select
a.id as uid,
a.type,
a.status,
date_format(a.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
a.business_audit as businessAudit,
a.current_member_status as currentMemberStatus,
a.identify_name as name,
a.lvl,a.is_member as isMember,
a.society_tag as societyTag,
a.share_type as shareType,
b.contacts,
b.contact_mobile as contactMobile,
b.international,
b.expert,
b.audit_status as auditStatus,
dg1.name as province,
dg2.name as city,
dg3.name as area,
c.name as industry,
d.name as adminName,
b.expert_audit as expertAudit
from user a inner join user_identity b on a.id = b.uid
left join district_glossory dg1 on b.province = dg1.id
left join district_glossory dg2 on b.city = dg2.id
left join district_glossory dg3 on b.area = dg3.id
left join industry_category c on b.industry = c.id
left join admin d on a.aid = d.id
where a.type = 0 and a.status != 1
and a.aid = #{aid,jdbcType=VARCHAR}
and b.expert_audit = #{expertAudit,jdbcType=VARCHAR}
and a.identify_name like concat('%',#{name},'%')
and a.share_type = #{shareType,jdbcType=VARCHAR}
and a.status = #{status,jdbcType=INTEGER}
and a.business_audit = #{businessAudit,jdbcType=INTEGER}
and a.is_member = #{isMember,jdbcType=INTEGER}
and a.lvl = #{lvl,jdbcType=INTEGER}
and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
and a.society_tag = #{societyTag,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
and b.province = #{province,jdbcType=INTEGER}
and b.city = #{city,jdbcType=INTEGER}
and b.area = #{area,jdbcType=INTEGER}
and b.industry = #{industry,jdbcType=INTEGER}
and b.expert = #{expert,jdbcType=INTEGER}
and b.international = #{international,jdbcType=INTEGER}
and b.audit_status = #{auditStatus,jdbcType=INTEGER}
order by a.create_time desc
${page_sql}
select count(0)
from user a inner join user_identity b on a.id = b.uid
left join district_glossory dg1 on b.province = dg1.id
left join district_glossory dg2 on b.city = dg2.id
left join district_glossory dg3 on b.area = dg3.id
left join industry_category c on b.industry = c.id
left join admin d on a.aid = d.id
where a.type = 0 and a.status != 1 and a.audit_status = 1
and a.aid = #{aid,jdbcType=VARCHAR}
and a.identify_name like concat('%',#{name},'%')
and b.expert_audit = #{expertAudit,jdbcType=VARCHAR}
and a.share_type = #{shareType,jdbcType=VARCHAR}
and a.status = #{status,jdbcType=INTEGER}
and a.business_audit = #{businessAudit,jdbcType=INTEGER}
and a.is_member = #{isMember,jdbcType=INTEGER}
and a.lvl = #{lvl,jdbcType=INTEGER}
and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
and a.society_tag = #{societyTag,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
and b.province = #{province,jdbcType=INTEGER}
and b.city = #{city,jdbcType=INTEGER}
and b.area = #{area,jdbcType=INTEGER}
and b.industry = #{industry,jdbcType=INTEGER}
and b.expert = #{expert,jdbcType=INTEGER}
and b.international = #{international,jdbcType=INTEGER}
and b.audit_status = #{auditStatus,jdbcType=INTEGER}
select
a.id as uid,
a.type,
a.status,
date_format(a.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
a.business_audit as businessAudit,
a.current_member_status as currentMemberStatus,
a.identify_name as name,
a.lvl,
a.is_member as isMember,
a.society_tag as societyTag,
share_type as shareType,
b.contacts,
b.contact_mobile as contactMobile,
b.international,
b.listed,
b.high_tech_zone as highTechZone,
b.audit_status as auditStatus,
dg1.name as province,
dg2.name as city,
dg3.name as area,
c.name as industry,
d.name as adminName
from user a inner join organization_identity b on a.id = b.uid
left join district_glossory dg1 on b.location_province = dg1.id
left join district_glossory dg2 on b.location_city = dg2.id
left join district_glossory dg3 on b.location_area = dg3.id
left join industry_category c on b.industry = c.id
left join admin d on a.aid = d.id
where a.type = 1 and a.status != 1 and a.audit_status = 1
and a.aid = #{aid,jdbcType=VARCHAR}
and a.identify_name like concat('%',#{name},'%')
and a.share_type = #{shareType,jdbcType=VARCHAR}
and a.status = #{status,jdbcType=INTEGER}
and a.business_audit = #{businessAudit,jdbcType=INTEGER}
and a.is_member = #{isMember,jdbcType=INTEGER}
and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
and a.lvl = #{lvl,jdbcType=INTEGER}
and a.society_tag = #{societyTag,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
and b.location_province = #{province,jdbcType=INTEGER}
and b.location_city = #{city,jdbcType=INTEGER}
and b.location_area = #{area,jdbcType=INTEGER}
and b.industry = #{industry,jdbcType=INTEGER}
and b.listed = #{listed,jdbcType=INTEGER}
and b.high_tech_zone = #{highTechZone,jdbcType=INTEGER}
and b.international = #{international,jdbcType=INTEGER}
and b.audit_status = #{auditStatus,jdbcType=INTEGER}
order by a.create_time desc
${page_sql}
select
count(0)
from user a inner join organization_identity b on a.id = b.uid
where a.type = 1 and a.status != 1 and a.audit_status = 1
and a.aid = #{aid,jdbcType=VARCHAR}
and a.identify_name like concat('%',#{name},'%')
and a.share_type = #{shareType,jdbcType=VARCHAR}
and a.status = #{status,jdbcType=INTEGER}
and a.business_audit = #{businessAudit,jdbcType=INTEGER}
and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
and a.is_member = #{isMember,jdbcType=INTEGER}
and a.society_tag = #{societyTag,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
and b.location_province = #{province,jdbcType=INTEGER}
and b.location_city = #{city,jdbcType=INTEGER}
and b.location_area = #{area,jdbcType=INTEGER}
and b.industry = #{industry,jdbcType=INTEGER}
and b.listed = #{listed,jdbcType=INTEGER}
and b.high_tech_zone = #{highTechZone,jdbcType=INTEGER}
and b.international = #{international,jdbcType=INTEGER}
and b.audit_status = #{auditStatus,jdbcType=INTEGER}
select id,identify_name as name from user where identify_name like
concat('%',#{identifyName},'%') and status 1 and audit_status = 1
select count(0) from user where identify_name = #{identifyName,jdbcType=VARCHAR}
and status 1
select
a.id as uid,
a.society_tag as societyTag,
a.company_logo_url as companyLogoUrl,
a.introduction,
a.identify_name as identifyName,
a.business_audit as businessAudit,
b.industry,
b.location_province as locationProvince,
b.location_city as locationCity,
b.location_area as locationArea,
b.postal_address as postalAddress,
b.contacts_fixed_tel as contactsFixedTel,
b.contacts_fax as contactsFax,
b.registered_capital registeredCapital,
b.enterprise_scale as enterpriseScale,
b.legal_person as legalPerson,
b.legal_person_id_card as legalPersonIdCard,
b.legal_person_tel as legalPersonTel,
b.legal_person_email as legalPersonEmail,
b.high_tech_zone highTechZone,
b.listed,
b.international,
b.org_code as orgCode,
b.org_code_url as orgCodeUrl,
b.business_scope as businessScope,
b.id,
b.contacts,
b.contact_mobile as contactMobile,
b.audit_status as auditStatus,
b.licence_number as licenceNumber,
a.aid as aid,d.name as adminName
from
user a inner join organization_identity b on a.id = b.uid
left join admin d on d.id = a.aid
where
a.id = #{uid,jdbcType=VARCHAR}
select
a.id as uid,
a.identify_name as identifyName,
a.society_tag as societyTag,
a.head_portrait_url as headPortraitUrl,
a.introduction,
a.business_audit as businessAudit,
b.id,
b.industry,
b.sex,
b.date_of_birth_year as dateOfBirthYear,
b.date_of_birth_month as dateOfBirthMonth,
b.id_number as idNumber,
b.province,
b.city,
b.area,
b.positive_id_url as positiveIdUrl,
b.opposite_id_url as oppositeIdUrl,
b.postal_address as postalAddress,
b.contact_mobile as contactMobile,
b.fixed_tel as fixedTel,
b.email,
b.expert,
b.international,
b.contacts,
b.contact_mobile as contactMobile,
b.qq,
b.professional_title as professionalTitle,
b.work_unit as workUnit,
b.education,
b.major_category as majorCategory,
b.qualification,
b.audit_status as auditStatus,
b.graduate_school as graduateSchool,
b.consultation_price as consultationPrice,
b.expert_audit as expertAudit,
b.release_status as releaseStatus,
a.aid as aid,d.name as adminName
from
user a inner join user_identity b on
a.id = b.uid
left join admin d on d.id = a.aid
where
a.id = #{uid,jdbcType=VARCHAR}
select
a.id as followId,
a.create_time as followTime,
a.contact_type as contactType,
a.result,
b.identify_name as identifyName,
c.name as contacts,
c.mobile as contactMobile,
d.name as adminName
,e.id as ufbId,e.follow_situation as followSituation,e.customer_status as customerStatus
from user_follow a
left join user b on a.uid = b.id
left join organization_contact_book c on a.ocb_id = c.id
left join admin d on a.aid = d.id
inner join user_follow_business e on a.id = e.follow_id
where a.effective = 0
and a.uid = #{uid,jdbcType=VARCHAR}
and a.aid = #{aid,jdbcType=VARCHAR}
and e.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
${page_sql}
select
count(0)
from user_follow a
left join user b on a.uid = b.id
left join organization_contact_book c on a.ocb_id = c.id
left join admin d on a.aid = d.id
inner join user_follow_business e on a.id = e.follow_id
where a.effective = 0
and a.uid = #{uid,jdbcType=VARCHAR}
and a.aid = #{aid,jdbcType=VARCHAR}
and e.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
select
id,
mobile,
nickname,
create_time as createTime,
type,
source,
email,
is_member as isMember,
lvl,
current_member_status currentMemberStatus,
business_audit as businessAudit,
identify_name as identifyName,
status
from
user
where id = #{uid,jdbcType=VARCHAR}
select id,name,mobile,email,qq,wechat,depatrment,position,major from organization_contact_book
where uid = #{uid,jdbcType=VARCHAR} and aid = #{aid,jdbcType=VARCHAR}
select id,name,mobile,major,sex,depatrment,wechat,qq from organization_contact_book
where uid = #{uid,jdbcType=VARCHAR}
select
a.id as followId,
a.uid,
a.ocb_id as ocbId,
a.contact_type as contactType,
a.result,
a.create_time as followTime,
b.identify_name as identifyName,
c.name as contacts,
c.mobile as contactType,
d.name as adminName
from
user_follow a
left join user b on a.uid = b.id
left join organization_contact_book c on a.ocb_id = c.id
left join admin d on a.aid = d.id
where a.id = #{followId,jdbcType=VARCHAR}
select a.*,b.name as adminName,c.name as departmentName from (
select
aid,
sum(case when customer_status = 0 then 1 else 0 end) as newNo,
sum(case when customer_status = 1 then 1 else 0 end) as intentionNo,
sum(case when customer_status = 2 then 1 else 0 end) as pointNo,
sum(case when customer_status = 3 then 1 else 0 end) as interviewNo,
sum(case when customer_status = 4 then 1 else 0 end) as signNo,
sum(case when customer_status = 5 then 1 else 0 end) as refuseNo,
sum(case when customer_status = 6 then 1 else 0 end) as stopNo
from user_business where 1=1
and create_time > #{sDate,jdbcType=DATE}
and create_time < #{eDate,jdbcType=DATE}
and business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
group by aid
)a
left join admin b on a.aid = b.id
left join department_management c on b.department_id = c.id
where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
${page_sql}
select count(0) from (
select
aid
from user_business where 1=1
and create_time > #{sDate,jdbcType=DATE}
and create_time < #{eDate,jdbcType=DATE}
and business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
group by aid
)a
left join admin b on a.aid = b.id
left join department_management c on b.department_id = c.id
where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
select a.*,b.name as adminName,c.name as departmentName from (
select
aid,
sum(case when follow_situation = 0 then 1 else 0 end) as sendMaterialNo,
sum(case when follow_situation = 1 then 1 else 0 end) as interviewNo,
sum(case when follow_situation = 2 then 1 else 0 end) as sendProspectusNo,
sum(case when follow_situation = 3 then 1 else 0 end) as quoteNo,
sum(case when follow_situation = 4 then 1 else 0 end) as sendContractNo,
sum(case when follow_situation = 5 then 1 else 0 end) as signContractNo,
sum(case when follow_situation = 6 then 1 else 0 end) as onVisaNo,
sum(case when follow_situation = 7 then 1 else 0 end) as visaNo
from user_business where 1=1
and create_time > #{sDate,jdbcType=DATE}
and create_time < #{eDate,jdbcType=DATE}
and business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
group by aid
)a
left join admin b on a.aid = b.id
left join department_management c on b.department_id = c.id
where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
${page_sql}
select count(0) from (
select
aid
from user_business where 1=1
and create_time > #{sDate,jdbcType=DATE}
and create_time < #{eDate,jdbcType=DATE}
and business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
group by aid
)a
left join admin b on a.aid = b.id
left join department_management c on b.department_id = c.id
where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
select x.*,b.name as adminName,c.name as departmentName,y.* from (
select
count(0) as followNo,
aid,
sum(case when contact_type = 0 then 1 else 0 end) as visitNo,
sum(case when contact_type = 1 then 1 else 0 end) as telNo,
sum(case when contact_type = 2 then 1 else 0 end) as qqNo,
sum(case when contact_type = 3 then 1 else 0 end) as wxNo,
sum(case when contact_type = 4 then 1 else 0 end) as emailNo,
sum(case when contact_type = 5 then 1 else 0 end) as letterNo
from user_follow where 1=1
and create_time > #{sDate,jdbcType=DATE}
and create_time < #{eDate,jdbcType=DATE}
group by aid
)x
left join admin b on x.aid = b.id
left join department_management c on b.department_id = c.id
left join
(
select
count( 0 ) as customerNo,
aid
from
(
select
aid,
uid
from
user_follow
group by
aid,
uid
) a
group by
aid
)y on x.aid = y.aid
where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
select count(0) from (
select
aid
from user_follow where 1=1
and create_time > #{sDate,jdbcType=DATE}
and create_time < #{eDate,jdbcType=DATE}
group by aid
)x
left join admin b on x.aid = b.id
left join department_management c on b.department_id = c.id
where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
select
a.id,
a.follow_situation as followSituation,
a.customer_status as customerStatus,
a.remarks,
a.business_glossory_id as businessGlossoryId
from
user_follow_business a
where a.follow_id = #{followId,jdbcType=VARCHAR}
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
and a.aid = #{aid,jdbcType=VARCHAR}
and a.uid = #{uid,jdbcType=VARCHAR}
and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
and b.identify_name like concat('%', #{identifyName},'%')
and a.follow_situation = #{followSituation,jdbcType=INTEGER}
and a.customer_status = #{customerStatus,jdbcType=INTEGER}
and d.name = #{adminName,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
order by a.create_time desc
${page_sql}
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
and a.aid = #{aid,jdbcType=VARCHAR}
and a.uid = #{uid,jdbcType=VARCHAR}
and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
and b.identify_name like concat('%', #{identifyName},'%')
and a.follow_situation = #{followSituation,jdbcType=INTEGER}
and a.customer_status = #{customerStatus,jdbcType=INTEGER}
and d.name = #{adminName,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
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
LEFT JOIN department_management dm on dm.id = d.department_id
where 1 = 1
and (b.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
and a.uid = #{uid,jdbcType=VARCHAR}
and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
and b.identify_name like concat('%', #{identifyName},'%')
and a.follow_situation = #{followSituation,jdbcType=INTEGER}
and a.customer_status = #{customerStatus,jdbcType=INTEGER}
and d.name = #{adminName,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
order by a.create_time desc
${page_sql}
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
LEFT JOIN department_management dm on dm.id = d.department_id
where 1 = 1
and (b.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
and a.uid = #{uid,jdbcType=VARCHAR}
and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
and b.identify_name like concat('%', #{identifyName},'%')
and a.follow_situation = #{followSituation,jdbcType=INTEGER}
and a.customer_status = #{customerStatus,jdbcType=INTEGER}
and d.name = #{adminName,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
select
a.id as uid,
a.type,
a.status,
date_format(a.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
a.business_audit as businessAudit,
a.current_member_status as currentMemberStatus,
a.identify_name as name,
a.lvl,a.is_member as isMember,
a.society_tag as societyTag,
a.share_type as shareType,
b.contacts,
b.contact_mobile as contactMobile,
b.international,
b.expert,
b.audit_status as auditStatus,
dg1.name as province,
dg2.name as city,
dg3.name as area,
c.name as industry,
d.name as adminName,
b.expert_audit as expertAudit,
b.release_status as releaseStatus
from user a inner join user_identity b on a.id = b.uid
left join district_glossory dg1 on b.province = dg1.id
left join district_glossory dg2 on b.city = dg2.id
left join district_glossory dg3 on b.area = dg3.id
left join industry_category c on b.industry = c.id
left join admin d on a.aid = d.id
LEFT JOIN department_management dm on dm.id = d.department_id
where a.type = 0 and a.status != 1 and a.audit_status = 1
and a.share_type =0
and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
and a.identify_name like concat('%',#{name},'%')
and a.share_type = #{shareType,jdbcType=INTEGER}
and a.status = #{status,jdbcType=INTEGER}
and a.business_audit = #{businessAudit,jdbcType=INTEGER}
and a.is_member = #{isMember,jdbcType=INTEGER}
and a.lvl = #{lvl,jdbcType=INTEGER}
and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
and a.society_tag = #{societyTag,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
and b.province = #{province,jdbcType=INTEGER}
and b.city = #{city,jdbcType=INTEGER}
and b.area = #{area,jdbcType=INTEGER}
and b.industry = #{industry,jdbcType=INTEGER}
and b.expert = #{expert,jdbcType=INTEGER}
and b.international = #{international,jdbcType=INTEGER}
and b.audit_status = #{auditStatus,jdbcType=INTEGER}
${page_sql}
select count(0)
from user a inner join user_identity b on a.id = b.uid
left join admin d on a.aid = d.id
LEFT JOIN department_management dm on dm.id = d.department_id
where a.type = 0 and a.status != 1 and a.audit_status = 1
and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
and a.identify_name like concat('%',#{name},'%')
and a.share_type = #{shareType,jdbcType=VARCHAR}
and a.status = #{status,jdbcType=INTEGER}
and a.business_audit = #{businessAudit,jdbcType=INTEGER}
and a.is_member = #{isMember,jdbcType=INTEGER}
and a.lvl = #{lvl,jdbcType=INTEGER}
and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
and a.society_tag = #{societyTag,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
and b.province = #{province,jdbcType=INTEGER}
and b.city = #{city,jdbcType=INTEGER}
and b.area = #{area,jdbcType=INTEGER}
and b.industry = #{industry,jdbcType=INTEGER}
and b.expert = #{expert,jdbcType=INTEGER}
and b.international = #{international,jdbcType=INTEGER}
and b.audit_status = #{auditStatus,jdbcType=INTEGER}
select
a.id as uid,
a.type,
a.status,
date_format(a.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
a.business_audit as businessAudit,
a.current_member_status as currentMemberStatus,
a.identify_name as name,
a.lvl,
a.is_member as isMember,
a.society_tag as societyTag,
share_type as shareType,
b.contacts,
b.contact_mobile as contactMobile,
b.international,
b.listed,
b.high_tech_zone as highTechZone,
b.audit_status as auditStatus,
dg1.name as province,
dg2.name as city,
dg3.name as area,
c.name as industry,
d.name as adminName
from user a inner join organization_identity b on a.id = b.uid
left join district_glossory dg1 on b.location_province = dg1.id
left join district_glossory dg2 on b.location_city = dg2.id
left join district_glossory dg3 on b.location_area = dg3.id
left join industry_category c on b.industry = c.id
left join admin d on a.aid = d.id
LEFT JOIN department_management dm on dm.id = d.department_id
where a.type = 1 and a.status != 1 and a.audit_status = 1
and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
and a.identify_name like concat('%',#{name},'%')
and a.share_type = #{shareType,jdbcType=VARCHAR}
and a.status = #{status,jdbcType=INTEGER}
and a.business_audit = #{businessAudit,jdbcType=INTEGER}
and a.is_member = #{isMember,jdbcType=INTEGER}
and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
and a.lvl = #{lvl,jdbcType=INTEGER}
and a.society_tag = #{societyTag,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
and b.location_province = #{province,jdbcType=INTEGER}
and b.location_city = #{city,jdbcType=INTEGER}
and b.location_area = #{area,jdbcType=INTEGER}
and b.industry = #{industry,jdbcType=INTEGER}
and b.listed = #{listed,jdbcType=INTEGER}
and b.high_tech_zone = #{highTechZone,jdbcType=INTEGER}
and b.international = #{international,jdbcType=INTEGER}
and b.audit_status = #{auditStatus,jdbcType=INTEGER}
${page_sql}
select
count(0)
from user a inner join organization_identity b on a.id = b.uid
left join admin d on a.aid = d.id
LEFT JOIN department_management dm on dm.id = d.department_id
where a.type = 1 and a.status != 1 and a.audit_status = 1
and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
and a.identify_name like concat('%',#{name},'%')
and a.share_type = #{shareType,jdbcType=VARCHAR}
and a.status = #{status,jdbcType=INTEGER}
and a.business_audit = #{businessAudit,jdbcType=INTEGER}
and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
and a.is_member = #{isMember,jdbcType=INTEGER}
and a.society_tag = #{societyTag,jdbcType=VARCHAR}
and a.create_time > STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
and a.create_time < STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
and b.location_province = #{province,jdbcType=INTEGER}
and b.location_city = #{city,jdbcType=INTEGER}
and b.location_area = #{area,jdbcType=INTEGER}
and b.industry = #{industry,jdbcType=INTEGER}
and b.listed = #{listed,jdbcType=INTEGER}
and b.high_tech_zone = #{highTechZone,jdbcType=INTEGER}
and b.international = #{international,jdbcType=INTEGER}
and b.audit_status = #{auditStatus,jdbcType=INTEGER}
select d.name as adminName,d.id as aid
from admin d left join department_management dm on dm.id = d.department_id
where d.department_id=(select department_id from admin where id=#{aid,jdbcType=INTEGER})
select u.id as uid,u.nickname as name,u.mobile as contactMobile,a.name as adminName,u.create_time as createTime,u.audit_status as auditStatus
from user u left join admin a on u.aid=a.id
where u.audit_status=0 and u.status != 1 and u.share_type=0
and u.aid = #{aid,jdbcType=VARCHAR}
and u.nickname = #{name,jdbcType=VARCHAR}
and a.name = #{adminName,jdbcType=VARCHAR}
${page_sql}
select
count(0)
from user u left join admin a on u.aid=a.id
where u.audit_status=0 and u.status != 1 and u.share_type=0
and u.aid = #{aid,jdbcType=VARCHAR}
and u.nickname = #{name,jdbcType=VARCHAR}
and a.name = #{adminName,jdbcType=VARCHAR}
select u.id as uid,u.nickname as name,u.mobile as contactMobile,a.name as adminName,u.create_time as createTime,
u.audit_status as auditStatus,u.audit_opinion as auditOpinion,u.society_tag as societyTag
from user u left join admin a on u.aid=a.id
where u.audit_status=2 and u.status != 1
and u.aid = #{aid,jdbcType=VARCHAR}
and u.nickname = #{name,jdbcType=VARCHAR}
and a.name = #{adminName,jdbcType=VARCHAR}
${page_sql}
select
count(0)
from user u left join admin a on u.aid=a.id
where u.audit_status=2 and u.status != 1
and u.aid = #{aid,jdbcType=VARCHAR}
and u.nickname = #{name,jdbcType=VARCHAR}
and a.name = #{adminName,jdbcType=VARCHAR}
update user
set
nickname = #{nickname,jdbcType=VARCHAR},
mobile = #{mobile,jdbcType=VARCHAR},
society_tag = #{societyTag,jdbcType=VARCHAR},
audit_status=0
where id = #{id,jdbcType=VARCHAR}