|
|
@@ -52,6 +52,10 @@ public class AmbInvestServiceImpl extends BaseMybatisDao<AmbInvestMapper> implem
|
|
|
ambInvest.setStatus(in.getStatus());
|
|
|
ambInvest.setOperator(TokenManager.getAdminId());
|
|
|
ambInvest.setComment(in.getComment());
|
|
|
+ Integer x=ambInvestMapper.selectCountAmountById(other.getId());
|
|
|
+ if (x!=null){
|
|
|
+ ambInvest.setCountAmount(ambInvest.getAmount().add(new BigDecimal(x)));
|
|
|
+ }
|
|
|
ambInvestMapper.insertSelective(ambInvest);
|
|
|
addAmbInvestLog(in, ambInvest);
|
|
|
if (in.getStatus()==1)addNoticAndEmail(1,myAmb,other);
|
|
|
@@ -149,7 +153,9 @@ public class AmbInvestServiceImpl extends BaseMybatisDao<AmbInvestMapper> implem
|
|
|
ambSystemMapper.updateByPrimaryKeySelective(newMy);
|
|
|
ambSystemMapper.updateByPrimaryKeySelective(newOther);
|
|
|
Integer x=ambInvestMapper.selectCountAmountById(newOther.getId());
|
|
|
- if (x!=null)newAmbInvest.setCountAmount(new BigDecimal(x));
|
|
|
+ if (x!=null){
|
|
|
+ newAmbInvest.setCountAmount(ambInvest.getAmount().add(new BigDecimal(x)));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
ambInvestMapper.updateByPrimaryKeySelective(newAmbInvest);
|