|
|
@@ -36,8 +36,8 @@ public interface UserMapper extends BaseMapper<User> {
|
|
|
@Update("update user set points = points - #{deductPoints} where id = #{id} and points = #{originalPoints}")
|
|
|
Integer subPointsNegative(@Param("id") Long userId, @Param("originalPoints") BigDecimal originalPoints, @Param("deductPoints") BigDecimal deductPoints);
|
|
|
|
|
|
- @Update("update user set balance = balance - #{deduct} where id = #{userId} and balance = #{userBalance} and balance >= #{deduct}")
|
|
|
- Integer deductBalance(@Param("userId") Long userId, @Param("deduct") BigDecimal deduct, @Param("userBalance") BigDecimal userBalance);
|
|
|
+ @Update("update user set balance = balance - #{deduct} where id = #{userId} and balance >= #{deduct}")
|
|
|
+ Integer deductBalance(@Param("userId") Long userId, @Param("deduct") BigDecimal deduct);
|
|
|
|
|
|
@Update("update user set balance = balance + #{returnBalance} where id = #{userId} and balance = #{userBalance}")
|
|
|
Integer returnBalance(@Param("userId") Long userId, @Param("returnBalance") BigDecimal returnBalance, @Param("userBalance") BigDecimal userBalance);
|
|
|
@@ -63,8 +63,8 @@ public interface UserMapper extends BaseMapper<User> {
|
|
|
@Update("update user set yhs_money = yhs_money - #{subMoney} where id = #{shopUserId} and yhs_money >= #{subMoney} and yhs_money > 0")
|
|
|
Integer subYhsMoney(@Param("shopUserId") Long shopUserId, @Param("subMoney") BigDecimal subMoney);
|
|
|
|
|
|
- @Update("update user set galaxycoin = galaxycoin - (${subGalaxycoin}) where id = #{id} and galaxycoin = #{userGalaxycoin}")
|
|
|
- Integer deductGalaxycoin(@Param("id") Long id, @Param("subGalaxycoin") BigDecimal subGalaxycoin, @Param("userGalaxycoin") BigDecimal userGalaxycoin);
|
|
|
+ @Update("update user set galaxycoin = galaxycoin - (${subGalaxycoin}) where id = #{id} and galaxycoin >= #{subGalaxycoin}")
|
|
|
+ Integer deductGalaxycoin(@Param("id") Long id, @Param("subGalaxycoin") BigDecimal subGalaxycoin);
|
|
|
|
|
|
@Update("update user set galaxycoin = galaxycoin + (${addGalaxycoin}) where id = #{id} and galaxycoin = #{originalGalaxycoin}")
|
|
|
Integer updateGalaxycoin(@Param("id") Long id, @Param("originalGalaxycoin") BigDecimal originalGalaxycoin, @Param("addGalaxycoin") BigDecimal addGalaxycoin);
|