|
@@ -176,7 +176,7 @@ public class SysUserCashAccountServiceImpl extends BaseServiceImpl<Integer, SysU
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
- public boolean updateCourseBalance(Integer userId, BigDecimal decimal, BigDecimal amount, String description) {
|
|
|
|
|
|
+ public boolean updateCourseBalance(Integer userId, BigDecimal decimal, PlatformCashAccountDetailTypeEnum type, BigDecimal amount, String description) {
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
if (sysUser == null) {
|
|
if (sysUser == null) {
|
|
throw new BizException("用户信息获取失败");
|
|
throw new BizException("用户信息获取失败");
|
|
@@ -200,6 +200,7 @@ public class SysUserCashAccountServiceImpl extends BaseServiceImpl<Integer, SysU
|
|
sysUserCoursesAccountDetail.setBalance(decimal);
|
|
sysUserCoursesAccountDetail.setBalance(decimal);
|
|
sysUserCoursesAccountDetail.setComment(description + "-" + sysUser.getId());
|
|
sysUserCoursesAccountDetail.setComment(description + "-" + sysUser.getId());
|
|
sysUserCoursesAccountDetail.setStatus(DealStatusEnum.SUCCESS);
|
|
sysUserCoursesAccountDetail.setStatus(DealStatusEnum.SUCCESS);
|
|
|
|
+ sysUserCoursesAccountDetail.setType(type);
|
|
sysUserCoursesAccountDetail.setUpdateTime(date);
|
|
sysUserCoursesAccountDetail.setUpdateTime(date);
|
|
sysUserCoursesAccountDetail.setCreateTime(date);
|
|
sysUserCoursesAccountDetail.setCreateTime(date);
|
|
sysUserCoursesAccountDetailDao.insert(sysUserCoursesAccountDetail);
|
|
sysUserCoursesAccountDetailDao.insert(sysUserCoursesAccountDetail);
|
|
@@ -209,7 +210,7 @@ public class SysUserCashAccountServiceImpl extends BaseServiceImpl<Integer, SysU
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
- public boolean appendCourseBalance(Integer userId, BigDecimal decimal, String description) {
|
|
|
|
|
|
+ public boolean appendCourseBalance(Integer userId, BigDecimal decimal, PlatformCashAccountDetailTypeEnum type, String description) {
|
|
SysUserCashAccount cashAccount = sysUserCashAccountDao.getLocked(userId);
|
|
SysUserCashAccount cashAccount = sysUserCashAccountDao.getLocked(userId);
|
|
if (cashAccount == null) {
|
|
if (cashAccount == null) {
|
|
throw new BizException("用户[{}]现金账户不存在", userId);
|
|
throw new BizException("用户[{}]现金账户不存在", userId);
|
|
@@ -234,6 +235,7 @@ public class SysUserCashAccountServiceImpl extends BaseServiceImpl<Integer, SysU
|
|
sysUserCoursesAccountDetail.setBalance(balance);
|
|
sysUserCoursesAccountDetail.setBalance(balance);
|
|
sysUserCoursesAccountDetail.setComment(description + "-" + sysUser.getId());
|
|
sysUserCoursesAccountDetail.setComment(description + "-" + sysUser.getId());
|
|
sysUserCoursesAccountDetail.setStatus(DealStatusEnum.SUCCESS);
|
|
sysUserCoursesAccountDetail.setStatus(DealStatusEnum.SUCCESS);
|
|
|
|
+ sysUserCoursesAccountDetail.setType(type);
|
|
sysUserCoursesAccountDetail.setUpdateTime(date);
|
|
sysUserCoursesAccountDetail.setUpdateTime(date);
|
|
sysUserCoursesAccountDetail.setCreateTime(date);
|
|
sysUserCoursesAccountDetail.setCreateTime(date);
|
|
sysUserCoursesAccountDetailDao.insert(sysUserCoursesAccountDetail);
|
|
sysUserCoursesAccountDetailDao.insert(sysUserCoursesAccountDetail);
|