Forráskód Böngészése

试验-委托单
1、撤回上报的时候没有对电签pdf清空

LHB 1 napja
szülő
commit
42edd2f885

+ 5 - 3
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/EntrustInfoServiceImpl.java

@@ -287,9 +287,11 @@ public class EntrustInfoServiceImpl extends BaseServiceImpl<EntrustInfoMapper, E
                 if(entrustInfo.getStatus()!=2&&entrustInfo.getStatus()!=3){
                     throw new ServiceException("该委托单不能废除"+entrustInfo.getEntrustNo());
                 }
-                entrustInfo.setEntrustEPdf(null);
-                entrustInfo.setStatus(1);
-                entrustInfoMapper.updateById(entrustInfo);
+				// mybatis plus 默认的updateById 会跳过null值字段, 改为 lambda 方式
+                entrustInfoMapper.update(null,Wrappers.<EntrustInfo>lambdaUpdate()
+						.set(EntrustInfo::getStatus, 1)
+						.set(EntrustInfo::getEntrustEPdf, null)
+						.eq(EntrustInfo::getId, Long.parseLong(i)));
             }
             List<InformationQuery> queryList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getId, Arrays.asList(ids)));
             if (queryList.size() == 0) {