| | |
| | | <result column="area_code" property="areaCode"/> |
| | | <result column="flyer_address" property="flyerAddress"/> |
| | | <result column="certification" property="certification" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/> |
| | | <result column="area_match_flag" property="areaMatchFlag"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectGdFlyerPage" resultMap="gdFlyerVOResultMap"> |
| | | select |
| | | * |
| | | *, |
| | | CASE |
| | | WHEN #{param2.areaCode} IS NOT NULL AND #{param2.areaCode} != '' |
| | | AND area_code LIKE concat('%',#{param2.areaCode},'%') THEN 1 |
| | | ELSE 0 |
| | | END as area_match_flag |
| | | from |
| | | ja_gd_flyer |
| | | <where> |
| | |
| | | <if test="param2.skilledTaskType != null and param2.skilledTaskType != ''"> |
| | | and skilled_task_type = #{param2.skilledTaskType} |
| | | </if> |
| | | |
| | | <if test="param2.areaCode != null and param2.areaCode != ''"> |
| | | and area_code like concat('%',#{param2.areaCode},'%') |
| | | </if> |
| | | <!-- <if test="param2.deptList != null and param2.deptList.size > 0"> --> |
| | | <!-- AND create_dept in --> |
| | | <!-- <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> --> |
| | |
| | | <!-- </foreach> --> |
| | | <!-- </if> --> |
| | | </where> |
| | | ORDER BY area_match_flag DESC, create_time DESC |
| | | </select> |
| | | |
| | | |