| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.account.mapper.CoachMapper"> |
| | | <update id="changeState"> |
| | | update t_coach set |
| | | state = #{state} |
| | | <where> |
| | | <if test="ids != null and ids.size()>0"> |
| | | AND t_coach.id IN |
| | | <foreach collection="ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </update> |
| | | |
| | | |
| | | <select id="listAll" resultType="com.dsh.account.model.vo.CoachSerchVO"> |
| | | select t1.*,t2.name accountName,t2.phone accountPhone,t3.name coachTypeName from t_coach t1 |
| | | left join t_city_manager t2 on t1.cityManagerId = t2.id |
| | | left join t_coach_type t3 on t1.coachTypeId = t3.id |
| | | <where> |
| | | <if test="query.city!=null and query.city!= ''"> |
| | | and t1.city = #{query.city} |
| | | </if> |
| | | <if test="query.province!=null and query.province!= ''"> |
| | | and t1.province = #{query.province} |
| | | </if> |
| | | <if test="query.name!=null and query.name!= ''"> |
| | | AND t1.name LIKE concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone!=null and query.phone!= ''"> |
| | | and t1.phone LIKE concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.id!=null and query.id!= ''"> |
| | | and t1.id LIKE concat('%',#{query.id},'%') |
| | | </if> |
| | | and t1.state != 3 |
| | | </where> |
| | | </select> |
| | | </mapper> |