|
@@ -244,7 +244,7 @@ public class SysCompanyServiceImpl implements ISysCompanyService
|
|
|
user.setLoginName(cr.getLoginName());
|
|
|
user.setUserName("商户管理员");
|
|
|
user.setPassword(cr.getPassword());
|
|
|
- user.setPhonenumber(cr.getContactNumber());
|
|
|
+ // user.setPhonenumber(cr.getContactNumber());
|
|
|
|
|
|
if(addCompany(company,user)>0){
|
|
|
CompanyReviewed upCr = new CompanyReviewed();
|
|
@@ -281,8 +281,17 @@ public class SysCompanyServiceImpl implements ISysCompanyService
|
|
|
int i = 0;
|
|
|
CompanyReviewed cr = companyReviewedMapper.selectCompanyReviewedById(companyExamine.getCompanyReviewedId());
|
|
|
if(cr==null){
|
|
|
- throw new RuntimeException("创建公司实体时出错!");
|
|
|
+ throw new RuntimeException("更新公司实体时出错!");
|
|
|
+ }
|
|
|
+ SysDept pramDept = new SysDept();
|
|
|
+ pramDept.setCompanyId(cr.getCompanyId());
|
|
|
+ List<SysDept> sysDepts = sysDeptService.selectDeptList(pramDept);
|
|
|
+ if(sysDepts.size()<1){
|
|
|
+ throw new RuntimeException("更新公司信息时出错!");
|
|
|
}
|
|
|
+ SysDept sysDept = sysDepts.get(0);
|
|
|
+ sysDept.setDeptName(cr.getCompanyName());
|
|
|
+ sysDeptService.updateDept(sysDept);
|
|
|
SysCompany company = reviewedTocompany(cr);
|
|
|
company.setId(cr.getCompanyId());
|
|
|
company.setUpdateBy(cr.getCreateBy());
|