|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.poteviohealth.cgp.common.filter.MiniJwtVO;
|
|
import com.poteviohealth.cgp.common.filter.MiniJwtVO;
|
|
|
import com.poteviohealth.cgp.common.filter.TokenContext;
|
|
import com.poteviohealth.cgp.common.filter.TokenContext;
|
|
|
import com.poteviohealth.cgp.common.integrated.customer.model.CustomerIntegration;
|
|
import com.poteviohealth.cgp.common.integrated.customer.model.CustomerIntegration;
|
|
|
|
|
+import com.poteviohealth.cgp.common.integrated.customer.model.UserPointForCoupon;
|
|
|
import com.poteviohealth.cgp.common.model.CommonPage;
|
|
import com.poteviohealth.cgp.common.model.CommonPage;
|
|
|
import com.poteviohealth.cgp.common.model.PageQuery;
|
|
import com.poteviohealth.cgp.common.model.PageQuery;
|
|
|
import com.poteviohealth.cgp.common.model.VaultsResponse;
|
|
import com.poteviohealth.cgp.common.model.VaultsResponse;
|
|
@@ -126,12 +127,27 @@ public class IntegralDetailServiceImpl extends BaseServiceImpl<IntegralDetailMap
|
|
|
List<IntegralDetail> list = IntegralConverter.INSTANCE.model2FeginDTO(customerIntegration);
|
|
List<IntegralDetail> list = IntegralConverter.INSTANCE.model2FeginDTO(customerIntegration);
|
|
|
for (IntegralDetail detail : list) {
|
|
for (IntegralDetail detail : list) {
|
|
|
createOperator(detail.getOperatorId());
|
|
createOperator(detail.getOperatorId());
|
|
|
|
|
+ detail.setType(1);
|
|
|
detail.setIntegralDetailId(CgpTool.generateKey());
|
|
detail.setIntegralDetailId(CgpTool.generateKey());
|
|
|
super.save(detail);
|
|
super.save(detail);
|
|
|
}
|
|
}
|
|
|
return VaultsResponse.success();
|
|
return VaultsResponse.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public VaultsResponse forCoupon(UserPointForCoupon userPointForCoupon) {
|
|
|
|
|
+ IntegralDetail detail = new IntegralDetail();
|
|
|
|
|
+ detail.setCustomerId(userPointForCoupon.getCustomerId());
|
|
|
|
|
+ detail.setIntegral(Long.valueOf(userPointForCoupon.getIntegral()));
|
|
|
|
|
+ detail.setOperatorId(userPointForCoupon.getOperatorId());
|
|
|
|
|
+ detail.setOrderId(userPointForCoupon.getCouponId());
|
|
|
|
|
+ detail.setType(2);
|
|
|
|
|
+ detail.setEvent("兑换优惠券");
|
|
|
|
|
+ detail.setIntegralDetailId(CgpTool.generateKey());
|
|
|
|
|
+ super.save(detail);
|
|
|
|
|
+ return VaultsResponse.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private CommonPage<IntegralDetail> selectOrderIPage(IntegralDetailWebInDTO integralDetailWebInDTO) {
|
|
private CommonPage<IntegralDetail> selectOrderIPage(IntegralDetailWebInDTO integralDetailWebInDTO) {
|
|
|
IPage<IntegralDetail> page = new Page<>(integralDetailWebInDTO.getPageNum(), integralDetailWebInDTO.getPageSize());
|
|
IPage<IntegralDetail> page = new Page<>(integralDetailWebInDTO.getPageNum(), integralDetailWebInDTO.getPageSize());
|
|
|
|
|
|