Commit dab874f9 by duanhq

技工统计 by duanht 2019/2/28

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@17996 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 61661437
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glsx.ordercenter.mapper.SysOrderMapper"> <mapper namespace="com.glsx.ordercenter.mapper.SysOrderMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOrder"> <resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOrder">
...@@ -494,7 +494,7 @@ ...@@ -494,7 +494,7 @@
</if> </if>
<if test="installRemark != null"> <if test="installRemark != null">
install_remark = #{installRemark,jdbcType=VARCHAR}, install_remark = #{installRemark,jdbcType=VARCHAR},
</if> </if>
<if test="installDeviceType != null"> <if test="installDeviceType != null">
#{installDeviceType,jdbcType=VARCHAR}, #{installDeviceType,jdbcType=VARCHAR},
</if> </if>
...@@ -550,12 +550,12 @@ ...@@ -550,12 +550,12 @@
<result column="shop_name" jdbcType="VARCHAR" property="shopName" /> <result column="shop_name" jdbcType="VARCHAR" property="shopName" />
<result column="biz_amount" jdbcType="BIGINT" property="bizAmount" /> <result column="biz_amount" jdbcType="BIGINT" property="bizAmount" />
</resultMap> </resultMap>
<!-- <select id="selectByParams" parameterType="com.glsx.ordercenter.pojo.SysOrderExample" <!-- <select id="selectByParams" parameterType="com.glsx.ordercenter.pojo.SysOrderExample"
resultMap="OrderDetailResultMap"> SELECT so.*,sm.shop_name,su.`name`,su.phone_number resultMap="OrderDetailResultMap"> SELECT so.*,sm.shop_name,su.`name`,su.phone_number
FROM sys_order so LEFT JOIN sys_merchant sm ON so.merchant_id = sm.id LEFT FROM sys_order so LEFT JOIN sys_merchant sm ON so.merchant_id = sm.id LEFT
JOIN sys_user su ON sm.user_id = su.id LEFT JOIN sys_mechanic smc ON so.mechanic_id JOIN sys_user su ON sm.user_id = su.id LEFT JOIN sys_mechanic smc ON so.mechanic_id
= smc.id and smc.user_id = su.id <if test="_parameter != null"> <include = smc.id and smc.user_id = su.id <if test="_parameter != null"> <include
refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order
by ${orderByClause} </if> </select> --> by ${orderByClause} </if> </select> -->
<select id="selectByParams" parameterType="com.glsx.ordercenter.pojo.SysOrderExample" <select id="selectByParams" parameterType="com.glsx.ordercenter.pojo.SysOrderExample"
...@@ -602,9 +602,9 @@ ...@@ -602,9 +602,9 @@
ORDER BY biz_amount DESC ORDER BY biz_amount DESC
LIMIT 10 LIMIT 10
</select> </select>
<select id="getOrderCount" parameterType="com.glsx.ordercenter.pojo.SysOrder" resultType="Integer"> <select id="getOrderCount" parameterType="com.glsx.ordercenter.pojo.SysOrder" resultType="Integer">
select select
count(1) count(1)
from sys_order from sys_order
<where> <where>
...@@ -640,11 +640,12 @@ ...@@ -640,11 +640,12 @@
WHERE WHERE
order_type = 1 order_type = 1
AND active_status = 8 AND active_status = 8
AND ssm.service_id = #{userId}
<if test="dateStart != null and dateEnd!=null and dateStart !='' and dateEnd !=''"> <if test="dateStart != null and dateEnd!=null and dateStart !='' and dateEnd !=''">
and sys_order.create_time between #{dateStart,jdbcType=TIMESTAMP} and #{dateEnd,jdbcType=TIMESTAMP} and so.complete_time between #{dateStart,jdbcType=TIMESTAMP} and #{dateEnd,jdbcType=TIMESTAMP}
</if> </if>
<if test="mechanicId != null"> <if test="mechanicId != null">
and ssm.service_id = #{mechanicId} and so.mechanic_id = #{mechanicId}
</if> </if>
GROUP BY GROUP BY
so.mechanic_id so.mechanic_id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!