|
@@ -47,6 +47,9 @@
|
|
|
<if test="merchSn != null and merchSn.trim() != '' ">
|
|
|
AND h.merch_sn = #{merchSn}
|
|
|
</if>
|
|
|
+ <if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
|
|
|
+ AND s.third_party_merch_code = #{thirdPartyMerchCode}
|
|
|
+ </if>
|
|
|
<if test="typeName != null and typeName.trim() != ''">
|
|
|
AND t.type_name LIKE concat('%',#{typeName},'%')
|
|
|
</if>
|
|
@@ -64,17 +67,21 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="queryTotal" resultType="int">
|
|
|
- select count(*) from mall_help_issue
|
|
|
- LEFT JOIN mall_help_type on mall_help_issue.type_id = mall_help_type.id
|
|
|
+ select count(*) from mall_help_issue h
|
|
|
+ LEFT JOIN mall_help_type on h.type_id = mall_help_type.id
|
|
|
+ left join mall_store s on h.store_id = s.id
|
|
|
WHERE 1=1
|
|
|
<if test="storeId != null and storeId != '' ">
|
|
|
- AND mall_help_issue.store_id = #{storeId}
|
|
|
+ AND h.store_id = #{storeId}
|
|
|
</if>
|
|
|
<if test="merchSn != null and merchSn.trim() != '' ">
|
|
|
- AND mall_help_issue.merch_sn = #{merchSn}
|
|
|
+ AND h.merch_sn = #{merchSn}
|
|
|
+ </if>
|
|
|
+ <if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
|
|
|
+ AND s.third_party_merch_code = #{thirdPartyMerchCode}
|
|
|
</if>
|
|
|
<if test="typeName != null and typeName.trim() != ''">
|
|
|
- AND mall_help_type.type_name LIKE concat('%',#{typeName},'%')
|
|
|
+ AND h.type_name LIKE concat('%',#{typeName},'%')
|
|
|
</if>
|
|
|
</select>
|
|
|
|