user_money数据同步测试代码

This commit is contained in:
张松
2025-01-04 18:32:49 +08:00
parent a2fdd2c4fd
commit 1646af8c76
2 changed files with 45 additions and 4 deletions

View File

@@ -3,6 +3,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sqx.modules.app.entity.UserMoney;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.math.BigDecimal;
@Mapper
public interface UserMoneyDao extends BaseMapper<UserMoney> {
@@ -14,4 +17,11 @@ public interface UserMoneyDao extends BaseMapper<UserMoney> {
void updateSysMoney(@Param("type") Integer type, @Param("sysUserId")Long sysUserId, @Param("money") Double money);
void updateSysAmount(@Param("type") Integer type, @Param("sysUserId")Long sysUserId, @Param("amount") Double amount);
@Select("select sum(money) from user_money_details where user_id=#{userId} and classify in (6,1) and (content like '%额外奖励金币%' or content like '获取金币')")
BigDecimal sumMoney(Long userId);
@Select("select sum(money) from user_money_details where user_id=#{userId} and classify=6 and content like '%额外奖励现金红包%'")
BigDecimal sumMoney2(Long userId);
}