Commit 977c72bd authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents 79bebed7 d02710d9
......@@ -165,6 +165,13 @@ public class TSalaryStandard extends BaseEntity {
@ExcelAttribute(name = "最终审核时间", isDate = true)
@ExcelProperty("最终审核时间")
private Date auditTime;
/**
* 审核意见
*/
@ExcelAttribute(name = "审核意见", maxLength = 500)
@Length(max = 500, message = "审核意见不能超过500个字符")
@ExcelProperty("审核意见")
private String auditRemark;
/**
* 省
*/
......
......@@ -46,8 +46,6 @@ public interface SysMessageSalaryService extends IService<SysMessageSalary> {
**/
void deleteAllBySettleMonth(String settleMonth);
void createSysMessageSalaryTemp(String settleMonth);
void listExport(HttpServletResponse response, SysMessageSalarySearchVo searchVo);
R<String> feedback(Integer reasonType, String id, String feedBack);
......
......@@ -96,6 +96,12 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
/**
* @Author fxj
* @Description 新增-普通工资
* 最低工资提醒(和档案属性在职状态和员工类型无关):
* 1.执行时间:每月1号上午六点 salaryTask createSysMessageSalary
* 2.判断逻辑:先上传上月(发送EKP时间对应的月份)数据,然后取值薪资合计-(薪资单状态发送成功)实发小于配置的最低工资
* 3.数据消失逻辑:当月不消失;次月定时任务执行的时候删除,重新计算生成
* 4.反馈:只能反馈创建人为自己的数据
* 5.导出:可选择/按查询条件/全量导出,导出字段为列表字段
* @Date 18:19 2022/8/17
**/
@Transactional
......@@ -137,54 +143,6 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
baseMapper.deleteAllBySettleMonth(settleMonth);
}
@Override
public void createSysMessageSalaryTemp(String month) {
//删除之前的数据
sysMessageSalaryTempService.remove(Wrappers.<SysMessageSalaryTemp>query().lambda().eq(SysMessageSalaryTemp::getSettleMonth, month));
//获取当月的所有最低工资,并且是临时人员
// 获取他上次发工资是不是在最低工资表里面 次数+1
//继续循环上次,如果发现上次没有在最低工资表里面,则循环下一个人员
List<SysMessageSalary> list = this.list(Wrappers.<SysMessageSalary>query().lambda().eq(SysMessageSalary::getSettleMonth, month));
R<List<TEmployeeInfo>> employeeInfoListR = null;//remoteBasicArchivesService.getEmployeeListForImportCheckByIds(Common.listObjectToStr(list, "employeeId", CommonConstants.COMMA_STRING), SecurityConstants.FROM_IN);
HashMap<String, TEmployeeInfo> employeeInfoMap = Maps.newHashMap();
List<TEmployeeInfo> employeeInfoList = employeeInfoListR.getData();
for (TEmployeeInfo employeeInfo : employeeInfoList) {
employeeInfoMap.put(employeeInfo.getId(), employeeInfo);
}
//获取当月的所有最低工资,并且是临时人员
List<SysMessageSalary> tempSysMessageSalary = Lists.newArrayList();
for (SysMessageSalary salary : list) {
TEmployeeInfo employeeInfo = employeeInfoMap.get(salary.getEmployeeId());
tempSysMessageSalary.add(salary);
}
for (SysMessageSalary messageSalary : tempSysMessageSalary) {
//获取他上次发工资是不是在最低工资表里面 次数+1
List<TSalaryAccount> accountList = salaryAccountService.list(Wrappers.<TSalaryAccount>query().lambda().eq(TSalaryAccount::getEmpIdcard, messageSalary.getEmployeeIdnum())
.lt(TSalaryAccount::getSalaryGiveTime, messageSalary.getSalaryMonth()).groupBy(TSalaryAccount::getSalaryGiveTime).orderByDesc(TSalaryAccount::getSalaryGiveTime));
int lowerConut = 1;
for (TSalaryAccount salaryAccount : accountList) {
long count = this.count(Wrappers.<SysMessageSalary>query().lambda().eq(SysMessageSalary::getEmployeeId, salaryAccount.getEmpId()).eq(SysMessageSalary::getSalaryMonth, salaryAccount.getSalaryGiveTime()));
if (count > 0) {
//如果大于0 则上次也是最低工资。
lowerConut++;
} else {
break;
}
}
//判断最低次数
if (lowerConut > 1) {
SysMessageSalaryTemp messageSalaryTemp = new SysMessageSalaryTemp();
messageSalaryTemp.setRelateId(messageSalary.getId());
messageSalaryTemp.setTimes(lowerConut);
messageSalaryTemp.setSettleMonth(month);
sysMessageSalaryTempService.save(messageSalaryTemp);
}
}
}
/**
* @Author fxj
* @Description 最低工资提醒导出
......
......@@ -100,6 +100,12 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
/**
* @Author fxj
* @Description 每月生成有工资没有社保(首页提醒定时任务 )
*有工资无社保提醒 ( 和档案属性在职状态和员工类型无关 ) :
*1.执行时间 : 每月1号上午六点 salaryTask createHaveSalaryNoSocial
*2.判断逻辑 : 先删除上月 ( 发送EKP时间对应的月份 ) 提醒数据 , 然后查找连续三个月 ( 不包含当月 ) 有发薪记录 - ( 薪资单状态发送成功 ) , 但是对应三个月均无社保缴费记录 ( 无个人社保数据 ) 并生成
*3.数据消失逻辑 : 当月不消失 ; 次月定时任务执行的时候删除 , 重新计算生成
*4.反馈 : 只能反馈创建人为自己的数据
*5.导出 : 可选择 / 按查询条件 / 全量导出 , 导出字段为列表字段
* @Date 18:30 2022/8/16
* @Param
* @return
......
......@@ -269,7 +269,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
tApprovalRecord.setApprovalResult(CommonConstants.ONE_STRING);
}
if (Common.isNotNull(auditRemark)) {
tSalaryStandard.setRemark(auditRemark);
tSalaryStandard.setAuditRemark(auditRemark);
tApprovalRecord.setApprovalOpinion(auditRemark);
}
tSalaryStandard.setAuditUser(user.getId());
......@@ -280,6 +280,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
tApprovalRecord.setApprovalMan(user.getId());
tApprovalRecord.setApprovalManName(user.getNickname());
tApprovalRecord.setApprovalTime(DateUtil.getCurrentDateTime());
tApprovalRecord.setNodeId("审核");
approvalRecordService.save(tApprovalRecord);
}
return R.ok();
......
......@@ -194,7 +194,7 @@
LEFT JOIN t_salary_account_item l ON l.SALARY_ACCOUNT_ID = a.id and l.JAVA_FIED_NAME = 'relaySalary'
WHERE
a.DELETE_FLAG = 0
and a.SETTLEMENT_MONTH = #{settleMonth}
and a.SEND_MONTH = #{settleMonth}
AND s.STATUS IN (3, 4)
GROUP BY a.EMP_IDCARD,a.SALARY_DATE
) b
......
......@@ -272,40 +272,45 @@
<select id="getLastMonthTHaveSalaryNosocial" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial">
select a.EMP_ID employee_id
, a.EMP_IDCARD employee_id_card
, a.EMP_NAME employee_name
, a.relaySalary relay_salary
, s.CREATE_USER CREATE_USER_ID
, a.SALARY_DATE month
, a.EMP_NAME employee_name
, a.EMP_IDCARD employee_id_card
, s.DEPART_ID settle_domain_id
, s.DEPART_NAME SETTLEMENT_ORGAN_NAME
, s.DEPART_NO SETTLEMENT_ORGAN_NO
, a.SETTLEMENT_MONTH SETTLE_MONTH
, a.EMP_IDCARD employee_id_card
, a.EMP_NAME employee_name
, GROUP_CONCAT(a.relaySalary) relay_salary
, a.CREATE_BY CREATE_USER_ID
, GROUP_CONCAT(a.SALARY_MONTH) month
, a.EMP_NAME employee_name
, a.EMP_IDCARD employee_id_card
, a.DEPT_ID settle_domain_id
, a.DEPT_NAME SETTLEMENT_ORGAN_NAME
, a.DEPT_NO SETTLEMENT_ORGAN_NO
, a.SETTLEMENT_MONTH SETTLE_MONTH
from (
select a.id
, a.SALARY_FORM_ID
, a.EMP_ID
, DISTINCT(a.EMP_IDCARD)
, a.EMP_NAME
, a.SALARY_DATE
, a.SETTLEMENT_MONTH
, if(item.JAVA_FIED_NAME = 'relaySalary', item.SALARY_MONEY, 0) relaySalary
, sum(if(item.JAVA_FIED_NAME in
('unitSocial', 'personalSocial', 'withholidingUnitSocial', 'withholidingPersonSocial'),
item.SALARY_MONEY, 0)) social
from hr_salary.t_salary_account a
left join hr_salary.t_salary_account_item item on item.SALARY_ACCOUNT_ID = a.id
where
<!-- a.SETTLEMENT_MONTH = '202006' and EMP_ID='1242371741017026561' -->
a.SETTLEMENT_MONTH in ( #{month} , #{month2} , #{month3})
and a.DELETE_FLAG = 0
GROUP BY a.EMP_IDCARD, a.SALARY_DATE
) a
LEFT JOIN hr_salary.t_salary_standard s on a.SALARY_FORM_ID = s.id
where a.relaySalary > 0
and a.social = 0
select a.id
, s.DEPT_ID
, s.DEPT_NAME
, s.DEPT_NO
, s.CREATE_BY
, a.SALARY_FORM_ID
, a.EMP_ID
, a.EMP_IDCARD
, a.EMP_NAME
, a.SALARY_MONTH
, a.SETTLEMENT_MONTH
, if(item.JAVA_FIED_NAME = 'relaySalary', item.SALARY_MONEY, 0) relaySalary
, sum(if(item.JAVA_FIED_NAME in
('unitSocial', 'personalSocial', 'withholidingUnitSocial', 'withholidingPersonSocial'),
item.SALARY_MONEY, 0)) social
from mvp_salary.t_salary_account a
left join mvp_salary.t_salary_account_item item on item.SALARY_ACCOUNT_ID = a.id
LEFT JOIN mvp_salary.t_salary_standard s on a.SALARY_FORM_ID = s.id
where
a.DELETE_FLAG = 0
and s.send_month in ( #{month} , #{month2} , #{month3})
AND s.STATUS IN (3, 4)
GROUP BY a.EMP_IDCARD, a.SALARY_MONTH limit 10
) a
where a.relaySalary > 0
and a.social = 0
GROUP BY a.EMP_IDCARD HAVING count(1) = 3
</select>
</mapper>
......@@ -41,6 +41,7 @@
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="auditUser" column="AUDIT_USER"/>
<result property="auditTime" column="AUDIT_TIME"/>
<result property="auditRemark" column="AUDIT_REMARK"/>
<result property="province" column="PROVINCE"/>
<result property="city" column="CITY"/>
<result property="town" column="TOWN"/>
......@@ -82,6 +83,7 @@
a.DELETE_FLAG,
a.AUDIT_USER,
a.AUDIT_TIME,
a.AUDIT_REMARK,
a.PROVINCE,
a.CITY,
a.TOWN,
......@@ -159,6 +161,9 @@
<if test="tSalaryStandard.auditTime != null">
AND a.AUDIT_TIME = #{tSalaryStandard.auditTime}
</if>
<if test="tSalaryStandard.auditReamrk != null and tSalaryStandard.auditReamrk.trim() != ''">
AND a.AUDIT_REAMRK = #{tSalaryStandard.auditReamrk}
</if>
<if test="tSalaryStandard.province != null">
AND a.PROVINCE = #{tSalaryStandard.province}
</if>
......
......@@ -16,13 +16,7 @@
<description>yifu-social 业务模块</description>
<dependencies>
<!-- seata 依赖 -->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-seata</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-social-api</artifactId>
......@@ -73,11 +67,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<version>5.8.0</version>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
......@@ -90,6 +79,20 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-transaction-base-seata-at</artifactId>
<version>4.1.1</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-core</artifactId>
</dependency>
</dependencies>
<build>
......
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.fastjson.JSON;
import com.google.common.collect.Range;
import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@Component
public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<LocalDateTime> {
private static final DateTimeFormatter yyyy = DateTimeFormatter.ofPattern("yyyy");
/**
* 数据插入
* @param collection
* @param preciseShardingValue
* @Author hyc
* @Date 2022-07-21
* @return
*/
@Override
public String doSharding(Collection<String> collection, PreciseShardingValue<LocalDateTime> preciseShardingValue) {
LocalDateTime value = preciseShardingValue.getValue();
String tableSuffix = value.format(yyyy);
String logicTableName = preciseShardingValue.getLogicTableName();
String table = logicTableName.concat("_").concat(tableSuffix);
System.out.println("OrderStrategy.doSharding table name: " + table);
return collection.stream().filter(s -> s.equals(table)).findFirst().orElseThrow(() -> new RuntimeException("逻辑分表不存在"));
}
/**
* 【范围】数据查询
* @param collection
* @param rangeShardingValue
* @Author hyc
* @Date 2022-07-21
* @return
*/
@Override
public Collection<String> doSharding(Collection<String> collection, RangeShardingValue<LocalDateTime> rangeShardingValue) {
// 逻辑表名
String logicTableName = rangeShardingValue.getLogicTableName();
// 范围参数
Range<LocalDateTime> valueRange = rangeShardingValue.getValueRange();
Set<String> queryRangeTables = extracted(logicTableName, valueRange.lowerEndpoint(), valueRange.upperEndpoint());
ArrayList<String> tables = new ArrayList<>(collection);
tables.retainAll(queryRangeTables);
System.out.println(JSON.toJSONString(tables));
return tables;
}
/**
* 根据范围计算表名
* @param logicTableName 逻辑表明
* @param lowerEndpoint 范围起点
* @param upperEndpoint 范围终端
* @Author hyc
* @Date 2022-07-21
* @return 物理表名集合
*/
private Set<String> extracted(String logicTableName, LocalDateTime lowerEndpoint, LocalDateTime upperEndpoint) {
Set<String> rangeTable = new HashSet<>();
while (lowerEndpoint.isBefore(upperEndpoint)) {
String str = getTableNameByDate(lowerEndpoint, logicTableName);
rangeTable.add(str);
lowerEndpoint = lowerEndpoint.plusYears(1);
}
// 获取物理表明
String tableName = getTableNameByDate(upperEndpoint, logicTableName);
rangeTable.add(tableName);
return rangeTable;
}
/**
* 根据日期获取表明
* @param dateTime 日期
* @param logicTableName 逻辑表名
* @Author hyc
* @Date 2022-07-21
* @return 物理表名
*/
private String getTableNameByDate(LocalDateTime dateTime, String logicTableName) {
String tableSuffix = dateTime.format(yyyy);
return logicTableName.concat("_").concat(tableSuffix);
}
@Override
public Properties getProps() {
return null;
}
@Override
public void init(Properties properties) {
}
}
......@@ -25,7 +25,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.shardingsphere.transaction.annotation.ShardingTransactionType;
import org.apache.shardingsphere.transaction.core.TransactionType;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
......@@ -50,14 +52,16 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo);
@GlobalTransactional
@Transactional
@ShardingTransactionType(TransactionType.BASE)
void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList,
YifuUser user);
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream);
@GlobalTransactional
@Transactional
@ShardingTransactionType(TransactionType.BASE)
void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, YifuUser user);
R<Boolean> removeByIdDiy(String id);
......
......@@ -50,9 +50,10 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.shardingsphere.transaction.annotation.ShardingTransactionType;
import org.apache.shardingsphere.transaction.core.TransactionType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
......@@ -294,8 +295,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return R.ok(errorMessageList);
}
@Override
@GlobalTransactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE)
public void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList,
YifuUser user) {
......@@ -2365,9 +2366,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return R.ok(errorMessageList);
}
@GlobalTransactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class)
@Override
@Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE)
public void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, YifuUser user) {
if (!Common.isNotNull(excelVOList)){
return;
......@@ -2679,8 +2680,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Param
* @return
**/
@GlobalTransactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE)
@Override
public List<ErrorMessage> addBatchApplyAudit(List<String> idsList, YifuUser user, int flag, String auditStatus, String auditRemark, String remark) {
List<ErrorMessage> errorList = new ArrayList<>();
......@@ -3008,8 +3009,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Author fxj
* @Date 2022-07-26
**/
@GlobalTransactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE)
public List<ErrorMessage> addBatchApplyHandle(List<String> idsList, String typeSub, YifuUser user
, int flag, String handleStatus, String handleRemark, String socialType, String remark) {
List<ErrorMessage> errorList = new ArrayList<>();
......
spring:
shardingsphere:
datasource:
ds0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.65:22306/mvp_social?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: yf_zsk
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
names: ds0
rules:
sharding:
key-generators:
snowflake:
type: SNOWFLAKE
sharding-algorithms:
t-payment-inline:
props:
strategy: standard
algorithmClassName: com.yifu.cloud.plus.v1.yifu.social.config.OTAStrategyShardingAlgorithm
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.t_payment_info_20$->{17..22}
key-generate-strategy:
column: ID
key-generator-name: snowflake
table-strategy:
standard:
sharding-column: CREATE_TIME
sharding-algorithm-name: t-payment-inline
mvc:
pathmatch:
matching-strategy: ant_path_matcher
......@@ -8,21 +50,4 @@ spring:
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/mvp_social?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
\ No newline at end of file
password: '@yf_2017'
\ No newline at end of file
......@@ -103,3 +103,61 @@ springdoc:
- group: social
#按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.yifu.social.controller
seata:
enabled: true
application-id: seata-server
tx-service-group: yifu_tx_group # 事务群组(可以每个应用独立取名,也可以使用相同的名字)
client:
rm-report-success-enable: true
rm-table-meta-check-enable: false # 自动刷新缓存中的表结构(默认false)
rm-report-retry-count: 5 # 一阶段结果上报TC重试次数(默认5)
rm-async-commit-buffer-limit: 10000 # 异步提交缓存队列长度(默认10000)
rm:
lock:
lock-retry-internal: 10 # 校验或占用全局锁重试间隔(默认10ms)
lock-retry-times: 30 # 校验或占用全局锁重试次数(默认30)
lock-retry-policy-branch-rollback-on-conflict: true # 分支事务与其它全局回滚事务冲突时锁策略(优先释放本地锁让回滚成功)
tm-commit-retry-count: 3 # 一阶段全局提交结果上报TC重试次数(默认1次,建议大于1)
tm-rollback-retry-count: 3 # 一阶段全局回滚结果上报TC重试次数(默认1次,建议大于1)
undo:
data-validation: true # 二阶段回滚镜像校验(默认true开启)
log-serialization: kryo # undo序列化方式(默认jackson 不支持 LocalDateTime)
log-table: undo_log # 自定义undo表名(默认undo_log)
log:
exceptionRate: 100 # 日志异常输出概率(默认100)
support:
spring:
datasource-autoproxy: true
service:
vgroup-mapping:
yifu_tx_group: default # TC 集群(必须与seata-server保持一致)
enable-degrade: false # 降级开关
disable-global-transaction: false # 禁用全局事务(默认false)
grouplist:
default: 192.168.1.65:33091
transport:
shutdown:
wait: 3
thread-factory:
boss-thread-prefix: NettyBoss
worker-thread-prefix: NettyServerNIOWorker
server-executor-thread-prefix: NettyServerBizHandler
share-boss-worker: false
client-selector-thread-prefix: NettyClientSelector
client-selector-thread-size: 1
client-worker-thread-prefix: NettyClientWorkerThread
type: TCP
server: NIO
heartbeat: true
serialization: seata
compressor: none
enable-client-batch-send-request: true # 客户端事务消息请求是否批量合并发送(默认true)
registry:
file:
name: file.conf
type: file
config:
file:
name: file.conf
type: file
client {
application.id = seata-server ## 应用唯一id
transaction.service.group = yifu_tx_group ## 所属事务组
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment