| @@ -175,18 +175,22 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||||
| wxCreditHistoryMapper.insertSelective(record); | wxCreditHistoryMapper.insertSelective(record); | ||||
| //将计算出来新的总积分 更新到两张用户表里 | //将计算出来新的总积分 更新到两张用户表里 | ||||
| if (wxCUser != null) { | if (wxCUser != null) { | ||||
| wxCUser.setCredit(record.getCreditAmount()); | |||||
| wxCUserMapper.updateByPrimaryKeySelective(wxCUser); | |||||
| WxCUser wxCUserNew = new WxCUser(); | |||||
| wxCUserNew.setId(wxCUser.getId()); | |||||
| wxCUserNew.setCredit(record.getCreditAmount()); | |||||
| wxCUserMapper.updateByPrimaryKeySelective(wxCUserNew); | |||||
| } | } | ||||
| if (wxCUserBasicInfo != null) { | if (wxCUserBasicInfo != null) { | ||||
| wxCUserBasicInfo.setCredit(record.getCreditAmount()); | |||||
| wxCUserBasicInfoMapper.updateByPrimaryKeySelective(wxCUserBasicInfo); | |||||
| WxCUserBasicInfo wxCUserBasicInfoNew = new WxCUserBasicInfo(); | |||||
| wxCUserBasicInfoNew.setId(wxCUserBasicInfo.getId()); | |||||
| wxCUserBasicInfoNew.setCredit(record.getCreditAmount()); | |||||
| wxCUserBasicInfoMapper.updateByPrimaryKeySelective(wxCUserBasicInfoNew); | |||||
| } | } | ||||
| } else { | } else { | ||||
| //wxCreditHistoryMapper.updateByPrimaryKeySelective(record); | //wxCreditHistoryMapper.updateByPrimaryKeySelective(record); | ||||
| } | } | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS,"积分操作成功"); | |||||
| return new ResultData(Result.SUCCESS,"积分操作成功",record); | |||||
| } | } | ||||
| @Override | @Override | ||||