修改bug
This commit is contained in:
parent
eb4d016f0d
commit
0055812ab4
|
@ -271,7 +271,7 @@ public class UserMoneyDetailsServiceImpl extends ServiceImpl<UserMoneyDetailsDao
|
|||
QueryWrapper<UserMoneyDetails> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("user_id", period.getArtificerId());
|
||||
if(StringUtil.isNotEmpty(period.getStartFundData().toString())){
|
||||
queryWrapper.between("create_time", period.getStartFundData(), period.getEndFundData());
|
||||
queryWrapper.between("end_times", period.getStartFundData(), period.getEndFundData());
|
||||
}
|
||||
if(period.getDetailsType()!= null){
|
||||
//方便前端判断 传1则查询全部 2查询收入 3查询支出
|
||||
|
@ -288,7 +288,7 @@ public class UserMoneyDetailsServiceImpl extends ServiceImpl<UserMoneyDetailsDao
|
|||
}
|
||||
//只查询操作余额的数据
|
||||
queryWrapper.eq("manipulate_type", 2);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.orderByDesc("end_times");
|
||||
IPage<UserMoneyDetails> page2 = baseMapper.selectPage(page1, queryWrapper);
|
||||
//资金明细添加到返回对象中
|
||||
FundDetailsResult fundDetailsResult = new FundDetailsResult();
|
||||
|
@ -331,7 +331,7 @@ public class UserMoneyDetailsServiceImpl extends ServiceImpl<UserMoneyDetailsDao
|
|||
QueryWrapper<UserMoneyDetails> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("user_id", period.getArtificerId());
|
||||
if(StringUtil.isNotEmpty(period.getStartFundData().toString())){
|
||||
queryWrapper.between("create_time", period.getStartFundData(), period.getEndFundData());
|
||||
queryWrapper.between("end_times", period.getStartFundData(), period.getEndFundData());
|
||||
}
|
||||
if(period.getDetailsType()!= null){
|
||||
//方便前端判断 传1则查询全部 2查询收入 3查询支出
|
||||
|
@ -348,7 +348,7 @@ public class UserMoneyDetailsServiceImpl extends ServiceImpl<UserMoneyDetailsDao
|
|||
}
|
||||
//只查询操作余额的数据
|
||||
queryWrapper.eq("manipulate_type", 2);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.orderByDesc("end_times");
|
||||
List<UserMoneyDetails> page2 = baseMapper.selectList(queryWrapper);
|
||||
return page2;
|
||||
}
|
||||
|
|
|
@ -5594,11 +5594,11 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
}
|
||||
queryWrapper.eq("artificer_id", period.getArtificerId());
|
||||
if(StringUtil.isNotEmpty(period.getStartFundData().toString())){
|
||||
queryWrapper.between("create_time", period.getStartFundData(), period.getEndFundData());
|
||||
queryWrapper.between("end_times", period.getStartFundData(), period.getEndFundData());
|
||||
}
|
||||
//只查询已完成和待评价的订单
|
||||
queryWrapper.in("status", Arrays.asList(5, 3));
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.orderByDesc("end_times");
|
||||
List<Orders> orderList = baseMapper.selectList(queryWrapper);
|
||||
UserMoneyArtificerDetails userMoneyArtificerDetails = new UserMoneyArtificerDetails();
|
||||
|
||||
|
@ -5625,13 +5625,13 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
QueryWrapper<Orders> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("artificer_id", period.getArtificerId());
|
||||
if(StringUtil.isNotEmpty(period.getStartFundData().toString())){
|
||||
queryWrapper.between("create_time", period.getStartFundData(), period.getEndFundData());
|
||||
queryWrapper.between("end_times", period.getStartFundData(), period.getEndFundData());
|
||||
}
|
||||
//只查询已完成和待评价的订单
|
||||
queryWrapper.in("status", Arrays.asList(5, 3));
|
||||
//只查询根节点数据
|
||||
queryWrapper.eq("parent_id", 0);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.orderByDesc("end_times");
|
||||
IPage<Orders> page2 = baseMapper.selectPage(page1, queryWrapper);
|
||||
//分成明细添加到返回对象中
|
||||
return Result.success().put("data", page2);
|
||||
|
|
|
@ -61,7 +61,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
* A0,A1,A2,A3,A4,A5等
|
||||
*/
|
||||
// @Scheduled(cron = "0 * * * * ?")
|
||||
@Scheduled(cron = "0 0 0 * * ?")
|
||||
@Scheduled(cron = "0 * * * * ?")
|
||||
public void upgradeJishi() {
|
||||
System.out.println("------------计算技师升级规则-----------");
|
||||
//1.获取全部参与积分规则的技师
|
||||
|
@ -90,7 +90,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
String lastMonth = format.format(calendar4.getTime());
|
||||
startTime = lastMonth+"-01 00:00:00";
|
||||
endTime = lastMonth+"-10 23:59:59";
|
||||
}else if(dayOfMonth == 21){
|
||||
}else if(dayOfMonth == 29){
|
||||
Calendar calendar4 = Calendar.getInstance();
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM");
|
||||
String lastMonth = format.format(calendar4.getTime());
|
||||
|
@ -99,10 +99,14 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
}
|
||||
System.out.println("startTime:" + startTime);
|
||||
System.out.println("endTime:" + endTime);
|
||||
|
||||
// startTime = "2024-06-21 00:00:00";
|
||||
// endTime = "2024-06-30 23:59:59";
|
||||
//不为空则继续执行,否则不到时间不计算升级规则
|
||||
if(StringUtils.isNotEmpty(startTime)){
|
||||
//3.查询升级规则配置表
|
||||
QueryWrapper<ArtificerPartitioningDetails> sjgzQuery = new QueryWrapper<ArtificerPartitioningDetails>();
|
||||
sjgzQuery.ne("grade","新");
|
||||
sjgzQuery.orderByDesc("outstanding_achievement","duration_online");
|
||||
List<ArtificerPartitioningDetails> sjgzAllList = artificerPartitioningDetailsMapper.selectList(sjgzQuery);
|
||||
//4.根据技师的服务类型查找对应的配置规则,
|
||||
|
@ -150,7 +154,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
System.out.println("在线时长:"+zxsc+">"+zxscPar);
|
||||
System.out.println("充值积分:"+jsjf+">"+czjfPar);
|
||||
System.out.println("============================================================");
|
||||
if(zddj>zddjPar && jzl >jzlPar && zxsc > zxscPar && jsjf > czjfPar){
|
||||
if(zddj>=zddjPar && jzl >=jzlPar && zxsc >= zxscPar && jsjf >= czjfPar){
|
||||
jsdj = sjgzPar.getGrade();
|
||||
rate = BigDecimal.valueOf(Double.parseDouble(sjgzPar.getProportionalSharing()));
|
||||
break;
|
||||
|
@ -160,10 +164,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
//如果都不符合,则给最低等级(保底)
|
||||
if(StringUtils.isEmpty(jsdj)){
|
||||
QueryWrapper<ArtificerPartitioningDetails> sjgzQuery1 = new QueryWrapper<ArtificerPartitioningDetails>();
|
||||
sjgzQuery1.eq("outstanding_achievement",0);
|
||||
sjgzQuery1.eq("clock_rate",0);
|
||||
sjgzQuery1.eq("duration_online",0);
|
||||
sjgzQuery1.eq("integral",0);
|
||||
sjgzQuery1.eq("grade","A0");
|
||||
sjgzQuery1.eq("classify_id",classifyId);
|
||||
sjgzQuery1.last("limit 1");
|
||||
ArtificerPartitioningDetails zddjgz = artificerPartitioningDetailsMapper.selectOne(sjgzQuery1);
|
||||
|
@ -216,7 +217,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
/**
|
||||
* 计算技师在线时长,每10分钟计算一积分
|
||||
*/
|
||||
// @Scheduled(cron = "0 * * * * ?")
|
||||
@Scheduled(cron = "0 * * * * ?")
|
||||
public void upJishiZxsc() throws ParseException {
|
||||
System.out.println("----------------计算技师在线时长,每10分钟计算一积分-------------");
|
||||
CommonInfo commonInfo = commonInfoDao.findOne(100000);
|
||||
|
@ -264,7 +265,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
/**
|
||||
* 积分汇总 t+1进行汇总
|
||||
*/
|
||||
// @Scheduled(cron = "0 0 0 * * ?")
|
||||
@Scheduled(cron = "0 * * * * ?")
|
||||
public void tongjiJishiGrade() {
|
||||
System.out.println("----------------每日积分汇总 定时任务-------------");
|
||||
//当前时间减一天
|
||||
|
@ -294,8 +295,5 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
userRecharge.setCreateTime(dateStr);
|
||||
userRechargeDao.insert(userRecharge);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</select>
|
||||
|
||||
<select id="selectSumRefund" resultType="java.math.BigDecimal">
|
||||
select ifnull(sum(money), 0) from user_money_details where artificer_id = #{userId}
|
||||
select ifnull(sum(money), 0) from user_money_details where artificer_id = #{userId} and type = 1
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and date_format(create_time,'%Y-%m-%d') >= date_format(#{startTime},'%Y-%m-%d')
|
||||
</if>
|
||||
|
|
Loading…
Reference in New Issue