获取第三方产品规格型号问题

pro
anthonywj 2 years ago
parent d23ffecf3b
commit 5365852e1e

@ -198,6 +198,9 @@ public class ThrProductsServiceImpl extends ServiceImpl<ThrProductsDao, ThrProdu
if (isChange) {
BeanUtil.copyProperties(item, thrProductsEntity, new CopyOptions().setIgnoreNullValue(true));
thrProductsEntity.setUpdateTime(new Date());
if (StrUtil.isEmpty(thrProductsEntity.getSpec())) {
thrProductsEntity.setSpec(thrProductsEntity.getStandard());
}
thrProductsDao.updateEntityById(thrProductsEntity);
}
}
@ -245,6 +248,9 @@ public class ThrProductsServiceImpl extends ServiceImpl<ThrProductsDao, ThrProdu
if (isChange) {
BeanUtil.copyProperties(item, thrProductsEntity, new CopyOptions().setIgnoreNullValue(true));
thrProductsEntity.setUpdateTime(new Date());
if (StrUtil.isEmpty(thrProductsEntity.getSpec())) {
thrProductsEntity.setSpec(thrProductsEntity.getStandard());
}
thrProductsDao.updateEntityById(thrProductsEntity);
}
}
@ -276,7 +282,10 @@ public class ThrProductsServiceImpl extends ServiceImpl<ThrProductsDao, ThrProdu
//将关键字段的值设置为新数据的值
thrProductsEntity.setName(thrProductsResponse.getName());
thrProductsEntity.setMeasname(thrProductsResponse.getMeasname());
thrProductsEntity.setSpec(thrProductsResponse.getSpec());
if (StrUtil.isEmpty(thrProductsResponse.getSpec())) {
thrProductsEntity.setSpec(thrProductsResponse.getStandard());
}
thrProductsEntity.setRegisterNo(thrProductsResponse.getRegisterNo());
thrProductsEntity.setManufactory(thrProductsResponse.getManufactory());
thrProductsEntity.setCplb(thrProductsResponse.getCplb());

Loading…
Cancel
Save