| | |
| | | d.dict_value AS categoryName |
| | | FROM |
| | | blade_notice n |
| | | LEFT JOIN ( SELECT * FROM blade_dict WHERE CODE = 'notice' ) d ON n.category = d.dict_key |
| | | LEFT JOIN ( SELECT * FROM blade_dict WHERE code = 'notice' ) d ON n.category = d.dict_key |
| | | WHERE |
| | | n.is_deleted = 0 and n.tenant_id = #{notice.tenantId} |
| | | <if test="notice.title!=null"> |
| | |
| | | <if test="notice.category!=null"> |
| | | and n.category = #{notice.category} |
| | | </if> |
| | | <if test="notice.deptId!=null"> |
| | | and (n.dept_id = #{notice.deptId} or n.category = 2) |
| | | </if> |
| | | <if test="notice.startTime!=null and notice.startTime!=''"> |
| | | and n.release_time >= #{notice.startTime} |
| | | </if> |
| | | <if test="notice.endTime!=null and notice.endTime!=''"> |
| | | and n.release_time <= #{notice.endTime} |
| | | </if> |
| | | </select> |
| | | </mapper> |