This commit is contained in:
77
2024-03-18 21:01:57 +08:00
parent eaea74350b
commit 02e8ea8f2f
5 changed files with 26 additions and 2 deletions

View File

@@ -21,4 +21,7 @@ public interface UserExtendMapper extends BaseMapper<UserExtend> {
boolean incrIncome(@Param("userId") Long userId, @Param("price") BigDecimal price);
Page<UserExtendAdminVo> pageAdmin(@Param("build") Page<Object> build, @Param("bo") UserExtendAdminVo bo);
boolean incsWithdrawCount(@Param("userId") Long userId, @Param("withdrawMonty") BigDecimal withdrawMonty);
}

View File

@@ -20,6 +20,8 @@ public interface UserExtendService extends IService<UserExtend> {
boolean withdraw(Long userId, BigDecimal withdrawPrice);
void resetWithdraw(Long userId, BigDecimal withdrawMoney, String traceId);
boolean incsWithdrawCount(Long userId, BigDecimal withdrawMonty);
Page<UserExtendAdminVo> pageAdmin(PageQuery pageQuery, UserExtendAdminVo bo);
void updateIncomeCoin(UpdateIncomeCoinReq bo);

View File

@@ -47,6 +47,17 @@ public class UserExtendServiceImpl extends ServiceImpl<UserExtendMapper,UserExte
}
}
/**
* 新增提现统计
* @param userId
* @param withdrawMonty
*/
@Override
public boolean incsWithdrawCount(Long userId, BigDecimal withdrawMonty){
return baseMapper.incsWithdrawCount(userId,withdrawMonty);
}
@Override
public Page<UserExtendAdminVo> pageAdmin(PageQuery pageQuery, UserExtendAdminVo bo) {
return baseMapper.pageAdmin(pageQuery.build(), bo);

View File

@@ -96,10 +96,13 @@ public class UserWithdrawServiceImpl extends ServiceImpl<UserWithdrawMapper,User
.set(UserWithdraw::getAuditOpName, LoginHelper.getUsername())
.set(UserWithdraw::getAuditTime, LocalDateTime.now())
.set(UserWithdraw::getAuditRemark, "审核成功"));
if(flag && autoTrans){
if(flag){
if(autoTrans){
// TODO 自动打款
}
}
}
@Override
@Transactional(rollbackFor = Exception.class)

View File

@@ -14,6 +14,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
set income_coin = income_coin + #{price}
where income_coin + #{price} > 0 and user_id = #{userId}
</update>
<update id="incsWithdrawCount">
update xq_user_extend
set withdraw_total = withdraw_total + #{withdrawMonty}
where user_id = #{userId}
</update>
<select id="pageAdmin" resultType="com.ruoyi.xq.dto.admin.user.UserExtendAdminVo">
select t1.*, t2.nickname,t2.mobile,t2.avatar
from xq_user_extend t1