| | |
| | | |
| | | import com.dsh.activity.entity.THuiminRecord; |
| | | import com.dsh.activity.entity.TPayHuimin; |
| | | import com.dsh.activity.entity.UserPointsMerchandise; |
| | | import com.dsh.activity.entity.VipDetail; |
| | | import com.dsh.activity.feignclient.other.SiteClient; |
| | | import com.dsh.activity.feignclient.other.StoreClient; |
| | | import com.dsh.activity.feignclient.other.model.Site; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.service.*; |
| | | import com.dsh.activity.util.ResultUtil; |
| | | import com.dsh.activity.util.UUIDUtil; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | private SiteClient siteClient; |
| | | @Resource |
| | | private StoreClient storeClient; |
| | | @Resource |
| | | private UserPointsMerchandiseService userPointsMerchandiseService; |
| | | // @GetMapping("/grantTicket") |
| | | // public void grantTicket(Integer userId, Integer id) throws Exception { |
| | | // UserPointsMerchandise userPointsMerchandise = new UserPointsMerchandise(); |
| | | // userPointsMerchandise.setPointsMerchandiseId(id); |
| | | // userPointsMerchandise.setUserId(userId); |
| | | // userPointsMerchandise.setStatus(1); |
| | | // userPointsMerchandise.setInsertTime(new Date()); |
| | | // 947024 userPointsMerchandise.setPayType(1); |
| | | // userPointsMerchandise.setGoodsNumber(1); |
| | | // userPointsMerchandise.setCode(UUIDUtil.getTimeStr() + UUIDUtil.getNumberRandom(5)); |
| | | // userPointsMerchandise.setPayStatus(2); |
| | | // userPointsMerchandise.setState(1); |
| | | // userPointsMerchandise.setCashPayType(1); |
| | | // userPointsMerchandise.setPaymentTime(new Date()); |
| | | // userPointsMerchandiseService.save(userPointsMerchandise); |
| | | // } |
| | | /** |
| | | * 硬件开门后回调 存储玩湃惠民卡使用记录 |
| | | */ |
| | |
| | | * 硬件开门后回调 存储会员使用明细 |
| | | */ |
| | | @GetMapping("/recordVipDetail") |
| | | public void recordVipDetail(Integer vipDetailId,Integer rid,Integer sid) throws ParseException { |
| | | public void recordVipDetail(Integer vipDetail,Integer rid,Integer sid) throws ParseException { |
| | | System.err.println("硬件开门后回调 存储会员卡门票权益使用记录"); |
| | | System.err.println("vipDetailId:"+vipDetailId); |
| | | System.err.println("vipDetailId:"+vipDetail); |
| | | System.err.println("rid:"+rid); |
| | | System.err.println("sid:"+sid); |
| | | VipDetail vipDetailServiceById = vipDetailService.getById(vipDetailId); |
| | | String replace = vipDetail.toString().replace("-", ""); |
| | | VipDetail vipDetailServiceById = vipDetailService.getById(Integer.valueOf( replace)); |
| | | if (vipDetailServiceById!=null){ |
| | | Site site = siteClient.querySiteById(rid); |
| | | if (site!=null){ |
| | | List<Store> stores = storeClient.queryStoreByIds(Arrays.asList(rid)); |
| | | List<Store> stores = storeClient.queryStoreByIds(Arrays.asList(sid)); |
| | | if (!stores.isEmpty()){ |
| | | Store store = stores.get(0); |
| | | vipDetailServiceById.setOperatorId(store.getOperatorId()); |
| | | if(store.getOperatorId()==null){ |
| | | vipDetailServiceById.setOperatorId(0); |
| | | }else{ |
| | | vipDetailServiceById.setOperatorId(store.getOperatorId()); |
| | | } |
| | | } |
| | | } |
| | | // 根据场地id查询运营商id |
| | |
| | | vipDetailServiceById.setUseStoreId(sid); |
| | | vipDetailServiceById.setStatus(2); |
| | | vipDetailServiceById.setStartTime(new Date()); |
| | | vipDetailServiceById.setUseTime(new Date()); |
| | | // 获取今天的晚上23:59:59 |
| | | // 获取今天的晚上23:59:59 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |