Compare commits
No commits in common. "d96583d316ecbb4dbcdd85e7004ef834145c465d" and "07ff5cd199df501638e7b0099fd5a559b043dd26" have entirely different histories.
d96583d316
...
07ff5cd199
|
|
@ -1,20 +1,37 @@
|
||||||
package com.hzs.report.stat;
|
package com.hzs.report.stat;
|
||||||
|
|
||||||
import com.hzs.common.core.domain.R;
|
import com.hzs.common.core.domain.R;
|
||||||
|
import com.hzs.common.core.enums.EApprovalBusiness;
|
||||||
|
import com.hzs.report.stat.dto.StatisticalLogDTO;
|
||||||
|
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计分析
|
* @description: 统计分析
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2025/2/12 15:22
|
||||||
|
* @param:
|
||||||
|
* @return:
|
||||||
**/
|
**/
|
||||||
public interface IMemberReportServiceApi {
|
public interface IMemberReportServiceApi {
|
||||||
|
|
||||||
/**
|
|
||||||
* 定时任务批量处理统计会员以及伞下金额业绩盒数
|
|
||||||
**/
|
|
||||||
R<?> pushAmountBoxmethod();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务7天重算直推会员金额业绩盒数
|
* @description: 定时任务批量处理统计会员以及伞下金额业绩盒数
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2025/2/13 10:41
|
||||||
|
* @param: []
|
||||||
|
* @return: com.hzs.common.core.domain.R
|
||||||
**/
|
**/
|
||||||
R<?> repeatPushAmountBoxmethod(String startDateStr, String endDateStr);
|
R pushAmountBoxmethod();
|
||||||
|
/**
|
||||||
|
* @description: 定时任务7天重算直推会员金额业绩盒数
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2025/2/13 10:41
|
||||||
|
* @param: [startDateStr, endDateStr]
|
||||||
|
* @return: com.hzs.common.core.domain.R
|
||||||
|
**/
|
||||||
|
R repeatPushAmountBoxmethod(String startDateStr, String endDateStr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,22 +30,27 @@ import java.util.List;
|
||||||
public class MemberSettleBonusProvider implements IMemberSettleBonusApi {
|
public class MemberSettleBonusProvider implements IMemberSettleBonusApi {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberMonthAchieveService iCuMemberMonthAchieveService;
|
private ICuMemberMonthAchieveService cuMemberMonthAchieveService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBonusSettleService iBonusSettleService;
|
private IBonusSettleService bonusSettleService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBonusGrantService iBonusGrantService;
|
private ICuMemberBonusService cuMemberBonusService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberBonusService iCuMemberBonusService;
|
private IBonusGrantService bonusGrantService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberAchieveService iCuMemberAchieveService;
|
private ICuMemberAchieveService cuMemberAchieveService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberRetailLogService iCuMemberRetailLogService;
|
private ICuMemberRetailLogService cuMemberRetailLogService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<Boolean> calculateCumberBonusBySecond(String orderCode) {
|
public R<Boolean> calculateCumberBonusBySecond(String orderCode) {
|
||||||
try {
|
try {
|
||||||
iBonusSettleService.calculateCumberBonusBySecond(orderCode);
|
bonusSettleService.calculateCumberBonusBySecond(orderCode);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return R.fail();
|
return R.fail();
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +69,7 @@ public class MemberSettleBonusProvider implements IMemberSettleBonusApi {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void backupsSettleBonusEveryday() {
|
public void backupsSettleBonusEveryday() {
|
||||||
iCuMemberBonusService.backupsSettleBonusEveryday();
|
cuMemberBonusService.backupsSettleBonusEveryday();
|
||||||
}
|
}
|
||||||
|
|
||||||
class BonusCalculateBonus extends Thread {
|
class BonusCalculateBonus extends Thread {
|
||||||
|
|
@ -77,53 +82,55 @@ public class MemberSettleBonusProvider implements IMemberSettleBonusApi {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
if (DateUtils.compareDateBefore(settleDate, DateUtils.parseStringToDate("2023-09-04"))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Date settleEndDate = DateUtils.afterDate(1, ChronoUnit.DAYS, settleDate);
|
Date settleEndDate = DateUtils.afterDate(1, ChronoUnit.DAYS, settleDate);
|
||||||
log.info("奖金结算开始, 结算时间:{}", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, settleDate));
|
log.info("奖金结算完成,结算时间:{}", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, settleDate));
|
||||||
// 奖金结算
|
// 奖金结算
|
||||||
try {
|
try {
|
||||||
iCuMemberBonusService.autoCalculateBonus(settleDate, settleEndDate);
|
cuMemberBonusService.autoCalculateBonus(settleDate, settleEndDate);
|
||||||
log.info("奖金结算结束");
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("奖金结算异常,结算时间:{}", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, settleDate), e);
|
log.info("BonusCalculateBonus error: ", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertCuMemberAchieveByEveryDay() {
|
public void insertCuMemberAchieveByEveryDay() {
|
||||||
iCuMemberMonthAchieveService.insertCuMemberAchieveByEveryDay(DateUtils.beforeDate(1, ChronoUnit.DAYS));
|
cuMemberMonthAchieveService.insertCuMemberAchieveByEveryDay(DateUtils.beforeDate(1, ChronoUnit.DAYS));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autoPublishBonus() {
|
public void autoPublishBonus() {
|
||||||
iBonusGrantService.publishBonusByPeriodEveryDay();
|
bonusGrantService.publishBonusByPeriodEveryDay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autoGrantBonus() {
|
public void autoGrantBonus() {
|
||||||
iBonusGrantService.grantWithdrawBonusByPeriodEveryDay();
|
bonusGrantService.grantWithdrawBonusByPeriodEveryDay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean chargeBackSaOrder(SaOrder saOrder) {
|
public Boolean chargeBackSaOrder(SaOrder saOrder) {
|
||||||
return iCuMemberAchieveService.chargeBackSaOrder(saOrder);
|
return cuMemberAchieveService.chargeBackSaOrder(saOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void calculateCuMemberRetailRangeBonusBySaOrder() {
|
public void calculateCuMemberRetailRangeBonusBySaOrder() {
|
||||||
List<CuMemberRetailLog> cuMemberRetailLogs = iCuMemberRetailLogService.queryCuMemberRetailLog();
|
List<CuMemberRetailLog> cuMemberRetailLogs = cuMemberRetailLogService.queryCuMemberRetailLog();
|
||||||
if (cuMemberRetailLogs.size() > 0) {
|
if (cuMemberRetailLogs.size() > 0) {
|
||||||
List<CuMemberRetailLog> successLogList = new ArrayList<>();
|
List<CuMemberRetailLog> successLogList = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
for (CuMemberRetailLog cuMemberRetailLog : cuMemberRetailLogs) {
|
for (CuMemberRetailLog cuMemberRetailLog : cuMemberRetailLogs) {
|
||||||
iBonusSettleService.calculateCuMemberRetailRangeBonusBySaOrder(cuMemberRetailLog.getOrderCode());
|
bonusSettleService.calculateCuMemberRetailRangeBonusBySaOrder(cuMemberRetailLog.getOrderCode());
|
||||||
successLogList.add(cuMemberRetailLog);
|
successLogList.add(cuMemberRetailLog);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
if (successLogList.size() > 0) {
|
if (successLogList.size() > 0) {
|
||||||
iCuMemberRetailLogService.updateCuMemberRetailLogByList(successLogList);
|
cuMemberRetailLogService.updateCuMemberRetailLogByList(successLogList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -131,6 +138,6 @@ public class MemberSettleBonusProvider implements IMemberSettleBonusApi {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<CuMemberRetail> queryValidateBoxOrAchieve(Long pkMember) {
|
public R<CuMemberRetail> queryValidateBoxOrAchieve(Long pkMember) {
|
||||||
return R.ok(iBonusSettleService.queryValidateBoxOrAchieve(pkMember));
|
return R.ok(bonusSettleService.queryValidateBoxOrAchieve(pkMember));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
package com.hzs.retail.login.service.impl;
|
package com.hzs.retail.login.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.codec.Base64Decoder;
|
import cn.hutool.core.codec.Base64Decoder;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.lang.Validator;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.hzs.common.core.constant.SysConstants;
|
||||||
import com.hzs.common.core.constant.msg.SystemMsgConstants;
|
import com.hzs.common.core.constant.msg.SystemMsgConstants;
|
||||||
import com.hzs.common.core.enums.EAccountStatus;
|
import com.hzs.common.core.enums.EAccountStatus;
|
||||||
import com.hzs.common.core.enums.ECategory;
|
import com.hzs.common.core.enums.ECategory;
|
||||||
|
|
@ -27,6 +30,7 @@ import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售会员登录服务
|
* 新零售会员登录服务
|
||||||
|
|
@ -48,27 +52,27 @@ public class RetailMemberLoginServiceImpl implements IRetailMemberLoginService {
|
||||||
throw new ServiceException("会员账号或联系方式必须填写");
|
throw new ServiceException("会员账号或联系方式必须填写");
|
||||||
}
|
}
|
||||||
|
|
||||||
CuMemberExt member = iCuMemberService.getRetailMemberByCode(userName);
|
CuMemberExt member;
|
||||||
|
|
||||||
// if (userName.startsWith(SysConstants.RETAIL_PREFIX)) {
|
if (userName.startsWith(SysConstants.RETAIL_PREFIX)) {
|
||||||
// // 会员编号登录
|
// 会员编号登录
|
||||||
// member = iCuMemberService.getRetailMemberByCode(userName);
|
member = iCuMemberService.getRetailMemberByCode(userName);
|
||||||
// } else if ((userName.length() == 11 && userName.startsWith("1"))
|
} else if ((userName.length() == 11 && userName.startsWith("1"))
|
||||||
// || Validator.isEmail(userName)) {
|
|| Validator.isEmail(userName)) {
|
||||||
// // 手机号 或 邮箱 登录
|
// 手机号 或 邮箱 登录
|
||||||
// List<CuMemberExt> memberList = iCuMemberService.listMemberByPhone(userName);
|
List<CuMemberExt> memberList = iCuMemberService.listMemberByPhone(userName);
|
||||||
// if (CollectionUtil.isEmpty(memberList)) {
|
if (CollectionUtil.isEmpty(memberList)) {
|
||||||
// throw new ServiceException("会员账号或联系方式填写有误,请检查后重试");
|
throw new ServiceException("会员账号或联系方式填写有误,请检查后重试");
|
||||||
// }
|
}
|
||||||
// if (memberList.size() > 1) {
|
if (memberList.size() > 1) {
|
||||||
// // 联系方式超过两个,只能使用会员编号进行登录
|
// 联系方式超过两个,只能使用会员编号进行登录
|
||||||
// throw new ServiceException("当前会员需要使用会员编号进行登录");
|
throw new ServiceException("当前会员需要使用会员编号进行登录");
|
||||||
// }
|
}
|
||||||
// member = memberList.get(0);
|
member = memberList.get(0);
|
||||||
// } else {
|
} else {
|
||||||
// // 用户/密码必须填写
|
// 用户/密码必须填写
|
||||||
// throw new ServiceException("会员账号或联系方式填写有误,请检查后重试");
|
throw new ServiceException("会员账号或联系方式填写有误,请检查后重试");
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (null == member) {
|
if (null == member) {
|
||||||
recordLoginLog(null, EStatus.NO, userName + " 登录会员不存在");
|
recordLoginLog(null, EStatus.NO, userName + " 登录会员不存在");
|
||||||
|
|
@ -118,20 +122,20 @@ public class RetailMemberLoginServiceImpl implements IRetailMemberLoginService {
|
||||||
updateFlag = true;
|
updateFlag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (null == member.getPkTeamCode()) {
|
if (null == member.getPkTeamCode()) {
|
||||||
// // 空单注册会员,如果团队为空处理
|
// 空单注册会员,如果团队为空处理
|
||||||
// CuMemberExt teamMember = iCuMemberService.queryParentTeam(member.getPkId());
|
CuMemberExt teamMember = iCuMemberService.queryParentTeam(member.getPkId());
|
||||||
// if (null != teamMember) {
|
if (null != teamMember) {
|
||||||
// updateWrapper.set(CuMember::getPkTeamCode, teamMember.getPkTeamCode());
|
updateWrapper.set(CuMember::getPkTeamCode, teamMember.getPkTeamCode());
|
||||||
// updateFlag = true;
|
updateFlag = true;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
if (updateFlag) {
|
if (updateFlag) {
|
||||||
updateWrapper.eq(CuMember::getPkId, member.getPkId());
|
updateWrapper.eq(CuMember::getPkId, member.getPkId());
|
||||||
iCuMemberService.update(updateWrapper);
|
iCuMemberService.update(updateWrapper);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("会员 {} 补全【体系】错误", member.getMemberCode());
|
log.error("会员 {} 补全【体系】或【团队】错误", member.getMemberCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
recordLoginLog(loginMember.getPkId(), EStatus.YES, "登录成功");
|
recordLoginLog(loginMember.getPkId(), EStatus.YES, "登录成功");
|
||||||
|
|
|
||||||
|
|
@ -166,8 +166,10 @@ public class RetailMemberController extends BaseController {
|
||||||
|
|
||||||
// 达到条件,但是没有选择区域,需要弹窗选择区域
|
// 达到条件,但是没有选择区域,需要弹窗选择区域
|
||||||
CuMemberRetailAchieveVO retailAchieve = iCuMemberRetailAchieveService.selectMemberSumAchieve(userId, pkCountry, systemType);
|
CuMemberRetailAchieveVO retailAchieve = iCuMemberRetailAchieveService.selectMemberSumAchieve(userId, pkCountry, systemType);
|
||||||
// TODO 2025.06.09 新需求,选择区域判断等级达到合伙人,血缘累计业绩达到30万,可以选择
|
// 2024.12.30 添加需求,存在手动V0升V5,需要判断小市场业绩达到2万以上才可以进行开通
|
||||||
if (retailAchieve.getSmallAreaPv().add(retailAchieve.getBigArealPv()).compareTo(SysConstants.TOTAL_AREA_PV) < 0) {
|
if (retailAchieve.getSmallAreaPv().multiply(new BigDecimal("10000")).compareTo(SysConstants.SMALL_AREA_PV) < 0
|
||||||
|
|| retailAchieve.getBigArealPv().multiply(new BigDecimal("10000")).compareTo(SysConstants.SMALL_AREA_PV) < 0
|
||||||
|
) {
|
||||||
return AjaxResult.error("还未达到选择收益区域条件");
|
return AjaxResult.error("还未达到选择收益区域条件");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,11 @@ import org.apache.dubbo.config.annotation.DubboService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计分析相关dubbo服务
|
* @description: 统计分析相关dubbo服务
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2025/2/12 15:23
|
||||||
|
* @param:
|
||||||
|
* @return:
|
||||||
**/
|
**/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@DubboService
|
@DubboService
|
||||||
|
|
@ -17,15 +21,30 @@ public class MemberReportServiceProvider implements IMemberReportServiceApi {
|
||||||
@Autowired
|
@Autowired
|
||||||
private MemberReportService iMemberReportService;
|
private MemberReportService iMemberReportService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 定时任务批量处理统计会员以及伞下金额业绩盒数
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2025/2/12 15:28
|
||||||
|
* @param: []
|
||||||
|
* @return: com.hzs.common.core.domain.R
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public R<?> pushAmountBoxmethod() {
|
public R pushAmountBoxmethod() {
|
||||||
iMemberReportService.pushAmountBoxmethod();
|
iMemberReportService.pushAmountBoxmethod();
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 定时任务7天重算直推会员金额业绩盒数
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: '2025/2/12' 16:10
|
||||||
|
* @param: [startDateStr, endDateStr]
|
||||||
|
* @return: com.hzs.common.core.domain.R
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public R<?> repeatPushAmountBoxmethod(String startDateStr, String endDateStr) {
|
public R repeatPushAmountBoxmethod(String startDateStr, String endDateStr) {
|
||||||
iMemberReportService.repeatPushAmountBoxmethod(startDateStr, endDateStr);
|
iMemberReportService.repeatPushAmountBoxmethod(startDateStr,endDateStr);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,13 @@ public class SysConstants {
|
||||||
public static final String PAY_PASSWORD = "222222";
|
public static final String PAY_PASSWORD = "222222";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 血缘累计业绩30万
|
* 小市场2万业绩(人民币)
|
||||||
*/
|
*/
|
||||||
public static final BigDecimal TOTAL_AREA_PV = new BigDecimal("300000");
|
public static final BigDecimal SMALL_AREA_PV = new BigDecimal("20000");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开放使用会员编号(用于支付登录查看数据)
|
* 开放使用会员编号(用于支付登录查看数据)
|
||||||
*/
|
*/
|
||||||
public static final List<String> CONTROL_MEMBER_LIST = Arrays.asList("RE20240001", "RE20240002");
|
public static final List<String> CONTROL_MEMBER_LIST = Arrays.asList("HZS20240001", "HZS20240002");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@ import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信发送记录
|
* 短信发送记录
|
||||||
|
*
|
||||||
|
* @author hzs
|
||||||
|
* @since 2023-03-08
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* token验证处理
|
* token验证处理
|
||||||
|
*
|
||||||
|
* @author hzs
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,19 @@ import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每日奖金计算定时任务
|
* @description: 每日奖金计算定时任务
|
||||||
|
* @author: sui q
|
||||||
|
* @time: 2023/4/10 14:19
|
||||||
|
* @classname: BonusSettleJob
|
||||||
|
* @package_name: com.hzs.third.job
|
||||||
|
* version 1.0.0
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
@ -20,124 +26,173 @@ import java.util.Date;
|
||||||
public class BonusSettleJob {
|
public class BonusSettleJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberSettleBonusApi iMemberSettleBonusApi;
|
private IMemberSettleBonusApi memberBonusSettleApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 奖金每天自动结算,计算前一天奖金
|
* 奖金每天自动结算,计算前一天奖金
|
||||||
|
*
|
||||||
|
* @return: void
|
||||||
|
* @Author: sui q
|
||||||
|
* @Date: 2023/3/4 13:48
|
||||||
*/
|
*/
|
||||||
@XxlJob("backSettleBonus")
|
@XxlJob("backSettleBonus")
|
||||||
|
// @Scheduled(cron = "10 8 10 * * ?")
|
||||||
public void backupsSettleBonusEveryday() {
|
public void backupsSettleBonusEveryday() {
|
||||||
log.info("开始进行奖金结算");
|
log.info("开始进行奖金结算");
|
||||||
iMemberSettleBonusApi.backupsSettleBonusEveryday();
|
memberBonusSettleApi.backupsSettleBonusEveryday();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 奖金每天自动结算,计算前一天奖金
|
* 奖金每天自动结算,计算前一天奖金
|
||||||
|
*
|
||||||
|
* @return: void
|
||||||
|
* @Author: sui q
|
||||||
|
* @Date: 2023/3/4 13:48
|
||||||
*/
|
*/
|
||||||
@XxlJob("autoSettleBonus")
|
@XxlJob("autoSettleBonus")
|
||||||
|
// @Scheduled(cron = "10 8 10 * * ?")
|
||||||
public void autoSettleBonusEveryday() {
|
public void autoSettleBonusEveryday() {
|
||||||
Date startDate = DateUtils.beforeDate(7, ChronoUnit.DAYS, DateUtils.currentDate());
|
Date startDate = DateUtils.beforeDate(7, ChronoUnit.DAYS, DateUtils.currentDate());
|
||||||
log.info("开始进行奖金结算");
|
log.info("开始进行奖金结算");
|
||||||
iMemberSettleBonusApi.autoCalculateBonus(startDate);
|
memberBonusSettleApi.autoCalculateBonus(startDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 奖金每天自动结算,计算前一天奖金
|
* 奖金每天自动结算,计算前一天奖金
|
||||||
|
*
|
||||||
|
* @return: void
|
||||||
|
* @Author: sui q
|
||||||
|
* @Date: 2023/3/4 13:48
|
||||||
*/
|
*/
|
||||||
@XxlJob("autoSettleBonus1")
|
@XxlJob("autoSettleBonus1")
|
||||||
public void autoSettleBonusEveryday1() {
|
public void autoSettleBonusEveryday1() {
|
||||||
Date startDate = DateUtils.beforeDate(6, ChronoUnit.DAYS, DateUtils.currentDate());
|
Date startDate = DateUtils.beforeDate(6, ChronoUnit.DAYS, DateUtils.currentDate());
|
||||||
log.info("开始进行奖金结算");
|
log.info("开始进行奖金结算");
|
||||||
iMemberSettleBonusApi.autoCalculateBonus(startDate);
|
memberBonusSettleApi.autoCalculateBonus(startDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 奖金每天自动结算,计算前一天奖金
|
* 奖金每天自动结算,计算前一天奖金
|
||||||
|
*
|
||||||
|
* @return: void
|
||||||
|
* @Author: sui q
|
||||||
|
* @Date: 2023/3/4 13:48
|
||||||
*/
|
*/
|
||||||
@XxlJob("autoSettleBonus2")
|
@XxlJob("autoSettleBonus2")
|
||||||
public void autoSettleBonusEveryday2() {
|
public void autoSettleBonusEveryday2() {
|
||||||
Date startDate = DateUtils.beforeDate(5, ChronoUnit.DAYS, DateUtils.currentDate());
|
Date startDate = DateUtils.beforeDate(5, ChronoUnit.DAYS, DateUtils.currentDate());
|
||||||
log.info("开始进行奖金结算");
|
log.info("开始进行奖金结算");
|
||||||
iMemberSettleBonusApi.autoCalculateBonus(startDate);
|
memberBonusSettleApi.autoCalculateBonus(startDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 奖金每天自动结算,计算前一天奖金
|
* 奖金每天自动结算,计算前一天奖金
|
||||||
|
*
|
||||||
|
* @return: void
|
||||||
|
* @Author: sui q
|
||||||
|
* @Date: 2023/3/4 13:48
|
||||||
*/
|
*/
|
||||||
@XxlJob("autoSettleBonus3")
|
@XxlJob("autoSettleBonus3")
|
||||||
public void autoSettleBonusEveryday3() {
|
public void autoSettleBonusEveryday3() {
|
||||||
Date startDate = DateUtils.beforeDate(4, ChronoUnit.DAYS, DateUtils.currentDate());
|
Date startDate = DateUtils.beforeDate(4, ChronoUnit.DAYS, DateUtils.currentDate());
|
||||||
log.info("开始进行奖金结算");
|
log.info("开始进行奖金结算");
|
||||||
iMemberSettleBonusApi.autoCalculateBonus(startDate);
|
memberBonusSettleApi.autoCalculateBonus(startDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 奖金每天自动结算,计算前一天奖金
|
* 奖金每天自动结算,计算前一天奖金
|
||||||
|
*
|
||||||
|
* @return: void
|
||||||
|
* @Author: sui q
|
||||||
|
* @Date: 2023/3/4 13:48
|
||||||
*/
|
*/
|
||||||
@XxlJob("autoSettleBonus4")
|
@XxlJob("autoSettleBonus4")
|
||||||
|
// @Scheduled(cron = "10 6 11 * * ?")
|
||||||
public void autoSettleBonusEveryday4() {
|
public void autoSettleBonusEveryday4() {
|
||||||
Date startDate = DateUtils.beforeDate(3, ChronoUnit.DAYS, DateUtils.currentDate());
|
Date startDate = DateUtils.beforeDate(3, ChronoUnit.DAYS, DateUtils.currentDate());
|
||||||
log.info("开始进行奖金结算");
|
log.info("开始进行奖金结算");
|
||||||
iMemberSettleBonusApi.autoCalculateBonus(startDate);
|
memberBonusSettleApi.autoCalculateBonus(startDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 奖金每天自动结算,计算前一天奖金
|
* 奖金每天自动结算,计算前一天奖金
|
||||||
|
*
|
||||||
|
* @return: void
|
||||||
|
* @Author: sui q
|
||||||
|
* @Date: 2023/3/4 13:48
|
||||||
*/
|
*/
|
||||||
@XxlJob("autoSettleBonus5")
|
@XxlJob("autoSettleBonus5")
|
||||||
public void autoSettleBonusEveryday5() {
|
public void autoSettleBonusEveryday5() {
|
||||||
Date startDate = DateUtils.beforeDate(2, ChronoUnit.DAYS, DateUtils.currentDate());
|
Date startDate = DateUtils.beforeDate(2, ChronoUnit.DAYS, DateUtils.currentDate());
|
||||||
log.info("开始进行奖金结算");
|
log.info("开始进行奖金结算");
|
||||||
iMemberSettleBonusApi.autoCalculateBonus(startDate);
|
memberBonusSettleApi.autoCalculateBonus(startDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 奖金每天自动结算,计算前一天奖金
|
* 奖金每天自动结算,计算前一天奖金
|
||||||
|
*
|
||||||
|
* @return: void
|
||||||
|
* @Author: sui q
|
||||||
|
* @Date: 2023/3/4 13:48
|
||||||
*/
|
*/
|
||||||
@XxlJob("autoSettleBonus6")
|
@XxlJob("autoSettleBonus6")
|
||||||
public void autoSettleBonusEveryday6() {
|
public void autoSettleBonusEveryday6() {
|
||||||
Date startDate = DateUtils.beforeDate(1, ChronoUnit.DAYS, DateUtils.currentDate());
|
Date startDate = DateUtils.beforeDate(1, ChronoUnit.DAYS, DateUtils.currentDate());
|
||||||
log.info("开始进行奖金结算");
|
log.info("开始进行奖金结算");
|
||||||
iMemberSettleBonusApi.autoCalculateBonus(startDate);
|
memberBonusSettleApi.autoCalculateBonus(startDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 自动公布奖金
|
* @description: 自动公布奖金
|
||||||
|
* @author: sui q
|
||||||
|
* @date: 2023/4/24 14:26
|
||||||
|
* @param: null null
|
||||||
**/
|
**/
|
||||||
@XxlJob("autoPublishBonus")
|
@XxlJob("autoPublishBonus")
|
||||||
public void autoPublishBonusEveryday() {
|
public void autoPublishBonusEveryday() {
|
||||||
log.info("开始进行奖金公布");
|
log.info("开始进行奖金公布");
|
||||||
iMemberSettleBonusApi.autoPublishBonus();
|
memberBonusSettleApi.autoPublishBonus();
|
||||||
log.info("奖金公布完成");
|
log.info("奖金公布完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 自动发放奖金
|
* @description: 自动发放奖金
|
||||||
|
* @author: sui q
|
||||||
|
* @date: 2023/4/24 14:26
|
||||||
|
* @param: null null
|
||||||
**/
|
**/
|
||||||
@XxlJob("autoGrantBonus")
|
@XxlJob("autoGrantBonus")
|
||||||
|
// @Scheduled(cron = "10 42 13 * * ?")
|
||||||
public void autoGrantBonusEveryday() {
|
public void autoGrantBonusEveryday() {
|
||||||
log.info("开始进行奖金发放");
|
log.info("开始进行奖金发放");
|
||||||
iMemberSettleBonusApi.autoGrantBonus();
|
memberBonusSettleApi.autoGrantBonus();
|
||||||
log.info("奖金发放完成");
|
log.info("奖金发放完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 自动结算每日业绩,每月业绩,用于统计分析
|
* @description: 自动结算每日业绩,每月业绩,用于统计分析
|
||||||
|
* @author: sui q
|
||||||
|
* @date: 2023/9/1 9:53
|
||||||
|
* @param: null null
|
||||||
**/
|
**/
|
||||||
@XxlJob("autoSettleMember")
|
@XxlJob("autoSettleMember")
|
||||||
|
// @Scheduled(cron = "50 55 15 * * ?")
|
||||||
public void autoSettleMemberAchieveEveryday() {
|
public void autoSettleMemberAchieveEveryday() {
|
||||||
log.info("开始进行会员业绩计算");
|
log.info("开始进行会员业绩计算");
|
||||||
iMemberSettleBonusApi.insertCuMemberAchieveByEveryDay();
|
memberBonusSettleApi.insertCuMemberAchieveByEveryDay();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 自动结算每日业绩,每月业绩,用于统计分析
|
* @description: 自动结算每日业绩,每月业绩,用于统计分析
|
||||||
|
* @author: sui q
|
||||||
|
* @date: 2023/9/1 9:53
|
||||||
|
* @param: null null
|
||||||
**/
|
**/
|
||||||
@XxlJob("autoSecondBonus")
|
@XxlJob("autoSecondBonus")
|
||||||
public void autoSettleMemberBonusBySecond() {
|
public void autoSettleMemberBonusBySecond() {
|
||||||
log.info("开始进行会员业绩计算");
|
log.info("开始进行会员业绩计算");
|
||||||
iMemberSettleBonusApi.calculateCuMemberRetailRangeBonusBySaOrder();
|
memberBonusSettleApi.calculateCuMemberRetailRangeBonusBySaOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,12 @@ import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员模块定时任务
|
* 会员模块定时任务
|
||||||
|
*
|
||||||
|
* @Description:
|
||||||
|
* @Author: ljc
|
||||||
|
* @Time: 2023/4/11 19:11
|
||||||
|
* @Classname: CuMemberJob
|
||||||
|
* @Package_name: com.hzs.member.job
|
||||||
*/
|
*/
|
||||||
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
||||||
@Component
|
@Component
|
||||||
|
|
@ -16,22 +22,23 @@ import org.springframework.stereotype.Component;
|
||||||
public class CuMemberJob {
|
public class CuMemberJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberJobServiceApi iMemberJobServiceApi;
|
IMemberJobServiceApi memberJobServiceApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时插入账户详情数据
|
* 定时插入账户详情数据
|
||||||
*/
|
*/
|
||||||
@XxlJob("insertAccountDetail")
|
@XxlJob("insertAccountDetail")
|
||||||
public void insertAccountDetail() {
|
public void insertAccountDetail() {
|
||||||
iMemberJobServiceApi.insertAccountDetail();
|
memberJobServiceApi.insertAccountDetail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自动提现
|
* 自动提现
|
||||||
*/
|
*/
|
||||||
@XxlJob("automaticWithdrawal")
|
@XxlJob("automaticWithdrawal")
|
||||||
public void automaticWithdrawal() {
|
public void automaticWithdrawal() {
|
||||||
iMemberJobServiceApi.automaticWithdrawal();
|
memberJobServiceApi.automaticWithdrawal();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.hzs.member.statis.ICuBonusStatisServiceApi;
|
||||||
import com.hzs.member.statis.ICuBonusVertexStatisServiceApi;
|
import com.hzs.member.statis.ICuBonusVertexStatisServiceApi;
|
||||||
import com.hzs.report.stat.IMemberReportServiceApi;
|
import com.hzs.report.stat.IMemberReportServiceApi;
|
||||||
import com.hzs.retail.member.IMemberRetailApi;
|
import com.hzs.retail.member.IMemberRetailApi;
|
||||||
|
import com.hzs.system.config.IBdBarCodeServiceApi;
|
||||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
|
|
@ -19,22 +20,32 @@ import org.springframework.stereotype.Component;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: hzs_cloud
|
||||||
|
* @BelongsPackage: com.hzs.third.job
|
||||||
|
* @Author: yh
|
||||||
|
* @CreateTime: 2023-04-27 09:31
|
||||||
|
* @Description:
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class MemberJob {
|
public class MemberJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberServiceApi iMemberServiceApi;
|
IMemberServiceApi memberServiceApi;
|
||||||
@DubboReference
|
|
||||||
IMemberRetailApi iMemberRetailApi;
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ICuBonusStatisServiceApi iCuBonusStatisServiceApi;
|
ICuBonusStatisServiceApi iCuBonusStatisServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ICuBonusVertexStatisServiceApi iCuBonusVertexStatisServiceApi;
|
ICuBonusVertexStatisServiceApi iCuBonusVertexStatisServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
|
IBdBarCodeServiceApi iBdBarCodeServiceApi;
|
||||||
|
@DubboReference
|
||||||
ICuMemberRetailRegionServiceApi iCuMemberRetailRegionServiceApi;
|
ICuMemberRetailRegionServiceApi iCuMemberRetailRegionServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
|
IMemberRetailApi iMemberRetailApi;
|
||||||
|
@DubboReference
|
||||||
IAcRetailPickLogServiceApi iAcRetailPickLogServiceApi;
|
IAcRetailPickLogServiceApi iAcRetailPickLogServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberReportServiceApi iMemberReportServiceApi;
|
IMemberReportServiceApi iMemberReportServiceApi;
|
||||||
|
|
@ -72,7 +83,11 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重算7天内奖金拨比
|
* @description: 重算7天内奖金拨比
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2023/12/11 10:45
|
||||||
|
* @param: []
|
||||||
|
* @return: void
|
||||||
**/
|
**/
|
||||||
@XxlJob("rerun-bonus-statis")
|
@XxlJob("rerun-bonus-statis")
|
||||||
public void rerunCuBonusStatis() {
|
public void rerunCuBonusStatis() {
|
||||||
|
|
@ -94,7 +109,11 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 7天重算顶点奖金拨比统计
|
* @description: 7天重算顶点奖金拨比统计
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2024/8/15 10:29
|
||||||
|
* @param: []
|
||||||
|
* @return: void
|
||||||
**/
|
**/
|
||||||
@XxlJob("rerun-bonus-vertex-statis")
|
@XxlJob("rerun-bonus-vertex-statis")
|
||||||
public void rerunCuBonusVertexStatis() {
|
public void rerunCuBonusVertexStatis() {
|
||||||
|
|
@ -115,26 +134,43 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时清除未使用的会员编号
|
* 定时清除未使用的会员编号
|
||||||
*/
|
*/
|
||||||
@XxlJob("clear-member-empty-code")
|
@XxlJob("clear-member-empty-code")
|
||||||
public void clearMemberEmptyCode() {
|
public void clearMemberEmptyCode() {
|
||||||
log.info("clear-member-empty-code 开始执行!");
|
log.info("clear-member-empty-code 开始执行!");
|
||||||
Integer dataCount = iMemberServiceApi.clearMemberEmptyCode().getData();
|
Integer dataCount = memberServiceApi.clearMemberEmptyCode().getData();
|
||||||
log.info("clear-member-empty-code 开始结束! 共处理:{}", dataCount);
|
log.info("clear-member-empty-code 开始结束! 共处理:{}", dataCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时修改到期的零售区域
|
* 定时初始化条形码配置
|
||||||
|
*/
|
||||||
|
@XxlJob("updatWarehouseLogJob")
|
||||||
|
public void updatWarehouseLogJob() {
|
||||||
|
/**
|
||||||
|
* 查询初始化条形码配置,将当前尾号初始化为初始尾号
|
||||||
|
*/
|
||||||
|
iBdBarCodeServiceApi.updatWarehouseLog();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 定时修改到期的零售区域
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2024/12/30 14:25
|
||||||
|
* @param: []
|
||||||
|
* @return: void
|
||||||
**/
|
**/
|
||||||
@XxlJob("retail-region")
|
@XxlJob("retail-region")
|
||||||
public void retailRegion() {
|
public void retailRegion() {
|
||||||
Date date = new Date();
|
Date date=new Date();
|
||||||
Date startDate = DateUtils.beforeDate(2, ChronoUnit.DAYS, date);
|
Date startDate= DateUtils.beforeDate(2, ChronoUnit.DAYS, date);
|
||||||
Date endDate = DateUtils.afterDate(1, ChronoUnit.DAYS, date);
|
Date endDate = DateUtils.afterDate(1, ChronoUnit.DAYS, date);
|
||||||
//批量修改已到期的会员收益区域
|
//批量修改已到期的会员收益区域
|
||||||
iCuRegionAssessApi.validateHandAreaAssess(startDate, endDate);
|
iCuRegionAssessApi.validateHandAreaAssess(startDate,endDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -155,7 +191,11 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每月10号处理上个月提货赠送活动满足活动规则的数据
|
* @description: 每月10号处理上个月提货赠送活动满足活动规则的数据
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2025/2/6 10:59
|
||||||
|
* @param: []
|
||||||
|
* @return: void
|
||||||
**/
|
**/
|
||||||
@XxlJob("deliveryLog")
|
@XxlJob("deliveryLog")
|
||||||
public void deliveryLog() {
|
public void deliveryLog() {
|
||||||
|
|
@ -163,7 +203,11 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计直推会员金额业绩盒数
|
* @description: 统计直推会员金额业绩盒数
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2025/2/12 16:09
|
||||||
|
* @param: []
|
||||||
|
* @return: void
|
||||||
**/
|
**/
|
||||||
@XxlJob("sta-smount-box")
|
@XxlJob("sta-smount-box")
|
||||||
public void pushAmountBoxmethod() {
|
public void pushAmountBoxmethod() {
|
||||||
|
|
@ -171,7 +215,11 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重算7天统计直推会员金额业绩盒数
|
* @description: 重算7天统计直推会员金额业绩盒数
|
||||||
|
* @author: zhang jing
|
||||||
|
* @date: 2023/12/11 10:45
|
||||||
|
* @param: []
|
||||||
|
* @return: void
|
||||||
**/
|
**/
|
||||||
@XxlJob("repeat-sta-smount-box")
|
@XxlJob("repeat-sta-smount-box")
|
||||||
public void repeatPushAmountBoxmethod() {
|
public void repeatPushAmountBoxmethod() {
|
||||||
|
|
@ -183,7 +231,9 @@ public class MemberJob {
|
||||||
String startDateStr = (DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, endDate));
|
String startDateStr = (DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, endDate));
|
||||||
//重算前6天的数据
|
//重算前6天的数据
|
||||||
iMemberReportServiceApi.repeatPushAmountBoxmethod(startDateStr, endDateStr);
|
iMemberReportServiceApi.repeatPushAmountBoxmethod(startDateStr, endDateStr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.hzs.third.job;
|
package com.hzs.third.job;
|
||||||
|
|
||||||
|
import com.hzs.member.account.IMemberJobServiceApi;
|
||||||
import com.hzs.sale.order.ISaOrderServiceApi;
|
import com.hzs.sale.order.ISaOrderServiceApi;
|
||||||
|
import com.hzs.system.base.ICurrencyServiceApi;
|
||||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
|
|
@ -13,14 +15,14 @@ import org.springframework.stereotype.Component;
|
||||||
public class OrderJob {
|
public class OrderJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ISaOrderServiceApi iSaOrderServiceApi;
|
ISaOrderServiceApi orderServiceApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时关单 订单三十分钟未支付自动关闭
|
* 定时关单 订单三十分钟未支付自动关闭
|
||||||
*/
|
*/
|
||||||
@XxlJob("autoCloseOrder")
|
@XxlJob("autoCloseOrder")
|
||||||
public void timingCloseOrder() {
|
public void timingCloseOrder() {
|
||||||
iSaOrderServiceApi.closeOrder();
|
orderServiceApi.closeOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,12 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 供应链定时任务
|
* @description: 供应链定时任务
|
||||||
|
* @author: sui q
|
||||||
|
* @time: 2024/2/21 15:45
|
||||||
|
* @classname: ScmJob
|
||||||
|
* @package_name: com.hzs.third.job
|
||||||
|
* version 1.0.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
||||||
|
|
@ -16,13 +21,14 @@ import org.springframework.stereotype.Component;
|
||||||
public class ScmJob {
|
public class ScmJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IScmBillServiceApi iScmBillServiceApi;
|
private IScmBillServiceApi scmBillServiceApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新单据号初始化值
|
* 更新单据号初始化值
|
||||||
*/
|
*/
|
||||||
|
// @Scheduled(cron = "0 54 15 * * ?")
|
||||||
@XxlJob("updateBillNo")
|
@XxlJob("updateBillNo")
|
||||||
public void updateBillNo() {
|
public void updateBillNo() {
|
||||||
iScmBillServiceApi.updateScmBillNoNextValue();
|
scmBillServiceApi.updateScmBillNoNextValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.hzs.third.job;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.hzs.common.core.constant.MagicNumberConstants;
|
||||||
|
import com.hzs.common.core.constant.SystemFieldConstants;
|
||||||
|
import com.hzs.common.core.enums.ESmsSendResult;
|
||||||
|
import com.hzs.common.core.enums.ESmsSendStatus;
|
||||||
|
import com.hzs.common.core.enums.ESmsSendType;
|
||||||
|
import com.hzs.common.domain.third.sms.TSmsRecord;
|
||||||
|
import com.hzs.third.sms.service.ITSmsRecordService;
|
||||||
|
import com.hzs.third.sms.util.SmsUtil;
|
||||||
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 短信定时任务
|
||||||
|
* @Author: jiang chao
|
||||||
|
* @Time: 2023/3/11 16:22
|
||||||
|
* @Classname: SmsJob
|
||||||
|
* @PackageName: com.hzs.third.job
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
||||||
|
@Component
|
||||||
|
public class SmsJob {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITSmsRecordService itSmsRecordService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时发送短信
|
||||||
|
*/
|
||||||
|
// @Scheduled(cron = "0 * * * * ?")
|
||||||
|
@XxlJob("sendSms")
|
||||||
|
public void sendSms() {
|
||||||
|
log.info("定时发送短信任务开始!");
|
||||||
|
|
||||||
|
Date date = new Date();
|
||||||
|
|
||||||
|
QueryWrapper<TSmsRecord> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("SEND_TYPE", ESmsSendType.SCHEDULED.getValue());
|
||||||
|
queryWrapper.eq("SEND_STATUS", ESmsSendStatus.NOT_SEND.getValue());
|
||||||
|
queryWrapper.le("SEND_TIME", date);
|
||||||
|
queryWrapper.orderByAsc(SystemFieldConstants.CREATION_TIME);
|
||||||
|
List<TSmsRecord> list = itSmsRecordService.list(queryWrapper);
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
log.info("本次共需要发送短信{}条", list.size());
|
||||||
|
|
||||||
|
for (TSmsRecord tSmsRecord : list) {
|
||||||
|
String str = SmsUtil.sendSms(tSmsRecord.getPhone(), tSmsRecord.getContent());
|
||||||
|
if (null == str) {
|
||||||
|
// 发送成功
|
||||||
|
tSmsRecord.setSendResult(ESmsSendResult.SUCCESS.getValue());
|
||||||
|
} else {
|
||||||
|
tSmsRecord.setSendResult(ESmsSendResult.FAIL.getValue());
|
||||||
|
}
|
||||||
|
tSmsRecord.setSendStatus(ESmsSendStatus.SEND.getValue());
|
||||||
|
tSmsRecord.setPkModified(MagicNumberConstants.PK_ADMIN);
|
||||||
|
tSmsRecord.setModifiedTime(date);
|
||||||
|
itSmsRecordService.updateById(tSmsRecord);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log.info("本次没有需要发送的短信");
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("定时发送短信任务结束!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -4,18 +4,27 @@ import com.hzs.sale.wares.IWaresServiceApi;
|
||||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: hzs_cloud
|
||||||
|
* @BelongsPackage: com.hzs.third.job
|
||||||
|
* @Author: yh
|
||||||
|
* @CreateTime: 2023-06-01 10:44
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
||||||
@Component
|
@Component
|
||||||
public class WaresJob {
|
public class WaresJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IWaresServiceApi iWaresServiceApi;
|
private IWaresServiceApi waresServiceApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品自动上下架
|
* 商品自动上下架
|
||||||
|
|
@ -23,12 +32,14 @@ public class WaresJob {
|
||||||
@XxlJob("waresAutoLoadingJob")
|
@XxlJob("waresAutoLoadingJob")
|
||||||
public void waresAutoLoadingJob() {
|
public void waresAutoLoadingJob() {
|
||||||
// 修改符合 时间条件商品上架
|
// 修改符合 时间条件商品上架
|
||||||
// 获取当前时间
|
/**
|
||||||
|
* 获取当前时间
|
||||||
|
*/
|
||||||
Date currentTime = new Date();
|
Date currentTime = new Date();
|
||||||
// 自动上架
|
// 自动上架
|
||||||
iWaresServiceApi.updateByAutoStartAndAutoStart(currentTime);
|
waresServiceApi.updateByAutoStartAndAutoStart(currentTime);
|
||||||
// 定时自动下架
|
// 定时自动下架
|
||||||
iWaresServiceApi.updateByAutoStartAndAutoEnd(currentTime);
|
waresServiceApi.updateByAutoStartAndAutoEnd(currentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -37,6 +48,6 @@ public class WaresJob {
|
||||||
@XxlJob("waresPreSaleJob")
|
@XxlJob("waresPreSaleJob")
|
||||||
public void waresPreSaleJob() {
|
public void waresPreSaleJob() {
|
||||||
// 修改商品预售状态
|
// 修改商品预售状态
|
||||||
iWaresServiceApi.waresPreSale();
|
waresServiceApi.waresPreSale();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,11 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信发送记录
|
* @Description: 短信发送记录
|
||||||
|
* @Author: jiang chao
|
||||||
|
* @Time: 2023/3/9 16:10
|
||||||
|
* @Classname: SmsRecordController
|
||||||
|
* @PackageName: com.hzs.third.sms.controller
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/manage/sms-record/")
|
@RequestMapping("/manage/sms-record/")
|
||||||
|
|
@ -35,7 +39,7 @@ public class SmsRecordController extends BaseController {
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Log(module = EOperationModule.SMS_CONFIG, business = EOperationBusiness.SMS_RECORD, method = EOperationMethod.SELECT)
|
@Log(module = EOperationModule.SMS_CONFIG, business = EOperationBusiness.SMS_RECORD ,method = EOperationMethod.SELECT)
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SmsRecordQueryParam param) {
|
public TableDataInfo list(SmsRecordQueryParam param) {
|
||||||
startPage();
|
startPage();
|
||||||
|
|
@ -54,7 +58,7 @@ public class SmsRecordController extends BaseController {
|
||||||
* @param response
|
* @param response
|
||||||
* @param param
|
* @param param
|
||||||
*/
|
*/
|
||||||
@Log(module = EOperationModule.SMS_CONFIG, business = EOperationBusiness.SMS_RECORD, method = EOperationMethod.EXPORT)
|
@Log(module = EOperationModule.SMS_CONFIG, business = EOperationBusiness.SMS_RECORD ,method = EOperationMethod.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, SmsRecordQueryParam param) {
|
public void export(HttpServletResponse response, SmsRecordQueryParam param) {
|
||||||
List<TSmsRecordExt> list = itSmsRecordService.queryList(param, SecurityUtils.getPkCountry());
|
List<TSmsRecordExt> list = itSmsRecordService.queryList(param, SecurityUtils.getPkCountry());
|
||||||
|
|
@ -74,7 +78,7 @@ public class SmsRecordController extends BaseController {
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Log(module = EOperationModule.SMS_CONFIG, business = EOperationBusiness.SMS_CREATE, method = EOperationMethod.INSERT)
|
@Log(module = EOperationModule.SMS_CONFIG, business = EOperationBusiness.SMS_CREATE ,method = EOperationMethod.INSERT)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public AjaxResult create(@RequestBody SmsCreateParam param) {
|
public AjaxResult create(@RequestBody SmsCreateParam param) {
|
||||||
if (null == param.getTemplateId() || null == param.getSendScope() || null == param.getSendType()) {
|
if (null == param.getTemplateId() || null == param.getSendScope() || null == param.getSendType()) {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信发送记录 Mapper 接口
|
* 短信发送记录 Mapper 接口
|
||||||
|
*
|
||||||
|
* @author hzs
|
||||||
|
* @since 2023-03-08
|
||||||
*/
|
*/
|
||||||
public interface TSmsRecordMapper extends BaseMapper<TSmsRecord> {
|
public interface TSmsRecordMapper extends BaseMapper<TSmsRecord> {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信发送记录 服务类
|
* 短信发送记录 服务类
|
||||||
|
*
|
||||||
|
* @author hzs
|
||||||
|
* @since 2023-03-08
|
||||||
*/
|
*/
|
||||||
public interface ITSmsRecordService extends IService<TSmsRecord> {
|
public interface ITSmsRecordService extends IService<TSmsRecord> {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信发送记录 服务实现类
|
* 短信发送记录 服务实现类
|
||||||
|
*
|
||||||
|
* @author hzs
|
||||||
|
* @since 2023-03-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class TSmsRecordServiceImpl extends ServiceImpl<TSmsRecordMapper, TSmsRecord> implements ITSmsRecordService {
|
public class TSmsRecordServiceImpl extends ServiceImpl<TSmsRecordMapper, TSmsRecord> implements ITSmsRecordService {
|
||||||
|
|
@ -34,9 +37,9 @@ public class TSmsRecordServiceImpl extends ServiceImpl<TSmsRecordMapper, TSmsRec
|
||||||
private ITSmsTemplateService itSmsTemplateService;
|
private ITSmsTemplateService itSmsTemplateService;
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberServiceApi iMemberServiceApi;
|
private IMemberServiceApi iMemberServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ISaOrderServiceApi iSaOrderServiceApi;
|
private ISaOrderServiceApi iSaOrderServiceApi;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TSmsRecordExt> queryList(SmsRecordQueryParam param, Integer pkCountry) {
|
public List<TSmsRecordExt> queryList(SmsRecordQueryParam param, Integer pkCountry) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue