Commit 8f6e8099 by 魏文甫

update

1 parent b729b12c
...@@ -3,6 +3,7 @@ package com.server.web.controller; ...@@ -3,6 +3,7 @@ package com.server.web.controller;
import com.server.utils.ResultMapUtil; import com.server.utils.ResultMapUtil;
import com.server.utils.SendSMSUtil; import com.server.utils.SendSMSUtil;
import com.server.utils.VerifyCodeUtils; import com.server.utils.VerifyCodeUtils;
import com.server.web.common.mapper.TKzyUserMapper;
import com.server.web.common.model.TKzyUser; import com.server.web.common.model.TKzyUser;
import com.server.web.common.model.TKzyUserExample; import com.server.web.common.model.TKzyUserExample;
import com.server.web.common.service.UserService; import com.server.web.common.service.UserService;
...@@ -26,11 +27,16 @@ import java.util.concurrent.TimeUnit; ...@@ -26,11 +27,16 @@ import java.util.concurrent.TimeUnit;
public class UserController extends BaseController { public class UserController extends BaseController {
@Autowired @Autowired
UserService userService; UserService userService;
@Autowired
private TKzyUserMapper tKzyUserMapper;
@PostMapping("/userData") @PostMapping("/userData")
public Map userData(HttpServletRequest request) { public Map userData(HttpServletRequest request) {
TKzyUser loginUser = getLoginUser(request); TKzyUser loginUser = getLoginUser(request);
if (loginUser != null && loginUser.getId() != null) {
loginUser = tKzyUserMapper.selectByPrimaryKey(loginUser.getId());
}
return returnSuccess(loginUser); return returnSuccess(loginUser);
} }
...@@ -222,7 +228,7 @@ public class UserController extends BaseController { ...@@ -222,7 +228,7 @@ public class UserController extends BaseController {
* @return * @return
*/ */
@ResponseBody @ResponseBody
@RequestMapping(value = "/signIn", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json") @RequestMapping(value = "/signIn", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> signIn(HttpServletRequest request) { public Map<String, Object> signIn(HttpServletRequest request) {
TKzyUser loginUser = getLoginUser(request); TKzyUser loginUser = getLoginUser(request);
if (loginUser == null || loginUser.getId() == null) { if (loginUser == null || loginUser.getId() == null) {
...@@ -238,7 +244,7 @@ public class UserController extends BaseController { ...@@ -238,7 +244,7 @@ public class UserController extends BaseController {
* @return * @return
*/ */
@ResponseBody @ResponseBody
@RequestMapping(value = "/signInList", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json") @RequestMapping(value = "/signInList", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> signInList(HttpServletRequest request) { public Map<String, Object> signInList(HttpServletRequest request) {
TKzyUser loginUser = getLoginUser(request); TKzyUser loginUser = getLoginUser(request);
if (loginUser == null || loginUser.getId() == null) { if (loginUser == null || loginUser.getId() == null) {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
WHERE WHERE
t.source_type = 1 t.source_type = 1
AND t.user_id = #{userId,jdbcType=BIGINT} AND t.user_id = #{userId,jdbcType=BIGINT}
AND DATE_FORMAT(t.create_dt, '%Y-%m-%') = #{todya,jdbcType=VARCHAR} AND DATE_FORMAT(t.create_dt, '%Y-%m-%') = #{today,jdbcType=VARCHAR}
limit t.id DESC limit 0,1 ORDER BY t.id DESC limit 0,1
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!