分销 定时任务
This commit is contained in:
@@ -1,39 +0,0 @@
|
|||||||
package com.czg.controller;
|
|
||||||
|
|
||||||
import com.czg.account.entity.ShopUser;
|
|
||||||
import com.czg.account.service.ShopInfoService;
|
|
||||||
import com.czg.account.service.ShopUserFlowService;
|
|
||||||
import com.czg.account.service.ShopUserService;
|
|
||||||
import com.czg.account.service.TestService;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author GYJoker
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/notify/test")
|
|
||||||
public class TestController {
|
|
||||||
@Resource
|
|
||||||
private ShopUserFlowService shopUserFlowService;
|
|
||||||
@Resource
|
|
||||||
private ShopInfoService shopInfoService;
|
|
||||||
@Resource
|
|
||||||
private ShopUserService shopUserService;
|
|
||||||
@Resource
|
|
||||||
private TestService testService;
|
|
||||||
|
|
||||||
@RequestMapping("/hello")
|
|
||||||
public String hello() {
|
|
||||||
shopUserFlowService.list().forEach(item -> {
|
|
||||||
ShopUser shopUserInfo = shopUserService.getShopUserInfo(item.getShopId(), item.getUserId());
|
|
||||||
if (shopUserInfo != null) {
|
|
||||||
item.setShopUserId(shopUserInfo.getId());
|
|
||||||
shopUserFlowService.updateById(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// return testService.insertData();
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,6 +13,7 @@ import com.czg.market.vo.InviteUserVO;
|
|||||||
import com.czg.market.vo.MkDistributionConfigVO;
|
import com.czg.market.vo.MkDistributionConfigVO;
|
||||||
import com.czg.resp.CzgResult;
|
import com.czg.resp.CzgResult;
|
||||||
import com.czg.sa.StpKit;
|
import com.czg.sa.StpKit;
|
||||||
|
import com.czg.task.DistributionTask;
|
||||||
import com.czg.utils.AssertUtil;
|
import com.czg.utils.AssertUtil;
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@@ -37,6 +38,22 @@ public class UDistributionController {
|
|||||||
private MkDistributionWithdrawFlowService withdrawFlowService;
|
private MkDistributionWithdrawFlowService withdrawFlowService;
|
||||||
@Resource
|
@Resource
|
||||||
private MkDistributionFlowService distributionFlowService;
|
private MkDistributionFlowService distributionFlowService;
|
||||||
|
@Resource
|
||||||
|
private DistributionTask distributionTask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销员中心-获取配置
|
||||||
|
*/
|
||||||
|
@GetMapping("/task")
|
||||||
|
public CzgResult<String> task(@RequestParam Long shopId) {
|
||||||
|
try {
|
||||||
|
distributionTask.deliver(shopId);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return CzgResult.failure(e.getMessage());
|
||||||
|
}
|
||||||
|
return CzgResult.success("任务执行成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分销员中心-获取配置
|
* 分销员中心-获取配置
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ public class NotifyController {
|
|||||||
@Resource
|
@Resource
|
||||||
private MkShopConsumeDiscountRecordService consumeDiscountRecordService;
|
private MkShopConsumeDiscountRecordService consumeDiscountRecordService;
|
||||||
|
|
||||||
|
|
||||||
|
//新客立减清除数据 测试用
|
||||||
@RequestMapping("clear")
|
@RequestMapping("clear")
|
||||||
public String clear(@RequestParam Integer shopId) {
|
public String clear(@RequestParam Integer shopId) {
|
||||||
consumeDiscountRecordService.remove(new QueryWrapper().eq(MkShopConsumeDiscountRecord::getShopId, shopId));
|
consumeDiscountRecordService.remove(new QueryWrapper().eq(MkShopConsumeDiscountRecord::getShopId, shopId));
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class StatisticTaskController {
|
|||||||
private StatisticTask statisticTask;
|
private StatisticTask statisticTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础统计
|
* 基础统计 预留重置统计
|
||||||
*
|
*
|
||||||
* @param date 日期yyyy-MM-dd
|
* @param date 日期yyyy-MM-dd
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user