|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
@@ -16,12 +16,13 @@
|
|
|
<result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
|
|
<result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
|
|
|
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
|
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
|
|
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
|
|
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
|
|
|
|
|
+ <result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
<sql id="Example_Where_Clause">
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
<where>
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
@@ -55,7 +56,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
<where>
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
@@ -89,16 +90,16 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
id, order_no, refund_status, create_time, remarks, attachment_url, picture_url, amount,
|
|
id, order_no, refund_status, create_time, remarks, attachment_url, picture_url, amount,
|
|
|
- company_name
|
|
|
|
|
|
|
+ company_name, audit_time
|
|
|
</sql>
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.TOrderOutsourceExample" resultMap="BaseResultMap">
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.TOrderOutsourceExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
select
|
|
select
|
|
|
<if test="distinct">
|
|
<if test="distinct">
|
|
@@ -117,7 +118,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
select
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
<include refid="Base_Column_List" />
|
|
@@ -128,7 +129,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
delete from t_order_outsource
|
|
delete from t_order_outsource
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
@@ -137,7 +138,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
delete from t_order_outsource
|
|
delete from t_order_outsource
|
|
|
<if test="_parameter != null">
|
|
<if test="_parameter != null">
|
|
@@ -148,22 +149,22 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
insert into t_order_outsource (id, order_no, refund_status,
|
|
insert into t_order_outsource (id, order_no, refund_status,
|
|
|
create_time, remarks, attachment_url,
|
|
create_time, remarks, attachment_url,
|
|
|
- picture_url, amount, company_name
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ picture_url, amount, company_name,
|
|
|
|
|
+ audit_time)
|
|
|
values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{refundStatus,jdbcType=INTEGER},
|
|
values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{refundStatus,jdbcType=INTEGER},
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=VARCHAR},
|
|
#{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
- #{pictureUrl,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{companyName,jdbcType=VARCHAR}
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ #{pictureUrl,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{companyName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{auditTime,jdbcType=TIMESTAMP})
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderOutsource">
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderOutsource">
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
insert into t_order_outsource
|
|
insert into t_order_outsource
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -194,6 +195,9 @@
|
|
|
<if test="companyName != null">
|
|
<if test="companyName != null">
|
|
|
company_name,
|
|
company_name,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="auditTime != null">
|
|
|
|
|
+ audit_time,
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
<if test="id != null">
|
|
@@ -223,13 +227,16 @@
|
|
|
<if test="companyName != null">
|
|
<if test="companyName != null">
|
|
|
#{companyName,jdbcType=VARCHAR},
|
|
#{companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="auditTime != null">
|
|
|
|
|
+ #{auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.TOrderOutsourceExample" resultType="java.lang.Long">
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.TOrderOutsourceExample" resultType="java.lang.Long">
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
select count(*) from t_order_outsource
|
|
select count(*) from t_order_outsource
|
|
|
<if test="_parameter != null">
|
|
<if test="_parameter != null">
|
|
@@ -240,7 +247,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
update t_order_outsource
|
|
update t_order_outsource
|
|
|
<set>
|
|
<set>
|
|
@@ -271,6 +278,9 @@
|
|
|
<if test="record.companyName != null">
|
|
<if test="record.companyName != null">
|
|
|
company_name = #{record.companyName,jdbcType=VARCHAR},
|
|
company_name = #{record.companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="record.auditTime != null">
|
|
|
|
|
+ audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
</set>
|
|
</set>
|
|
|
<if test="_parameter != null">
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
@@ -280,7 +290,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
update t_order_outsource
|
|
update t_order_outsource
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
@@ -291,7 +301,8 @@
|
|
|
attachment_url = #{record.attachmentUrl,jdbcType=VARCHAR},
|
|
attachment_url = #{record.attachmentUrl,jdbcType=VARCHAR},
|
|
|
picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
|
picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
|
|
amount = #{record.amount,jdbcType=DECIMAL},
|
|
amount = #{record.amount,jdbcType=DECIMAL},
|
|
|
- company_name = #{record.companyName,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ company_name = #{record.companyName,jdbcType=VARCHAR},
|
|
|
|
|
+ audit_time = #{record.auditTime,jdbcType=TIMESTAMP}
|
|
|
<if test="_parameter != null">
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
</if>
|
|
@@ -300,7 +311,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
update t_order_outsource
|
|
update t_order_outsource
|
|
|
<set>
|
|
<set>
|
|
@@ -328,6 +339,9 @@
|
|
|
<if test="companyName != null">
|
|
<if test="companyName != null">
|
|
|
company_name = #{companyName,jdbcType=VARCHAR},
|
|
company_name = #{companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="auditTime != null">
|
|
|
|
|
+ audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
</update>
|
|
@@ -335,7 +349,7 @@
|
|
|
<!--
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jul 30 09:27:41 CST 2019.
|
|
|
|
|
|
|
+ This element was generated on Tue Jul 30 16:33:59 CST 2019.
|
|
|
-->
|
|
-->
|
|
|
update t_order_outsource
|
|
update t_order_outsource
|
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
@@ -345,12 +359,105 @@
|
|
|
attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
amount = #{amount,jdbcType=DECIMAL},
|
|
amount = #{amount,jdbcType=DECIMAL},
|
|
|
- company_name = #{companyName,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ company_name = #{companyName,jdbcType=VARCHAR},
|
|
|
|
|
+ audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
</update>
|
|
|
<select id="selectByOrderNo" resultType="com.goafanti.order.bo.OrderOutsourceDtails">
|
|
<select id="selectByOrderNo" resultType="com.goafanti.order.bo.OrderOutsourceDtails">
|
|
|
- select id, order_no orderNo, refund_status refundStatus, date_format(create_time,'%Y-%m-%d %H:%i:%S') createTimes , remarks,
|
|
|
|
|
- attachment_url attachmentUrl, picture_url pictureUrl, amount,company_name companyName from t_order_outsource
|
|
|
|
|
- where order_no = #{orderNo}
|
|
|
|
|
|
|
+ select id, order_no orderNo, refund_status refundStatus, date_format(create_time,'%Y-%m-%d %H:%i:%S') createTimes , remarks,
|
|
|
|
|
+ date_format(audit_time,'%Y-%m-%d %H:%i:%S') auditTimes,attachment_url attachmentUrl, picture_url pictureUrl, amount,
|
|
|
|
|
+ company_name companyName from t_order_outsource where order_no = #{orderNo}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="orderOutsourceList" resultType="com.goafanti.order.bo.OrderOutsourceBo">
|
|
|
|
|
+ select a.order_no orderNo,b.contract_no contractNo,date_format(b.create_time,'%Y-%m-%d %H:%i:%S') createTime,
|
|
|
|
|
+ date_format(b.sign_time,'%Y-%m-%d') signTime,c.nickname userName, e.name depName,b.total_amount totalAmount,
|
|
|
|
|
+ b.liquidation_status liquidationStatus,a.refund_status refundStatus,d.name adminName,f.name financeName
|
|
|
|
|
+ from t_order_outsource a
|
|
|
|
|
+ left join t_order_new b on a.order_no=b.order_no left join `user` c on b.buyer_id=c.id
|
|
|
|
|
+ left join admin d on b.salesman_id=d.id left join department e on d.department_id=e.id
|
|
|
|
|
+ left join admin f on b.finance_id=f.id
|
|
|
|
|
+ where 1=1
|
|
|
|
|
+ <if test="refundStatus != null">
|
|
|
|
|
+ and a.refund_status= #{refundStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contractNo != null">
|
|
|
|
|
+ and b.contract_no like concat('%',#{contractNo},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null">
|
|
|
|
|
+ and c.nickname like concat('%',#{name},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="startTime != null and endTime != null">
|
|
|
|
|
+ and b.create_time between #{startTime} and #{endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ order by b.create_time desc
|
|
|
|
|
+ <if test="page_sql!=null">
|
|
|
|
|
+ ${page_sql}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="orderOutsourceCount" resultType="java.lang.Integer">
|
|
|
|
|
+ select count(*) from t_order_outsource a left join t_order_new b on a.order_no=b.order_no
|
|
|
|
|
+ left join `user` c on b.buyer_id=c.id where 1=1
|
|
|
|
|
+ <if test="refundStatus != null">
|
|
|
|
|
+ and a.refund_status= #{refundStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contractNo != null">
|
|
|
|
|
+ and b.contract_no like concat('%',#{contractNo},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null">
|
|
|
|
|
+ and c.nickname like concat('%',#{name},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="starTime != null and endTime != null">
|
|
|
|
|
+ and b.create_time between #{starTime} and #{endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="salesmanOrderOutsourceList" resultType="com.goafanti.order.bo.OrderOutsourceBo">
|
|
|
|
|
+ select a.order_no orderNo,b.contract_no contractNo,date_format(b.create_time,'%Y-%m-%d %H:%i:%S') createTime,
|
|
|
|
|
+ date_format(b.sign_time,'%Y-%m-%d') signTime,c.nickname userName, e.name depName,b.total_amount totalAmount,
|
|
|
|
|
+ b.liquidation_status liquidationStatus,a.refund_status refundStatus,d.name adminName,f.name financeName
|
|
|
|
|
+ from t_order_outsource a
|
|
|
|
|
+ left join t_order_new b on a.order_no=b.order_no left join `user` c on b.buyer_id=c.id
|
|
|
|
|
+ left join admin d on b.salesman_id=d.id left join department e on d.department_id=e.id
|
|
|
|
|
+ left join admin f on b.finance_id=f.id
|
|
|
|
|
+ where 1=1 and b.outsource=1
|
|
|
|
|
+ and d.department_id in
|
|
|
|
|
+ <foreach close=")" collection="deps" item="deps" open="(" separator=",">
|
|
|
|
|
+ #{deps.id}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ <if test="refundStatus != null">
|
|
|
|
|
+ and a.refund_status= #{refundStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contractNo != null">
|
|
|
|
|
+ and b.contract_no like concat('%',#{contractNo},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null">
|
|
|
|
|
+ and c.nickname like concat('%',#{name},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="startTime != null and endTime != null">
|
|
|
|
|
+ and b.create_time between #{startTime} and #{endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ order by b.create_time desc
|
|
|
|
|
+ <if test="page_sql!=null">
|
|
|
|
|
+ ${page_sql}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="salesmanOrderOutsourceCount" resultType="java.lang.Integer">
|
|
|
|
|
+ select count(*) from t_order_outsource a left join t_order_new b on a.order_no=b.order_no
|
|
|
|
|
+ left join `user` c on b.buyer_id=c.id where 1=1 left join admin d on b.salesman_id=d.id
|
|
|
|
|
+ and d.department_id in
|
|
|
|
|
+ <foreach close=")" collection="deps" item="deps" open="(" separator=",">
|
|
|
|
|
+ #{deps.id}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ <if test="refundStatus != null">
|
|
|
|
|
+ and a.refund_status= #{refundStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contractNo != null">
|
|
|
|
|
+ and b.contract_no like concat('%',#{contractNo},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null">
|
|
|
|
|
+ and c.nickname like concat('%',#{name},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="starTime != null and endTime != null">
|
|
|
|
|
+ and b.create_time between #{starTime} and #{endTime}
|
|
|
|
|
+ </if>
|
|
|
</select>
|
|
</select>
|
|
|
</mapper>
|
|
</mapper>
|