| | |
| | | import com.dsh.activity.feignclient.other.StoreClient; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.model.CouponListVo; |
| | | import com.dsh.activity.model.CouponDeductionQuery; |
| | | import com.dsh.activity.model.CouponDeductionVO; |
| | | import com.dsh.activity.model.GrantCoupon; |
| | | import com.dsh.activity.model.SendCouponReq; |
| | | import com.dsh.activity.service.*; |
| | |
| | | private StoreClient storeClient; |
| | | @Autowired |
| | | private SiteClient siteClient; |
| | | @Autowired |
| | | private PointsMerchandiseService pointsMerchandiseService; |
| | | |
| | | |
| | | |
| | | |
| | | private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM"); |
| | | |
| | | /** |
| | | * 批量查询已核销优惠券的抵扣金额,供运营数据统计使用。 |
| | | * |
| | | * @param query 用户优惠券领取记录 ID 集合 |
| | | * @return 每条领取记录对应的抵扣金额 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/userCoupon/queryDeductionAmounts") |
| | | public List<CouponDeductionVO> queryDeductionAmounts(@RequestBody CouponDeductionQuery query) { |
| | | return userCouponService.queryDeductionAmounts(query); |
| | | } |
| | | |
| | | @PostMapping("/base/userConpon/getStuOfConpons") |
| | | public List<CouponStuAvailableVo> queryUserWithConponList(@RequestParam("appUserId") Integer appUserId) { |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/userCoupon/changeTicketStatus/{id}") |
| | | public void changeTicketStatus(@PathVariable("id") String id){ |
| | | @GetMapping("/userCoupon/changeTicketStatus/{id}/{storeId}/{siteId}") |
| | | public void changeTicketStatus(@PathVariable("id") String id,@PathVariable("storeId") Integer storeId,@PathVariable("siteId") Integer siteId){ |
| | | System.err.println("数据id"+id); |
| | | if (id.length()<=11){ |
| | | // 购买会员赠送的门票 |
| | |
| | | if (vipDetail!=null){ |
| | | System.err.println("修改使用状态"); |
| | | vipDetail.setStatus(2); |
| | | vipDetail.setUseStoreId(storeId); |
| | | vipDetail.setUseSiteId(siteId); |
| | | vipDetailService.updateById(vipDetail); |
| | | }else{ |
| | | System.err.println("未查询到会员权益门票数据"+ id); |
| | |
| | | UserPointsMerchandise userPointsMerchandise = userPointsMerchandiseService.getById(id); |
| | | System.err.println("积分商城门票数据"+ userPointsMerchandise); |
| | | if (userPointsMerchandise!=null){ |
| | | System.err.println("修改使用状态"); |
| | | userPointsMerchandise.setUserId(null); |
| | | userPointsMerchandise.setVerificationTime(new Date()); |
| | | userPointsMerchandise.setStatus(2); |
| | | userPointsMerchandiseService.updateById(userPointsMerchandise); |
| | | PointsMerchandise pointsMerchandise = pointsMerchandiseService.getById(userPointsMerchandise.getPointsMerchandiseId()); |
| | | if (pointsMerchandise!=null){ |
| | | if (pointsMerchandise.getCardType()==1){ |
| | | System.err.println("日卡修改使用状态"); |
| | | userPointsMerchandise.setUserId(null); |
| | | userPointsMerchandise.setVerificationTime(new Date()); |
| | | userPointsMerchandise.setVerifiStoreId(storeId); |
| | | userPointsMerchandise.setStatus(2); |
| | | userPointsMerchandiseService.updateById(userPointsMerchandise); |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | System.err.println("未查询到积分商城门票数据"+ id); |
| | | } |