1.代客下单 会员支付实现
This commit is contained in:
@@ -5,7 +5,9 @@ import cn.ysk.cashier.mybatis.entity.TbMShopUser;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -36,6 +38,8 @@ public interface TbMShopUserMapper extends BaseMapper<TbMShopUser> {
|
||||
"</script>")
|
||||
Map<String, Object> selectUserSummary(@Param("shopId") String shopId, @Param("isVip") Integer isVip);
|
||||
|
||||
@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