package cn.huge.module.ctuser.controller; import cn.huge.base.common.utils.ReturnFailUtils; import cn.huge.base.common.utils.ReturnSucUtils; import cn.huge.module.ctuser.domain.po.ByRegion; import cn.huge.module.ctuser.service.*; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; /** * @title: 数据割接-用户相关 * @description: 数据割接-用户相关 * @company: hugeinfo * @author: liyj * @time: 2024-10-18 15:14:06 * @version: 1.0.0 */ @Slf4j @RestController @RequestMapping("/api/client/syncCust") public class SyncCustController { @Autowired(required = false) private HttpServletRequest request; @Autowired private CtUnitService ctUnitService; @Autowired private CtDeptService ctDeptService; @Autowired private CtuserService ctuserService; @Autowired private CtAccountService ctAccountService; @Autowired private CtUseroleService ctUseroleService; /** * 数据割接-组织信息 * @url {ctx}/api/client/syncCust/byToGzCtUnit * @return Object */ @GetMapping("/byToGzCtUnit") public Object byToGzCtUnit() { try { return ReturnSucUtils.getRepInfo(ctUnitService.byToGzCtUnit()); } catch (Exception e) { log.error("[SyncCustController.byToGzCtUnit]请求失败,异常信息:"+e, e); return ReturnFailUtils.getRepInfo(e.getMessage()); } } /** * 数据割接-部门信息 * @url {ctx}/api/client/syncCust/byToGzCtDept * @return Object */ @GetMapping("/byToGzCtDept") public Object byToGzCtDept() { try { return ReturnSucUtils.getRepInfo(ctDeptService.byToGzCtDept()); } catch (Exception e) { log.error("[SyncCustController.byToGzCtDept]请求失败,异常信息:"+e, e); return ReturnFailUtils.getRepInfo(e.getMessage()); } } /** * 数据割接-用户信息 * @url {ctx}/api/client/syncCust/byToGzCtUser * @return Object */ @GetMapping("/byToGzCtUser") public Object byToGzCtUser() { try { return ReturnSucUtils.getRepInfo(ctuserService.byToGzCtUser()); } catch (Exception e) { log.error("[SyncCustController.byToGzCtUser]请求失败,异常信息:"+e, e); return ReturnFailUtils.getRepInfo(e.getMessage()); } } /** * 数据割接-账号信息 * @url {ctx}/api/client/syncCust/byToGzCtAccount * @return Object */ @GetMapping("/byToGzCtAccount") public Object byToGzCtAccount() { try { return ReturnSucUtils.getRepInfo(ctAccountService.byToGzCtAccount()); } catch (Exception e) { log.error("[SyncCustController.byToGzCtAccount]请求失败,异常信息:"+e, e); return ReturnFailUtils.getRepInfo(e.getMessage()); } } /** * 数据割接-用户角色关系信息 * @url {ctx}/api/client/syncCust/byToGzCtUserole * @return Object */ @GetMapping("/byToGzCtUserole") public Object byToGzCtUserole() { try { return ReturnSucUtils.getRepInfo(ctUseroleService.byToGzCtUserole()); } catch (Exception e) { log.error("[SyncCustController.byToGzCtAccount]请求失败,异常信息:"+e, e); return ReturnFailUtils.getRepInfo(e.getMessage()); } } }