|
@@ -44,6 +44,8 @@ public class PayOrderController {
|
|
private IntegralRuleService integralRuleService;
|
|
private IntegralRuleService integralRuleService;
|
|
@Resource
|
|
@Resource
|
|
private CustomerPointsService customerPointsService;
|
|
private CustomerPointsService customerPointsService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CustomerPointsRecordService customerPointsRecordService;
|
|
|
|
|
|
//一键支付,生成订单
|
|
//一键支付,生成订单
|
|
@RequestMapping(value = "/AddPayOrderInfo", consumes = "application/json", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/AddPayOrderInfo", consumes = "application/json", method = RequestMethod.POST)
|
|
@@ -511,7 +513,7 @@ public class PayOrderController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 计算使用电子会员卡消费生成积分
|
|
|
|
|
|
+ * 计算消费生成积分
|
|
*/
|
|
*/
|
|
public int calculateIntegral(CalculateIntegral calculateIntegral){
|
|
public int calculateIntegral(CalculateIntegral calculateIntegral){
|
|
int integral =0;
|
|
int integral =0;
|
|
@@ -636,6 +638,15 @@ public class PayOrderController {
|
|
if(customerPointsInfo !=null){
|
|
if(customerPointsInfo !=null){
|
|
customerName =customerPointsInfo.getCustomerName();
|
|
customerName =customerPointsInfo.getCustomerName();
|
|
surplusIntegral =new BigDecimal(customerPointsInfo.getPoints()).add(new BigDecimal(integral));
|
|
surplusIntegral =new BigDecimal(customerPointsInfo.getPoints()).add(new BigDecimal(integral));
|
|
|
|
+ CustomerPointsRecord customerPointsRecord = new CustomerPointsRecord();
|
|
|
|
+ customerPointsRecord.setCreateTime(new Date());
|
|
|
|
+ customerPointsRecord.setCustomerName(customerName);
|
|
|
|
+ customerPointsRecord.setStationName(stationName);
|
|
|
|
+ customerPointsRecord.setStationId(stationId);
|
|
|
|
+ customerPointsRecord.setRecordType("+");
|
|
|
|
+ customerPointsRecord.setUnionId(customerPointsInfo.getUnionId());
|
|
|
|
+ customerPointsRecord.setIntegral(integral);
|
|
|
|
+ customerPointsRecordService.insertCustomerPointsRecordInfo(customerPointsRecord);
|
|
customerPoints.setUnionId(customerPointsInfo.getUnionId());
|
|
customerPoints.setUnionId(customerPointsInfo.getUnionId());
|
|
customerPoints.setPoints(surplusIntegral.intValue());
|
|
customerPoints.setPoints(surplusIntegral.intValue());
|
|
//更新客户积分
|
|
//更新客户积分
|