|
@@ -15,7 +15,7 @@
|
|
|
SELECT
|
|
SELECT
|
|
|
personName,
|
|
personName,
|
|
|
COALESCE(otherName, '未知对手') as otherName,
|
|
COALESCE(otherName, '未知对手') as otherName,
|
|
|
- otherCardNo,
|
|
|
|
|
|
|
+ COALESCE(otherCardNo, '未知对手卡号') as otherCardNo,
|
|
|
MIN(transDate) as startTransDate,
|
|
MIN(transDate) as startTransDate,
|
|
|
MAX(transDate) as endTransDate,
|
|
MAX(transDate) as endTransDate,
|
|
|
COUNT(*) AS transCount ,
|
|
COUNT(*) AS transCount ,
|
|
@@ -38,6 +38,16 @@
|
|
|
</otherwise>
|
|
</otherwise>
|
|
|
</choose>
|
|
</choose>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="query.otherCardNo != null and query.otherCardNo != ''">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test="query.otherCardNo == '未知对手卡号'">
|
|
|
|
|
+ AND otherCardNo IS NULL
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ AND otherCardNo = #{query.otherCardNo}
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </if>
|
|
|
<if test="query.startDate != null">
|
|
<if test="query.startDate != null">
|
|
|
and transDate >= #{query.startDate}
|
|
and transDate >= #{query.startDate}
|
|
|
</if>
|
|
</if>
|