|
|
|
@ -25,20 +25,51 @@ |
|
|
|
<!-- 多条件查询记录 --> |
|
|
|
<select id="getUserAccBillMap" resultType="cn.chjyj.szwh.bean.UserAccountBill"> |
|
|
|
SELECT <include refid="column"/> |
|
|
|
FROM <include refid="tbName"/> |
|
|
|
FROM `order` o |
|
|
|
LEFT JOIN <include refid="tbName"/> ub ON o.batchcode = ub.batchcode |
|
|
|
WHERE o.close_status=1 and ub.batchcode='1683254243765693' |
|
|
|
<where> |
|
|
|
<if test="map!=null"> |
|
|
|
<foreach collection="map" item="v" index="k" separator="and"> |
|
|
|
<if test="v != null and v != ''"> |
|
|
|
<if test="v != null and v != '' and k!='bcin'"> |
|
|
|
${k} = #{v} |
|
|
|
</if> |
|
|
|
<!-- 订单编号 --> |
|
|
|
<if test="k=='bcin' and v!=null"> |
|
|
|
ub.batchcode in |
|
|
|
<foreach item="btcode" index="index" collection="v" open="(" separator="," close=")"> |
|
|
|
#{btcode} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY id DESC |
|
|
|
ORDER BY ub.id DESC |
|
|
|
LIMIT #{startrs},#{limit} |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 多条件统计 --> |
|
|
|
<select id="countUserAccBillMap" parameterType="java.util.Map" resultType="java.lang.Integer"> |
|
|
|
SELECT count(*) FROM `order` o |
|
|
|
LEFT JOIN <include refid="tbName"/> ub ON o.batchcode = ub.batchcode |
|
|
|
<where> |
|
|
|
<if test="map!=null"> |
|
|
|
<foreach collection="map" item="v" index="k" separator="and"> |
|
|
|
<if test="v != null and v != '' and k!='bcin'"> |
|
|
|
${k} = #{v} |
|
|
|
</if> |
|
|
|
<!-- 订单编号 --> |
|
|
|
<if test="k=='bcin' and v!=null"> |
|
|
|
ub.batchcode in |
|
|
|
<foreach item="btcode" index="index" collection="v" open="(" separator="," close=")"> |
|
|
|
#{btcode} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 统计数量 --> |
|
|
|
<select id="countUserAccBill" parameterType="java.lang.String" resultType="java.lang.Integer"> |
|
|
|
select count(*) from <include refid="tbName"/> where user_isli=#{userisli} |
|
|
|
|