|
|
@@ -28,7 +28,7 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Fri May 28 13:36:56 CST 2021.
|
|
|
-->
|
|
|
- id, `uid`, aid, add_wechat, wechat, renewal, renewal_time, sign_project, sign_project_id,
|
|
|
+ id, `uid`, aid, add_wechat, wechat, renewal, renewal_time, sign_project, sign_project_id,
|
|
|
new_time, remarks, create_time, tech_satisfaction, business_satisfaction
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
@@ -37,7 +37,7 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Fri May 28 13:36:56 CST 2021.
|
|
|
-->
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from user_service
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -57,15 +57,15 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Fri May 28 13:36:56 CST 2021.
|
|
|
-->
|
|
|
- insert into user_service (id, `uid`, aid,
|
|
|
- add_wechat, wechat, renewal,
|
|
|
- renewal_time, sign_project, sign_project_id,
|
|
|
- new_time, remarks, create_time,
|
|
|
+ insert into user_service (id, `uid`, aid,
|
|
|
+ add_wechat, wechat, renewal,
|
|
|
+ renewal_time, sign_project, sign_project_id,
|
|
|
+ new_time, remarks, create_time,
|
|
|
tech_satisfaction, business_satisfaction)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
- #{addWechat,jdbcType=INTEGER}, #{wechat,jdbcType=VARCHAR}, #{renewal,jdbcType=INTEGER},
|
|
|
- #{renewalTime,jdbcType=TIMESTAMP}, #{signProject,jdbcType=VARCHAR}, #{signProjectId,jdbcType=VARCHAR},
|
|
|
- #{newTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
+ #{addWechat,jdbcType=INTEGER}, #{wechat,jdbcType=VARCHAR}, #{renewal,jdbcType=INTEGER},
|
|
|
+ #{renewalTime,jdbcType=TIMESTAMP}, #{signProject,jdbcType=VARCHAR}, #{signProjectId,jdbcType=VARCHAR},
|
|
|
+ #{newTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
#{techSatisfaction,jdbcType=INTEGER}, #{businessSatisfaction,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.UserService">
|
|
|
@@ -239,8 +239,8 @@
|
|
|
<select id="selectByUid" resultType="java.lang.Integer">
|
|
|
select id from user_service where uid= #{uid}
|
|
|
</select>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<resultMap id="userService" type="com.goafanti.user.bo.OutOrderUserService">
|
|
|
<result column="orderNo" property="orderNo" />
|
|
|
<result column="contractNo" property="contractNo" />
|
|
|
@@ -267,8 +267,8 @@
|
|
|
receiver_name receiverName ,certificate_number certificateNumber
|
|
|
from t_order_task where split_status in (0,1) and order_no = #{orderNo}
|
|
|
</select>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<select id="OrderUseServiceList" resultMap="userService">
|
|
|
select a.order_no orderNo,a.contract_no contractNo,b.dep_name depName ,a.buyer_id uid,a.create_time ,b.buyer_name userName,c.new_time ,
|
|
|
date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as orderTimes, date_format(c.new_time,'%Y-%m-%d %H:%i:%S') as newTimes,
|
|
|
@@ -276,56 +276,62 @@ date_format(c.renewal_time,'%Y-%m-%d') as renewalTimes, date_format(a.sign_time,
|
|
|
d.name adminName,c.add_wechat addWechat,c.wechat ,c.renewal ,c.renewal_time ,c.sign_project signProject ,c.remarks,
|
|
|
c.tech_satisfaction techSatisfaction, c.business_satisfaction businessSatisfaction
|
|
|
from t_order_new a
|
|
|
-left join t_order_mid b on a.order_no =b.order_no left join user_service c on a.buyer_id =c.uid
|
|
|
-left join admin d on c.aid =d.id
|
|
|
+left join t_order_mid b on a.order_no =b.order_no left join user_service c on a.buyer_id =c.uid
|
|
|
+left join admin d on c.aid =d.id
|
|
|
where a.delete_sign in(0,2,3)
|
|
|
-<if test="userName != null">
|
|
|
-and b.buyer_name like CONCAT('%', #{userName},'%')
|
|
|
-</if>
|
|
|
-<if test="depId != null">
|
|
|
-and a.order_dep = #{depId}
|
|
|
-</if>
|
|
|
-<if test="addWechat != null">
|
|
|
-and c.add_wechat = #{addWechat}
|
|
|
-</if>
|
|
|
-<if test="renewal != null">
|
|
|
-and c.renewal = #{renewal}
|
|
|
-</if>
|
|
|
-<if test="startFollowTimes != null">
|
|
|
-and c.new_time BETWEEN #{startFollowTimes} and #{endFollowTimes}
|
|
|
-</if>
|
|
|
-<if test="startSignTimes != null">
|
|
|
-and a.create_time BETWEEN #{startSignTimes} and #{endSignTimes}
|
|
|
-</if>
|
|
|
+ <if test="userName != null">
|
|
|
+ and b.buyer_name like CONCAT('%', #{userName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="deps != null">
|
|
|
+ and a.order_dep in
|
|
|
+ <foreach close=")" collection="deps" item="depId" open="(" separator=",">
|
|
|
+ #{depId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="addWechat != null">
|
|
|
+ and c.add_wechat = #{addWechat}
|
|
|
+ </if>
|
|
|
+ <if test="renewal != null">
|
|
|
+ and c.renewal = #{renewal}
|
|
|
+ </if>
|
|
|
+ <if test="startFollowTimes != null">
|
|
|
+ and c.new_time BETWEEN #{startFollowTimes} and #{endFollowTimes}
|
|
|
+ </if>
|
|
|
+ <if test="startSignTimes != null">
|
|
|
+ and a.create_time BETWEEN #{startSignTimes} and #{endSignTimes}
|
|
|
+ </if>
|
|
|
order by c.new_time,a.create_time
|
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="OrderUseServiceCount" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
from t_order_new a
|
|
|
-left join t_order_mid b on a.order_no =b.order_no left join user_service c on a.buyer_id =c.uid
|
|
|
-left join admin d on c.aid =d.id
|
|
|
+left join t_order_mid b on a.order_no =b.order_no left join user_service c on a.buyer_id =c.uid
|
|
|
+left join admin d on c.aid =d.id
|
|
|
where a.delete_sign in(0,2,3)
|
|
|
-<if test="userName != null">
|
|
|
-and b.buyer_name like CONCAT('%', #{userName},'%')
|
|
|
-</if>
|
|
|
-<if test="depId != null">
|
|
|
-and a.order_dep = #{depId}
|
|
|
-</if>
|
|
|
-<if test="addWechat != null">
|
|
|
-and c.add_wechat = #{addWechat}
|
|
|
-</if>
|
|
|
-<if test="renewal != null">
|
|
|
-and c.renewal = #{renewal}
|
|
|
-</if>
|
|
|
-<if test="startFollowTimes != null">
|
|
|
-and c.new_time BETWEEN #{startFollowTimes} and #{endFollowTimes}
|
|
|
-</if>
|
|
|
-<if test="startSignTimes != null">
|
|
|
-and a.create_time BETWEEN #{startSignTimes} and #{endSignTimes}
|
|
|
-</if>
|
|
|
+ <if test="userName != null">
|
|
|
+ and b.buyer_name like CONCAT('%', #{userName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="deps != null">
|
|
|
+ and a.order_dep in
|
|
|
+ <foreach close=")" collection="deps" item="depId" open="(" separator=",">
|
|
|
+ #{depId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="addWechat != null">
|
|
|
+ and c.add_wechat = #{addWechat}
|
|
|
+ </if>
|
|
|
+ <if test="renewal != null">
|
|
|
+ and c.renewal = #{renewal}
|
|
|
+ </if>
|
|
|
+ <if test="startFollowTimes != null">
|
|
|
+ and c.new_time BETWEEN #{startFollowTimes} and #{endFollowTimes}
|
|
|
+ </if>
|
|
|
+ <if test="startSignTimes != null">
|
|
|
+ and a.create_time BETWEEN #{startSignTimes} and #{endSignTimes}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|