18339543638 2 лет назад
Родитель
Сommit
8c7d6c1f49

+ 2 - 0
tr-modules/tr-module-gen/src/main/java/cn/tr/module/gen/modular/basic/service/impl/GenBasicServiceImpl.java

@@ -582,6 +582,8 @@ public class GenBasicServiceImpl extends ServiceImpl<GenBasicMapper, GenBasic> i
                             configItem.set("needTableId", false);
                         }
                     }
+                    configItem.set("queryWhether", genConfig.getQueryWhether().equalsIgnoreCase(GenYesNoEnum.Y.getValue()));
+                    configItem.set("queryType", genConfig.getQueryType());
                     // 列显示
                     configItem.set("whetherTable", genConfig.getWhetherTable().equalsIgnoreCase(GenYesNoEnum.Y.getValue()));
                     // 列省略

+ 47 - 97
tr-modules/tr-module-gen/src/main/resources/backend/Controller.java.btl

@@ -1,20 +1,11 @@
-/*
- * Copyright [2022] [https://www.xiaonuo.vip]
- *
- * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1.请不要删除和修改根目录下的LICENSE文件。
- * 2.请不要删除和修改Snowy源码头部的版权声明。
- * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
- * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
- * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
- * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
- */
-package ${packageName}.${moduleName}.modular.${busName}.controller;
+package ${packageName}.${moduleName}.${busName}.controller;
 
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.tr.core.validation.Insert;
+import cn.tr.core.validation.Update;
+import cn.tr.core.pojo.CommonResult;
+import lombok.AllArgsConstructor;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.validation.annotation.Validated;
@@ -22,20 +13,12 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
-import ${packageName}.common.annotation.CommonLog;
-import ${packageName}.common.pojo.CommonResult;
-import ${packageName}.common.pojo.CommonValidList;
-import ${packageName}.${moduleName}.modular.${busName}.entity.${className};
-import ${packageName}.${moduleName}.modular.${busName}.param.${className}AddParam;
-import ${packageName}.${moduleName}.modular.${busName}.param.${className}EditParam;
-import ${packageName}.${moduleName}.modular.${busName}.param.${className}IdParam;
-import ${packageName}.${moduleName}.modular.${busName}.param.${className}PageParam;
-import ${packageName}.${moduleName}.modular.${busName}.service.${className}Service;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
-
+import ${packageName}.${moduleName}.${busName}.dto.${className}DTO;
+import ${packageName}.${moduleName}.${busName}.service.${className}Service;
+import ${packageName}.${moduleName}.${busName}.dto.${className}QueryDTO;
+import java.util.*;
+import cn.tr.plugin.mybatis.base.BaseController;
+import org.springframework.web.bind.annotation.*;
 /**
  * ${functionName}控制器
  *
@@ -43,83 +26,50 @@ import javax.validation.constraints.NotEmpty;
  * @date ${genTime}
  */
 @Api(tags = "${functionName}控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
-@RestController
-@Validated
-public class ${className}Controller {
+@RestController("/${moduleName}/${busName}")
+@AllArgsConstructor
+public class ${className}Controller extends BaseController{
 
-    @Resource
-    private ${className}Service ${classNameFirstLower}Service;
+    private final ${className}Service ${classNameFirstLower}Service;
 
-    /**
-     * 获取${functionName}分页
-     *
-     * @author ${authorName}
-     * @date ${genTime}
-     */
-    @ApiOperationSupport(order = 1)
-    @ApiOperation("获取${functionName}分页")
-    @GetMapping("/${moduleName}/${busName}/page")
-    public CommonResult<Page<${className}>> page(${className}PageParam ${classNameFirstLower}PageParam) {
-        return CommonResult.data(${classNameFirstLower}Service.page(${classNameFirstLower}PageParam));
+    @ApiOperationSupport(author = "${authorName}",order = 1)
+    @ApiOperation(value="根据条件查询${functionName}",notes = "权限: ${moduleName}:${busName}:query")
+    @GetMapping("/query/page")
+    @SaCheckPermission("${moduleName}:${busName}:query")
+    public CommonResult<List<${className}DTO>> selectList(${className}QueryDTO query) {
+        startPage();
+        return CommonResult.success(${classNameFirstLower}Service.select${className}List(query));
     }
 
-    /**
-     * 添加${functionName}
-     *
-     * @author ${authorName}
-     * @date ${genTime}
-     */
-    @ApiOperationSupport(order = 2)
-    @ApiOperation("添加${functionName}")
-    @CommonLog("添加${functionName}")
-    @PostMapping("/${moduleName}/${busName}/add")
-    public CommonResult<String> add(@RequestBody @Valid ${className}AddParam ${classNameFirstLower}AddParam) {
-        ${classNameFirstLower}Service.add(${classNameFirstLower}AddParam);
-        return CommonResult.ok();
+    @ApiOperationSupport(author = "${authorName}",order = 2)
+    @ApiOperation(value = "根据id查询${functionName}",notes = "权限: ${moduleName}:${busName}:query")
+    @GetMapping("/detail/{id}")
+    @SaCheckPermission("${moduleName}:${busName}:query")
+    public CommonResult<${className}DTO> findById(@PathVariable("id") String id){
+        return CommonResult.success(${classNameFirstLower}Service.select${className}ById(id));
     }
 
-    /**
-     * 编辑${functionName}
-     *
-     * @author ${authorName}
-     * @date ${genTime}
-     */
-    @ApiOperationSupport(order = 3)
-    @ApiOperation("编辑${functionName}")
-    @CommonLog("编辑${functionName}")
-    @PostMapping("/${moduleName}/${busName}/edit")
-    public CommonResult<String> edit(@RequestBody @Valid ${className}EditParam ${classNameFirstLower}EditParam) {
-        ${classNameFirstLower}Service.edit(${classNameFirstLower}EditParam);
-        return CommonResult.ok();
+    @ApiOperationSupport(author = "${authorName}",order = 3)
+    @ApiOperation(value="添加${functionName}",notes = "权限: ${moduleName}:${busName}:add")
+    @PostMapping("/add")
+    @SaCheckPermission("${moduleName}:${busName}:add")
+    public CommonResult<Boolean> add(@RequestBody@Validated(Insert.class) ${className}DTO source) {
+        return CommonResult.success(${classNameFirstLower}Service.insert${className}(source));
     }
 
-    /**
-     * 删除${functionName}
-     *
-     * @author ${authorName}
-     * @date ${genTime}
-     */
-    @ApiOperationSupport(order = 4)
-    @ApiOperation("删除${functionName}")
-    @CommonLog("删除${functionName}")
-    @PostMapping("/${moduleName}/${busName}/delete")
-    public CommonResult<String> delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
-                                                   CommonValidList<${className}IdParam> ${classNameFirstLower}IdParamList) {
-        ${classNameFirstLower}Service.delete(${classNameFirstLower}IdParamList);
-        return CommonResult.ok();
+    @ApiOperationSupport(author = "${authorName}",order = 4)
+    @ApiOperation(value="编辑${functionName}",notes = "权限: ${moduleName}:${busName}:edit")
+    @PostMapping("/edit")
+    @SaCheckPermission("${moduleName}:${busName}:edit")
+    public CommonResult<Boolean> edit(@RequestBody@Validated(Update.class) ${className}DTO source) {
+        return CommonResult.success(${classNameFirstLower}Service.update${className}ById(source));
     }
 
-    /**
-     * 获取${functionName}详情
-     *
-     * @author ${authorName}
-     * @date ${genTime}
-     */
-    @ApiOperationSupport(order = 5)
-    @ApiOperation("获取${functionName}详情")
-    @GetMapping("/${moduleName}/${busName}/detail")
-    public CommonResult<${className}> detail(@Valid ${className}IdParam ${classNameFirstLower}IdParam) {
-        return CommonResult.data(${classNameFirstLower}Service.detail(${classNameFirstLower}IdParam));
+    @ApiOperationSupport(author = "${authorName}",order = 5)
+    @ApiOperation(value="删除${functionName}",notes = "权限: ${moduleName}:${busName}:del")
+    @PostMapping("/deleteByIds")
+    @SaCheckPermission("${moduleName}:${busName}:del")
+    public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
+        return CommonResult.success(${classNameFirstLower}Service.delete${className}ByIds(ids));
     }
 }

+ 3 - 4
tr-modules/tr-module-gen/src/main/resources/backend/DTO.java.btl

@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import javax.validation.constraints.NotNull;
+import java.util.*;
 /**
  * ${functionName}传输对象
  *
@@ -25,9 +26,7 @@ public class ${className}DTO extends BaseDTO  {
     <% var fieldNameCamelCase=configList[i].fieldNameCamelCase;
 if(fieldNameCamelCase== "createTime" || fieldNameCamelCase == "createBy" || fieldNameCamelCase == "updateTime" ||fieldNameCamelCase == "updateBy" || fieldNameCamelCase == "tenantId"  || fieldNameCamelCase== "deleted" ) {
         continue ;} %>
-    <% if(configList[i].needPage) { %>
-        continue;
-    <% } %>
+    <% if(!configList[i].needPage) { %>
     @ApiModelProperty(value = "${configList[i].fieldRemark}", position = ${i + 1})
     <% if(configList[i].needTableId ) { %>
     @NotNull(message = "主键不能为空",groups = {Update.class})
@@ -36,6 +35,6 @@ if(fieldNameCamelCase== "createTime" || fieldNameCamelCase == "createBy" || fiel
     <% } %>
     private ${configList[i].fieldJavaType} ${configList[i].fieldNameCamelCase};
 
-
+    <% } %>
     <% } %>
 }

+ 1 - 1
tr-modules/tr-module-gen/src/main/resources/backend/PO.java.btl

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
-
+import java.util.*;
 /**
  * ${functionName}实体
  *

+ 5 - 9
tr-modules/tr-module-gen/src/main/resources/backend/QueryDTO.java.btl

@@ -1,14 +1,11 @@
 package ${packageName}.${moduleName}.${busName}.dto;
 
-import cn.tr.plugin.mybatis.pojo.BaseDTO;
-import lombok.EqualsAndHashCode;
 import lombok.ToString;
-import cn.tr.core.validation.Insert;
-import cn.tr.core.validation.Update;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import javax.validation.constraints.NotNull;
+import cn.tr.plugin.mybatis.pojo.BetweenQuery;
+import java.util.*;
 /**
  * ${functionName}查询参数
  *
@@ -17,15 +14,14 @@ import javax.validation.constraints.NotNull;
  **/
 @Data
 @ApiModel("${functionName}")
-@EqualsAndHashCode(callSuper = true)
 @ToString
 public class ${className}QueryDTO  {
     private static final long serialVersionUID = 1L;
     <% for(var i = 0; i < configList.~size; i++) { %>
-    <% if(configList[i].queryWhether != null && configList[i].queryWhether ) { %>
-        @ApiModelProperty(value = "${configList[i].fieldRemark}", position = ${i + 1})
+    <% if(configList[i].queryWhether!=null && configList[i].queryWhether ) { %>
+    @ApiModelProperty(value = "${configList[i].fieldRemark}", position = ${i + 1})
+    private <% if(configList[i].queryType == "BETWEEN"){ %>BetweenQuery<${configList[i].fieldJavaType}><% }else { %>${configList[i].fieldJavaType}<%}%> ${configList[i].fieldNameCamelCase};
 
-        private <% if(configList[i].queryType == "BETWEEN"){ %>BetweenQuery<${configList[i].fieldJavaType}><% }else { %>${configList[i].fieldJavaType}<%}%> ${configList[i].fieldNameCamelCase};
     <% } %>
     <% } %>
 }

+ 7 - 8
tr-modules/tr-module-gen/src/main/resources/backend/Service.java.btl

@@ -1,9 +1,8 @@
 package ${packageName}.${moduleName}.${busName}.service;
 
-import ${packageName}.${moduleName}.${busName}.po.${className}PO;
 import ${packageName}.${moduleName}.${busName}.dto.${className}DTO;
 import ${packageName}.${moduleName}.${busName}.dto.${className}QueryDTO;
-import java.util.List;
+import java.util.*;
 
 /**
  * ${functionName}Service接口
@@ -14,7 +13,7 @@ import java.util.List;
 public interface ${className}Service{
 
     /**
-     * 根据条件查询{functionName}
+     * 根据条件查询${functionName}
      * @param    query 查询参数
      * @author   ${authorName}
      * @date     ${genTime}
@@ -22,12 +21,12 @@ public interface ${className}Service{
     List<${className}DTO> select${className}List(${className}QueryDTO query);
 
     /**
-     * 根据id查询{functionName}
+     * 根据id查询${functionName}
      * @param    id 主键id
      * @author   ${authorName}
      * @date     ${genTime}
      */
-    ${className}CommonDTO select${className}ById(String id);
+    ${className}DTO select${className}ById(String id);
 
     /**
      * 编辑${functionName}
@@ -38,15 +37,15 @@ public interface ${className}Service{
     boolean update${className}ById(${className}DTO source);
 
     /**
-     * 新增{functionName}
+     * 新增${functionName}
      * @param   source 新增实体类
      * @author ${authorName}
      * @date ${genTime}
      */
-    boolean insert${className}(${className}AddDTO source);
+    boolean insert${className}(${className}DTO source);
 
     /**
-     * 删除{functionName}详情
+     * 删除${functionName}详情
      * @param  ids 删除主键集合
      * @author ${authorName}
      * @date   ${genTime}

+ 26 - 22
tr-modules/tr-module-gen/src/main/resources/backend/ServiceImpl.java.btl

@@ -1,11 +1,9 @@
 package ${packageName}.${moduleName}.${busName}.service.impl;
 
-import ${packageName}.${moduleName}.mapper.${busName}.${className}Mapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.*;
 import cn.tr.plugin.mybatis.pojo.BetweenQuery;
 import org.springframework.transaction.annotation.Transactional;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -13,8 +11,9 @@ import ${packageName}.${moduleName}.${busName}.repository.${className}Repository
 import ${packageName}.${moduleName}.${busName}.po.${className}PO;
 import ${packageName}.${moduleName}.${busName}.dto.${className}DTO;
 import ${packageName}.${moduleName}.${busName}.dto.${className}QueryDTO;
-import java.util.List;
-
+import java.util.*;
+import ${packageName}.${moduleName}.${busName}.service.${className}Service;
+import ${packageName}.${moduleName}.mapper.${className}Mapper;
 /**
  * ${functionName}Service接口实现类
  *
@@ -28,44 +27,45 @@ public class ${className}ServiceImpl implements ${className}Service {
 
 
     /**
-    * 根据条件查询{functionName}
+    * 根据条件查询${functionName}
     * @param    query 查询参数
     * @author   ${authorName}
     * @date     ${genTime}
     */
+    @Override
     public List<${className}DTO> select${className}List(${className}QueryDTO query){
         return ${className}Mapper.INSTANCE.convertDtoList(
                 baseRepository.selectList(new LambdaQueryWrapper<${className}PO>()
                     <% for(var i = 0; i < configList.~size; i++) {  %>
                     <% if(configList[i].queryWhether != null && configList[i].queryWhether ) {  %>
                         <% if(configList[i].queryType == "like"){  %>
-                        .like(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper()),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,
-query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
+                        .like(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},
+query.get${configList[i].fieldNameCamelCaseFirstUpper}())
                         <% }  %>
                         <% if(configList[i].queryType == "notLike"){  %>
-                        .notLike(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper()),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
+                        .notLike(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},query.get${configList[i].fieldNameCamelCaseFirstUpper}())
                         <% }  %>
                         <% if(configList[i].queryType == "eq"){  %>
-                        .eq(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper()),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
+                        .eq(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},query.get${configList[i].fieldNameCamelCaseFirstUpper}())
                         <% }  %>
                         <% if(configList[i].queryType == "ne"){  %>
-                        .ne(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper()),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
+                        .ne(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},query.get${configList[i].fieldNameCamelCaseFirstUpper}())
                         <% }  %>
                         <% if(configList[i].queryType == "gt"){  %>
-                        .gt(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper()),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
+                        .gt(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},query.get${configList[i].fieldNameCamelCaseFirstUpper}())
                         <% }  %>
                         <% if(configList[i].queryType == "ge"){  %>
-                        .ge(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper()),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
+                        .ge(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},query.get${configList[i].fieldNameCamelCaseFirstUpper}())
                         <% }  %>
                         <% if(configList[i].queryType == "lt"){  %>
-                        .lt(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper()),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
+                        .lt(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},query.get${configList[i].fieldNameCamelCaseFirstUpper}())
                         <% }  %>
                         <% if(configList[i].queryType == "le"){  %>
-                        .le(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper()),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
+                        .le(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},query.get${configList[i].fieldNameCamelCaseFirstUpper}())
                         <% }  %>
                         <% if(configList[i].queryType == "BETWEEN"){  %>
-                        .le(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())&&Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper().getMax(),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,query.get<%%>configList[i].fieldNameCamelCaseFirstUpper().getMax()))
-                        .ge(Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())&&Objects.nonNull(query.get<%%>configList[i].fieldNameCamelCaseFirstUpper().getMin(),${className}PO::get<%%>configList[i].fieldNameCamelCaseFirstUpper,query.get<%%>configList[i].fieldNameCamelCaseFirstUpper().getMin()))
+                        .le(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}())&&Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}().getMax()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},query.get${configList[i].fieldNameCamelCaseFirstUpper}().getMax())
+                        .ge(Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}())&&Objects.nonNull(query.get${configList[i].fieldNameCamelCaseFirstUpper}().getMin()),${className}PO::get${configList[i].fieldNameCamelCaseFirstUpper},query.get${configList[i].fieldNameCamelCaseFirstUpper}().getMin())
                         <% }  %>
                     <% }  %>
                     <% }  %>
