解决计量单位更新的bug
This commit is contained in:
@@ -18,4 +18,8 @@ public interface UnitMapperEx {
|
||||
@Param("name") String name);
|
||||
|
||||
int batchDeleteUnitByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String ids[]);
|
||||
|
||||
void updateRatioTwoById(@Param("id") Long id);
|
||||
|
||||
void updateRatioThreeById(@Param("id") Long id);
|
||||
}
|
||||
@@ -120,6 +120,12 @@ public class UnitService {
|
||||
try{
|
||||
parseNameByUnit(unit);
|
||||
result=unitMapper.updateByPrimaryKeySelective(unit);
|
||||
if(unit.getRatioTwo()==null) {
|
||||
unitMapperEx.updateRatioTwoById(unit.getId());
|
||||
}
|
||||
if(unit.getRatioThree()==null) {
|
||||
unitMapperEx.updateRatioThreeById(unit.getId());
|
||||
}
|
||||
logService.insertLog("计量单位",
|
||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(unit.getName()).toString(), request);
|
||||
}catch(Exception e){
|
||||
|
||||
Reference in New Issue
Block a user