|
@ -10,13 +10,21 @@ public interface RefundMapper { |
|
|
|
|
|
|
|
|
@Insert({ |
|
|
@Insert({ |
|
|
"insert into detail", |
|
|
"insert into detail", |
|
|
"(jwcode,refund_type,refund_goods,recharge_coin,free_coin,task_coin,remark,admin_id,create_time)", |
|
|
|
|
|
|
|
|
"(jwcode,refund_type,refund_goods,recharge_coin,free_coin,task_coin,remark,admin_id,create_time,update_type)", |
|
|
"values", |
|
|
"values", |
|
|
"(#{jwcode},#{refundType},#{refundGoods},#{rechargeCoin},#{freeCoin},#{taskCoin},#{remark},#{adminId},now())" |
|
|
|
|
|
|
|
|
"(#{jwcode},#{refundType},#{refundGoods},#{rechargeCoin},#{freeCoin},#{taskCoin},#{remark},#{adminId},now(),#{updateType})" |
|
|
}) |
|
|
}) |
|
|
@Options(useGeneratedKeys = true, keyColumn = "detail_id", keyProperty = "detailId") |
|
|
@Options(useGeneratedKeys = true, keyColumn = "detail_id", keyProperty = "detailId") |
|
|
int insert(Detail detail); |
|
|
int insert(Detail detail); |
|
|
|
|
|
|
|
|
|
|
|
@Select({ |
|
|
|
|
|
"insert into audit", |
|
|
|
|
|
"(jwcode,refund_id,admin_id,create_time,detail_id)", |
|
|
|
|
|
"values", |
|
|
|
|
|
"(,#{jwcode},#{refundId},#{adminId},now(),#{detailId})" |
|
|
|
|
|
}) |
|
|
|
|
|
int insertAudit(Detail detail); |
|
|
|
|
|
|
|
|
@Update("update detail set detail_flag = 0 where detail_id = #{detailId}") |
|
|
@Update("update detail set detail_flag = 0 where detail_id = #{detailId}") |
|
|
int update(@Param("detailId") Integer detailId); |
|
|
int update(@Param("detailId") Integer detailId); |
|
|
|
|
|
|
|
@ -34,16 +42,16 @@ public interface RefundMapper { |
|
|
"LEFT JOIN admin a ON d.admin_id = a.admin_id", |
|
|
"LEFT JOIN admin a ON d.admin_id = a.admin_id", |
|
|
"LEFT JOIN user u ON d.jwcode = u.jwcode", |
|
|
"LEFT JOIN user u ON d.jwcode = u.jwcode", |
|
|
"LEFT JOIN audit au ON d.detail_id = au.refund_id", |
|
|
"LEFT JOIN audit au ON d.detail_id = au.refund_id", |
|
|
"WHERE d.detail_flag = 1", |
|
|
|
|
|
|
|
|
"WHERE d.detail_flag = 1 and update_type ='退款'", |
|
|
"<if test='jwcode != null'>AND d.jwcode = #{jwcode}</if>", |
|
|
"<if test='jwcode != null'>AND d.jwcode = #{jwcode}</if>", |
|
|
"<if test='refundType != null'>AND d.refund_type LIKE CONCAT('%', #{refundType}, '%')</if>", |
|
|
"<if test='refundType != null'>AND d.refund_type LIKE CONCAT('%', #{refundType}, '%')</if>", |
|
|
"<if test='refundGoods != null'>AND d.refund_goods = #{refundGoods}</if>", |
|
|
|
|
|
|
|
|
"<if test='refundGoods != null'>AND d.refund_goods LIKE CONCAT('%', #{refundGoods}, '%')</if>", |
|
|
"<if test='rechargeCoin != null'>AND d.recharge_coin = #{rechargeCoin}</if>", |
|
|
"<if test='rechargeCoin != null'>AND d.recharge_coin = #{rechargeCoin}</if>", |
|
|
"<if test='freeCoin != null'>AND d.free_coin = #{freeCoin}</if>", |
|
|
"<if test='freeCoin != null'>AND d.free_coin = #{freeCoin}</if>", |
|
|
"<if test='taskCoin != null'>AND d.task_coin = #{taskCoin}</if>", |
|
|
"<if test='taskCoin != null'>AND d.task_coin = #{taskCoin}</if>", |
|
|
"<if test='remark != null'>AND d.remark LIKE CONCAT('%', #{remark}, '%')</if>", |
|
|
"<if test='remark != null'>AND d.remark LIKE CONCAT('%', #{remark}, '%')</if>", |
|
|
"<if test='adminId != null'>AND d.admin_id = #{adminId}</if>", |
|
|
"<if test='adminId != null'>AND d.admin_id = #{adminId}</if>", |
|
|
"<if test='adminArea != null'>AND a.area = #{adminArea}</if>", // admin表字段过滤 |
|
|
|
|
|
|
|
|
"<if test='adminArea != null'>AND a.area LIKE CONCAT('%', #{adminArea}, '%')</if>", // admin表字段过滤 |
|
|
"<if test='adminName != null'>AND a.name LIKE CONCAT('%', #{adminName}, '%')</if>", // admin表字段过滤 |
|
|
"<if test='adminName != null'>AND a.name LIKE CONCAT('%', #{adminName}, '%')</if>", // admin表字段过滤 |
|
|
"<if test='userName != null'>AND u.name LIKE CONCAT('%', #{userName}, '%')</if>", // user表字段过滤 |
|
|
"<if test='userName != null'>AND u.name LIKE CONCAT('%', #{userName}, '%')</if>", // user表字段过滤 |
|
|
"<if test='auditStatus != null'>AND au.status = #{auditStatus}</if>", // audit 表字段过滤 |
|
|
"<if test='auditStatus != null'>AND au.status = #{auditStatus}</if>", // audit 表字段过滤 |
|
|