mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-19 11:40:05 +08:00
分销:@Select sql语句增加逻辑删除字段过滤
This commit is contained in:
parent
3dca66eefa
commit
16af31d980
@ -53,14 +53,14 @@ public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> {
|
||||
}
|
||||
|
||||
@Select("SELECT COUNT(1), SUM(price) FROM trade_brokerage_record " +
|
||||
"WHERE user_id = #{userId} AND biz_type = #{bizType} AND status = #{status}")
|
||||
"WHERE user_id = #{userId} AND biz_type = #{bizType} AND status = #{status} AND deleted = FALSE")
|
||||
UserBrokerageSummaryBO selectCountAndSumPriceByUserIdAndBizTypeAndStatus(@Param("userId") Long userId,
|
||||
@Param("bizType") Integer bizType,
|
||||
@Param("status") Integer status);
|
||||
|
||||
@Select("SELECT SUM(price) FROM trade_brokerage_record " +
|
||||
"WHERE user_id = #{userId} AND biz_type = #{bizType} " +
|
||||
"AND create_time BETWEEN #{beginTime} AND #{endTime}")
|
||||
"AND create_time BETWEEN #{beginTime} AND #{endTime} AND deleted = FALSE")
|
||||
Integer selectSummaryPriceByUserIdAndBizTypeAndCreateTimeBetween(@Param("userId") Long userId,
|
||||
@Param("bizType") Integer bizType,
|
||||
@Param("beginTime") LocalDateTime beginTime,
|
||||
|
@ -38,6 +38,7 @@ public interface BrokerageWithdrawMapper extends BaseMapperX<BrokerageWithdrawDO
|
||||
}
|
||||
|
||||
@Select("SELECT COUNT(1) AS count, SUM(price) AS price FROM trade_brokerage_withdraw " +
|
||||
"WHERE user_id = #{userId} AND status = #{status}")
|
||||
UserWithdrawSummaryBO selectCountAndSumPriceByUserIdAndStatus(Long userId, Integer status);
|
||||
"WHERE user_id = #{userId} AND status = #{status} AND deleted = FALSE")
|
||||
UserWithdrawSummaryBO selectCountAndSumPriceByUserIdAndStatus(@Param("userId") Long userId,
|
||||
@Param("status") Integer status);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user