|
|
@@ -348,90 +348,6 @@
|
|
|
remarks = #{remarks,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
- <select id="selectBusinessList" resultType="com.goafanti.customer.bo.BusinessListBo">
|
|
|
- select
|
|
|
- c.name as businessName,
|
|
|
- b.identify_name as identifyName,
|
|
|
- a.id as businessId,
|
|
|
- a.create_time as createTime,
|
|
|
- a.update_time as updateTime,
|
|
|
- a.follow_situation as followSituation,
|
|
|
- a.customer_status as customerStatus,
|
|
|
- d.name as adminName
|
|
|
- from
|
|
|
- user_business a inner join user b on
|
|
|
- a.uid = b.id left join business_glossory c on
|
|
|
- a.business_glossory_id = c.id left join admin d on
|
|
|
- a.aid = d.id
|
|
|
- where 1 = 1
|
|
|
- <if test="aid != null and aid != ''">
|
|
|
- and a.aid = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="uid != null and uid !=''">
|
|
|
- and a.uid = #{uid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="businessGlossoryId !=null and businessGlossoryId != ''">
|
|
|
- and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="identifyName != null and identifyName != ''">
|
|
|
- and b.identify_name like concat('%', #{identifyName},'%')
|
|
|
- </if>
|
|
|
- <if test="followSituation != null">
|
|
|
- and a.follow_situation = #{followSituation,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="customerStatus != null">
|
|
|
- and a.customer_status = #{customerStatus,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="adminName != null and adminName != ''">
|
|
|
- and d.name = #{adminName,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="startDate != null and startDate != ''">
|
|
|
- and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
|
|
|
- </if>
|
|
|
- <if test="endDate != null and endDate != ''">
|
|
|
- and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
|
|
|
- </if>
|
|
|
- <if test="page_sql != null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <select id="selectBusinessCount" parameterType="com.goafanti.customer.bo.BusinessListBo" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(0)
|
|
|
- from
|
|
|
- user_business a inner join user b on
|
|
|
- a.uid = b.id left join business_glossory c on
|
|
|
- a.business_glossory_id = c.id left join admin d on
|
|
|
- a.aid = d.id
|
|
|
- where 1 = 1
|
|
|
- <if test="aid != null and aid != ''">
|
|
|
- and a.aid = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="uid != null and uid !=''">
|
|
|
- and a.uid = #{uid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="businessGlossoryId !=null and businessGlossoryId != ''">
|
|
|
- and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="identifyName != null and identifyName != ''">
|
|
|
- and b.identify_name like concat('%', #{identifyName},'%')
|
|
|
- </if>
|
|
|
- <if test="followSituation != null">
|
|
|
- and a.follow_situation = #{followSituation,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="customerStatus != null">
|
|
|
- and a.customer_status = #{customerStatus,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="adminName != null and adminName != ''">
|
|
|
- and d.name = #{adminName,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="startDate != null and startDate != ''">
|
|
|
- and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
|
|
|
- </if>
|
|
|
- <if test="endDate != null and endDate != ''">
|
|
|
- and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
|
|
|
- </if>
|
|
|
- </select>
|
|
|
|
|
|
<select id="findBusinessGlossory" resultType="com.goafanti.customer.bo.BusinessListBo">
|
|
|
select id as businessGlossoryId,name as businessName from business_glossory
|