From 829826c5c1164b0c27ab4b242672625433863b01 Mon Sep 17 00:00:00 2001 From: Bunny <1319900154@qq.com> Date: Thu, 7 Nov 2024 23:50:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=92=8C=E9=83=A8=E5=88=86=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/vms/server/mapper.vm | 2 +- .../src/main/resources/vms/server/serviceImpl.vm | 2 +- .../src/main/resources/vms/web/hook.vm | 5 +---- .../src/main/resources/vms/web/index.vm | 15 +++------------ service/src/main/resources/application-dev.yml | 12 +++--------- service/src/main/resources/application-prod.yml | 10 +++------- service/src/main/resources/application-test.yml | 11 ++++------- service/src/main/resources/application.yml | 10 ++++++++++ 8 files changed, 26 insertions(+), 41 deletions(-) diff --git a/common/common-generator/src/main/resources/vms/server/mapper.vm b/common/common-generator/src/main/resources/vms/server/mapper.vm index ee42075..5029be8 100644 --- a/common/common-generator/src/main/resources/vms/server/mapper.vm +++ b/common/common-generator/src/main/resources/vms/server/mapper.vm @@ -24,7 +24,7 @@ public interface ${originalName}Mapper extends BaseMapper<${originalName}> { * @param dto ${classTitle}查询表单 * @return ${classTitle}分页结果 */ - IPage<${originalName}> selectListByPage(@Param("page") Page<${originalName}> pageParams, @Param("dto") ${originalName}Dto dto); + IPage<${originalName}Vo> selectListByPage(@Param("page") Page<${originalName}> pageParams, @Param("dto") ${originalName}Dto dto); /** * 物理删除${classTitle} diff --git a/common/common-generator/src/main/resources/vms/server/serviceImpl.vm b/common/common-generator/src/main/resources/vms/server/serviceImpl.vm index a40384f..b418d2b 100644 --- a/common/common-generator/src/main/resources/vms/server/serviceImpl.vm +++ b/common/common-generator/src/main/resources/vms/server/serviceImpl.vm @@ -34,7 +34,7 @@ public class ${originalName}ServiceImpl extends ServiceImpl<${originalName}Mappe IPage<${originalName}Vo> page = baseMapper.selectListByPage(pageParams, dto); return PageResult.<${originalName}Vo>builder() - .list(voList) + .list(page.getRecords()) .pageNo(page.getCurrent()) .pageSize(page.getSize()) .total(page.getTotal()) diff --git a/common/common-generator/src/main/resources/vms/web/hook.vm b/common/common-generator/src/main/resources/vms/web/hook.vm index 2473584..f948132 100644 --- a/common/common-generator/src/main/resources/vms/web/hook.vm +++ b/common/common-generator/src/main/resources/vms/web/hook.vm @@ -51,10 +51,7 @@ export function onAdd() { }); } -/** - * * 更新${classTitle} - * @param row - */ +/** 更新${classTitle} */ export function onUpdate(row: any) { addDialog({ title: `$leftBrace$t("modify")}$leftBrace$t("${lowercaseName}")}`, diff --git a/common/common-generator/src/main/resources/vms/web/index.vm b/common/common-generator/src/main/resources/vms/web/index.vm index f449f2c..3a8e491 100644 --- a/common/common-generator/src/main/resources/vms/web/index.vm +++ b/common/common-generator/src/main/resources/vms/web/index.vm @@ -24,27 +24,18 @@ await onSearch(); }; - /** - * * 当分页发生变化 - * @param value - */ + /** 当分页发生变化 */ const onPageSizeChange = async (value: number) => { ${lowercaseName}Store.pagination.pageSize = value; await onSearch(); }; -/** - * * 选择多行 - * @param rows - */ +/** 选择多行 */ const onSelectionChange = (rows: Array) => { deleteIds.value = rows.map((row: any) => row.id); }; - /** - * 重置表单 - * @param formEl - */ +/** 重置表单 */ const resetForm = async (formEl: FormInstance | undefined) => { if (!formEl) return; formEl.resetFields(); diff --git a/service/src/main/resources/application-dev.yml b/service/src/main/resources/application-dev.yml index fd81c62..3eb0f46 100644 --- a/service/src/main/resources/application-dev.yml +++ b/service/src/main/resources/application-dev.yml @@ -12,15 +12,9 @@ logging: file: path: "/logs/${spring.application.name}" -mybatis-plus: - mapper-locations: classpath:mapper/*.xml - global-config: - db-config: - logic-delete-field: isDeleted - logic-delete-value: 1 # 逻辑已删除值 - logic-not-delete-value: 0 # 逻辑未删除值 - configuration: - map-underscore-to-camel-case: true +#mybatis-plus: +# configuration: +# map-underscore-to-camel-case: true # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志 bunny: diff --git a/service/src/main/resources/application-prod.yml b/service/src/main/resources/application-prod.yml index 8e24804..ae9f34f 100644 --- a/service/src/main/resources/application-prod.yml +++ b/service/src/main/resources/application-prod.yml @@ -1,13 +1,9 @@ server: port: 8000 -mybatis-plus: - mapper-locations: classpath:mapper/*.xml - global-config: - db-config: - logic-delete-field: isDeleted - configuration: - map-underscore-to-camel-case: true +#mybatis-plus: +# configuration: +# map-underscore-to-camel-case: true # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志 logging: diff --git a/service/src/main/resources/application-test.yml b/service/src/main/resources/application-test.yml index 1f7a052..9567fe5 100644 --- a/service/src/main/resources/application-test.yml +++ b/service/src/main/resources/application-test.yml @@ -1,13 +1,10 @@ server: port: 8000 -mybatis-plus: - mapper-locations: classpath:mapper/*.xml - global-config: - db-config: - logic-delete-field: isDeleted - configuration: - map-underscore-to-camel-case: true +#mybatis-plus: +# configuration: +# map-underscore-to-camel-case: true +# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志 logging: level: diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml index 1ac900c..b9e49c8 100644 --- a/service/src/main/resources/application.yml +++ b/service/src/main/resources/application.yml @@ -74,6 +74,16 @@ spring: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 +mybatis-plus: + mapper-locations: classpath:mapper/*.xml + global-config: + db-config: + logic-delete-field: isDeleted + logic-delete-value: 1 # 逻辑已删除值 + logic-not-delete-value: 0 # 逻辑未删除值 + configuration: + map-underscore-to-camel-case: true + management: endpoints: web: