7 changed files with 230 additions and 0 deletions
@ -0,0 +1,61 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.DeptOption; |
|||
import com.elink.esua.epdc.dto.result.EpdcWorkLogUserDetailDTO; |
|||
import com.elink.esua.epdc.service.AdminService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* 工作日志相关 |
|||
* |
|||
* @author songyunpeng |
|||
* @date 2021/1/27 10:30 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("plugins/workLog") |
|||
public class ApiWorkLogController { |
|||
@Autowired |
|||
private AdminService adminService; |
|||
/** |
|||
* @Description 获取用户信息 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/27 |
|||
* @Param [] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcWorkLogUserDetailDTO> |
|||
**/ |
|||
@PostMapping("getUserInfo") |
|||
public Result<EpdcWorkLogUserDetailDTO> getUserInfo(){ |
|||
return adminService.getUserInfo(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 获取用户部门权限 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/27 |
|||
* @Param [] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcWorkLogUserDetailDTO> |
|||
**/ |
|||
@PostMapping("getUserDeptOptionByUserId") |
|||
public Result<DeptOption> getUserDeptOptionByUserId(){ |
|||
return adminService.getUserDeptOptionByUserId(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 获取customId |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/27 |
|||
* @Param [] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
@GetMapping("getCustomId") |
|||
public Result<String> getCustomId(){ |
|||
return adminService.getCustomId(); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.elink.esua.epdc.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.feign.fallback.AnalysisFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
|
|||
/** |
|||
* 数据分析模块调用 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2020/9/9 15:41 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_ANALYSIS_SERVER, fallback = AnalysisFeignClientFallback.class) |
|||
public interface AnalysisFeignClient { |
|||
|
|||
/** |
|||
* @Description 组织机构编码获取 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/7 |
|||
* @Param [] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
@GetMapping(value = "analysis/workLog/getCustomId", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<String> getCustomId(); |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
package com.elink.esua.epdc.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.feign.AnalysisFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author:songyunpeg |
|||
* @Date:2020/9/9 15:42 |
|||
*/ |
|||
@Component |
|||
public class AnalysisFeignClientFallback implements AnalysisFeignClient { |
|||
|
|||
@Override |
|||
public Result getCustomId() { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getCustomId"); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue