|
|
@ -104,7 +104,10 @@ |
|
|
select |
|
|
select |
|
|
IFNULL(sum(amount),0.00) as totalPayAmount |
|
|
IFNULL(sum(amount),0.00) as totalPayAmount |
|
|
from t_dealings_record |
|
|
from t_dealings_record |
|
|
where user_type ='1' |
|
|
where |
|
|
|
|
|
<!--20240802 排除掉删除的交易记录--> |
|
|
|
|
|
del_flag != 2 |
|
|
|
|
|
and user_type ='1' |
|
|
and shop_id = #{shopId} |
|
|
and shop_id = #{shopId} |
|
|
and create_time BETWEEN #{startTime} AND #{endTime} |
|
|
and create_time BETWEEN #{startTime} AND #{endTime} |
|
|
</select> |
|
|
</select> |
|
|
@ -113,7 +116,10 @@ |
|
|
select |
|
|
select |
|
|
<include refid="Base_Column_List"/> |
|
|
<include refid="Base_Column_List"/> |
|
|
from t_dealings_record |
|
|
from t_dealings_record |
|
|
where shop_id = #{shopId} |
|
|
where |
|
|
|
|
|
<!--20240802 排除掉删除的交易记录--> |
|
|
|
|
|
del_flag != 2 |
|
|
|
|
|
and shop_id = #{shopId} |
|
|
and dealings_user_id = #{userId} |
|
|
and dealings_user_id = #{userId} |
|
|
order by create_time desc |
|
|
order by create_time desc |
|
|
</select> |
|
|
</select> |
|
|
@ -127,6 +133,7 @@ |
|
|
|
|
|
|
|
|
<select id="getDealingsRecordPageByUserId" resultType="cc.hiver.mall.bill.vo.CustomerBillSaleVo"> |
|
|
<select id="getDealingsRecordPageByUserId" resultType="cc.hiver.mall.bill.vo.CustomerBillSaleVo"> |
|
|
select |
|
|
select |
|
|
|
|
|
tdr.id, |
|
|
tdr.sale_id, |
|
|
tdr.sale_id, |
|
|
tdr.create_by_name, |
|
|
tdr.create_by_name, |
|
|
tdr.create_time, |
|
|
tdr.create_time, |
|
|
@ -156,7 +163,9 @@ |
|
|
n.sale_id |
|
|
n.sale_id |
|
|
) trs on ts.id = trs.sale_id |
|
|
) trs on ts.id = trs.sale_id |
|
|
WHERE |
|
|
WHERE |
|
|
tdr.dealings_user_id = #{customerBillQueryVo.customerId} |
|
|
<!--20240802 排除掉删除的交易记录--> |
|
|
|
|
|
tdr.del_flag != 2 |
|
|
|
|
|
and tdr.dealings_user_id = #{customerBillQueryVo.customerId} |
|
|
and tdr.shop_id = #{customerBillQueryVo.shopId} |
|
|
and tdr.shop_id = #{customerBillQueryVo.shopId} |
|
|
<if test='customerBillQueryVo.startDate !=null and customerBillQueryVo.endDate !=null'> |
|
|
<if test='customerBillQueryVo.startDate !=null and customerBillQueryVo.endDate !=null'> |
|
|
and tdr.create_time BETWEEN #{customerBillQueryVo.startDate} AND #{customerBillQueryVo.endDate} |
|
|
and tdr.create_time BETWEEN #{customerBillQueryVo.startDate} AND #{customerBillQueryVo.endDate} |
|
|
@ -166,6 +175,7 @@ |
|
|
|
|
|
|
|
|
<select id="getDealingsRecordPageBySupplierId" resultType="cc.hiver.mall.bill.vo.SupplierBillPurchaseVo"> |
|
|
<select id="getDealingsRecordPageBySupplierId" resultType="cc.hiver.mall.bill.vo.SupplierBillPurchaseVo"> |
|
|
select |
|
|
select |
|
|
|
|
|
tdr.id, |
|
|
tdr.sale_id as purchase_id, |
|
|
tdr.sale_id as purchase_id, |
|
|
tdr.create_by_name, |
|
|
tdr.create_by_name, |
|
|
tdr.create_time, |
|
|
tdr.create_time, |
|
|
@ -182,7 +192,9 @@ |
|
|
t_dealings_record tdr |
|
|
t_dealings_record tdr |
|
|
left join t_purchase ts on ts.id = tdr.sale_id and ts.shop_id = #{supplierBillQueryVo.shopId} |
|
|
left join t_purchase ts on ts.id = tdr.sale_id and ts.shop_id = #{supplierBillQueryVo.shopId} |
|
|
WHERE |
|
|
WHERE |
|
|
tdr.dealings_user_id = #{supplierBillQueryVo.supplierId} |
|
|
<!--20240802 排除掉删除的交易记录--> |
|
|
|
|
|
tdr.del_flag != 2 |
|
|
|
|
|
and tdr.dealings_user_id = #{supplierBillQueryVo.supplierId} |
|
|
and tdr.shop_id = #{supplierBillQueryVo.shopId} |
|
|
and tdr.shop_id = #{supplierBillQueryVo.shopId} |
|
|
and (tdr.sale_id is null or ts.in_storage_status = '1') |
|
|
and (tdr.sale_id is null or ts.in_storage_status = '1') |
|
|
<if test='supplierBillQueryVo.startDate !=null and supplierBillQueryVo.endDate !=null'> |
|
|
<if test='supplierBillQueryVo.startDate !=null and supplierBillQueryVo.endDate !=null'> |
|
|
@ -190,4 +202,11 @@ |
|
|
</if> |
|
|
</if> |
|
|
order by tdr.create_time asc |
|
|
order by tdr.create_time asc |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<!-- cancelRecord--> |
|
|
|
|
|
<update id="deleteDealingsRecord"> |
|
|
|
|
|
update t_dealings_record |
|
|
|
|
|
set del_flag = 2 |
|
|
|
|
|
where id = #{id} |
|
|
|
|
|
</update> |
|
|
</mapper> |
|
|
</mapper> |