|
@ -11,6 +11,7 @@ import com.qs.serve.framework.base.model.R; |
|
|
import com.qs.serve.modules.oms.entity.OmsPromotionGift; |
|
|
import com.qs.serve.modules.oms.entity.OmsPromotionGift; |
|
|
import com.qs.serve.modules.oms.entity.bo.OmsPromotionGiftBo; |
|
|
import com.qs.serve.modules.oms.entity.bo.OmsPromotionGiftBo; |
|
|
import com.qs.serve.modules.oms.entity.vo.OmsPromotionGiftVo; |
|
|
import com.qs.serve.modules.oms.entity.vo.OmsPromotionGiftVo; |
|
|
|
|
|
import com.qs.serve.modules.oms.service.OmsPromotionGiftOptionsService; |
|
|
import com.qs.serve.modules.oms.service.OmsPromotionGiftService; |
|
|
import com.qs.serve.modules.oms.service.OmsPromotionGiftService; |
|
|
import lombok.AllArgsConstructor; |
|
|
import lombok.AllArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
@ -31,6 +32,7 @@ import java.util.List; |
|
|
public class OmsPromotionGiftController { |
|
|
public class OmsPromotionGiftController { |
|
|
|
|
|
|
|
|
private OmsPromotionGiftService omsPromotionGiftService; |
|
|
private OmsPromotionGiftService omsPromotionGiftService; |
|
|
|
|
|
private OmsPromotionGiftOptionsService omsPromotionGiftOptionsService; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取客户所有搭赠方案 |
|
|
* 获取客户所有搭赠方案 |
|
@ -64,6 +66,13 @@ public class OmsPromotionGiftController { |
|
|
@SysLog(module = SystemModule.BASE, title = "搭赠方案", biz = BizType.QUERY) |
|
|
@SysLog(module = SystemModule.BASE, title = "搭赠方案", biz = BizType.QUERY) |
|
|
public R<OmsPromotionGiftVo> getById(@PathVariable("id") String id){ |
|
|
public R<OmsPromotionGiftVo> getById(@PathVariable("id") String id){ |
|
|
OmsPromotionGiftVo omsPromotionGift = omsPromotionGiftService.getDetailVo(id); |
|
|
OmsPromotionGiftVo omsPromotionGift = omsPromotionGiftService.getDetailVo(id); |
|
|
|
|
|
if (omsPromotionGift!=null&&omsPromotionGift.getGiftStatus()==1){ |
|
|
|
|
|
try { |
|
|
|
|
|
omsPromotionGiftOptionsService.runCompensate(id); |
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
return R.ok(omsPromotionGift); |
|
|
return R.ok(omsPromotionGift); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|