id,uid,aid, paid,result,attachment_url, create_time,ocb_id,contact_type, effective,time_stamp,follow_count, guidance,guidance_time,guidance_aid, guidance_name,follow_name,follow_dep, type,pid delete from user_follow where id = #{id,jdbcType=VARCHAR} insert into user_follow ( id,uid,aid ,paid,result,attachment_url ,create_time,ocb_id,contact_type ,effective,time_stamp,follow_count ,guidance,guidance_time,guidance_aid ,guidance_name,follow_name,follow_dep ,type,pid) values (#{id,jdbcType=VARCHAR},#{uid,jdbcType=VARCHAR},#{aid,jdbcType=VARCHAR} ,#{paid,jdbcType=VARCHAR},#{result,jdbcType=VARCHAR},#{attachmentUrl,jdbcType=VARCHAR} ,#{createTime,jdbcType=TIMESTAMP},#{ocbId,jdbcType=VARCHAR},#{contactType,jdbcType=INTEGER} ,#{effective,jdbcType=INTEGER},#{timeStamp,jdbcType=TIMESTAMP},#{followCount,jdbcType=INTEGER} ,#{guidance,jdbcType=VARCHAR},#{guidanceTime,jdbcType=TIMESTAMP},#{guidanceAid,jdbcType=VARCHAR} ,#{guidanceName,jdbcType=VARCHAR},#{followName,jdbcType=VARCHAR},#{followDep,jdbcType=VARCHAR} ,#{type,jdbcType=INTEGER},#{pid,jdbcType=VARCHAR}) insert into user_follow id, uid, aid, paid, result, attachment_url, create_time, ocb_id, contact_type, effective, time_stamp, follow_count, guidance, guidance_time, guidance_aid, guidance_name, follow_name, follow_dep, type, pid, #{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{paid,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{ocbId,jdbcType=VARCHAR}, #{contactType,jdbcType=INTEGER}, #{effective,jdbcType=INTEGER}, #{timeStamp,jdbcType=TIMESTAMP}, #{followCount,jdbcType=INTEGER}, #{guidance,jdbcType=VARCHAR}, #{guidanceTime,jdbcType=TIMESTAMP}, #{guidanceAid,jdbcType=VARCHAR}, #{guidanceName,jdbcType=VARCHAR}, #{followName,jdbcType=VARCHAR}, #{followDep,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{pid,jdbcType=VARCHAR}, update user_follow uid = #{uid,jdbcType=VARCHAR}, aid = #{aid,jdbcType=VARCHAR}, paid = #{paid,jdbcType=VARCHAR}, result = #{result,jdbcType=VARCHAR}, attachment_url = #{attachmentUrl,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, ocb_id = #{ocbId,jdbcType=VARCHAR}, contact_type = #{contactType,jdbcType=INTEGER}, effective = #{effective,jdbcType=INTEGER}, time_stamp = #{timeStamp,jdbcType=TIMESTAMP}, follow_count = #{followCount,jdbcType=INTEGER}, guidance = #{guidance,jdbcType=VARCHAR}, guidance_time = #{guidanceTime,jdbcType=TIMESTAMP}, guidance_aid = #{guidanceAid,jdbcType=VARCHAR}, guidance_name = #{guidanceName,jdbcType=VARCHAR}, follow_name = #{followName,jdbcType=VARCHAR}, follow_dep = #{followDep,jdbcType=VARCHAR}, type = #{type,jdbcType=INTEGER}, pid = #{pid,jdbcType=VARCHAR}, where id = #{id,jdbcType=VARCHAR} update user_follow set uid = #{uid,jdbcType=VARCHAR}, aid = #{aid,jdbcType=VARCHAR}, paid = #{paid,jdbcType=VARCHAR}, result = #{result,jdbcType=VARCHAR}, attachment_url = #{attachmentUrl,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, ocb_id = #{ocbId,jdbcType=VARCHAR}, contact_type = #{contactType,jdbcType=INTEGER}, effective = #{effective,jdbcType=INTEGER}, time_stamp = #{timeStamp,jdbcType=TIMESTAMP}, follow_count = #{followCount,jdbcType=INTEGER}, guidance = #{guidance,jdbcType=VARCHAR}, guidance_time = #{guidanceTime,jdbcType=TIMESTAMP}, guidance_aid = #{guidanceAid,jdbcType=VARCHAR}, guidance_name = #{guidanceName,jdbcType=VARCHAR}, follow_name = #{followName,jdbcType=VARCHAR}, follow_dep = #{followDep,jdbcType=VARCHAR}, type = #{type,jdbcType=INTEGER}, pid = #{pid,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} update user_follow b, `user` a set a.guidance= #{guidance} where a.id=b.uid and b.id= #{id} and a.aid= #{aid} and a.aid in #{id} and a.follow_name like concat('%',#{followName},'%') and b.nickname like concat('%',#{userName},'%') and b.share_type =0 and b.share_type =1 and b.share_type =2 and b.share_type =3 and a.type=1 and a.contact_type = #{contactType} and a.create_time between #{followStartTime} and #{followEndTime} and b.transfer_time between #{createStartTime} and #{createEndTime} and a.guidance_time between #{guidanceStartTime} and #{guidanceEndTime} and d.department_id in #{depId}