@ -106,27 +106,27 @@
<if test= "ipAddress != null and ipAddress.length > 0" >
<if test= "ipAddress != null and ipAddress.length > 0" >
AND fm.ip_address = #{ipAddress}
AND fm.ip_address = #{ipAddress}
</if>
</if>
<if test= "sourceName != null and sourceName.length > 0" >
AND fy.source_name = #{sourceName}
</if>
<if test= "payType != null" >
<if test= "payType != null" >
AND fy.pay_type = #{payType}
AND fy.pay_type = #{payType}
</if>
</if>
<if test= "sourceType != null" >
<if test= "sourceType != null" >
AND fy.source_type = #{good }
AND fy.source_type = #{sourceType }
</if>
</if>
<if test= "startTime != null and endTime != null" >
<if test= "startTime != null and endTime != null" >
AND FROM_UNIXTIME(fy.`time`) BETWEEN #{startTime} AND #{endTime}
AND FROM_UNIXTIME(fy.`time`) BETWEEN #{startTime} AND #{endTime}
</if>
</if>
) AS subquery
) AS subquery
WHERE 1=1
WHERE 1=1
<if test= "room != null and room .length > 0" >
AND room LIKE CONCAT('%', #{room }, '%')
<if test= "sourceName != null and sourceName .length > 0" >
AND room LIKE CONCAT('%', #{sourceName }, '%')
</if>
</if>
<choose >
<choose >
<when test= "sortField != null and sortField.length > 0 or sortOrder != null and sortOrder.length > 0" >
<when test= "sortField != null and sortField.length > 0 or sortOrder != null and sortOrder.length > 0" >
ORDER BY ${sortField} ${sortOrder}
ORDER BY ${sortField} ${sortOrder}
</when>
</when>
<otherwise >
ORDER BY createTime DESC
</otherwise>
</choose>
</choose>
</select>
</select>
<select id= "getSpendTotal" resultType= "java.lang.Integer" >
<select id= "getSpendTotal" resultType= "java.lang.Integer" >
@ -177,10 +177,10 @@
and fy.order_no = #{orderNo}
and fy.order_no = #{orderNo}
</if>
</if>
<if test= "type != null and type.length > 0" >
<if test= "type != null and type.length > 0" >
and typ e LIKE CONCAT('%', #{type}, '%')
and con tent LIKE CONCAT('%', #{type}, '%')
</if>
</if>
<if test= "ipAddress != null and ipAddress .length > 0" >
and fm.ip_address = #{ipAddress }
<if test= "deptName != null and deptName .length > 0" >
and fm.ip_address = #{deptName }
</if>
</if>
<if test= "startTime != null and endTime != null" >
<if test= "startTime != null and endTime != null" >
and FROM_UNIXTIME(fy.`time`) BETWEEN #{startTime} AND #{endTime}
and FROM_UNIXTIME(fy.`time`) BETWEEN #{startTime} AND #{endTime}
@ -190,35 +190,41 @@
<when test= "sortField != null and sortField.length > 0 or sortOrder != null and sortOrder.length > 0" >
<when test= "sortField != null and sortField.length > 0 or sortOrder != null and sortOrder.length > 0" >
ORDER BY ${sortField} ${sortOrder}
ORDER BY ${sortField} ${sortOrder}
</when>
</when>
<otherwise >
ORDER BY fy.`time` DESC
</otherwise>
</choose>
</choose>
</select>
</select>
<select id= "getPayIp" resultType= "java.lang.String" >
<select id= "getPayIp" resultType= "java.lang.String" >
select DISTINCT ip_address from fx_member WHERE ip_address is not null
select DISTINCT ip_address from fx_member WHERE ip_address is not null
</select>
</select>
<select id= "getRecharge Total" resultType= "com.example.demo.domain.dou.Recharge Total" >
<select id= "getTotal" resultType= "com.example.demo.domain.dou.Total" >
SELECT
SELECT
sum(money)/50 as priceTotal ,
sum(money) as countTotal
sum(money)/50 as price,
sum(money) as count
from fx_yaoqing_records as fy
from fx_yaoqing_records as fy
LEFT JOIN fx_member as fm on fy.uid = fm.id
LEFT JOIN fx_member as fm on fy.uid = fm.id
<where >
<where >
`data`=0
`data`=0
<if test= "jwcode != null" >
<if test= "jwcode != null and jwcode.length > 0 " >
and fm.jwcode = #{jwcode}
and fm.jwcode = #{jwcode}
</if>
</if>
<if test= "orderNo != null and orderNo.length > 0" >
<if test= "orderNo != null and orderNo.length > 0" >
and fy.order_no = #{orderNo}
and fy.order_no = #{orderNo}
</if>
</if>
<if test= "type != null and type.length > 0" >
<if test= "type != null and type.length > 0" >
and typ e LIKE CONCAT('%', #{type}, '%')
and `con tent` LIKE CONCAT('%', #{type}, '%')
</if>
</if>
<if test= "ipAddress != null and ipAddress .length > 0" >
and fm.ip_address = #{ipAddress }
<if test= "deptName != null and deptName .length > 0" >
and fm.ip_address = #{deptName }
</if>
</if>
<if test= "startTime != null and endTime != null" >
<if test= "startTime != null and endTime != null" >
and FROM_UNIXTIME(fy.`time`) BETWEEN #{startTime} AND #{endTime}
and FROM_UNIXTIME(fy.`time`) BETWEEN #{startTime} AND #{endTime}
</if>
</if>
</where>
</where>
</select>
</select>
<select id= "getType" resultType= "java.lang.String" >
SELECT DISTINCT content FROM fx_yaoqing_records
</select>
</mapper>
</mapper>