大调整
This commit is contained in:
@@ -28,25 +28,5 @@ public class EnterpriseUserController {
|
||||
@Resource
|
||||
public EnterpriseUserService enterpriseUserService;
|
||||
|
||||
@GetMapping(path = "/dept/userList")
|
||||
public ResponseResult<PageInfo<EnterpriseUserPageVO>> getUserList(@RequestParam(name = "user_name", required = false) String userName,
|
||||
@RequestParam(name = "dept_id", required = false) String deptId,
|
||||
@RequestParam(name = "role_id", required = false) Long roleId,
|
||||
@RequestParam(name = "order_by", required = false) String orderBy,
|
||||
@RequestParam(name = "order_rule", required = false, defaultValue = "asc") String orderRule,
|
||||
@RequestParam(name = "user_status", required = false) Integer userStatus,
|
||||
@RequestParam(name = "page_num", required = false, defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "page_size", required = false, defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "job_number", required = false) String jobNumber,
|
||||
@RequestParam(name = "region_id", required = false) String regionId,
|
||||
@RequestParam(name = "has_page", required = false,defaultValue = "true") Boolean hasPage) {
|
||||
DataSourceHelper.changeToMy();
|
||||
List<EnterpriseUserPageVO> deptUserList = enterpriseUserService.listUser(userName, deptId, orderBy, orderRule, roleId, userStatus, pageNum, pageSize, jobNumber,regionId,hasPage);
|
||||
if(CollectionUtils.isNotEmpty(deptUserList)){
|
||||
return ResponseResult.success(new PageInfo<>(deptUserList));
|
||||
}else {
|
||||
return ResponseResult.success(new PageInfo<>());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,18 +37,15 @@ public class LoginController {
|
||||
public Object feiShuLogin(@RequestBody FeiShuLoginDTO param) {
|
||||
log.info("feiShuLogin data={}", JSONObject.toJSONString(param));
|
||||
String code = param.getCode();
|
||||
String appId = param.getAppId();
|
||||
String userId = "", corpId = "", appType = AppTypeEnum.FEI_SHU.getValue();
|
||||
try {
|
||||
String value = "code=" + code + "&appType=" + appType + "&appId=" + appId;
|
||||
String value = "code=" + code;
|
||||
UserIdInfoDTO userInfo = isvHttpRequest.getUserIdByCode(value);
|
||||
if(Objects.isNull(userInfo)){
|
||||
throw new ServiceException(ErrorCodeEnum.LOGIN_ERROR);
|
||||
}
|
||||
log.info("userInfo:{}", JSONObject.toJSONString(userInfo));
|
||||
userId = userInfo.getOpenId();
|
||||
corpId = userInfo.getCorpId();
|
||||
return loginService.feiShuLogin(userId, corpId, Boolean.TRUE, appType, StringUtils.EMPTY);
|
||||
String userId = userInfo.getOpenId();
|
||||
return loginService.feiShuLogin(userId, Boolean.TRUE, StringUtils.EMPTY);
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(ErrorCodeEnum.LOGIN_ERROR);
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.cool.store.enums.RocketMqTagEnum;
|
||||
import com.cool.store.http.ISVHttpRequest;
|
||||
import com.cool.store.mq.producer.SimpleMessageService;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.EnterpriseSyncService;
|
||||
import com.cool.store.service.EnterpriseUserService;
|
||||
import com.cool.store.utils.UUIDUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -34,6 +35,9 @@ public class TestController {
|
||||
private EnterpriseUserService enterpriseUserService;
|
||||
@Resource
|
||||
private ISVHttpRequest isvHttpRequest;
|
||||
@Resource
|
||||
private EnterpriseSyncService enterpriseSyncService;
|
||||
|
||||
|
||||
@GetMapping("/sendMq")
|
||||
public ResponseResult sendMq(){
|
||||
@@ -94,4 +98,10 @@ public class TestController {
|
||||
return ResponseResult.success(isvHttpRequest.getSubDepartments(parentId, fetchChild));
|
||||
}
|
||||
|
||||
@GetMapping("syncAll")
|
||||
public ResponseResult syncAll(){
|
||||
enterpriseSyncService.syncAll();
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user