Commit 3c37a81d authored by hezhen's avatar hezhen

Merge branch 'hz_master' into dev

parents 5f11ce63 51fef0f1
......@@ -10,6 +10,7 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.google.common.collect.Lists;
import com.xxfc.platform.vehicle.common.RestResponse;
......@@ -398,4 +399,16 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
return mapper.getList();
}
public ObjectRestResponse branchCompans() {
UserDTO userDTO = getAdminUserInfo();
List<BranchCompany> list;
if (userDTO != null&&userDTO.getDataAll() == DATA_ALL_FALSE) {
List<Integer> branchCompanies = vehicleBiz.dataCompany(userDTO.getDataZone(), userDTO.getDataCompany());
list = mapper.selectByIdList(branchCompanies);
}else {
list=getAll();
}
return ObjectRestResponse.succ(list);
}
}
......@@ -214,8 +214,7 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
}
@RequestMapping(value ="/companys",method = RequestMethod.GET)
public RestResponse<List<BranchCompany>> companys() {
UserDTO userDTO = userFeign.userinfoByToken(userAuthConfig.getToken(request)).getData();
return RestResponse.data(baseBiz.getListByUser(userDTO));
public ObjectRestResponse<List<BranchCompany>> companys() {
return baseBiz.branchCompans();
}
}
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