mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 08:25:07 +08:00
增加 service 模板
This commit is contained in:
@ -2,6 +2,13 @@ spring:
|
||||
application:
|
||||
name: dashboard
|
||||
|
||||
# 数据源配置项 TODO 多数据源;TODO 监控配置
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.1:33061/ruoyi-vue-pro?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: 123456
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
redis:
|
||||
host: 127.0.0.1 # 地址
|
||||
|
62
src/main/resources/codegen/service/service.vm
Normal file
62
src/main/resources/codegen/service/service.vm
Normal file
@ -0,0 +1,62 @@
|
||||
package ${basePackage}.${table.moduleName}.service.${table.businessName};
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import ${basePackage}.${table.moduleName}.controller.${table.businessName}.vo.*;
|
||||
import ${basePackage}.${table.moduleName}.dal.mysql.dataobject.${table.businessName}.${table.className}DO;
|
||||
import ${PageResultClassName};
|
||||
|
||||
/**
|
||||
* ${table.classComment} Service 接口
|
||||
*
|
||||
* @author ${table.author}
|
||||
*/
|
||||
public interface ${table.className}Service {
|
||||
|
||||
/**
|
||||
* 创建${table.classComment}
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return ${class.description}
|
||||
*/
|
||||
${primaryColumn.javaType} create${simpleClassName}(@Valid ${table.className}CreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新${table.classComment}
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void update${simpleClassName}(@Valid ${table.className}UpdateReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除${table.classComment}
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void delete${simpleClassName}(${primaryColumn.javaType} id);
|
||||
|
||||
/**
|
||||
* 获得${table.classComment}
|
||||
*
|
||||
* @param id 编号
|
||||
* @return ${class.description}
|
||||
*/
|
||||
${table.className}DO get${simpleClassName}(${primaryColumn.javaType} id);
|
||||
|
||||
/**
|
||||
* 获得${table.classComment}列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return ${class.classComment}列表
|
||||
*/
|
||||
List<${table.className}DO> get${simpleClassName}List(Collection<${primaryColumn.javaType}> ids);
|
||||
|
||||
/**
|
||||
* 获得${table.classComment}分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return ${class.classComment}分页
|
||||
*/
|
||||
PageResult<${table.className}DO> get${simpleClassName}Page(${table.className}PageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
spring:
|
||||
# 数据源配置项 TODO 多数据源;TODO 监控配置
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.1:33061/ruoyi-vue-pro?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: 123456
|
Reference in New Issue
Block a user