| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RequestMapping("heart") |
| | |
| | | |
| | | @ApiOperation(value = "cookie点击") |
| | | @GetMapping("getCookie") |
| | | public Response getCookie() { |
| | | //service.updateTime(); |
| | | public Response getCookie(@RequestParam String uname, @RequestParam String sessionid) { |
| | | service.updateTime(uname,sessionid); |
| | | return new Response().set(1, true); |
| | | } |
| | | |
| | |
| | | mapper.delete(wrapper); |
| | | } |
| | | |
| | | public void updateTime() { |
| | | String uname=ActionUtil.getUser().getUname(); |
| | | public void updateTime(String uname, String sessionid) { |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.eq("uname",uname); |
| | | wrapper.eq("sessionid",sessionid); |
| | | wrapper.eq("create_time",new Date()); |
| | | } |
| | | } |