@@ -36,6 +36,7 @@ public class UserController extends BaseController {
*/
@PostMapping("/list")
public ResultData list(@RequestBody UserParam param){
+ param.setAgentId(getAgent().getId());
return ResultData.ok(userService.pageList(param));
}
@@ -13,4 +13,6 @@ public class UserParam extends RequestBase {
private String password;
private String newPassword;
+
+ private Integer agentId;
@@ -12,7 +12,12 @@
<if test="param.email != null and param.email !=''">
and s.email like concat ('%',#{param.email},'%')
</if>
- and (agent_key is not null or d.agent_id is not null)
+ <if test="param.agentId != null ">
+ and (agent_key is not null or d.agent_id = #{param.agentId} )
+ </if>
+ <if test="param.agentId == null ">
+ and (agent_key is not null or d.agent_id is not null )
order by s.id desc
</select>