| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, name, phone, status, storeId, img, registerTime, createTime, updateTime, createBy, updateBy, isDelete |
| | | id, `name`, phone, status, storeId, img, registerTime, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.vo.TOptometryVO"> |
| | | select t1.id, t1.code, t1.userId, t1.age, t1.gender, |
| | |
| | | <if test="query.name != null and query.name != ''"> |
| | | and t2.`name` like concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.userId != null and query.userId != ''"> |
| | | and t2.id like concat('%',#{query.userId},'%') |
| | | </if> |
| | | <if test="query.realName != null and query.realName != ''"> |
| | | and t1.`name` like concat('%',#{query.realName},'%') |
| | | and t1.realName like concat('%',#{query.realName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and t1.phone like concat('%',#{query.phone},'%') |
| | |
| | | <if test="query.optometristId != null and query.optometristId != ''"> |
| | | and t1.optometristId = #{query.optometristId} |
| | | </if> |
| | | <if test="req.startTime != null and req.startTime!=''"> |
| | | and (t1.createTime between #{req.startTime} and #{req.endTime}) |
| | | <if test="query.startTime != null and query.startTime!=''"> |
| | | and (t1.createTime between #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | AND t3.type=1 |
| | | AND isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | AND t1.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY t1.createTime DESC |
| | | </select> |
| | | <select id="pageList1" resultType="com.jilongda.manage.vo.TOptometristVO"> |
| | | select <include refid="Base_Column_List"></include> |
| | | from t_optometrist |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | and `name` like concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and status = #{query.status} |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | and storeId = #{query.storeId} |
| | | </if> |
| | | and isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY createTime DESC |
| | | </select> |