forked from kidgrow-microservices-platform

zhaoxiaohao
2020-11-03 1a39d6ffecc6b4949f06dd03a8f64df0de75851a
kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-server/src/main/java/com/kidgrow/usercenter/controller/SysUserController.java
@@ -26,7 +26,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -87,7 +86,7 @@
     */
    @GetMapping(value = "/users/name/{username}")
    @ApiOperation(value = "根据用户名查询用户实体")
    @Cacheable(value = "user", key = "#username")
//    @Cacheable(value = "user", key = "#username")
    public SysUser selectByUsername(@PathVariable String username) {
        return appUserService.selectByUsername(username);
    }
@@ -199,8 +198,6 @@
    })
    @GetMapping("/users")
    public PageResult<SysUser> findUsers(@RequestParam Map<String, Object> params) {
//        log.info("租户ID:"+ TenantContextHolder.getTenant());
//        log.info("IP:"+request.getHeader(CommonConstant.USER_AGENT_IP));
        return appUserService.findUsers(params);
    }
    /**
@@ -258,7 +255,7 @@
     * 返回给Python加密密码
     */
    @GetMapping(value = "/users/python")
    public ResultBody jiaMipython(@RequestBody String password)  {
    public ResultBody jiaMipython(@RequestParam("password") String password)  {
        if (password==null||"".equals(password)) {
            return ResultBody.failed().msg("请输入密码");
        }
@@ -423,7 +420,7 @@
     * 根据map查询
     */
    private boolean checkAdmin(long id) {
        return id == 1L;
        return id == CommonConstant.ADMIN_USER_ID;
    }
    @PostMapping("/users/findAll")