| | |
| | | <sql id="Base_Column_List"> |
| | | 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, |
| | | t1.realName, t1.phone, t1.optometristId, |
| | | t1.storeId, t1.status, t1.registerTime, |
| | | t1.createTime, t1.updateTime, t1.createBy, |
| | | t1.updateBy, t1.isDelete,t2.`name`, |
| | | t3.name as storeName,t4.name as optometristName |
| | | from t_optometry t1 |
| | | left join t_app_user t2 on t1.userId = t2.id |
| | | left join t_store t3 on t1.storeId = t3.id |
| | | left join t_optometrist t4 on t1.optometristId = t4.id |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | and t2.`name` like concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.realName != null and query.realName != ''"> |
| | | and t1.`name` like concat('%',#{query.realName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and t1.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.storeId != null and query.storeId != ''"> |
| | | and t1.storeId = #{query.storeId} |
| | | </if> |
| | | <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> |
| | | AND t3.type=1 |
| | | AND isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY createTime DESC |
| | | </select> |
| | | |
| | | </mapper> |