Commit 1b6b188f by 墨竹

feat:接口优化

parent 8c417608
......@@ -22,6 +22,7 @@ import com.gic.haoban.app.customer.service.api.service.CustomerApiService;
import com.gic.haoban.app.customer.service.api.service.DistributeApiService;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.PageResult2;
import com.gic.haoban.base.api.common.pojo.dto.WellDoneLoginDTO;
import com.gic.haoban.common.anno.HttpLimit;
import com.gic.haoban.common.anno.IgnoreLogin;
import com.gic.haoban.common.utils.GooglePhoneNumberUtil;
......@@ -1255,17 +1256,18 @@ public class ClerkController extends WebBaseController {
* @return
*/
@RequestMapping(value = "/queryMenuCodesByClerkType", method = RequestMethod.GET)
public RestResponse<HaobanRoleDTO> queryMenuByClerkType(Integer clerkType, String staffId) {
public RestResponse<HaobanRoleDTO> queryMenuByClerkType(Integer clerkType) {
WellDoneLoginDTO loginUser = this.getLoginUser();
String staffId = loginUser.getStaffId();
if ("-1".equals(staffId)) {
//游客获取系统级别的导购权限
clerkType = RoleClerkTypeEnum.CLERK.getCode();
ServiceResponse<HaobanRoleDTO> serviceResponse = haobanRoleApiService.getMenuByWxEnterpriseIdAndClerkType("-1", clerkType, 0);
ServiceResponse<HaobanRoleDTO> serviceResponse = haobanRoleApiService.getMenuByWxEnterpriseIdAndClerkType("-1", RoleClerkTypeEnum.CLERK.getCode(), 0);
return RestResponse.successResult(serviceResponse.getResult());
}
if (clerkType == null) {
return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_2.getCode()), HaoBanErrCode.ERR_2.getMsg());
}
String wxEnterpriseId = this.getLoginUser().getWxEnterpriseId();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
ServiceResponse<HaobanRoleDTO> serviceResponse = haobanRoleApiService.getMenuByWxEnterpriseIdAndClerkType(wxEnterpriseId, clerkType, 1);
return RestResponse.successResult(serviceResponse.getResult());
}
......
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