From 12b75ea8869fa6e65b1bd53d4460328e73a66125 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期三, 22 三月 2023 22:35:20 +0800 Subject: [PATCH] 新增加司机端接口 --- driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/AccountChangeDetailMapper.xml | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/AccountChangeDetailMapper.xml b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/AccountChangeDetailMapper.xml index 80b1519..08fdf80 100644 --- a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/AccountChangeDetailMapper.xml +++ b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/AccountChangeDetailMapper.xml @@ -5,6 +5,7 @@ <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="com.supersavedriving.driver.modular.system.model.AccountChangeDetail"> <id column="id" property="id"/> + <result column="code" property="code"/> <result column="userType" property="userType"/> <result column="userId" property="userId"/> <result column="type" property="type"/> @@ -61,4 +62,22 @@ </if> ) as aa where aa.money > 0 </select> + + + <select id="queryBalanceDetail" resultType="com.supersavedriving.driver.modular.system.warpper.BalanceDetailWarpper"> + select + code, + changeType as `type`, + UNIX_TIMESTAMP(createTime) * 1000 as createTime, + (newData - oldData) as money, + newData as balance + from t_account_change_detail where userType = 2 and userId = #{driverId} and changeType in (1, 3, 4, 7, 8) + <if test="null != time and '' != time"> + and DATE_FORMAT(createTime, '%Y年%m月') = #{time} + </if> + <if test="null != type"> + and changeType = #{type} + </if> + order by createTime desc limit #{pageNum}, #{pageSize} + </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1