...
|
...
|
@@ -129,16 +129,19 @@ public class UnionShareRebateServiceImpl implements IUnionShareRebateService,IBu |
|
|
@Override
|
|
|
public int updateSkn(UnionShareRebateBo req){
|
|
|
logger.info("updateSkn start.req is {}.",req);
|
|
|
if (req == null) {
|
|
|
if (req == null || req.getSkn() == null) {
|
|
|
return 0;
|
|
|
}
|
|
|
if (req.getId() == null) {
|
|
|
return addSkn(req);
|
|
|
UnionShareRebateSkn shareRebateSkn = unionShareRebateSknMapper.selectBySkn(req.getSkn());
|
|
|
if (shareRebateSkn == null && req.getId() != null && unionShareRebateSknMapper.selectByPrimaryKey(req.getId()) != null) {
|
|
|
return 0;//id和skn不匹配
|
|
|
}
|
|
|
UnionShareRebateSkn shareRebateSkn = unionShareRebateSknMapper.selectByPrimaryKey(req.getId());
|
|
|
if (shareRebateSkn == null) {
|
|
|
return addSkn(req);
|
|
|
}
|
|
|
if (req.getId() != null && !req.getId().equals(shareRebateSkn.getId())) {
|
|
|
return 0;//id和skn不匹配
|
|
|
}
|
|
|
UnionShareRebateSkn rebateSkn = new UnionShareRebateSkn();
|
|
|
BeanUtils.copyProperties(req,rebateSkn);
|
|
|
if(!StringUtils.isBlank(req.getRebatePercentStr())){
|
...
|
...
|
|