1.代客下单会员余额支付
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package com.chaozhanggui.system.cashierservice.mybatis;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow;
|
||||
|
||||
public interface MpShopUserFlowMapper extends BaseMapper<TbShopUserFlow> {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.chaozhanggui.system.cashierservice.mybatis;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public interface MpShopUserMapper extends BaseMapper<TbShopUser> {
|
||||
@Update("update tb_shop_user set amount=amount-#{orderAmount}, consume_amount=consume_amount+#{orderAmount} where id=#{vipUserId} and amount >= 0")
|
||||
long decrBalance(@Param("vipUserId") Integer vipUserId, @Param("orderAmount") BigDecimal orderAmount);
|
||||
}
|
||||
Reference in New Issue
Block a user