@@ -74,12 +74,13 @@ query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
     };
 
     /**
-    * 根据id查询{functionName}
+    * 根据id查询${functionName}
     * @param    id 主键id
     * @author   ${authorName}
     * @date     ${genTime}
     */
-    public ${className}CommonDTO select${className}ById(String id){
+    @Override
+    public ${className}DTO select${className}ById(String id){
         return ${className}Mapper.INSTANCE.convertDto(baseRepository.selectById(id));
     };
 
@@ -90,27 +91,30 @@ query.get<%%>configList[i].fieldNameCamelCaseFirstUpper())
     * @date    ${genTime}
     */
     @Transactional(rollbackFor = Exception.class)
+    @Override
     public boolean update${className}ById(${className}DTO source){
             return baseRepository.updateById(${className}Mapper.INSTANCE.convertPO(source))!=0;
     };
 
     /**
-    * 新增{functionName}
+    * 新增${functionName}
     * @param   source 新增实体类
     * @author ${authorName}
     * @date ${genTime}
     */
+    @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean insert${className}(${className}AddDTO source){
+    public boolean insert${className}(${className}DTO source){
         return baseRepository.insert(${className}Mapper.INSTANCE.convertPO(source))!=0;
     };
 
     /**
-    * 删除{functionName}详情
+    * 删除${functionName}详情
     * @param  ids 删除主键集合
     * @author ${authorName}
     * @date   ${genTime}
     */
+    @Override
     @Transactional(rollbackFor = Exception.class)
     public int delete${className}ByIds(Collection<String> ids){
         return baseRepository.deleteBatchIds(ids);

+ 6 - 2
tr-test/pom.xml

@@ -33,9 +33,13 @@
             <artifactId>tr-spring-boot-starter-plugin-websocket</artifactId>
         </dependency>
 
+        <!--<dependency>-->
+            <!--<groupId>cn.tr</groupId>-->
+            <!--<artifactId>tr-spring-boot-starter-plugin-eventbus</artifactId>-->
+        <!--</dependency>-->
         <dependency>
-            <groupId>cn.tr</groupId>
-            <artifactId>tr-spring-boot-starter-plugin-eventbus</artifactId>
+            <groupId>org.redisson</groupId>
+            <artifactId>redisson-spring-boot-starter</artifactId>
         </dependency>
 
         <dependency>