|
|
@@ -19,8 +19,8 @@ public interface UserMapper extends BaseMapper<User> {
|
|
|
@Update("update user set lottery_time = lottery_time + 1 where id = #{id}")
|
|
|
void incrLotteryTime(@Param("id") Long userId);
|
|
|
|
|
|
- @Update("update user set points = points - #{points} where id = #{id} and points >= #{points} and points >0")
|
|
|
- Integer subPoints(@Param("id") Long id, @Param("points") int points);
|
|
|
+ @Update("update user set points = points - #{points} where id = #{id} and points >= #{points} and points > 0")
|
|
|
+ Integer subPoints(@Param("id") Long id, @Param("points") BigDecimal points);
|
|
|
|
|
|
@Update("update user set points = points + #{points} where id = #{id} and points >=0")
|
|
|
Integer addPoints(@Param("id") Long id, @Param("points") BigDecimal points);
|