Commit 059ab7fb by 墨竹

Merge remote-tracking branch 'origin/developer' into developer

parents df3f461d 00e5701f
package com.gic.haoban.manage.web.controller;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.clerk.api.dto.right.RightMenuDTO;
import com.gic.clerk.api.service.RightService;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.utils.AuthWebRequestUtil;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
/**
*
* @ClassName: RightController
* @Description: 好办权限
* @author xugh
* @date 2022年4月26日 下午4:59:35
*
*/
@RestController
public class RightController extends WebBaseController {
private static final Logger log = LogManager.getLogger(RightController.class);
@Autowired
private RightService rightService;
@RequestMapping("get-haoban-menu")
public HaobanResponse getHaobanMenu(String enterpriseId) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String phoneNumber = login.getStaffDTO().getPhoneNumber();
log.info("好办菜单={},{}", enterpriseId, phoneNumber);
ServiceResponse<List<RightMenuDTO>> resp = this.rightService.getHaobanMenu(enterpriseId, phoneNumber);
if (resp.isSuccess()) {
return resultResponse(HaoBanErrCode.ERR_1, resp.getResult());
}
return resultResponse(HaoBanErrCode.ERR_OTHER, resp.getMessage());
}
@RequestMapping("get-haoban-right")
public HaobanResponse listHaobanAllMenu(String enterpriseId) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String phoneNumber = login.getStaffDTO().getPhoneNumber();
log.info("好办菜单={},{}", enterpriseId, phoneNumber);
ServiceResponse<Map<String,Object>> resp = this.rightService.listHaobanAllMenu(enterpriseId, phoneNumber);
if (resp.isSuccess()) {
return resultResponse(HaoBanErrCode.ERR_1, resp.getResult());
}
return resultResponse(HaoBanErrCode.ERR_OTHER, resp.getMessage());
}
}
......@@ -14,6 +14,8 @@
<dubbo:application name="haoban-manage3-web"/>
<dubbo:protocol name="dubbo" port="30009"/>
<dubbo:reference interface="com.gic.clerk.api.service.RightService" id="rightService" timeout="10000"/>
<dubbo:reference interface="com.gic.clerk.api.service.UserService" id="userService" timeout="10000"/>
<dubbo:reference interface="com.gic.haoban.manage.api.service.StaffApiService" id="staffApiService"
timeout="15000"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment