生日有礼发券修复
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
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;
|
||||
@@ -11,12 +15,25 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequestMapping("/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() {
|
||||
return testService.insertData();
|
||||
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 "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.czg.task;
|
||||
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.account.service.PointsExchangeRecordService;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.account.service.ShopUserFlowService;
|
||||
import com.czg.account.service.ShopUserService;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
@@ -18,6 +22,12 @@ public class PointsProductExchangeTask {
|
||||
|
||||
@Resource
|
||||
private PointsExchangeRecordService pointsExchangeRecordService;
|
||||
@Resource
|
||||
private ShopUserFlowService shopUserFlowService;
|
||||
@Resource
|
||||
private ShopInfoService shopInfoService;
|
||||
@Resource
|
||||
private ShopUserService shopUserService;
|
||||
|
||||
/**
|
||||
* order 过期
|
||||
@@ -26,4 +36,5 @@ public class PointsProductExchangeTask {
|
||||
public void run() {
|
||||
pointsExchangeRecordService.authCancel();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user