| | |
| | | <sql id="Base_Column_List"> |
| | | id, code, userId, optometristId, storeId, status, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.model.TLineUp"> |
| | | select t.*,u.name,u.phone,u.age,u.gender,u.realName,s.name storeName,o.name optometrist |
| | | from t_line_up t |
| | | left join t_user u on t.userId = u.id |
| | | left join t_optometrist o on t.optometristId = o.id |
| | | left join t_store s on t.storeId = s.id |
| | | <where> |
| | | <if test="query.status != null"> |
| | | and t.status = #{query.status} |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | AND u.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.name != null and query.name != ''"> |
| | | AND u.name like concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | and s.id = #{query.storeId} |
| | | </if> |
| | | </where> |
| | | order by t.createTime desc |
| | | </select> |
| | | |
| | | </mapper> |