Compare commits
4 Commits
07ff5cd199
...
d96583d316
| Author | SHA1 | Date |
|---|---|---|
|
|
d96583d316 | |
|
|
153a3fd24b | |
|
|
34e86d1835 | |
|
|
c8d446ad8b |
|
|
@ -1,37 +1,20 @@
|
||||||
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();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 定时任务批量处理统计会员以及伞下金额业绩盒数
|
* 定时任务7天重算直推会员金额业绩盒数
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2025/2/13 10:41
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.domain.R
|
|
||||||
**/
|
**/
|
||||||
R pushAmountBoxmethod();
|
R<?> repeatPushAmountBoxmethod(String startDateStr, String endDateStr);
|
||||||
/**
|
|
||||||
* @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,27 +30,22 @@ import java.util.List;
|
||||||
public class MemberSettleBonusProvider implements IMemberSettleBonusApi {
|
public class MemberSettleBonusProvider implements IMemberSettleBonusApi {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberMonthAchieveService cuMemberMonthAchieveService;
|
private ICuMemberMonthAchieveService iCuMemberMonthAchieveService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBonusSettleService bonusSettleService;
|
private IBonusSettleService iBonusSettleService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberBonusService cuMemberBonusService;
|
private IBonusGrantService iBonusGrantService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBonusGrantService bonusGrantService;
|
private ICuMemberBonusService iCuMemberBonusService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberAchieveService cuMemberAchieveService;
|
private ICuMemberAchieveService iCuMemberAchieveService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberRetailLogService cuMemberRetailLogService;
|
private ICuMemberRetailLogService iCuMemberRetailLogService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<Boolean> calculateCumberBonusBySecond(String orderCode) {
|
public R<Boolean> calculateCumberBonusBySecond(String orderCode) {
|
||||||
try {
|
try {
|
||||||
bonusSettleService.calculateCumberBonusBySecond(orderCode);
|
iBonusSettleService.calculateCumberBonusBySecond(orderCode);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return R.fail();
|
return R.fail();
|
||||||
}
|
}
|
||||||
|
|
@ -69,7 +64,7 @@ public class MemberSettleBonusProvider implements IMemberSettleBonusApi {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void backupsSettleBonusEveryday() {
|
public void backupsSettleBonusEveryday() {
|
||||||
cuMemberBonusService.backupsSettleBonusEveryday();
|
iCuMemberBonusService.backupsSettleBonusEveryday();
|
||||||
}
|
}
|
||||||
|
|
||||||
class BonusCalculateBonus extends Thread {
|
class BonusCalculateBonus extends Thread {
|
||||||
|
|
@ -82,55 +77,53 @@ 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 {
|
||||||
cuMemberBonusService.autoCalculateBonus(settleDate, settleEndDate);
|
iCuMemberBonusService.autoCalculateBonus(settleDate, settleEndDate);
|
||||||
|
log.info("奖金结算结束");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("BonusCalculateBonus error: ", e);
|
log.error("奖金结算异常,结算时间:{}", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, settleDate), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertCuMemberAchieveByEveryDay() {
|
public void insertCuMemberAchieveByEveryDay() {
|
||||||
cuMemberMonthAchieveService.insertCuMemberAchieveByEveryDay(DateUtils.beforeDate(1, ChronoUnit.DAYS));
|
iCuMemberMonthAchieveService.insertCuMemberAchieveByEveryDay(DateUtils.beforeDate(1, ChronoUnit.DAYS));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autoPublishBonus() {
|
public void autoPublishBonus() {
|
||||||
bonusGrantService.publishBonusByPeriodEveryDay();
|
iBonusGrantService.publishBonusByPeriodEveryDay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autoGrantBonus() {
|
public void autoGrantBonus() {
|
||||||
bonusGrantService.grantWithdrawBonusByPeriodEveryDay();
|
iBonusGrantService.grantWithdrawBonusByPeriodEveryDay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean chargeBackSaOrder(SaOrder saOrder) {
|
public Boolean chargeBackSaOrder(SaOrder saOrder) {
|
||||||
return cuMemberAchieveService.chargeBackSaOrder(saOrder);
|
return iCuMemberAchieveService.chargeBackSaOrder(saOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void calculateCuMemberRetailRangeBonusBySaOrder() {
|
public void calculateCuMemberRetailRangeBonusBySaOrder() {
|
||||||
List<CuMemberRetailLog> cuMemberRetailLogs = cuMemberRetailLogService.queryCuMemberRetailLog();
|
List<CuMemberRetailLog> cuMemberRetailLogs = iCuMemberRetailLogService.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) {
|
||||||
bonusSettleService.calculateCuMemberRetailRangeBonusBySaOrder(cuMemberRetailLog.getOrderCode());
|
iBonusSettleService.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) {
|
||||||
cuMemberRetailLogService.updateCuMemberRetailLogByList(successLogList);
|
iCuMemberRetailLogService.updateCuMemberRetailLogByList(successLogList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -138,6 +131,6 @@ public class MemberSettleBonusProvider implements IMemberSettleBonusApi {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<CuMemberRetail> queryValidateBoxOrAchieve(Long pkMember) {
|
public R<CuMemberRetail> queryValidateBoxOrAchieve(Long pkMember) {
|
||||||
return R.ok(bonusSettleService.queryValidateBoxOrAchieve(pkMember));
|
return R.ok(iBonusSettleService.queryValidateBoxOrAchieve(pkMember));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
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;
|
||||||
|
|
@ -30,7 +27,6 @@ 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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售会员登录服务
|
* 新零售会员登录服务
|
||||||
|
|
@ -52,27 +48,27 @@ public class RetailMemberLoginServiceImpl implements IRetailMemberLoginService {
|
||||||
throw new ServiceException("会员账号或联系方式必须填写");
|
throw new ServiceException("会员账号或联系方式必须填写");
|
||||||
}
|
}
|
||||||
|
|
||||||
CuMemberExt member;
|
CuMemberExt member = iCuMemberService.getRetailMemberByCode(userName);
|
||||||
|
|
||||||
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 + " 登录会员不存在");
|
||||||
|
|
@ -122,20 +118,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,10 +166,8 @@ public class RetailMemberController extends BaseController {
|
||||||
|
|
||||||
// 达到条件,但是没有选择区域,需要弹窗选择区域
|
// 达到条件,但是没有选择区域,需要弹窗选择区域
|
||||||
CuMemberRetailAchieveVO retailAchieve = iCuMemberRetailAchieveService.selectMemberSumAchieve(userId, pkCountry, systemType);
|
CuMemberRetailAchieveVO retailAchieve = iCuMemberRetailAchieveService.selectMemberSumAchieve(userId, pkCountry, systemType);
|
||||||
// 2024.12.30 添加需求,存在手动V0升V5,需要判断小市场业绩达到2万以上才可以进行开通
|
// TODO 2025.06.09 新需求,选择区域判断等级达到合伙人,血缘累计业绩达到30万,可以选择
|
||||||
if (retailAchieve.getSmallAreaPv().multiply(new BigDecimal("10000")).compareTo(SysConstants.SMALL_AREA_PV) < 0
|
if (retailAchieve.getSmallAreaPv().add(retailAchieve.getBigArealPv()).compareTo(SysConstants.TOTAL_AREA_PV) < 0) {
|
||||||
|| retailAchieve.getBigArealPv().multiply(new BigDecimal("10000")).compareTo(SysConstants.SMALL_AREA_PV) < 0
|
|
||||||
) {
|
|
||||||
return AjaxResult.error("还未达到选择收益区域条件");
|
return AjaxResult.error("还未达到选择收益区域条件");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,7 @@ import org.apache.dubbo.config.annotation.DubboService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 统计分析相关dubbo服务
|
* 统计分析相关dubbo服务
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2025/2/12 15:23
|
|
||||||
* @param:
|
|
||||||
* @return:
|
|
||||||
**/
|
**/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@DubboService
|
@DubboService
|
||||||
|
|
@ -21,29 +17,14 @@ 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";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小市场2万业绩(人民币)
|
* 血缘累计业绩30万
|
||||||
*/
|
*/
|
||||||
public static final BigDecimal SMALL_AREA_PV = new BigDecimal("20000");
|
public static final BigDecimal TOTAL_AREA_PV = new BigDecimal("300000");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开放使用会员编号(用于支付登录查看数据)
|
* 开放使用会员编号(用于支付登录查看数据)
|
||||||
*/
|
*/
|
||||||
public static final List<String> CONTROL_MEMBER_LIST = Arrays.asList("HZS20240001", "HZS20240002");
|
public static final List<String> CONTROL_MEMBER_LIST = Arrays.asList("RE20240001", "RE20240002");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,6 @@ import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信发送记录
|
* 短信发送记录
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2023-03-08
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,6 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* token验证处理
|
* token验证处理
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,13 @@ 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
|
||||||
|
|
@ -26,173 +20,124 @@ import java.util.Date;
|
||||||
public class BonusSettleJob {
|
public class BonusSettleJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
private IMemberSettleBonusApi memberBonusSettleApi;
|
IMemberSettleBonusApi iMemberSettleBonusApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 奖金每天自动结算,计算前一天奖金
|
* 奖金每天自动结算,计算前一天奖金
|
||||||
*
|
|
||||||
* @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("开始进行奖金结算");
|
||||||
memberBonusSettleApi.backupsSettleBonusEveryday();
|
iMemberSettleBonusApi.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("开始进行奖金结算");
|
||||||
memberBonusSettleApi.autoCalculateBonus(startDate);
|
iMemberSettleBonusApi.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("开始进行奖金结算");
|
||||||
memberBonusSettleApi.autoCalculateBonus(startDate);
|
iMemberSettleBonusApi.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("开始进行奖金结算");
|
||||||
memberBonusSettleApi.autoCalculateBonus(startDate);
|
iMemberSettleBonusApi.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("开始进行奖金结算");
|
||||||
memberBonusSettleApi.autoCalculateBonus(startDate);
|
iMemberSettleBonusApi.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("开始进行奖金结算");
|
||||||
memberBonusSettleApi.autoCalculateBonus(startDate);
|
iMemberSettleBonusApi.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("开始进行奖金结算");
|
||||||
memberBonusSettleApi.autoCalculateBonus(startDate);
|
iMemberSettleBonusApi.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("开始进行奖金结算");
|
||||||
memberBonusSettleApi.autoCalculateBonus(startDate);
|
iMemberSettleBonusApi.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("开始进行奖金公布");
|
||||||
memberBonusSettleApi.autoPublishBonus();
|
iMemberSettleBonusApi.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("开始进行奖金发放");
|
||||||
memberBonusSettleApi.autoGrantBonus();
|
iMemberSettleBonusApi.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("开始进行会员业绩计算");
|
||||||
memberBonusSettleApi.insertCuMemberAchieveByEveryDay();
|
iMemberSettleBonusApi.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("开始进行会员业绩计算");
|
||||||
memberBonusSettleApi.calculateCuMemberRetailRangeBonusBySaOrder();
|
iMemberSettleBonusApi.calculateCuMemberRetailRangeBonusBySaOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,6 @@ 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
|
||||||
|
|
@ -22,23 +16,22 @@ import org.springframework.stereotype.Component;
|
||||||
public class CuMemberJob {
|
public class CuMemberJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberJobServiceApi memberJobServiceApi;
|
IMemberJobServiceApi iMemberJobServiceApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时插入账户详情数据
|
* 定时插入账户详情数据
|
||||||
*/
|
*/
|
||||||
@XxlJob("insertAccountDetail")
|
@XxlJob("insertAccountDetail")
|
||||||
public void insertAccountDetail() {
|
public void insertAccountDetail() {
|
||||||
memberJobServiceApi.insertAccountDetail();
|
iMemberJobServiceApi.insertAccountDetail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自动提现
|
* 自动提现
|
||||||
*/
|
*/
|
||||||
@XxlJob("automaticWithdrawal")
|
@XxlJob("automaticWithdrawal")
|
||||||
public void automaticWithdrawal() {
|
public void automaticWithdrawal() {
|
||||||
memberJobServiceApi.automaticWithdrawal();
|
iMemberJobServiceApi.automaticWithdrawal();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ 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;
|
||||||
|
|
@ -20,32 +19,22 @@ 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 memberServiceApi;
|
IMemberServiceApi iMemberServiceApi;
|
||||||
|
@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;
|
||||||
|
|
@ -83,11 +72,7 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 重算7天内奖金拨比
|
* 重算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() {
|
||||||
|
|
@ -109,11 +94,7 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 7天重算顶点奖金拨比统计
|
* 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() {
|
||||||
|
|
@ -134,35 +115,18 @@ 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 = memberServiceApi.clearMemberEmptyCode().getData();
|
Integer dataCount = iMemberServiceApi.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() {
|
||||||
|
|
@ -191,11 +155,7 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 每月10号处理上个月提货赠送活动满足活动规则的数据
|
* 每月10号处理上个月提货赠送活动满足活动规则的数据
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2025/2/6 10:59
|
|
||||||
* @param: []
|
|
||||||
* @return: void
|
|
||||||
**/
|
**/
|
||||||
@XxlJob("deliveryLog")
|
@XxlJob("deliveryLog")
|
||||||
public void deliveryLog() {
|
public void deliveryLog() {
|
||||||
|
|
@ -203,11 +163,7 @@ 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() {
|
||||||
|
|
@ -215,11 +171,7 @@ public class MemberJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 重算7天统计直推会员金额业绩盒数
|
* 重算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() {
|
||||||
|
|
@ -231,9 +183,7 @@ 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,8 +1,6 @@
|
||||||
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;
|
||||||
|
|
@ -15,14 +13,14 @@ import org.springframework.stereotype.Component;
|
||||||
public class OrderJob {
|
public class OrderJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ISaOrderServiceApi orderServiceApi;
|
ISaOrderServiceApi iSaOrderServiceApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时关单 订单三十分钟未支付自动关闭
|
* 定时关单 订单三十分钟未支付自动关闭
|
||||||
*/
|
*/
|
||||||
@XxlJob("autoCloseOrder")
|
@XxlJob("autoCloseOrder")
|
||||||
public void timingCloseOrder() {
|
public void timingCloseOrder() {
|
||||||
orderServiceApi.closeOrder();
|
iSaOrderServiceApi.closeOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,7 @@ 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")
|
||||||
|
|
@ -21,14 +16,13 @@ import org.springframework.stereotype.Component;
|
||||||
public class ScmJob {
|
public class ScmJob {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
private IScmBillServiceApi scmBillServiceApi;
|
IScmBillServiceApi iScmBillServiceApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新单据号初始化值
|
* 更新单据号初始化值
|
||||||
*/
|
*/
|
||||||
// @Scheduled(cron = "0 54 15 * * ?")
|
|
||||||
@XxlJob("updateBillNo")
|
@XxlJob("updateBillNo")
|
||||||
public void updateBillNo() {
|
public void updateBillNo() {
|
||||||
scmBillServiceApi.updateScmBillNoNextValue();
|
iScmBillServiceApi.updateScmBillNoNextValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
||||||
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,27 +4,18 @@ 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
|
||||||
private IWaresServiceApi waresServiceApi;
|
IWaresServiceApi iWaresServiceApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品自动上下架
|
* 商品自动上下架
|
||||||
|
|
@ -32,14 +23,12 @@ public class WaresJob {
|
||||||
@XxlJob("waresAutoLoadingJob")
|
@XxlJob("waresAutoLoadingJob")
|
||||||
public void waresAutoLoadingJob() {
|
public void waresAutoLoadingJob() {
|
||||||
// 修改符合 时间条件商品上架
|
// 修改符合 时间条件商品上架
|
||||||
/**
|
// 获取当前时间
|
||||||
* 获取当前时间
|
|
||||||
*/
|
|
||||||
Date currentTime = new Date();
|
Date currentTime = new Date();
|
||||||
// 自动上架
|
// 自动上架
|
||||||
waresServiceApi.updateByAutoStartAndAutoStart(currentTime);
|
iWaresServiceApi.updateByAutoStartAndAutoStart(currentTime);
|
||||||
// 定时自动下架
|
// 定时自动下架
|
||||||
waresServiceApi.updateByAutoStartAndAutoEnd(currentTime);
|
iWaresServiceApi.updateByAutoStartAndAutoEnd(currentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -48,6 +37,6 @@ public class WaresJob {
|
||||||
@XxlJob("waresPreSaleJob")
|
@XxlJob("waresPreSaleJob")
|
||||||
public void waresPreSaleJob() {
|
public void waresPreSaleJob() {
|
||||||
// 修改商品预售状态
|
// 修改商品预售状态
|
||||||
waresServiceApi.waresPreSale();
|
iWaresServiceApi.waresPreSale();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,7 @@ 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/")
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,6 @@ 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,9 +10,6 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信发送记录 服务类
|
* 短信发送记录 服务类
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2023-03-08
|
|
||||||
*/
|
*/
|
||||||
public interface ITSmsRecordService extends IService<TSmsRecord> {
|
public interface ITSmsRecordService extends IService<TSmsRecord> {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,6 @@ 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 {
|
||||||
|
|
@ -37,9 +34,9 @@ public class TSmsRecordServiceImpl extends ServiceImpl<TSmsRecordMapper, TSmsRec
|
||||||
private ITSmsTemplateService itSmsTemplateService;
|
private ITSmsTemplateService itSmsTemplateService;
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
private IMemberServiceApi iMemberServiceApi;
|
IMemberServiceApi iMemberServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
private ISaOrderServiceApi iSaOrderServiceApi;
|
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