This commit is contained in:
雷欧(林平凡)
2025-08-05 17:51:28 +08:00
parent 3ec3e9e315
commit b2996bd5b6
5 changed files with 81 additions and 586 deletions

View File

@@ -61,63 +61,71 @@
select id, order_id, parent_id, order_time, finish_time, modify_time, order_emt, plus, union_id, sku_id, sku_name, sku_num, sku_return_num, sku_frozen_num, price, commission_rate, sub_side_rate, subsidy_rate, final_rate, estimate_cos_price, estimate_fee, actual_cos_price, actual_fee, valid_code, trace_type, position_id, site_id, union_alias, pid, cid1, cid2, cid3, sub_union_id, union_tag, pop_id, ext1, pay_month, cp_act_id, union_role, gift_coupon_ocs_amount, gift_coupon_key, balance_ext, sign, pro_price_amount, rid, goods_info_id, express_status, channel_id, sku_tag, item_id, caller_item_id, order_tag from order_rows
</sql>
<select id="selectOrderRowsList" parameterType="OrderRows" resultMap="OrderRowsResult">
<include refid="selectOrderRowsVo"/>
<where>
<if test="orderId != null "> and order_id = #{orderId}</if>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="orderTime != null "> and order_time = #{orderTime}</if>
<if test="finishTime != null "> and finish_time = #{finishTime}</if>
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
<if test="orderEmt != null "> and order_emt = #{orderEmt}</if>
<if test="plus != null "> and plus = #{plus}</if>
<if test="unionId != null "> and union_id = #{unionId}</if>
<if test="skuId != null "> and sku_id = #{skuId}</if>
<if test="skuName != null and skuName != ''"> and sku_name like concat('%', #{skuName}, '%')</if>
<if test="skuNum != null "> and sku_num = #{skuNum}</if>
<if test="skuReturnNum != null "> and sku_return_num = #{skuReturnNum}</if>
<if test="skuFrozenNum != null "> and sku_frozen_num = #{skuFrozenNum}</if>
<if test="price != null "> and price = #{price}</if>
<if test="commissionRate != null "> and commission_rate = #{commissionRate}</if>
<if test="subSideRate != null "> and sub_side_rate = #{subSideRate}</if>
<if test="subsidyRate != null "> and subsidy_rate = #{subsidyRate}</if>
<if test="finalRate != null "> and final_rate = #{finalRate}</if>
<if test="estimateCosPrice != null "> and estimate_cos_price = #{estimateCosPrice}</if>
<if test="estimateFee != null "> and estimate_fee = #{estimateFee}</if>
<if test="actualCosPrice != null "> and actual_cos_price = #{actualCosPrice}</if>
<if test="actualFee != null "> and actual_fee = #{actualFee}</if>
<if test="validCode != null "> and valid_code = #{validCode}</if>
<if test="traceType != null "> and trace_type = #{traceType}</if>
<if test="positionId != null "> and position_id = #{positionId}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="unionAlias != null and unionAlias != ''"> and union_alias like concat('%', #{unionAlias}, '%')</if>
<if test="pid != null and pid != ''"> and pid = #{pid}</if>
<if test="cid1 != null "> and cid1 = #{cid1}</if>
<if test="cid2 != null "> and cid2 = #{cid2}</if>
<if test="cid3 != null "> and cid3 = #{cid3}</if>
<if test="subUnionId != null and subUnionId != ''"> and sub_union_id = #{subUnionId}</if>
<if test="unionTag != null and unionTag != ''"> and union_tag = #{unionTag}</if>
<if test="popId != null "> and pop_id = #{popId}</if>
<if test="ext1 != null and ext1 != ''"> and ext1 = #{ext1}</if>
<if test="payMonth != null and payMonth != ''"> and pay_month = #{payMonth}</if>
<if test="cpActId != null "> and cp_act_id = #{cpActId}</if>
<if test="unionRole != null "> and union_role = #{unionRole}</if>
<if test="giftCouponOcsAmount != null "> and gift_coupon_ocs_amount = #{giftCouponOcsAmount}</if>
<if test="giftCouponKey != null and giftCouponKey != ''"> and gift_coupon_key = #{giftCouponKey}</if>
<if test="balanceExt != null and balanceExt != ''"> and balance_ext = #{balanceExt}</if>
<if test="sign != null and sign != ''"> and sign = #{sign}</if>
<if test="proPriceAmount != null "> and pro_price_amount = #{proPriceAmount}</if>
<if test="rid != null "> and rid = #{rid}</if>
<if test="goodsInfoId != null "> and goods_info_id = #{goodsInfoId}</if>
<if test="expressStatus != null "> and express_status = #{expressStatus}</if>
<if test="channelId != null "> and channel_id = #{channelId}</if>
<if test="skuTag != null and skuTag != ''"> and sku_tag = #{skuTag}</if>
<if test="itemId != null and itemId != ''"> and item_id = #{itemId}</if>
<if test="callerItemId != null and callerItemId != ''"> and caller_item_id = #{callerItemId}</if>
<if test="orderTag != null and orderTag != ''"> and order_tag = #{orderTag}</if>
</where>
order by order_time desc
</select>
<select id="selectOrderRowsList" parameterType="OrderRows" resultMap="OrderRowsResult">
<include refid="selectOrderRowsVo"/>
<where>
<if test="orderId != null "> and order_id = #{orderId}</if>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="orderTime != null "> and order_time = #{orderTime}</if>
<if test="finishTime != null "> and finish_time = #{finishTime}</if>
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
<if test="orderEmt != null "> and order_emt = #{orderEmt}</if>
<if test="plus != null "> and plus = #{plus}</if>
<if test="unionId != null "> and union_id = #{unionId}</if>
<if test="skuId != null "> and sku_id = #{skuId}</if>
<if test="skuName != null and skuName != ''"> and sku_name like concat('%', #{skuName}, '%')</if>
<if test="skuNum != null "> and sku_num = #{skuNum}</if>
<if test="skuReturnNum != null "> and sku_return_num = #{skuReturnNum}</if>
<if test="skuFrozenNum != null "> and sku_frozen_num = #{skuFrozenNum}</if>
<if test="price != null "> and price = #{price}</if>
<if test="commissionRate != null "> and commission_rate = #{commissionRate}</if>
<if test="subSideRate != null "> and sub_side_rate = #{subSideRate}</if>
<if test="subsidyRate != null "> and subsidy_rate = #{subsidyRate}</if>
<if test="finalRate != null "> and final_rate = #{finalRate}</if>
<if test="estimateCosPrice != null "> and estimate_cos_price = #{estimateCosPrice}</if>
<if test="estimateFee != null "> and estimate_fee = #{estimateFee}</if>
<if test="actualCosPrice != null "> and actual_cos_price = #{actualCosPrice}</if>
<if test="actualFee != null "> and actual_fee = #{actualFee}</if>
<if test="validCode != null "> and valid_code = #{validCode}</if>
<!-- 支持validCode多值查询 -->
<if test="validCodes != null and validCodes.length > 0">
and valid_code in
<foreach item="item" index="index" collection="validCodes" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="traceType != null "> and trace_type = #{traceType}</if>
<if test="positionId != null "> and position_id = #{positionId}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="unionAlias != null and unionAlias != ''"> and union_alias like concat('%', #{unionAlias}, '%')</if>
<if test="pid != null and pid != ''"> and pid = #{pid}</if>
<if test="cid1 != null "> and cid1 = #{cid1}</if>
<if test="cid2 != null "> and cid2 = #{cid2}</if>
<if test="cid3 != null "> and cid3 = #{cid3}</if>
<if test="subUnionId != null and subUnionId != ''"> and sub_union_id = #{subUnionId}</if>
<if test="unionTag != null and unionTag != ''"> and union_tag = #{unionTag}</if>
<if test="popId != null "> and pop_id = #{popId}</if>
<if test="ext1 != null and ext1 != ''"> and ext1 = #{ext1}</if>
<if test="payMonth != null and payMonth != ''"> and pay_month = #{payMonth}</if>
<if test="cpActId != null "> and cp_act_id = #{cpActId}</if>
<if test="unionRole != null "> and union_role = #{unionRole}</if>
<if test="giftCouponOcsAmount != null "> and gift_coupon_ocs_amount = #{giftCouponOcsAmount}</if>
<if test="giftCouponKey != null and giftCouponKey != ''"> and gift_coupon_key = #{giftCouponKey}</if>
<if test="balanceExt != null and balanceExt != ''"> and balance_ext = #{balanceExt}</if>
<if test="sign != null and sign != ''"> and sign = #{sign}</if>
<if test="proPriceAmount != null "> and pro_price_amount = #{proPriceAmount}</if>
<if test="rid != null "> and rid = #{rid}</if>
<if test="goodsInfoId != null "> and goods_info_id = #{goodsInfoId}</if>
<if test="expressStatus != null "> and express_status = #{expressStatus}</if>
<if test="channelId != null "> and channel_id = #{channelId}</if>
<if test="skuTag != null and skuTag != ''"> and sku_tag = #{skuTag}</if>
<if test="itemId != null and itemId != ''"> and item_id = #{itemId}</if>
<if test="callerItemId != null and callerItemId != ''"> and caller_item_id = #{callerItemId}</if>
<if test="orderTag != null and orderTag != ''"> and order_tag = #{orderTag}</if>
</where>
order by order_time desc
</select>
<select id="selectOrderRowsById" parameterType="String" resultMap="OrderRowsResult">
<include refid="selectOrderRowsVo"/>