From 55b97c14d6c52c343ccce01dc40e50f9ae543cc2 Mon Sep 17 00:00:00 2001 From: hshansha Date: Wed, 18 Jun 2025 08:58:23 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=91=98=E5=B7=A5=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AF=86=E7=A0=81=E5=8A=A0=E5=AF=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/application-dev.yml | 2 +- .../com/ruoyi/pay/service/impl/PayEmployeeInfoServiceImpl.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index 7ff9dc9..167b0f8 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -51,7 +51,7 @@ spring: # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) url: jdbc:mysql://localhost:3306/pay?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true username: pay - password: hs123456 + password: CATAj3kmZTWdt8sA # 从库数据源 # slave: # lazy: true diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayEmployeeInfoServiceImpl.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayEmployeeInfoServiceImpl.java index 3ca0afa..d8ce216 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayEmployeeInfoServiceImpl.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayEmployeeInfoServiceImpl.java @@ -1,5 +1,6 @@ package com.ruoyi.pay.service.impl; +import cn.dev33.satoken.secure.BCrypt; import cn.hutool.core.bean.BeanUtil; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; @@ -113,7 +114,7 @@ public class PayEmployeeInfoServiceImpl implements IPayEmployeeInfoService { SysUser sysUser = new SysUser(); sysUser.setNickName(bo.getName()); sysUser.setUserName(bo.getPhone()); - sysUser.setPassword(bo.getPhone()); + sysUser.setPassword(BCrypt.hashpw(bo.getPhone())); sysUser.setDeptId(bo.getDeptId()); sysUser.setSex(bo.getSex()); sysUser.setPhonenumber(bo.getPhone()); From c33b5369c2480fac41f72ef9edc9a4c340d4c0d5 Mon Sep 17 00:00:00 2001 From: hshansha Date: Wed, 18 Jun 2025 15:07:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=87=BA=E5=8B=A4=E3=80=81=E5=BA=94?= =?UTF-8?q?=E5=87=BA=E5=8B=A4=E5=AF=BC=E5=85=A5bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PayRequireAttendanceReportController.java | 1 + .../com/ruoyi/pay/mapper/PayAttendanceMapper.java | 5 +++-- .../com/ruoyi/pay/service/IPayAttendanceService.java | 2 +- .../pay/service/impl/PayAttendanceServiceImpl.java | 5 +++-- .../impl/PayRequireAttendanceReportServiceImpl.java | 2 +- .../java/com/ruoyi/pay/util/AttendanceExcelUtil.java | 11 +++-------- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/controller/PayRequireAttendanceReportController.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/controller/PayRequireAttendanceReportController.java index bcf74d7..57775d2 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/controller/PayRequireAttendanceReportController.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/controller/PayRequireAttendanceReportController.java @@ -81,6 +81,7 @@ public class PayRequireAttendanceReportController extends BaseController { PayRequireAttendanceReportBo report = new PayRequireAttendanceReportBo(); report.setYear(date.split("-")[0]); report.setMonth(date.split("-")[1]); + report.setTenantId(tenantId); List occupaReports= iPayRequireAttendanceReportService.queryList(report); if(occupaReports!=null&&occupaReports.size()>0){//判断是否有当月应出勤信息 if(!updateSupport){ diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/mapper/PayAttendanceMapper.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/mapper/PayAttendanceMapper.java index 4026733..9cf671f 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/mapper/PayAttendanceMapper.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/mapper/PayAttendanceMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.pay.mapper; import com.ruoyi.pay.domain.PayAttendance; import com.ruoyi.pay.domain.vo.PayAttendanceVo; import com.ruoyi.common.core.mapper.BaseMapperPlus; +import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; /** @@ -13,6 +14,6 @@ import org.apache.ibatis.annotations.Select; */ public interface PayAttendanceMapper extends BaseMapperPlus { @Select({" select e.id employeeId,d.dept_id deptId,d.dept_name deptName from pay_employee_info e join sys_dept d on e.dept_id=d.dept_id " + - " where e.name=#{name} and e.deleted=0"} ) - PayAttendance selectEmpInfoByName(String empName); + " where e.name=#{empName} and e.deleted=0 and e.tenant_id=#{tenantId}"} ) + PayAttendance selectEmpInfoByName(@Param("empName") String empName, @Param("tenantId")Long tenantId); } diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/IPayAttendanceService.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/IPayAttendanceService.java index 5a29841..8efb38e 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/IPayAttendanceService.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/IPayAttendanceService.java @@ -47,7 +47,7 @@ public interface IPayAttendanceService { */ Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - PayAttendance selectEmpInfoByName(String empName); + PayAttendance selectEmpInfoByName(String empName, Long tenantId); String importAttendance(List attendanceList, boolean updateSupport, String date); } diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayAttendanceServiceImpl.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayAttendanceServiceImpl.java index 4057e0d..b97c062 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayAttendanceServiceImpl.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayAttendanceServiceImpl.java @@ -121,8 +121,8 @@ public class PayAttendanceServiceImpl implements IPayAttendanceService { } @Override - public PayAttendance selectEmpInfoByName(String empName) { - return baseMapper.selectEmpInfoByName(empName); + public PayAttendance selectEmpInfoByName(String empName, Long tenantId) { + return baseMapper.selectEmpInfoByName(empName,tenantId); } @Override @@ -143,6 +143,7 @@ public class PayAttendanceServiceImpl implements IPayAttendanceService { PayAttendanceBo query = new PayAttendanceBo(); query.setKaoqinDate(attendance.getKaoqinDate()); query.setEmpName(attendance.getEmpName()); + query.setTenantId(attendance.getTenantId()); List attendances=this.queryList(query); if (null==attendances||attendances.size()==0) { diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayRequireAttendanceReportServiceImpl.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayRequireAttendanceReportServiceImpl.java index 1c6d15d..0cd361d 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayRequireAttendanceReportServiceImpl.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayRequireAttendanceReportServiceImpl.java @@ -161,7 +161,7 @@ public class PayRequireAttendanceReportServiceImpl implements IPayRequireAttenda String name = attendanceReport.getEmpName(); //根据员工name查询员工id、部门id、部门名称 - PayAttendance info = attendanceMapper.selectEmpInfoByName(name); + PayAttendance info = attendanceMapper.selectEmpInfoByName(name, tenantId); if(info==null){ throw new IOException("请先在员工表中添加员工:"+name); } diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/util/AttendanceExcelUtil.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/util/AttendanceExcelUtil.java index 4b8b3b7..3aa91c5 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/util/AttendanceExcelUtil.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/util/AttendanceExcelUtil.java @@ -1,8 +1,6 @@ package com.ruoyi.pay.util; -import cn.hutool.core.lang.Dict; import com.ruoyi.common.core.service.DictService; -import com.ruoyi.common.helper.LoginHelper; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.pay.domain.PayAttendance; import com.ruoyi.pay.domain.bo.PayAttendanceBo; @@ -15,14 +13,11 @@ import org.apache.poi.ss.usermodel.Row; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; -import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.*; -import org.apache.poi.xssf.usermodel.XSSFSheet; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.annotation.PostConstruct; + import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; @@ -186,7 +181,7 @@ public class AttendanceExcelUtil { String wid = this.getCellValue(row1, 2).toString();//考勤机工号 String wname = this.getCellValue(row1, 10).toString(); //根据员工name查询员工id、部门id、部门名称 - PayAttendance info = iPayAttendanceService.selectEmpInfoByName(wname); + PayAttendance info = iPayAttendanceService.selectEmpInfoByName(wname,tenantId); if(info==null){ throw new IOException("请先在员工表中添加员工:"+wname+" 或者考勤机选择错误"); } @@ -431,7 +426,7 @@ public class AttendanceExcelUtil { String wid = this.getCellValue(row1, 0).toString();//考勤机工号 String wname = this.getCellValue(row1, 1).toString();//姓名 //根据员工name查询员工id、部门id、部门名称 - PayAttendance info = iPayAttendanceService.selectEmpInfoByName(wname); + PayAttendance info = iPayAttendanceService.selectEmpInfoByName(wname, tenantId); if(info==null){ throw new IOException("请先在员工表中添加员工:"+wname+" 或者考勤机选择错误"); } From 698d706a55ecea2fd64f27383e1d88679ebcc3da Mon Sep 17 00:00:00 2001 From: hshansha Date: Fri, 20 Jun 2025 10:27:02 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B5=8B=E8=AF=95bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/IPayBaohuoEmployeeService.java | 2 ++ .../impl/PayBaohuoEmployeeServiceImpl.java | 21 +++++++++++++++++++ .../impl/PayBaohuoWorktimeServiceImpl.java | 20 ++++++++++++++++++ .../impl/PayWorkOrderCheckServiceImpl.java | 6 +++--- ruoyi-ui/src/views/pay/employeeInfo/index.vue | 6 +++--- 5 files changed, 49 insertions(+), 6 deletions(-) diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/IPayBaohuoEmployeeService.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/IPayBaohuoEmployeeService.java index 3392850..35277f8 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/IPayBaohuoEmployeeService.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/IPayBaohuoEmployeeService.java @@ -46,4 +46,6 @@ public interface IPayBaohuoEmployeeService { * 校验并批量删除包活工单员工关联信息 */ Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + List queryList2(PayBaohuoEmployeeBo bhEmployee); } diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayBaohuoEmployeeServiceImpl.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayBaohuoEmployeeServiceImpl.java index 26614ac..37bee6e 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayBaohuoEmployeeServiceImpl.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayBaohuoEmployeeServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.pay.service.impl; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.domain.PageQuery; @@ -57,6 +58,11 @@ public class PayBaohuoEmployeeServiceImpl implements IPayBaohuoEmployeeService { LambdaQueryWrapper lqw = buildQueryWrapper(bo); return baseMapper.selectVoList(lqw); } + @Override + public List queryList2(PayBaohuoEmployeeBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper2(bo); + return baseMapper.selectVoList(lqw); + } private LambdaQueryWrapper buildQueryWrapper(PayBaohuoEmployeeBo bo) { Map params = bo.getParams(); @@ -72,6 +78,21 @@ public class PayBaohuoEmployeeServiceImpl implements IPayBaohuoEmployeeService { lqw.eq(bo.getIntime() != null, PayBaohuoEmployee::getIntime, bo.getIntime()); return lqw; } + private LambdaQueryWrapper buildQueryWrapper2(PayBaohuoEmployeeBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.eq(bo.getTenantId() != null, PayBaohuoEmployee::getTenantId, bo.getTenantId()); + lqw.eq(bo.getWoId() != null, PayBaohuoEmployee::getWoId, bo.getWoId()); + lqw.eq(bo.getEmpId() != null, PayBaohuoEmployee::getEmpId, bo.getEmpId()); + lqw.eq(bo.getDeptId() != null, PayBaohuoEmployee::getDeptId, bo.getDeptId()); + lqw.like(StringUtils.isNotBlank(bo.getEmpName()), PayBaohuoEmployee::getEmpName, bo.getEmpName()); + lqw.eq(bo.getAmount() != null, PayBaohuoEmployee::getAmount, bo.getAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getMonth()), PayBaohuoEmployee::getMonth, bo.getMonth()); + lqw.eq(bo.getHelper() != null, PayBaohuoEmployee::getHelper, bo.getHelper()); + lqw.apply(bo.getIntime()!= null, "DATE_FORMAT (intime,'%Y-%m')={0}", DateUtil.format(bo.getIntime(),"yyyy-MM")); + /*lqw.eq(bo.getIntime() != null, PayBaohuoEmployee::getIntime, bo.getIntime());*/ + return lqw; + } /** * 新增包活工单员工关联 diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayBaohuoWorktimeServiceImpl.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayBaohuoWorktimeServiceImpl.java index 0a3622e..aad75b3 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayBaohuoWorktimeServiceImpl.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayBaohuoWorktimeServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.pay.service.impl; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.domain.PageQuery; @@ -57,6 +58,10 @@ public class PayBaohuoWorktimeServiceImpl implements IPayBaohuoWorktimeService { LambdaQueryWrapper lqw = buildQueryWrapper(bo); return baseMapper.selectVoList(lqw); } + public List queryList2(PayBaohuoWorktimeBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper2(bo); + return baseMapper.selectVoList(lqw); + } private LambdaQueryWrapper buildQueryWrapper(PayBaohuoWorktimeBo bo) { Map params = bo.getParams(); @@ -72,6 +77,21 @@ public class PayBaohuoWorktimeServiceImpl implements IPayBaohuoWorktimeService { lqw.eq(bo.getIntime() != null, PayBaohuoWorktime::getIntime, bo.getIntime()); return lqw; } + private LambdaQueryWrapper buildQueryWrapper2(PayBaohuoWorktimeBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.eq(bo.getTenantId() != null, PayBaohuoWorktime::getTenantId, bo.getTenantId()); + lqw.eq(bo.getWoId() != null, PayBaohuoWorktime::getWoId, bo.getWoId()); + lqw.eq(bo.getEmpId() != null, PayBaohuoWorktime::getEmpId, bo.getEmpId()); + lqw.eq(bo.getBheId() != null, PayBaohuoWorktime::getBheId, bo.getBheId()); + lqw.eq(bo.getStime() != null, PayBaohuoWorktime::getStime, bo.getStime()); + lqw.eq(bo.getEtime() != null, PayBaohuoWorktime::getEtime, bo.getEtime()); + lqw.eq(bo.getValidHours() != null, PayBaohuoWorktime::getValidHours, bo.getValidHours()); + lqw.apply(bo.getDate()!= null, "DATE_FORMAT (date,'%Y-%m')={0}", DateUtil.format(bo.getDate(),"yyyy-MM")); +/* lqw.eq(bo.getDate() != null, PayBaohuoWorktime::getDate, bo.getDate());*/ + lqw.eq(bo.getIntime() != null, PayBaohuoWorktime::getIntime, bo.getIntime()); + return lqw; + } /** * 新增包活工单工时关联 diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayWorkOrderCheckServiceImpl.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayWorkOrderCheckServiceImpl.java index 41b111a..b3cb05a 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayWorkOrderCheckServiceImpl.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayWorkOrderCheckServiceImpl.java @@ -56,7 +56,7 @@ public class PayWorkOrderCheckServiceImpl implements IPayWorkOrderCheckService { PayBaohuoWorktimeBo bhtime = new PayBaohuoWorktimeBo(); bhtime.setEmpId(employeeInfo.getId()); bhtime.setDate(yearMonth); - List bhtimes = bhworktimeService.queryList(bhtime); + List bhtimes = bhworktimeService.queryList2(bhtime); Collections.sort(bhtimes, new Comparator() { //按照工作日期排序 @@ -84,7 +84,7 @@ public class PayWorkOrderCheckServiceImpl implements IPayWorkOrderCheckService { bhEmployee.setEmpName(empName); bhEmployee.setIntime(yearMonth); bhEmployee.setTenantId(tenantId); - List bhEmployees = bhemployeeService.queryList(bhEmployee); + List bhEmployees = bhemployeeService.queryList2(bhEmployee); /*for(SgrBaohuoEmployee bhe:bhEmployees){ if(bhe.getHelper()==0){ baohuogongzi = baohuogongzi.add(bhe.getAmount()); @@ -121,7 +121,7 @@ public class PayWorkOrderCheckServiceImpl implements IPayWorkOrderCheckService { bhEmployee.setEmpName(empName); bhEmployee.setIntime(yearMonth); bhEmployee.setTenantId(tenantId); - List bhEmployees = bhemployeeService.queryList(bhEmployee); + List bhEmployees = bhemployeeService.queryList2(bhEmployee); for(PayBaohuoEmployeeVo bhe:bhEmployees){ if(bhe.getHelper()==0){ // baohuogongzi = baohuogongzi.add(bhe.getAmount()); diff --git a/ruoyi-ui/src/views/pay/employeeInfo/index.vue b/ruoyi-ui/src/views/pay/employeeInfo/index.vue index 944bd9b..bca31cf 100644 --- a/ruoyi-ui/src/views/pay/employeeInfo/index.vue +++ b/ruoyi-ui/src/views/pay/employeeInfo/index.vue @@ -82,7 +82,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['secure:empinfo:add']" + v-hasPermi="['pay:employeeInfo:add']" >新增 @@ -93,7 +93,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['secure:empinfo:edit']" + v-hasPermi="['pay:employeeInfo:edit']" >修改 @@ -103,7 +103,7 @@ icon="el-icon-download" size="mini" @click="handleExport" - v-hasPermi="['secure:empinfo:export']" + v-hasPermi="['pay:employeeInfo:export']" >导出 From 084268bef82b59c6e1272e5af2fabdc6f725cc60 Mon Sep 17 00:00:00 2001 From: hshansha Date: Mon, 30 Jun 2025 14:20:53 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-nei.yml | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 ruoyi-admin/src/main/resources/application-nei.yml diff --git a/ruoyi-admin/src/main/resources/application-nei.yml b/ruoyi-admin/src/main/resources/application-nei.yml new file mode 100644 index 0000000..5b4be2a --- /dev/null +++ b/ruoyi-admin/src/main/resources/application-nei.yml @@ -0,0 +1,171 @@ +--- # 监控中心配置 +spring.boot.admin.client: + # 增加客户端开关 + enabled: true + url: http://localhost:9090/admin + instance: + service-host-type: IP + username: ruoyi + password: 123456 + +--- # xxl-job 配置 +xxl.job: + # 执行器开关 + enabled: false + # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。 + admin-addresses: http://localhost:9100/xxl-job-admin + # 执行器通讯TOKEN:非空时启用 + access-token: xxl-job + executor: + # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册 + appname: xxl-job-executor + # 执行器端口号 执行器从9101开始往后写 + port: 9101 + # 执行器注册:默认IP:PORT + address: + # 执行器IP:默认自动获取IP + ip: + # 执行器运行日志文件存储磁盘路径 + logpath: ./logs/xxl-job + # 执行器日志文件保存天数:大于3生效 + logretentiondays: 30 + +--- # 数据源配置 +spring: + datasource: + type: com.zaxxer.hikari.HikariDataSource + # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content + dynamic: + # 性能分析插件(有性能损耗 不建议生产环境使用) + p6spy: true + # 设置默认的数据源或者数据源组,默认值即为 master + primary: master + # 严格模式 匹配不到数据源则报错 + strict: true + datasource: + # 主库数据源 + master: + type: ${spring.datasource.type} + driverClassName: com.mysql.cj.jdbc.Driver + # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 + # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) + url: jdbc:mysql://localhost:3306/pay?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true + username: root + password: ruanfa + # 从库数据源 +# slave: +# lazy: true +# type: ${spring.datasource.type} +# driverClassName: com.mysql.cj.jdbc.Driver +# url: jdbc:mysql://localhost:3306/ry-flowable-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true +# username: +# password: +# oracle: +# type: ${spring.datasource.type} +# driverClassName: oracle.jdbc.OracleDriver +# url: jdbc:oracle:thin:@//localhost:1521/XE +# username: ROOT +# password: root +# hikari: +# connectionTestQuery: SELECT 1 FROM DUAL +# postgres: +# type: ${spring.datasource.type} +# driverClassName: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true +# username: root +# password: root +# sqlserver: +# type: ${spring.datasource.type} +# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver +# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true +# username: SA +# password: root + hikari: + # 最大连接池数量 + maxPoolSize: 20 + # 最小空闲线程数量 + minIdle: 10 + # 配置获取连接等待超时的时间 + connectionTimeout: 30000 + # 校验超时时间 + validationTimeout: 5000 + # 空闲连接存活最大时间,默认10分钟 + idleTimeout: 600000 + # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟 + maxLifetime: 1800000 + # 连接测试query(配置检测连接是否有效) + connectionTestQuery: SELECT 1 + # 多久检查一次连接的活性 + keepaliveTime: 30000 + +--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉) +spring: + redis: + # 地址 + host: localhost + # 端口,默认为6379 + port: 6379 + # 数据库索引 + database: 0 + # 密码(如没有密码请注释掉) + # password: + # 连接超时时间 + timeout: 10s + # 是否开启ssl + ssl: false + +redisson: + # redis key前缀 + keyPrefix: pay + # 线程池数量 + threads: 4 + # Netty线程池数量 + nettyThreads: 8 + # 单节点配置 + singleServerConfig: + # 客户端名称 + clientName: ${ruoyi.name} + # 最小空闲连接数 + connectionMinimumIdleSize: 8 + # 连接池大小 + connectionPoolSize: 32 + # 连接空闲超时,单位:毫秒 + idleConnectionTimeout: 10000 + # 命令等待超时,单位:毫秒 + timeout: 3000 + # 发布和订阅连接池大小 + subscriptionConnectionPoolSize: 50 + +--- # mail 邮件发送 +mail: + enabled: false + host: smtp.163.com + port: 465 + # 是否需要用户名密码验证 + auth: true + # 发送方,遵循RFC-822标准 + from: xxx@163.com + # 用户名(注意:如果使用foxmail邮箱,此处user为qq号) + user: xxx@163.com + # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助) + pass: xxxxxxxxxx + # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。 + starttlsEnable: true + # 使用SSL安全连接 + sslEnable: true + # SMTP超时时长,单位毫秒,缺省值不超时 + timeout: 0 + # Socket连接超时值,单位毫秒,缺省值不超时 + connectionTimeout: 0 + +--- # sms 短信 +sms: + enabled: false + # 阿里云 dysmsapi.aliyuncs.com + # 腾讯云 sms.tencentcloudapi.com + endpoint: "dysmsapi.aliyuncs.com" + accessKeyId: xxxxxxx + accessKeySecret: xxxxxx + signName: 测试 + # 腾讯专用 + sdkAppId: