|
|
|
@ -9,8 +9,7 @@ import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.constant.ConstantStatus;
|
|
|
|
|
import com.glxp.api.entity.auth.AuthAdmin;
|
|
|
|
|
import com.glxp.api.entity.auth.CustomerInfoEntity;
|
|
|
|
|
import com.glxp.api.entity.auth.*;
|
|
|
|
|
import com.glxp.api.entity.basic.BasicCorpEntity;
|
|
|
|
|
import com.glxp.api.entity.purchase.CustomerContactEntity;
|
|
|
|
|
import com.glxp.api.entity.purchase.SupCertEntity;
|
|
|
|
@ -24,7 +23,9 @@ import com.glxp.api.req.purchase.SelectCorpBindRequest;
|
|
|
|
|
import com.glxp.api.req.system.DeleteRequest;
|
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.api.service.auth.AuthAdminService;
|
|
|
|
|
import com.glxp.api.service.auth.AuthRoleAdminService;
|
|
|
|
|
import com.glxp.api.service.auth.CustomerInfoService;
|
|
|
|
|
import com.glxp.api.service.auth.ISysRoleService;
|
|
|
|
|
import com.glxp.api.service.basic.BasicCorpService;
|
|
|
|
|
import com.glxp.api.service.purchase.CustomerContactService;
|
|
|
|
|
import com.glxp.api.service.purchase.SupCertService;
|
|
|
|
@ -42,6 +43,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.ListIterator;
|
|
|
|
@ -68,6 +70,8 @@ public class SupCompanyController {
|
|
|
|
|
SupCompanyService supCompanyService;
|
|
|
|
|
@Resource
|
|
|
|
|
CustomerInfoService customerInfoService;
|
|
|
|
|
@Resource
|
|
|
|
|
AuthRoleAdminService authRoleAdminService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -266,12 +270,20 @@ public class SupCompanyController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//修改用户角色
|
|
|
|
|
if(companyEntity.getRoleId()!=null){
|
|
|
|
|
CustomerInfoEntity customerInfoEntity=new CustomerInfoEntity();
|
|
|
|
|
customerInfoEntity.setCustomerId(Long.valueOf(companyEntity.getCustomerId()));
|
|
|
|
|
customerInfoEntity.setRoleId(companyEntity.getRoleId());
|
|
|
|
|
customerInfoService.updateCustomerInfo(customerInfoEntity);
|
|
|
|
|
|
|
|
|
|
//获取该供应商下面的用户
|
|
|
|
|
List<AuthAdmin> authAdmin=authAdminService.findByCustomerld(companyEntity.getCustomerId());
|
|
|
|
|
for (AuthAdmin obj:authAdmin){
|
|
|
|
|
AuthRoleAdmin authRoleAdmin=new AuthRoleAdmin();
|
|
|
|
|
authRoleAdmin.setUser_id(obj.getId());
|
|
|
|
|
authRoleAdmin.setRole_id(Long.valueOf(companyEntity.getRoleId()));
|
|
|
|
|
authRoleAdminService.updateAuthRoleAdmin(authRoleAdmin);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|