|
@ -10,21 +10,25 @@ 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,update_type)", |
|
|
|
|
|
|
|
|
"(jwcode,refund_type,refund_goods,contact_id,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},#{contactId},#{rechargeCoin},#{freeCoin},#{taskCoin},#{remark},#{adminId},now(),'退款')" |
|
|
}) |
|
|
}) |
|
|
@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({ |
|
|
"insert into audit", |
|
|
"insert into audit", |
|
|
"(jwcode,refund_id,admin_id,create_time,detail_id)", |
|
|
"(jwcode,refund_id,admin_id,create_time,detail_id)", |
|
|
"values", |
|
|
"values", |
|
|
"(,#{jwcode},#{refundId},#{adminId},now(),#{detailId})" |
|
|
|
|
|
|
|
|
"(#{jwcode},#{detailId},#{adminId},now(),#{detailId})" |
|
|
}) |
|
|
}) |
|
|
int insertAudit(Detail detail); |
|
|
int insertAudit(Detail detail); |
|
|
|
|
|
|
|
|
|
|
|
// 检查 contactId 是否存在 |
|
|
|
|
|
@Select("SELECT EXISTS (SELECT 1 FROM detail WHERE contact_id = #{contactId})") |
|
|
|
|
|
boolean existsByContactId(@Param("contactId") Integer contactId); |
|
|
|
|
|
|
|
|
@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); |
|
|
|
|
|
|
|
|