id, `uid`, aid, last_follow_time, last_sign_time, create_time, big_customer, update_aid,
update_name, date_update_time, channel_type, chargeback, `member`, last_sales_type,
last_follow_type, follow_number, task_names, sign_number, sign_amount, last_signing_time,
first_signing_time, follow_dep, follow_explain, follow_aname, follow_aid
delete from user_mid
where id = #{id,jdbcType=INTEGER}
insert into user_mid (`uid`, aid, last_follow_time,
last_sign_time, create_time, big_customer,
update_aid, update_name, date_update_time,
channel_type, chargeback, `member`,
last_sales_type, last_follow_type, follow_number,
task_names, sign_number, sign_amount,
last_signing_time, first_signing_time, follow_dep,
follow_explain, follow_aname, follow_aid
)
values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{lastFollowTime,jdbcType=TIMESTAMP},
#{lastSignTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{bigCustomer,jdbcType=INTEGER},
#{updateAid,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR}, #{dateUpdateTime,jdbcType=TIMESTAMP},
#{channelType,jdbcType=INTEGER}, #{chargeback,jdbcType=INTEGER}, #{member,jdbcType=INTEGER},
#{lastSalesType,jdbcType=INTEGER}, #{lastFollowType,jdbcType=INTEGER}, #{followNumber,jdbcType=INTEGER},
#{taskNames,jdbcType=VARCHAR}, #{signNumber,jdbcType=INTEGER}, #{signAmount,jdbcType=DECIMAL},
#{lastSigningTime,jdbcType=DATE}, #{firstSigningTime,jdbcType=DATE}, #{followDep,jdbcType=VARCHAR},
#{followExplain,jdbcType=VARCHAR}, #{followAname,jdbcType=VARCHAR}, #{followAid,jdbcType=VARCHAR}
)
insert into user_mid
`uid`,
aid,
last_follow_time,
last_sign_time,
create_time,
big_customer,
update_aid,
update_name,
date_update_time,
channel_type,
chargeback,
`member`,
last_sales_type,
last_follow_type,
follow_number,
task_names,
sign_number,
sign_amount,
last_signing_time,
first_signing_time,
follow_dep,
follow_explain,
follow_aname,
follow_aid,
#{uid,jdbcType=VARCHAR},
#{aid,jdbcType=VARCHAR},
#{lastFollowTime,jdbcType=TIMESTAMP},
#{lastSignTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP},
#{bigCustomer,jdbcType=INTEGER},
#{updateAid,jdbcType=VARCHAR},
#{updateName,jdbcType=VARCHAR},
#{dateUpdateTime,jdbcType=TIMESTAMP},
#{channelType,jdbcType=INTEGER},
#{chargeback,jdbcType=INTEGER},
#{member,jdbcType=INTEGER},
#{lastSalesType,jdbcType=INTEGER},
#{lastFollowType,jdbcType=INTEGER},
#{followNumber,jdbcType=INTEGER},
#{taskNames,jdbcType=VARCHAR},
#{signNumber,jdbcType=INTEGER},
#{signAmount,jdbcType=DECIMAL},
#{lastSigningTime,jdbcType=DATE},
#{firstSigningTime,jdbcType=DATE},
#{followDep,jdbcType=VARCHAR},
#{followExplain,jdbcType=VARCHAR},
#{followAname,jdbcType=VARCHAR},
#{followAid,jdbcType=VARCHAR},
update user_mid
`uid` = #{uid,jdbcType=VARCHAR},
aid = #{aid,jdbcType=VARCHAR},
last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
big_customer = #{bigCustomer,jdbcType=INTEGER},
update_aid = #{updateAid,jdbcType=VARCHAR},
update_name = #{updateName,jdbcType=VARCHAR},
date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
channel_type = #{channelType,jdbcType=INTEGER},
chargeback = #{chargeback,jdbcType=INTEGER},
`member` = #{member,jdbcType=INTEGER},
last_sales_type = #{lastSalesType,jdbcType=INTEGER},
last_follow_type = #{lastFollowType,jdbcType=INTEGER},
follow_number = #{followNumber,jdbcType=INTEGER},
task_names = #{taskNames,jdbcType=VARCHAR},
sign_number = #{signNumber,jdbcType=INTEGER},
sign_amount = #{signAmount,jdbcType=DECIMAL},
last_signing_time = #{lastSigningTime,jdbcType=DATE},
first_signing_time = #{firstSigningTime,jdbcType=DATE},
follow_dep = #{followDep,jdbcType=VARCHAR},
follow_explain = #{followExplain,jdbcType=VARCHAR},
follow_aname = #{followAname,jdbcType=VARCHAR},
follow_aid = #{followAid,jdbcType=VARCHAR},
where id = #{id,jdbcType=INTEGER}
update user_mid
set `uid` = #{uid,jdbcType=VARCHAR},
aid = #{aid,jdbcType=VARCHAR},
last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
big_customer = #{bigCustomer,jdbcType=INTEGER},
update_aid = #{updateAid,jdbcType=VARCHAR},
update_name = #{updateName,jdbcType=VARCHAR},
date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
channel_type = #{channelType,jdbcType=INTEGER},
chargeback = #{chargeback,jdbcType=INTEGER},
`member` = #{member,jdbcType=INTEGER},
last_sales_type = #{lastSalesType,jdbcType=INTEGER},
last_follow_type = #{lastFollowType,jdbcType=INTEGER},
follow_number = #{followNumber,jdbcType=INTEGER},
task_names = #{taskNames,jdbcType=VARCHAR},
sign_number = #{signNumber,jdbcType=INTEGER},
sign_amount = #{signAmount,jdbcType=DECIMAL},
last_signing_time = #{lastSigningTime,jdbcType=DATE},
first_signing_time = #{firstSigningTime,jdbcType=DATE},
follow_dep = #{followDep,jdbcType=VARCHAR},
follow_explain = #{followExplain,jdbcType=VARCHAR},
follow_aname = #{followAname,jdbcType=VARCHAR},
follow_aid = #{followAid,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
update user_mid
aid = #{aid,jdbcType=VARCHAR},
last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
big_customer = #{bigCustomer,jdbcType=INTEGER},
update_aid = #{updateAid,jdbcType=VARCHAR},
update_name = #{updateName,jdbcType=VARCHAR},
date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
channel_type = #{channelType,jdbcType=INTEGER},
chargeback = #{chargeback,jdbcType=INTEGER},
`member` = #{member,jdbcType=INTEGER},
last_sales_type = #{lastSalesType,jdbcType=INTEGER},
last_follow_type = #{lastFollowType,jdbcType=INTEGER},
follow_number = #{followNumber,jdbcType=INTEGER},
task_names = #{taskNames,jdbcType=VARCHAR},
sign_number = #{signNumber,jdbcType=INTEGER},
sign_amount = #{signAmount,jdbcType=DECIMAL},
last_signing_time = #{lastSigningTime,jdbcType=DATE},
first_signing_time = #{firstSigningTime,jdbcType=DATE},
follow_dep = #{followDep,jdbcType=VARCHAR},
follow_explain = #{followExplain,jdbcType=VARCHAR},
follow_aname = #{followAname,jdbcType=VARCHAR},
follow_aid = #{followAid,jdbcType=VARCHAR},
where `uid` = #{uid,jdbcType=VARCHAR}
update user_mid
aid = #{aid,jdbcType=VARCHAR},
last_follow_time = null,
last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
big_customer = #{bigCustomer,jdbcType=INTEGER},
update_aid = #{updateAid,jdbcType=VARCHAR},
update_name = #{updateName,jdbcType=VARCHAR},
date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
where `uid` in
#{item}
and a.order_no like CONCAT('%',#{orderNo},'%')
and a.contract_no like CONCAT('%',#{contractNo},'%')
and b.buyer_name like CONCAT('%',#{userName},'%')
and e.commodity_name like CONCAT('%',#{projectName},'%')
and a.total_amount < 10
and a.total_amount >= 10 and a.total_amount < 20
and a.total_amount >= 20 and a.total_amount < 30
and a.total_amount >= 30 and a.total_amount < 40
and a.total_amount >= 40
and a.order_dep = #{depId}
and e2.department_id = #{liabilitiesDepId}
and e.declaration_batch = #{declarationBatch}
and e.commodity_price < 1
and e.commodity_price >= 1 and e.commodity_price < 5
and e.commodity_price >= 5 and e.commodity_price < 10
and e.commodity_price >= 10 and e.commodity_price < 20
and e.commodity_price >= 20
and e.project_status = #{projectStatus}
and e.satisfaction_degree = #{satisfactionDegree}
and a.create_time BETWEEN #{startDate} and #{endDate}
and a.sign_time BETWEEN #{signStartDate} and #{signEndDate}
and e.task_distribution_time BETWEEN #{projectStartDate} and #{projectEndDate}
and a.sales_type = #{salesType}
and find_in_set(b.service_type,#{serviceType})
and a.liquidation_status = #{liquidationStatus}
and nod.status = #{dunType}
and p2.province = #{province}
and a.salesman_id = #{salesmanId}
and a.finance_id = #{financeId}
and e.task_receiver =#{techId}
and a.approval = 0
and a.approval > 0
and bp.type in (0,1,2,3,4,5,6,8)
and bp.type in (7)
and bp.cid = #{businessCategory}
and b2.big_customer = #{bigCustomer}
and b.restatement_count = 0
and b.restatement_count > 0
and b.change_count =0
and b.change_count >0
and b.refund_count=0
and b.refund_count >0
and a.order_type in(0,2)
and a.order_type in(1)
and e.complete_date BETWEEN #{projectCompleteStartTime} and #{projectCompleteEndTime}