随行付进件通知加入mcc
This commit is contained in:
@@ -34,17 +34,7 @@ public interface UserAccountFlowMapper extends BaseMapper<UserAccountFlow> {
|
||||
"\tAND mf.biz_code = 'LD'\n" +
|
||||
"\torder by id desc limit #{pageSize} offset #{offset} ")
|
||||
List<UserMakerQuotaVO> selectByUserIdType(@Param("userId") Long userId, @Param("pageSize") Integer pageSize, @Param("offset") Integer offset);
|
||||
@Select("SELECT\n" +
|
||||
"\t IFNULL(SUM( amount ),0) \n" +
|
||||
"FROM\n" +
|
||||
"\ttb_pluss_user_account_flow \n" +
|
||||
"WHERE\n" +
|
||||
"\tuser_id = #{userId} \n" +
|
||||
"AND\n" +
|
||||
"\tbiz_code IN('102','LD')\n" +
|
||||
"AND\n" +
|
||||
"\tcreate_time < #{endTime} \n" +
|
||||
"AND\n" +
|
||||
"\tcreate_time\t> #{startTime}\t")
|
||||
|
||||
BigDecimal selectSumByUserId(@Param("userId") Long userId,@Param("startTime") Date startTime,@Param("endTime") Date endTime);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="cn.pluss.platform.mapper.UserAccountFlowMapper">
|
||||
|
||||
<select id="selectSumByUserId" resultType="java.math.BigDecimal">
|
||||
SELECT
|
||||
IFNULL( SUM( amount ), 0 ) - (
|
||||
SELECT
|
||||
IFNULL( SUM( amount ), 0 )
|
||||
FROM
|
||||
tb_pluss_user_account_flow
|
||||
WHERE
|
||||
user_id = #{userId}
|
||||
AND biz_code = '103'
|
||||
AND create_time < #{endTime} AND create_time > #{startTime}
|
||||
)
|
||||
FROM
|
||||
tb_pluss_user_account_flow
|
||||
WHERE
|
||||
user_id = #{userId}
|
||||
AND biz_code IN ( '102', 'LD' )
|
||||
AND create_time <#{endTime} AND create_time > #{startTime}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user