|
|
|
@@ -14,8 +14,10 @@ import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.simple.common.ResultData; |
|
|
|
import com.simple.domain.po.MallRole; |
|
|
|
import com.simple.domain.po.MallUserInfo; |
|
|
|
import com.simple.domain.po.MallUserRole; |
|
|
|
import com.simple.service.MallRoleService; |
|
|
|
import com.simple.service.MallUserInfoService; |
|
|
|
import com.simple.service.MallUserRoleService; |
|
|
|
import com.simple.shiro.PasswordHelper; |
|
|
|
@@ -38,6 +40,9 @@ public class MallUserInfoController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
MallUserRoleService userRoleService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
MallRoleService mallRoleService; |
|
|
|
|
|
|
|
@ApiOperation(value = "用户分页接口", response = String.class) |
|
|
|
@GetMapping("lists") |
|
|
|
@@ -48,11 +53,11 @@ public class MallUserInfoController { |
|
|
|
r.setUid(u.getId()); |
|
|
|
PageInfo<MallUserRole> ur = userRoleService.listAsPage(r, 1, 1); |
|
|
|
if(ur.getSize()>0) { |
|
|
|
u.setRoleId(ur.getList().get(0).getRoleId()); |
|
|
|
MallRole role = mallRoleService.getById(ur.getList().get(0).getRoleId()); |
|
|
|
u.setRoleName(role.getName()); |
|
|
|
} |
|
|
|
u.setPassword(null);//不返回密码 |
|
|
|
} |
|
|
|
|
|
|
|
return new ResultData(page); |
|
|
|
} |
|
|
|
|
|
|
|
|