|
|
@@ -333,6 +333,7 @@
|
|
|
dg2.name as city,
|
|
|
dg3.name as area,
|
|
|
a.aid,
|
|
|
+ a.sign_bills signBills,
|
|
|
a.share_type as shareType,
|
|
|
a.information_maintainer as mid
|
|
|
from user a
|
|
|
@@ -412,7 +413,7 @@
|
|
|
|
|
|
<select id="selectPrivateOrganizationCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
|
|
|
select a.id uid,a.aid,a.identify_name name,a.society_tag societyTag,a.`level`,b.name aName,dg1.name as province,dg2.name as city,
|
|
|
- a.guidance, dg3.name as area,d.contacts,d.contact_mobile as contactMobile,
|
|
|
+ a.guidance, dg3.name as area,
|
|
|
date_format(um.last_sign_time,'%Y-%m-%d %H:%i:%S') lastSignTime,
|
|
|
date_format(a.transfer_time,'%Y-%m-%d %H:%i:%S') as transferTime,
|
|
|
date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTime,
|
|
|
@@ -510,8 +511,6 @@
|
|
|
a.identify_name as name,
|
|
|
a.create_time as createTime,
|
|
|
a.transfer_time as transferTime,
|
|
|
- b.contacts,
|
|
|
- b.contact_mobile as contactMobile,
|
|
|
dg1.name as province,
|
|
|
dg2.name as city,
|
|
|
dg3.name as area
|
|
|
@@ -605,8 +604,6 @@
|
|
|
dg1.name as province,
|
|
|
dg2.name as city,
|
|
|
dg3.name as area,
|
|
|
- b.contacts,
|
|
|
- b.contact_mobile as contactMobile,
|
|
|
c.name as industry,
|
|
|
d.name as adminName
|
|
|
from
|
|
|
@@ -1645,10 +1642,9 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectSignedCustomerByName" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
|
|
|
- select b.id,b.identify_name as name from
|
|
|
- (select uid from user_lock_release where type = 1 and status = 0 and aid = #{aid} group by uid) a
|
|
|
- inner join user b on a.uid = b.id
|
|
|
- where b.status != 1 and b.identify_name like concat('%',#{name},'%')
|
|
|
+ select b.id,b.identify_name as name from user b
|
|
|
+ where b.status != 1 and b.share_type =2
|
|
|
+ and b.aid = #{aid} and b.identify_name like concat('%',#{name},'%')
|
|
|
</select>
|
|
|
|
|
|
<update id="updateReleaseLock" parameterType="java.lang.String">
|
|
|
@@ -2057,4 +2053,20 @@ inner join(
|
|
|
desc
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="checkUserMax" parameterType="string" resultType="integer">
|
|
|
+ select count(*) from `user`
|
|
|
+ where aid= #{aid,jdbcType=VARCHAR}
|
|
|
+ and source in(1,2,3) and share_type=0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="checkLock" parameterType="string" resultType="integer">
|
|
|
+ select count(*) from `user`
|
|
|
+ where id= #{uid,jdbcType=VARCHAR}
|
|
|
+ and share_type=2
|
|
|
+ </select>
|
|
|
+ <update id="updateShareType">
|
|
|
+ update user set share_type =2,aid = #{aid}
|
|
|
+ where id= #{uid}
|
|
|
+ </update>
|
|
|
</mapper>
|