|
@@ -48,6 +48,27 @@ public class IntegralShoppingMallController {
|
|
private WxPushUtil wxPushUtil;
|
|
private WxPushUtil wxPushUtil;
|
|
@Resource
|
|
@Resource
|
|
private IntegralRuleService integralRuleService;
|
|
private IntegralRuleService integralRuleService;
|
|
|
|
+ @Resource
|
|
|
|
+ private IntegralShopPicService integralShopPicService;
|
|
|
|
+
|
|
|
|
+ //获取积分活动信息图片
|
|
|
|
+ @RequestMapping(value = "/getIntegralShopPicInfoList", method = RequestMethod.GET)
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public String getIntegralShopPicInfoList(@RequestParam Integer stationId){
|
|
|
|
+ Gson gson =new Gson();
|
|
|
|
+ //返回结果集
|
|
|
|
+ ResultData resultData = null;
|
|
|
|
+ if(stationId !=null){
|
|
|
|
+ IntegralShopPic integralShopPic = new IntegralShopPic();
|
|
|
|
+ integralShopPic.setStationId(stationId);
|
|
|
|
+ List<IntegralShopPic> integralShopPicList = integralShopPicService.getIntegralShopPicList(integralShopPic);
|
|
|
|
+ resultData=ResultData.success(integralShopPicList);
|
|
|
|
+ }else {
|
|
|
|
+ resultData=ResultData.error(CodeMsg.REQUEST_FAIL);
|
|
|
|
+ }
|
|
|
|
+ return gson.toJson(resultData);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
//获取油站积分商品信息
|
|
//获取油站积分商品信息
|
|
@RequestMapping(value = "/getIntegralWaresInfoList", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/getIntegralWaresInfoList", method = RequestMethod.GET)
|
|
@@ -72,6 +93,7 @@ public class IntegralShoppingMallController {
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@Transactional
|
|
@Transactional
|
|
public String insertIntegralOrder(@RequestBody IntegralOrder request){
|
|
public String insertIntegralOrder(@RequestBody IntegralOrder request){
|
|
|
|
+ logger.info("生成订单所传递参数:"+ request.toString());
|
|
Gson gson =new Gson();
|
|
Gson gson =new Gson();
|
|
//返回结果集
|
|
//返回结果集
|
|
ResultData resultData = null;
|
|
ResultData resultData = null;
|
|
@@ -160,6 +182,7 @@ public class IntegralShoppingMallController {
|
|
//用户已消费积分累积
|
|
//用户已消费积分累积
|
|
BigDecimal consumptionPoints = new BigDecimal(customerPointsInfo.getConsumptionPoints()).add(multiply);
|
|
BigDecimal consumptionPoints = new BigDecimal(customerPointsInfo.getConsumptionPoints()).add(multiply);
|
|
customerPoints.setConsumptionPoints(Integer.valueOf(consumptionPoints.toString()));
|
|
customerPoints.setConsumptionPoints(Integer.valueOf(consumptionPoints.toString()));
|
|
|
|
+ logger.info("用户积分: "+ consumptionPoints.toString());
|
|
customerPointsService.updateCustomerPointsInfo(customerPoints);
|
|
customerPointsService.updateCustomerPointsInfo(customerPoints);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -168,6 +191,7 @@ public class IntegralShoppingMallController {
|
|
if(integralWaresInfoList !=null && integralWaresInfoList.size() ==1){
|
|
if(integralWaresInfoList !=null && integralWaresInfoList.size() ==1){
|
|
integralWares.setWaresOutCount(integralWaresInfoList.get(0).getWaresOutCount()+1);
|
|
integralWares.setWaresOutCount(integralWaresInfoList.get(0).getWaresOutCount()+1);
|
|
integralWares.setWaresCount(integralWaresInfoList.get(0).getWaresCount()-1);
|
|
integralWares.setWaresCount(integralWaresInfoList.get(0).getWaresCount()-1);
|
|
|
|
+ logger.info("商品已售数量: "+ integralWares.toString());
|
|
integralWaresService.updateIntegralWaresInfo(integralWares);
|
|
integralWaresService.updateIntegralWaresInfo(integralWares);
|
|
}
|
|
}
|
|
|
|
|