INSERT INTO student (user_id_,subject_id_list_, service_tag_, operating_tag_, teacher_id_,create_time_,update_time_,service_tag_update_time_) VALUES (#{userId},#{subjectIdList}, #{serviceTag}, #{operatingTag}, #{teacherId},NOW(),NOW(),NOW()) UPDATE student subject_id_list_ = #{subjectIdList}, service_tag_update_time_=IF(service_tag_ = #{serviceTag}, service_tag_update_time_, NOW()), service_tag_ = #{serviceTag}, operating_tag_ = #{operatingTag}, operating_temp_tag_ = #{operatingTempTag}, teacher_id_=#{teacherId}, update_time_ = NOW() WHERE user_id_ = #{userId} organ_id_ IN #{organId} AND (username_ LIKE CONCAT('%', #{search}, '%') OR phone_ LIKE CONCAT('%', #{search}, '%')) AND FIND_IN_SET("STUDENT", user_type_) UPDATE student subject_id_list_ = #{item.subjectIdList}, service_tag_ = #{item.serviceTag}, operating_tag_ = #{item.operatingTag}, operating_temp_tag_ = #{item.operatingTempTag}, teacher_id_=#{item.teacherId}, update_time_ = #{item.updateTime}, update_time_ = NOW() WHERE user_id_ = #{item.userId} UPDATE student service_tag_ = #{serviceTag}, operating_tag_ = #{operatingTag}, update_time_ = NOW() WHERE user_id_ = #{studentId} user_id_ IN #{studentId} UPDATE student service_tag_update_time_ = IF(service_tag_=#{serviceTag}, service_tag_update_time_, NOW()), service_tag_ = #{serviceTag}, update_time_ = NOW() WHERE service_tag_=0 AND user_id_ = #{studentId} AND user_id_ IN #{studentId} UPDATE student s SET s.teacher_id_ = #{teacherId},s.update_time_ = NOW() WHERE FIND_IN_SET(s.user_id_,#{studentIds}) su.user_type_ LIKE '%STUDENT%' AND (su.phone_ LIKE CONCAT('%',#{search},'%') OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.id_ LIKE CONCAT('%',#{search},'%')) AND FIND_IN_SET(su.organ_id_,#{organId}) AND s.teacher_id_ = #{teacherId} AND s.operating_tag_ = #{operatingTag} AND a.vip_times_ >=1 AND (a.vip_times_ =0 OR a.vip_times_ IS NULL) AND p.free_practice_times_ >=1 AND (p.free_practice_times_ =0 OR p.free_practice_times_ IS NULL) AND a.buy_practice_times_ >=1 AND (a.buy_practice_times_ =0 OR a.buy_practice_times_ IS NULL) AND a.music_netWork_times_ >=1 AND (a.music_netWork_times_ =0 OR a.music_netWork_times_ IS NULL)