| | |
| | | import com.dsh.activity.feignclient.other.model.Site; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.service.*; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | /** |
| | | * 硬件开门后回调 存储会员使用明细 |
| | | */ |
| | | @PostMapping("/recordVipDetail") |
| | | public void recordVipDetail(Integer vipDetailId,Integer rid,Integer sid) { |
| | | @GetMapping("/recordVipDetail") |
| | | public void recordVipDetail(Integer vipDetailId,Integer rid,Integer sid) throws ParseException { |
| | | System.err.println("硬件开门后回调 存储会员卡门票权益使用记录"); |
| | | System.err.println("vipDetailId:"+vipDetailId); |
| | | System.err.println("rid:"+rid); |
| | |
| | | vipDetailServiceById.setUseStoreId(sid); |
| | | vipDetailServiceById.setStatus(2); |
| | | vipDetailServiceById.setStartTime(new Date()); |
| | | vipDetailServiceById.setEndTime(new Date()); |
| | | // 获取今天的晚上23:59:59 |
| | | // 获取今天的晚上23:59:59 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| | | String endOfDayStr = today + " 23:59:58"; |
| | | Date endOfDay = sdf.parse(endOfDayStr); |
| | | vipDetailServiceById.setEndTime(endOfDay); |
| | | vipDetailService.updateById(vipDetailServiceById); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |