|
|
@@ -602,8 +602,20 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
if(company.isUpdateMiniApp()){
|
|
|
bindMiniApp(company);
|
|
|
}
|
|
|
- int rows = companyMapper.updateCompany(company);
|
|
|
- if (rows > 0 && company.getLevel() != null && company.getCompanyId() != null) {
|
|
|
+ return companyMapper.updateCompany(company);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int updateFsCompany(Company company)
|
|
|
+ {
|
|
|
+ Integer oldLevel = null;
|
|
|
+ if (company.getCompanyId() != null && company.getLevel() != null) {
|
|
|
+ Company oldCompany = companyMapper.selectCompanyById(company.getCompanyId());
|
|
|
+ oldLevel = oldCompany != null ? oldCompany.getLevel() : null;
|
|
|
+ }
|
|
|
+ int rows = updateCompany(company);
|
|
|
+ if (rows > 0 && company.getLevel() != null && company.getCompanyId() != null
|
|
|
+ && !Objects.equals(oldLevel, company.getLevel())) {
|
|
|
qwSopMapper.updateIsRatingByCompanyId(company.getCompanyId(), company.getLevel());
|
|
|
}
|
|
|
return rows;
|