Showing
1 changed file
with
7 additions
and
4 deletions
@@ -129,16 +129,19 @@ public class UnionShareRebateServiceImpl implements IUnionShareRebateService,IBu | @@ -129,16 +129,19 @@ public class UnionShareRebateServiceImpl implements IUnionShareRebateService,IBu | ||
129 | @Override | 129 | @Override |
130 | public int updateSkn(UnionShareRebateBo req){ | 130 | public int updateSkn(UnionShareRebateBo req){ |
131 | logger.info("updateSkn start.req is {}.",req); | 131 | logger.info("updateSkn start.req is {}.",req); |
132 | - if (req == null) { | 132 | + if (req == null || req.getSkn() == null) { |
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | - if (req.getId() == null) { | ||
136 | - return addSkn(req); | 135 | + UnionShareRebateSkn shareRebateSkn = unionShareRebateSknMapper.selectBySkn(req.getSkn()); |
136 | + if (shareRebateSkn == null && req.getId() != null && unionShareRebateSknMapper.selectByPrimaryKey(req.getId()) != null) { | ||
137 | + return 0;//id和skn不匹配 | ||
137 | } | 138 | } |
138 | - UnionShareRebateSkn shareRebateSkn = unionShareRebateSknMapper.selectByPrimaryKey(req.getId()); | ||
139 | if (shareRebateSkn == null) { | 139 | if (shareRebateSkn == null) { |
140 | return addSkn(req); | 140 | return addSkn(req); |
141 | } | 141 | } |
142 | + if (req.getId() != null && !req.getId().equals(shareRebateSkn.getId())) { | ||
143 | + return 0;//id和skn不匹配 | ||
144 | + } | ||
142 | UnionShareRebateSkn rebateSkn = new UnionShareRebateSkn(); | 145 | UnionShareRebateSkn rebateSkn = new UnionShareRebateSkn(); |
143 | BeanUtils.copyProperties(req,rebateSkn); | 146 | BeanUtils.copyProperties(req,rebateSkn); |
144 | if(!StringUtils.isBlank(req.getRebatePercentStr())){ | 147 | if(!StringUtils.isBlank(req.getRebatePercentStr())){ |
-
Please register or login to post a comment