diff --git a/jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/entity/SendCouponEntity.java b/jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/entity/SendCouponEntity.java new file mode 100644 index 0000000..08454a6 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/entity/SendCouponEntity.java @@ -0,0 +1,4 @@ +package org.jeecg.modules.applet.entity; + +public class SendCouponEntity { +} diff --git a/jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCoupon/vue3/V20250911_1__menu_insert_AppletCoupon.sql b/jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCoupon/vue3/V20250911_1__menu_insert_AppletCoupon.sql deleted file mode 100644 index 77fead4..0000000 --- a/jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCoupon/vue3/V20250911_1__menu_insert_AppletCoupon.sql +++ /dev/null @@ -1,26 +0,0 @@ --- 注意:该页面对应的前台目录为views/appletCoupon文件夹下 --- 如果你想更改到其他目录,请修改sql中component字段对应的值 - - -INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) -VALUES ('2025091103333940150', NULL, '优惠卷', '/appletCoupon/appletCouponList', 'appletCoupon/AppletCouponList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-09-11 15:33:15', NULL, NULL, 0); - --- 权限控制sql --- 新增 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091103333940151', '2025091103333940150', '添加优惠卷', NULL, NULL, 0, NULL, NULL, 2, 'appletCoupon:applet_coupon:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-11 15:33:15', NULL, NULL, 0, 0, '1', 0); --- 编辑 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091103333940152', '2025091103333940150', '编辑优惠卷', NULL, NULL, 0, NULL, NULL, 2, 'appletCoupon:applet_coupon:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-11 15:33:15', NULL, NULL, 0, 0, '1', 0); --- 删除 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091103333940153', '2025091103333940150', '删除优惠卷', NULL, NULL, 0, NULL, NULL, 2, 'appletCoupon:applet_coupon:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-11 15:33:15', NULL, NULL, 0, 0, '1', 0); --- 批量删除 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091103333940154', '2025091103333940150', '批量删除优惠卷', NULL, NULL, 0, NULL, NULL, 2, 'appletCoupon:applet_coupon:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-11 15:33:15', NULL, NULL, 0, 0, '1', 0); --- 导出excel -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091103333940155', '2025091103333940150', '导出excel_优惠卷', NULL, NULL, 0, NULL, NULL, 2, 'appletCoupon:applet_coupon:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-11 15:33:15', NULL, NULL, 0, 0, '1', 0); --- 导入excel -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091103333940156', '2025091103333940150', '导入excel_优惠卷', NULL, NULL, 0, NULL, NULL, 2, 'appletCoupon:applet_coupon:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-11 15:33:15', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCourse/vue3/V20250912_1__menu_insert_AppletCourse.sql b/jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCourse/vue3/V20250912_1__menu_insert_AppletCourse.sql deleted file mode 100644 index 45fff22..0000000 --- a/jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCourse/vue3/V20250912_1__menu_insert_AppletCourse.sql +++ /dev/null @@ -1,26 +0,0 @@ --- 注意:该页面对应的前台目录为views/appletCourse文件夹下 --- 如果你想更改到其他目录,请修改sql中component字段对应的值 - - -INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) -VALUES ('2025091201059810040', NULL, '课程', '/appletCourse/appletCourseList', 'appletCourse/AppletCourseList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-09-12 01:05:04', NULL, NULL, 0); - --- 权限控制sql --- 新增 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091201059810041', '2025091201059810040', '添加课程', NULL, NULL, 0, NULL, NULL, 2, 'appletCourse:applet_course:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-12 01:05:04', NULL, NULL, 0, 0, '1', 0); --- 编辑 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091201059820042', '2025091201059810040', '编辑课程', NULL, NULL, 0, NULL, NULL, 2, 'appletCourse:applet_course:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-12 01:05:04', NULL, NULL, 0, 0, '1', 0); --- 删除 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091201059820043', '2025091201059810040', '删除课程', NULL, NULL, 0, NULL, NULL, 2, 'appletCourse:applet_course:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-12 01:05:04', NULL, NULL, 0, 0, '1', 0); --- 批量删除 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091201059820044', '2025091201059810040', '批量删除课程', NULL, NULL, 0, NULL, NULL, 2, 'appletCourse:applet_course:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-12 01:05:04', NULL, NULL, 0, 0, '1', 0); --- 导出excel -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091201059820045', '2025091201059810040', '导出excel_课程', NULL, NULL, 0, NULL, NULL, 2, 'appletCourse:applet_course:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-12 01:05:04', NULL, NULL, 0, 0, '1', 0); --- 导入excel -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2025091201059820046', '2025091201059810040', '导入excel_课程', NULL, NULL, 0, NULL, NULL, 2, 'appletCourse:applet_course:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-12 01:05:04', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/applet/coupon/AppletCoupon.api.ts b/jeecgboot-vue3/src/views/applet/coupon/AppletCoupon.api.ts new file mode 100644 index 0000000..1a55983 --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/coupon/AppletCoupon.api.ts @@ -0,0 +1,64 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/appletCoupon/appletCoupon/list', + save='/appletCoupon/appletCoupon/add', + edit='/appletCoupon/appletCoupon/edit', + deleteOne = '/appletCoupon/appletCoupon/delete', + deleteBatch = '/appletCoupon/appletCoupon/deleteBatch', + importExcel = '/appletCoupon/appletCoupon/importExcel', + exportXls = '/appletCoupon/appletCoupon/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecgboot-vue3/src/views/applet/coupon/AppletCoupon.data.ts b/jeecgboot-vue3/src/views/applet/coupon/AppletCoupon.data.ts new file mode 100644 index 0000000..62c50bb --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/coupon/AppletCoupon.data.ts @@ -0,0 +1,93 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '优惠券名称', + align:"center", + dataIndex: 'name' + }, + { + title: '面额', + align:"center", + dataIndex: 'money' + }, + { + title: '有效期', + align:"center", + dataIndex: 'endTime' + }, + { + title: '发放数量', + align:"center", + dataIndex: 'count' + }, + { + title: '已使用数量', + align:"center", + dataIndex: 'quantityused' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '优惠券名称', + field: 'name', + component: 'Input', + }, + { + label: '面额', + field: 'money', + component: 'InputNumber', + }, + { + label: '有效期', + field: 'endTime', + component: 'DatePicker', + componentProps: { + showTime: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss' + }, + }, + { + label: '发放数量', + field: 'count', + component: 'Input', + }, + { + label: '已使用数量', + field: 'quantityused', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + name: {title: '优惠券名称',order: 0,view: 'text', type: 'string',}, + money: {title: '面额',order: 1,view: 'number', type: 'number',}, + endTime: {title: '有效期',order: 2,view: 'datetime', type: 'string',}, + count: {title: '发放数量',order: 3,view: 'text', type: 'string',}, + quantityused: {title: '已使用数量',order: 4,view: 'text', type: 'string',}, +}; + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[]{ + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/applet/coupon/AppletCouponList.vue b/jeecgboot-vue3/src/views/applet/coupon/AppletCouponList.vue new file mode 100644 index 0000000..18a4096 --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/coupon/AppletCouponList.vue @@ -0,0 +1,206 @@ + + + + + \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/applet/coupon/components/AppletCouponForm.vue b/jeecgboot-vue3/src/views/applet/coupon/components/AppletCouponForm.vue new file mode 100644 index 0000000..3334f8c --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/coupon/components/AppletCouponForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/applet/coupon/components/AppletCouponModal.vue b/jeecgboot-vue3/src/views/applet/coupon/components/AppletCouponModal.vue new file mode 100644 index 0000000..b8a10cc --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/coupon/components/AppletCouponModal.vue @@ -0,0 +1,99 @@ + + + + + \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/applet/course/AppletCourse.api.ts b/jeecgboot-vue3/src/views/applet/course/AppletCourse.api.ts new file mode 100644 index 0000000..ca81a53 --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/course/AppletCourse.api.ts @@ -0,0 +1,64 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/appletCourse/appletCourse/list', + save='/appletCourse/appletCourse/add', + edit='/appletCourse/appletCourse/edit', + deleteOne = '/appletCourse/appletCourse/delete', + deleteBatch = '/appletCourse/appletCourse/deleteBatch', + importExcel = '/appletCourse/appletCourse/importExcel', + exportXls = '/appletCourse/appletCourse/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecgboot-vue3/src/views/applet/course/AppletCourse.data.ts b/jeecgboot-vue3/src/views/applet/course/AppletCourse.data.ts new file mode 100644 index 0000000..2d7f7f1 --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/course/AppletCourse.data.ts @@ -0,0 +1,98 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '书籍', + align:"center", + dataIndex: 'bookId_dictText' + }, + { + title: '中文课程名', + align:"center", + dataIndex: 'chinese' + }, + { + title: '英文课程名', + align:"center", + dataIndex: 'english' + }, + { + title: '上架', + align:"center", + dataIndex: 'status', + customRender:({text}) => { + return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]) + }, + }, + { + title: '排序', + align:"center", + sorter: true, + dataIndex: 'sort' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '书籍', + field: 'bookId', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"applet_books,books_name,id" + }, + }, + { + label: '中文课程名', + field: 'chinese', + component: 'Input', + }, + { + label: '英文课程名', + field: 'english', + component: 'Input', + }, + { + label: '上架', + field: 'status', + component: 'JSwitch', + componentProps:{ + }, + }, + { + label: '排序', + field: 'sort', + component: 'InputNumber', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + bookId: {title: '书籍',order: 0,view: 'list', type: 'string',dictTable: "applet_books", dictCode: 'id', dictText: 'books_name',}, + chinese: {title: '中文课程名',order: 1,view: 'text', type: 'string',}, + english: {title: '英文课程名',order: 2,view: 'text', type: 'string',}, + status: {title: '上架',order: 3,view: 'switch', type: 'string',}, + sort: {title: '排序',order: 4,view: 'number', type: 'number',}, +}; + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[]{ + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/applet/course/AppletCourseList.vue b/jeecgboot-vue3/src/views/applet/course/AppletCourseList.vue new file mode 100644 index 0000000..1ed5099 --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/course/AppletCourseList.vue @@ -0,0 +1,206 @@ + + + + + \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/applet/course/components/AppletCourseForm.vue b/jeecgboot-vue3/src/views/applet/course/components/AppletCourseForm.vue new file mode 100644 index 0000000..3f8afb4 --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/course/components/AppletCourseForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/applet/course/components/AppletCourseModal.vue b/jeecgboot-vue3/src/views/applet/course/components/AppletCourseModal.vue new file mode 100644 index 0000000..381e061 --- /dev/null +++ b/jeecgboot-vue3/src/views/applet/course/components/AppletCourseModal.vue @@ -0,0 +1,99 @@ + + + + + \ No newline at end of file