This commit is contained in:
parent
adc9a4f1c1
commit
f979a8f275
|
|
@ -571,13 +571,12 @@ public class UserServiceImpl implements UserService {
|
|||
} else {
|
||||
userDao.update(userWechat);
|
||||
}
|
||||
if (userPhone != null) {
|
||||
//用户资产信息
|
||||
UserAssetDto userAssetDtoWechat = getUserAssetInfo(userWechat.getUserId());
|
||||
UserAssetDto userAssetDtoPhone = getUserAssetInfo(userPhone.getUserId());
|
||||
UserAsset userAsset = new UserAsset(userPhone.getUserId(),new BigDecimal(userAssetDtoWechat.getGoldValue().intValue() + userAssetDtoPhone.getGoldValue().intValue()));
|
||||
userAssetDao.update(userAsset);
|
||||
|
||||
if (null != userPhone) {
|
||||
UserAsset userAssetPhone = userAssetDao.get(userPhone.getUserId());
|
||||
UserAsset userAssetWechat = userAssetDao.get(userWechat.getUserId());
|
||||
userAssetPhone.setGoldValue(userAssetPhone.getGoldValue().add(userAssetWechat.getGoldValue()));
|
||||
userAssetDao.update(userAssetPhone);
|
||||
userAssetDao.delete(userAssetWechat);
|
||||
}
|
||||
return new JsonResult<JSONObject>(ResultEnum.success.getKey());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue