前端随机立减金额获取
This commit is contained in:
parent
ddf3bf7697
commit
42fbc8ba65
|
|
@ -1,8 +1,10 @@
|
|||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.market.dto.MkShopRechargeDTO;
|
||||
import com.czg.market.entity.MkShopConsumeDiscountRecord;
|
||||
import com.czg.market.entity.MkShopRechargeFlow;
|
||||
import com.czg.market.service.MkRechargeFlowService;
|
||||
import com.czg.market.service.MkShopConsumeDiscountRecordService;
|
||||
import com.czg.market.service.MkShopRechargeService;
|
||||
import com.czg.market.vo.MkShopRechargeVO;
|
||||
import com.czg.resp.CzgResult;
|
||||
|
|
@ -25,6 +27,14 @@ public class ShopRechargeController {
|
|||
@Resource
|
||||
private MkRechargeFlowService rechargeFlowService;
|
||||
|
||||
@Resource
|
||||
private MkShopConsumeDiscountRecordService shopConsumeDiscountRecordService;
|
||||
|
||||
@GetMapping("/test")
|
||||
public CzgResult<MkShopConsumeDiscountRecord> get(@RequestParam Long shopId) {
|
||||
return CzgResult.success(shopConsumeDiscountRecordService.get(shopId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置信息获取
|
||||
* 权限标识: activate:list
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 店铺会员相关
|
||||
* 新客立减相关
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
|
|
@ -32,6 +32,13 @@ import org.springframework.web.bind.annotation.*;
|
|||
public class UShopConsumeDiscountController {
|
||||
@Resource
|
||||
private MkShopConsumeDiscountRecordService shopConsumeDiscountRecordService;
|
||||
|
||||
/**
|
||||
* 获取新客立减金额
|
||||
* 返回新客立减当次减免金额
|
||||
* @param shopId 店铺id
|
||||
* @return 金额
|
||||
*/
|
||||
@GetMapping
|
||||
public CzgResult<MkShopConsumeDiscountRecord> get(@RequestParam Long shopId) {
|
||||
return CzgResult.success(shopConsumeDiscountRecordService.get(shopId));
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ public class MkShopConsumeDiscountRecordServiceImpl extends ServiceImpl<MkShopCo
|
|||
|
||||
MkShopConsumeDiscountRecord shopConsumeDiscountRecord = new MkShopConsumeDiscountRecord();
|
||||
shopConsumeDiscountRecord.setShopId(shopId);
|
||||
shopConsumeDiscountRecord.setConsumeDiscountId(consumeDiscountVO.getId());
|
||||
|
||||
// 固定金额
|
||||
if (TableValueConstant.ConsumeDiscount.DiscountType.FIXED.getCode().equals(consumeDiscountVO.getDiscountType())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue