统计 用户 领取 记录
This commit is contained in:
@@ -4,14 +4,16 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import com.czg.account.vo.UserCouponVo;
|
||||
import com.czg.log.annotation.OperationLog;
|
||||
import com.czg.market.dto.*;
|
||||
import com.czg.market.dto.MkCouponGiftDTO;
|
||||
import com.czg.market.dto.MkRewardCouponDTO;
|
||||
import com.czg.market.dto.MkShopCouponRecordDTO;
|
||||
import com.czg.market.dto.ShopCouponDTO;
|
||||
import com.czg.market.service.MkCouponGiftService;
|
||||
import com.czg.market.service.MkShopCouponRecordService;
|
||||
import com.czg.market.service.ShopCouponService;
|
||||
import com.czg.product.service.ShopSyncService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.task.CouponTask;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.czg.validator.group.DefaultGroup;
|
||||
import com.czg.validator.group.InsertGroup;
|
||||
@@ -24,6 +26,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -152,11 +155,11 @@ public class ACouponController {
|
||||
* 优惠券列表/已领取详情
|
||||
*/
|
||||
@GetMapping("/record")
|
||||
public CzgResult<Page<MkShopCouponRecordDTO>> getRecordByCoupon(
|
||||
public CzgResult<Map<String, Object>> getRecordByCoupon(
|
||||
@RequestParam(required = false) String startTime,
|
||||
@RequestParam(required = false) String endTime,
|
||||
MkShopCouponRecordDTO param) {
|
||||
Page<MkShopCouponRecordDTO> data = couponRecordService.getRecord(param, startTime, endTime);
|
||||
Map<String, Object> data = couponRecordService.getRecord(param, startTime, endTime);
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
@@ -188,9 +191,7 @@ public class ACouponController {
|
||||
private void asyncToBranchShop(Long id, Integer type) {
|
||||
long shopId = StpKit.USER.getShopId(0L);
|
||||
log.info("优惠券同步,优惠券id:{},类型:{}", id, type);
|
||||
ThreadUtil.execAsync(() -> {
|
||||
shopSyncService.syncCouponBySourceShop(shopId, id, type);
|
||||
});
|
||||
ThreadUtil.execAsync(() -> shopSyncService.syncCouponBySourceShop(shopId, id, type));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user