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); boolean incrIncome(@Param("userId") Long userId, @Param("price") BigDecimal price);
Page<UserExtendAdminVo> pageAdmin(@Param("build") Page<Object> build, @Param("bo") UserExtendAdminVo bo); 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); boolean withdraw(Long userId, BigDecimal withdrawPrice);
void resetWithdraw(Long userId, BigDecimal withdrawMoney, String traceId); void resetWithdraw(Long userId, BigDecimal withdrawMoney, String traceId);
boolean incsWithdrawCount(Long userId, BigDecimal withdrawMonty);
Page<UserExtendAdminVo> pageAdmin(PageQuery pageQuery, UserExtendAdminVo bo); Page<UserExtendAdminVo> pageAdmin(PageQuery pageQuery, UserExtendAdminVo bo);
void updateIncomeCoin(UpdateIncomeCoinReq 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 @Override
public Page<UserExtendAdminVo> pageAdmin(PageQuery pageQuery, UserExtendAdminVo bo) { public Page<UserExtendAdminVo> pageAdmin(PageQuery pageQuery, UserExtendAdminVo bo) {
return baseMapper.pageAdmin(pageQuery.build(), bo); return baseMapper.pageAdmin(pageQuery.build(), bo);

View File

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

View File

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