diff --git a/bonus-modules/bonus-bmw/pom.xml b/bonus-modules/bonus-bmw/pom.xml new file mode 100644 index 0000000..59fa8c2 --- /dev/null +++ b/bonus-modules/bonus-bmw/pom.xml @@ -0,0 +1,128 @@ + + + 4.0.0 + + com.bonus + bonus-modules + 24.12.0-SNAPSHOT + + + bonus-bmw + + + 8 + 8 + UTF-8 + + + + + + + com.github.ulisesbocchio + jasypt-spring-boot-starter + ${jasypt-spring-boot-starter.version} + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + + io.springfox + springfox-swagger-ui + ${swagger.fox.version} + + + + + com.mysql + mysql-connector-j + + + + + com.bonus + bonus-common-datasource + + + + + com.bonus + bonus-common-datascope + + + + + com.bonus + bonus-common-log + + + + + + com.bonus + bonus-common-swagger + + + + com.google.guava + guava + 30.0-jre + compile + + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework + spring-context + 6.0.18 + + + org.springframework + spring-context + + + org.springframework.boot + spring-boot-starter-websocket + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + \ No newline at end of file diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/BonusBmwApplication.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/BonusBmwApplication.java new file mode 100644 index 0000000..4de5d97 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/BonusBmwApplication.java @@ -0,0 +1,33 @@ +package com.bonus.bmw; + +import com.bonus.common.security.annotation.EnableCustomConfig; +import com.bonus.common.security.annotation.EnableRyFeignClients; +import com.bonus.common.swagger.annotation.EnableCustomSwagger2; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * 系统模块 + * + * @author bonus + */ +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableRyFeignClients +@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) +@EnableScheduling +public class BonusBmwApplication +{ + public static void main(String[] args) { + SpringApplication.run(BonusBmwApplication.class, args); + System.err.println("博诺思后端管理模块启动成功\n" + + " ____ _ _ _____ \n" + + " | _ \\ | \\ | | / ____|\n" + + " | |_) || \\| || (___ \n" + + " | _ < | . ` | \\___ \\ \n" + + " | |_) || |\\ | ____) |\n" + + " |____/ |_| \\_||_____/ \n"); + } +} diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/config/MyBatisConfig.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/config/MyBatisConfig.java new file mode 100644 index 0000000..ca1fe71 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/config/MyBatisConfig.java @@ -0,0 +1,20 @@ +package com.bonus.bmw.config; + +import com.bonus.bmw.interceptor.DataEnDecryptInterceptor; +import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * mybatis 配置类 + * @author weiweiwang + */ +@Configuration +public class MyBatisConfig { + @Bean + public ConfigurationCustomizer configurationCustomizer() { + return configuration -> { + configuration.addInterceptor(new DataEnDecryptInterceptor()); + }; + } +} \ No newline at end of file diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/config/PasswordPolicyConfig.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/config/PasswordPolicyConfig.java new file mode 100644 index 0000000..27b7483 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/config/PasswordPolicyConfig.java @@ -0,0 +1,57 @@ +package com.bonus.bmw.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 该类用于从 `application.yml` 中加载密码策略的配置项。 + * 使用 @ConfigurationProperties 注解,前缀为 password-policy。 + * @author bonus + */ +@Component +@ConfigurationProperties(prefix = "password-policy") +@Data +public class PasswordPolicyConfig { + + // 密码的最小长度 + private int minLength; + + // 密码的最大长度 + private int maxLength; + + // 是否需要包含大写字母 + private boolean requireUpperCase; + + // 是否需要包含小写字母 + private boolean requireLowerCase; + + // 是否需要包含数字 + private boolean requireDigit; + + // 是否需要包含特殊字符 + private boolean requireSpecialChar; + + // 常见的弱密码列表,禁止使用这些密码 + private List weakPasswords; + + // 密码历史记录限制 + private int passwordHistoryLimit; + + // 是否限制连续相同字符 + private boolean restrictConsecutiveChars; + + // 最大允许的连续字符数 + private int maxConsecutiveChars; + + // 密码中是否不能包含用户名 + private boolean excludeUsernameInPassword; + + // 是否在首次登录时强制修改密码 + private boolean forcePasswordChangeOnFirstLogin; + + // 定期修改密码 + private int regularlyChangePassword; +} diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/BmWorkerWageCardController.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/BmWorkerWageCardController.java new file mode 100644 index 0000000..a658be6 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/BmWorkerWageCardController.java @@ -0,0 +1,81 @@ +package com.bonus.bmw.controller; + +import com.bonus.bmw.domain.vo.BmWorkerWageCard; +import com.bonus.bmw.service.BmWorkerWageCardService; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.web.page.TableDataInfo; +import com.bonus.common.log.annotation.SysLog; +import com.bonus.common.log.enums.OperaType; +import com.bonus.common.security.annotation.InnerAuth; +import com.bonus.common.security.annotation.RequiresPermissions; +import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.List; + +/** +* 人员工资卡信息表(bm_worker_wage_card)表控制层 +* +* @author fly +*/ +@RestController +@RequestMapping("/workerWageCard") +public class BmWorkerWageCardController extends BaseController { + /** + * 服务对象 + */ + @Autowired + private BmWorkerWageCardService service; + + + /** + * 查询列表 + * @param o + * @return + * , requiresPermissions = @RequiresPermissions("system:wageCard:list") + */ + @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth(isUser = false)) + @GetMapping("/list") + @SysLog(title = "工资卡管理", businessType = OperaType.QUERY, logType = 0, module = "施工人员->红绿灯管理->工资卡管理", details = "查询工资卡列表") + public TableDataInfo list(BmWorkerWageCard o) { + try { + startPage(); + List list = service.selectWageCardList(o); + return getDataTable(list); + } catch (Exception e) { + logger.error(e.toString(), e); + } + return getDataTableError(new ArrayList<>()); + } + + @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("system:wageCard:edit")) + @PostMapping("/edit") + @SysLog(title = "查询工资卡列表", businessType = OperaType.UPDATE, logType = 0, module = "施工人员->红绿灯管理->工资卡管理", details = "修改工资卡") + public AjaxResult edit(@Validated @RequestBody BmWorkerWageCard o) { + try { + return toAjax(service.updateByPrimaryKey(o)); + } catch (Exception e) { + logger.error(e.toString(), e); + } + return error("系统异常,请联系管理员"); + } + + + @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("system:user:remove")) + @PostMapping("/delete/{id}") + @SysLog(title = "工资卡管理", businessType = OperaType.DELETE, logType = 0, module = "施工人员->红绿灯管理->工资卡管理", details = "删除工资卡") + public AjaxResult remove(@PathVariable("id") Integer id) { + try { + return toAjax(service.deleteByPrimaryKey(id)); + } catch (Exception e) { + logger.error(e.toString(), e); + } + return error("系统异常,请联系管理员"); + } + + +} diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/BmWorkerWageCard.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/BmWorkerWageCard.java new file mode 100644 index 0000000..ef4b330 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/BmWorkerWageCard.java @@ -0,0 +1,64 @@ +package com.bonus.bmw.domain.vo; + +import lombok.Data; + +/** + * 人员工资卡信息表 + */ +@Data +public class BmWorkerWageCard { + /** + * 编号 + */ + private Integer id; + + /** + * 施工人员id + */ + private Integer workerId; + + /** + * 银行卡号 + */ + private String bankCardCode; + + /** + * 银行名称 + */ + private String bankName; + + /** + * 银行支行名称 + */ + private String bankBranchName; + + /** + * 创建人 + */ + private String createUser; + + /** + * 修改人 + */ + private String updateUser; + + /** + * 更新时间 + */ + private String updateTime; + + /** + * 名字 + */ + private String name; + + /** + * 身份证 + */ + private String idNumber; + + /** + * 手机号 + */ + private String phone; +} \ No newline at end of file diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/interceptor/DataEnDecryptInterceptor.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/interceptor/DataEnDecryptInterceptor.java new file mode 100644 index 0000000..8e8ae1c --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/interceptor/DataEnDecryptInterceptor.java @@ -0,0 +1,182 @@ +package com.bonus.bmw.interceptor; + +import com.bonus.common.core.utils.encryption.Sm4Utils; +import com.bonus.system.api.domain.SysDept; +import com.bonus.system.api.domain.SysUser; +import org.apache.ibatis.executor.parameter.ParameterHandler; +import org.apache.ibatis.executor.resultset.ResultSetHandler; +import org.apache.ibatis.mapping.MappedStatement; +import org.apache.ibatis.plugin.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.lang.reflect.Field; +import java.sql.PreparedStatement; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +/** + * mybatis 拦截器 + * 对用户和部门实体里的邮箱和电话号码进行加密存库,并从库里查询后解密 + * @author weiweiwang + */ +@Intercepts({ + @Signature(type = ParameterHandler.class, method = "setParameters", args = {PreparedStatement.class}), + @Signature(type = ResultSetHandler.class, method = "handleResultSets", args = {Statement.class}) +}) +public class DataEnDecryptInterceptor implements Interceptor { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + final static String USER_MAPPER_ID = "com.bonus.system.mapper.SysUserMapper"; + final static String DEPT_MAPPER_ID = "com.bonus.system.mapper.SysDeptMapper"; + @Override + public Object intercept(Invocation invocation) throws Throwable { + try { + if (invocation.getTarget() instanceof ParameterHandler) { + // Handle encryption before setting parameters + ParameterHandler parameterHandler = (ParameterHandler) invocation.getTarget(); + MappedStatement mappedStatement = getMappedStatement(parameterHandler); + PreparedStatement preparedStatement = (PreparedStatement) invocation.getArgs()[0]; + Object parameterObject = parameterHandler.getParameterObject(); + String sqlId = mappedStatement.getId(); + if (sqlId.contains(USER_MAPPER_ID)){ + encryptUserObject(parameterObject); + } else if (sqlId.contains(DEPT_MAPPER_ID)){ + encryptDeptObject(parameterObject); + } + return invocation.proceed(); + + } else if (invocation.getTarget() instanceof ResultSetHandler) { + // Handle decryption after result set is obtained + ResultSetHandler resultSetHandler = (ResultSetHandler) invocation.getTarget(); + + MappedStatement mappedStatement = getMappedStatement(resultSetHandler); + Object result = invocation.proceed(); + + String sqlId = mappedStatement.getId(); + if (sqlId.contains(USER_MAPPER_ID)) + { + decryUserObject(result); + } else if (sqlId.contains(DEPT_MAPPER_ID)){ + decryDeptObject(result); + } + return result; + } + + return invocation.proceed(); + } + catch (Exception e){ + logger.error("mybatis对敏感数据加解密拦截器异常报错,{}",e.getMessage ()); + return invocation.proceed(); + } + } + + @Override + public Object plugin(Object target) { + return Plugin.wrap(target, this); + } + + @Override + public void setProperties(Properties properties) { + } + + private void encryptUserObject(Object parameterObject){ + if (parameterObject instanceof SysUser) { + SysUser user = (SysUser) parameterObject; + // 加密敏感字段 + if (user.getEmail() != null) { + user.setEmail(Sm4Utils.encrypt(user.getEmail())); + } + if (user.getPhonenumber() != null) { + user.setPhonenumber(Sm4Utils.encrypt(user.getPhonenumber())); + } + } + } + + private void encryptDeptObject(Object parameterObject) { + if (parameterObject instanceof SysDept) { + SysDept dept = (SysDept) parameterObject; + // 加密敏感字段 + if (dept.getEmail() != null) { + dept.setEmail(Sm4Utils.encrypt(dept.getEmail())); + } + if (dept.getPhone() != null) { + dept.setPhone(Sm4Utils.encrypt(dept.getPhone())); + } + } + + } + + private void decryUserObject(Object result){ + try { + if (result instanceof ArrayList) { + List list = (List) result; + for (Object obj : list) { + if (obj instanceof SysUser) { + decryptUser ((SysUser) obj); + } + } + } else if (result instanceof SysUser) { + decryptUser ((SysUser) result); + } + } catch (Exception ingore) { + } + } + private void decryptUser(SysUser user) { + if (user.getEmail() != null) { + user.setEmail(Sm4Utils.decrypt(user.getEmail())); + } + if (user.getPhonenumber() != null) { + user.setPhonenumber(Sm4Utils.decrypt(user.getPhonenumber())); + } + } + + private void decryDeptObject(Object result){ + try { + if (result instanceof ArrayList) { + List list = (List) result; + for (Object obj : list) { + if (obj instanceof SysDept) { + decryptDept ((SysDept) obj); + } + } + } else if (result instanceof SysDept) { + decryptDept ((SysDept) result); + } + } catch (Exception ingore) { + } + } + + private void decryptDept(SysDept dept) { + if (dept.getEmail() != null) { + dept.setEmail(Sm4Utils.decrypt(dept.getEmail())); + } + if (dept.getPhone() != null) { + dept.setPhone(Sm4Utils.decrypt(dept.getPhone())); + } + } + + private MappedStatement getMappedStatement(ParameterHandler parameterHandler) { + try { + // Use reflection to access the private field `mappedStatement` (or appropriate field) + Field mappedStatementField = parameterHandler.getClass().getDeclaredField("mappedStatement"); + mappedStatementField.setAccessible(true); + return (MappedStatement) mappedStatementField.get(parameterHandler); + } catch (Exception e) { + throw new RuntimeException("Failed to get MappedStatement from ParameterHandler", e); + } + } + + + private MappedStatement getMappedStatement(ResultSetHandler resultSetHandler) { + try { + // Use reflection to access the private field `mappedStatement` (or appropriate field) + Field mappedStatementField = resultSetHandler.getClass().getDeclaredField("mappedStatement"); + mappedStatementField.setAccessible(true); + return (MappedStatement) mappedStatementField.get(resultSetHandler); + } catch (Exception e) { + throw new RuntimeException("Failed to get MappedStatement from ResultSetHandler", e); + } + } +} \ No newline at end of file diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/mapper/BmWorkerWageCardMapper.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/mapper/BmWorkerWageCardMapper.java new file mode 100644 index 0000000..2c0e583 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/mapper/BmWorkerWageCardMapper.java @@ -0,0 +1,33 @@ +package com.bonus.bmw.mapper; + +import com.bonus.bmw.domain.vo.BmWorkerWageCard; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface BmWorkerWageCardMapper { + /** + * delete by primary key + * + * @param id primaryKey + * @return deleteCount + */ + int deleteByPrimaryKey(Integer id); + + /** + * insert record to table + * + * @param record the record + * @return insert count + */ + int insert(BmWorkerWageCard record); + + /** + * 查询列表 + * + * @param o + * @return + */ + List selectWageCardList(BmWorkerWageCard o); +} \ No newline at end of file diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/BmWorkerWageCardService.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/BmWorkerWageCardService.java new file mode 100644 index 0000000..a24415b --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/BmWorkerWageCardService.java @@ -0,0 +1,30 @@ +package com.bonus.bmw.service; + +import com.bonus.bmw.domain.vo.BmWorkerWageCard; + +import java.util.List; + +public interface BmWorkerWageCardService { + + /** + * 修改工资卡 + * @param record + * @return + */ + int updateByPrimaryKey(BmWorkerWageCard record); + + /** + * 查询工资卡列表 + * @param o + * @return + */ + List selectWageCardList(BmWorkerWageCard o); + + /** + * 删除工资卡 + * @param id + * @return + */ + int deleteByPrimaryKey(Integer id); +} + diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/BmWorkerWageCardServiceImpl.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/BmWorkerWageCardServiceImpl.java new file mode 100644 index 0000000..58785b4 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/BmWorkerWageCardServiceImpl.java @@ -0,0 +1,59 @@ +package com.bonus.bmw.service.impl; + +import com.bonus.bmw.domain.vo.BmWorkerWageCard; +import com.bonus.bmw.mapper.BmWorkerWageCardMapper; +import com.bonus.bmw.service.BmWorkerWageCardService; +import com.bonus.common.security.utils.SecurityUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class BmWorkerWageCardServiceImpl implements BmWorkerWageCardService { + + private static final Logger log = LoggerFactory.getLogger(BmWorkerWageCardServiceImpl.class); + + @Resource + private BmWorkerWageCardMapper mapper; + + @Override + public int updateByPrimaryKey(BmWorkerWageCard record) { + //存在则删除后新增,不存在则新增 + if(record.getId() != null){ + deleteByPrimaryKey(record.getId()); + } + record.setCreateUser(SecurityUtils.getUsername()); + //添加到文件库和minio上 TODO + return mapper.insert(record); + } + + /** + * 查询工资卡列表 + * + * @param o + * @return + */ + @Override + public List selectWageCardList(BmWorkerWageCard o) { + return mapper.selectWageCardList(o); + } + + /** + * 删除工资卡 + * + * @param id + * @return + */ + @Override + public int deleteByPrimaryKey(Integer id) { + //删除数据和工资卡图片 + int i = mapper.deleteByPrimaryKey(id); + //删除工资卡图片 TODO + //删除minio文件 + return i; + } +} + diff --git a/bonus-modules/bonus-bmw/src/main/resources/banner.txt b/bonus-modules/bonus-bmw/src/main/resources/banner.txt new file mode 100644 index 0000000..fbd45f5 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/resources/banner.txt @@ -0,0 +1,10 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} + _ _ + (_) | | + _ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___ +| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \ +| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | | +|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_| + __/ | __/ | + |___/ |___/ \ No newline at end of file diff --git a/bonus-modules/bonus-bmw/src/main/resources/bootstrap-dev.yml b/bonus-modules/bonus-bmw/src/main/resources/bootstrap-dev.yml new file mode 100644 index 0000000..b4ece04 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/resources/bootstrap-dev.yml @@ -0,0 +1,22 @@ +# Tomcat +server: + port: 18082 + +# Spring +spring: + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.0.14:8848 + namespace: f648524d-0a7b-449e-8f92-64e05236fd51 + config: + # 配置中心地址 + server-addr: 192.168.0.14:8848 + namespace: f648524d-0a7b-449e-8f92-64e05236fd51 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + diff --git a/bonus-modules/bonus-bmw/src/main/resources/bootstrap-local.yml b/bonus-modules/bonus-bmw/src/main/resources/bootstrap-local.yml new file mode 100644 index 0000000..23b5ba4 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/resources/bootstrap-local.yml @@ -0,0 +1,28 @@ +# Tomcat +server: + port: 38083 + +# Spring +spring: + cloud: + nacos: + username: nacos + password: nacos + discovery: + # 服务注册地址 + server-addr: 192.168.0.14:8848 + namespace: huadong_realname_dev + config: + # 配置中心地址 + server-addr: 192.168.0.14:8848 + namespace: huadong_realname_dev + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +#加密组件 +jasypt: + encryptor: + password: Encrypt diff --git a/bonus-modules/bonus-bmw/src/main/resources/bootstrap.yml b/bonus-modules/bonus-bmw/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..419c6d4 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/resources/bootstrap.yml @@ -0,0 +1,19 @@ +# Spring +spring: + application: + # 应用名称 + name: bonus-bmw + profiles: + # 环境配置 + active: local + task: + scheduling: + pool: + size: 1 # 定时任务线程池大小 + thread-name-prefix: scheduled-task- # 定时任务线程名称前缀 + +#加密组件 +jasypt: + encryptor: + password: Encrypt + diff --git a/bonus-modules/bonus-bmw/src/main/resources/logback.xml b/bonus-modules/bonus-bmw/src/main/resources/logback.xml new file mode 100644 index 0000000..64d7acb --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/resources/logback.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bonus-modules/bonus-bmw/src/main/resources/mapper.bmw/BmWorkerWageCardMapper.xml b/bonus-modules/bonus-bmw/src/main/resources/mapper.bmw/BmWorkerWageCardMapper.xml new file mode 100644 index 0000000..eee5b68 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/resources/mapper.bmw/BmWorkerWageCardMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + id, worker_id, bank_card_code, bank_name, bank_branch_name, create_user, update_user + + + + + update bm_worker_wage_card set is_active = 0 + where id = #{id} + + + + + insert into bm_worker_wage_card (worker_id, bank_card_code, bank_name, bank_branch_name, create_user) + values (#{workerId}, #{bankCardCode}, #{bankName}, #{bankBranchName}, #{createUser}) + + + + \ No newline at end of file diff --git a/bonus-modules/bonus-bmw/src/main/resources/mybatis-config.xml b/bonus-modules/bonus-bmw/src/main/resources/mybatis-config.xml new file mode 100644 index 0000000..479f671 --- /dev/null +++ b/bonus-modules/bonus-bmw/src/main/resources/mybatis-config.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/bonus-modules/pom.xml b/bonus-modules/pom.xml index 2ae7a22..a962e9b 100644 --- a/bonus-modules/pom.xml +++ b/bonus-modules/pom.xml @@ -13,8 +13,7 @@ bonus-system bonus-job bonus-file - - + bonus-bmw bonus-modules