package jnpf.permission; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import jnpf.base.ActionResult; import jnpf.base.Pagination; import jnpf.exception.DataException; import jnpf.permission.entity.UserEntity; import jnpf.permission.fallback.UserApiFallback; import jnpf.permission.model.SystemParamModel; import jnpf.permission.model.user.*; import jnpf.permission.model.user.mod.UserIdModelByPage; import jnpf.permission.model.user.vo.BaseInfoVo; import jnpf.permission.model.user.vo.UserByRoleVO; import jnpf.permission.model.user.vo.UserInfoVO; import jnpf.util.NoDataSourceBind; import jnpf.utils.FeignName; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; /** * 获取用户信息Api * * @author JNPF开发平台组 * @version V3.1.0 * @copyright 引迈信息技术有限公司(https://www.jnpfsoft.com) * @date 2021-03-24 */ @FeignClient(name = FeignName.PERMISSION_SERVER_NAME, fallback = UserApiFallback.class, path = "/Users") public interface UserApi { /** * 根据id获取用户 * * @param id 用户id * @return */ @PostMapping("/getUserName") List getUserName(@RequestBody List id); /** * 根据id获取用户 * * @param userModel * @return */ @PostMapping("/getUserNamePagination") List getUserNamePagination(@RequestBody UserModel userModel); /** * 获取用户信息 * * @param id 主键值 * @return */ @GetMapping("/{id}") ActionResult getInfo(@PathVariable("id") String id) throws DataException; /** * 获取用户id * * @return */ @GetMapping("/getListId") List getListId(); /** * 信息(登录前) * * * @param userInfoModel * @return */ @PostMapping("/getInfoByAccount") UserEntity getInfoByAccount(@RequestBody UserInfoModel userInfoModel); /** * 信息(登录前) * * * @param userInfoModel@return */ @PostMapping("/getInfoByUserId") UserEntity getInfoByUserId(@RequestBody UserInfoModel userInfoModel); /** * 通过id修改(登录前) * * @param userUpdateModel */ @PostMapping("/updateById") Boolean updateById(@RequestBody UserUpdateModel userUpdateModel); @PostMapping("/update/{id}") Boolean update(@PathVariable("id") String id, @RequestBody UserEntity entity) throws Exception; /** * 通过account获取用户信息 * * @param account * @return */ @GetMapping("/getInfoByAccount/{account}") UserEntity getInfoByAccount(@PathVariable("account") String account); /** * 通过Id获取用户信息 * * @param id 主键值 * @return */ @GetMapping("/getInfoById/{id}") UserEntity getInfoById(@PathVariable("id") String id); /** * 通过Id获取用户信息 * * @param id 主键值 * @return */ @GetMapping("/getInfoByIdInMessage") UserEntity getInfoByIdInMessage(@RequestParam("id") String id); /** * 通过Id获取主管信息 * * @param id 主键值 * @return */ @GetMapping("/getListByManagerId/{id}") List getListByManagerId(@PathVariable("id") String id); /** * 获取用户信息 * * @return * @param enabledMark */ @GetMapping("/getList") List getList(@RequestParam("enabledMark") boolean enabledMark); /** * 获取超级管理员 * * @return */ @GetMapping("/getAdminList") List getAdminList(); /** * 修改超级管理员 * * @param adminIds * @return */ @PostMapping("/setAdminListByIds") Boolean setAdminListByIds(@RequestBody List adminIds); /** * 通过fullName获取用户信息 * * @param fullName * @return */ @GetMapping("/getByRealName/{fullName}") UserEntity getByRealName(@PathVariable("fullName") String fullName); @PostMapping("/updateUserById") Boolean updateUserById(@RequestBody UserEntity userEntity); @GetMapping("/getUserMap") Map getUserMap(@RequestParam("type") String type); /** * 通过mobile获取用户信息 * * @param mobile * @return */ @GetMapping("/getInfoByMobile/{mobile}") UserEntity getInfoByMobile(@PathVariable("mobile") String mobile); @PostMapping("/create") Boolean create(@RequestBody UserEntity userEntity) throws Exception; @PostMapping("/delete") void delete(@RequestBody UserEntity userEntity); @PostMapping("/getUserIdList") List getUserIdList(@RequestBody List userIds); @PostMapping("/selectedByIds") List selectedByIds(@RequestBody List ids); @PostMapping("/getUserNameMark") List getUserNameMark(@RequestBody List id); @PostMapping("/getObjList") List getObjList(@RequestBody UserIdModelByPage objListModel); @PostMapping("/getIdsByAccounts") List getIdsByAccounts(@RequestBody List accounts); @PostMapping("/getUserPage") List getUserPage(@RequestBody Pagination pagination); @PostMapping("/getSystemFieldValue") Map getSystemFieldValue(@RequestBody SystemParamModel model); @PostMapping("/getListByOrgIds") List getListByOrgIds(@RequestBody List collect); @GetMapping("/getUserByMobile") UserEntity getUserByMobile(@RequestParam String dingMobile); @PostMapping("/userPage") List page(@RequestBody UserSystemCountModel userSystemCountModel); /** * 获取用户组织角色等数据列表 * * @param userId * @return */ @GetMapping("/getUserObjectIdList") UserRelationIds getUserObjectIdList(@RequestParam String userId); @PostMapping("/logoutUser") Boolean logoutUser(@RequestParam("message") String message,@RequestBody List userIds); }