|
|
@ -9,12 +9,12 @@ |
|
|
cash_record(order_type,jwcode,name,market,activity, |
|
|
cash_record(order_type,jwcode,name,market,activity, |
|
|
order_code,goods_name,good_num,permanent_gold,free_gold, |
|
|
order_code,goods_name,good_num,permanent_gold,free_gold, |
|
|
payment_currency,payment_amount,received_market, |
|
|
payment_currency,payment_amount,received_market, |
|
|
pay_type,pay_time,status,submitter_id, |
|
|
|
|
|
|
|
|
pay_type,pay_time,status,submitter_id,submtter_market, |
|
|
voucher,remark) |
|
|
voucher,remark) |
|
|
values(#{orderType},#{jwcode},#{name},#{market},#{activity}, |
|
|
values(#{orderType},#{jwcode},#{name},#{market},#{activity}, |
|
|
#{orderCode},#{goodsName},#{goodNum},#{permanentGold},#{freeGold},#{paymentCurrency}, |
|
|
#{orderCode},#{goodsName},#{goodNum},#{permanentGold},#{freeGold},#{paymentCurrency}, |
|
|
#{paymentAmount},#{receivedMarket},#{payType},#{payTime}, |
|
|
#{paymentAmount},#{receivedMarket},#{payType},#{payTime}, |
|
|
#{status},#{submitterId},#{voucher},#{remark}) |
|
|
|
|
|
|
|
|
#{status},#{submitterId},#{submitterMarket},#{voucher},#{remark}) |
|
|
</insert> |
|
|
</insert> |
|
|
<!-- <insert id="syncToCashRecord"> |
|
|
<!-- <insert id="syncToCashRecord"> |
|
|
insert into cash_record(order_type,jwcode,name,market,activity, |
|
|
insert into cash_record(order_type,jwcode,name,market,activity, |
|
|
@ -121,12 +121,10 @@ |
|
|
m2.name as receivedMarket, |
|
|
m2.name as receivedMarket, |
|
|
cr.received_amount/100 as receivedAmount,cr.handling_charge/100 as handlingCharge, |
|
|
cr.received_amount/100 as receivedAmount,cr.handling_charge/100 as handlingCharge, |
|
|
cr.pay_type,cr.pay_time,cr.received_time, |
|
|
cr.pay_type,cr.pay_time,cr.received_time, |
|
|
cr.status,cr.submitter_id,cr.voucher,cr.remark,cr.reject_reason, |
|
|
|
|
|
|
|
|
cr.status,cr.submitter_id,cr.submitter_market,cr.voucher,cr.remark,cr.reject_reason, |
|
|
cr.audit_id,cr.create_time,cr.update_time,cr.audit_time, |
|
|
cr.audit_id,cr.create_time,cr.update_time,cr.audit_time, |
|
|
a1.admin_name as submitterName, |
|
|
a1.admin_name as submitterName, |
|
|
a2.admin_name as auditName |
|
|
a2.admin_name as auditName |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from cash_record cr |
|
|
from cash_record cr |
|
|
left join admin a1 on cr.submitter_id = a1.id |
|
|
left join admin a1 on cr.submitter_id = a1.id |
|
|
left join admin a2 on cr.audit_id = a2.id |
|
|
left join admin a2 on cr.audit_id = a2.id |
|
|
@ -148,9 +146,32 @@ |
|
|
<if test="cashCollection.submitterId!=null and cashCollection.submitterId !=''"> |
|
|
<if test="cashCollection.submitterId!=null and cashCollection.submitterId !=''"> |
|
|
AND cr.submitter_id = #{cashCollection.submitterId} |
|
|
AND cr.submitter_id = #{cashCollection.submitterId} |
|
|
</if> |
|
|
</if> |
|
|
<if test="cashCollection.receivedMarket!=null and cashCollection.receivedMarket!=''"> |
|
|
|
|
|
AND cr.received_market = #{cashCollection.receivedMarket} |
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
<!-- 其他原有条件不变 --> |
|
|
|
|
|
<!-- <choose> |
|
|
|
|
|
<when test="cashCollection.status != null and cashCollection.status == 4"> |
|
|
|
|
|
<if test="cashCollection.receivedMarket != null and cashCollection.receivedMarket != ''"> |
|
|
|
|
|
AND (cr.received_market = #{cashCollection.receivedMarket} |
|
|
|
|
|
<if test="cashCollection.submitterMarket != null and cashCollection.submitterMarket != ''"> |
|
|
|
|
|
OR cr.submitter_market = #{cashCollection.submitterMarket} |
|
|
|
|
|
</if> |
|
|
|
|
|
) |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="(cashCollection.receivedMarket == null or cashCollection.receivedMarket == '') |
|
|
|
|
|
and cashCollection.submitterMarket != null and cashCollection.submitterMarket != ''"> |
|
|
|
|
|
AND cr.submitter_market = #{cashCollection.submitterMarket} |
|
|
|
|
|
</if> |
|
|
|
|
|
</when> |
|
|
|
|
|
|
|
|
|
|
|
<!– 非 status=4 保持原逻辑:同时满足 –> |
|
|
|
|
|
<otherwise>--> |
|
|
|
|
|
<if test="cashCollection.receivedMarket != null and cashCollection.receivedMarket != ''"> |
|
|
|
|
|
AND cr.received_market = #{cashCollection.receivedMarket} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="cashCollection.submitterMarket != null and cashCollection.submitterMarket != ''"> |
|
|
|
|
|
AND cr.submitter_market = #{cashCollection.submitterMarket} |
|
|
|
|
|
</if> |
|
|
|
|
|
<!-- </otherwise> |
|
|
|
|
|
</choose>--> |
|
|
<if test="cashCollection.activity!=null and cashCollection.activity!=''"> |
|
|
<if test="cashCollection.activity!=null and cashCollection.activity!=''"> |
|
|
AND cr.activity like concat('%',#{cashCollection.activity},'%') |
|
|
AND cr.activity like concat('%',#{cashCollection.activity},'%') |
|
|
</if> |
|
|
</if> |
|
|
|