| | |
| | | |
| | | <select id="getDynTypeListByAdmin" parameterType="com.panzhihua.common.model.dtos.community.PageComActDynTypeDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActDynTypeVO"> |
| | | <!-- SELECT--> |
| | | <!-- cadt.id,--> |
| | | <!-- cadt.`name`,--> |
| | | <!-- cadt.color,--> |
| | | <!-- cadt.community_id,--> |
| | | <!-- cadt.create_at,--> |
| | | <!-- cadt.update_at,--> |
| | | <!-- su.`name` AS createBy,--> |
| | | <!-- su1.`name` AS updateBy--> |
| | | <!-- FROM--> |
| | | <!-- com_act_dyn_type AS cadt--> |
| | | <!-- LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by--> |
| | | <!-- LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by--> |
| | | <!-- where cadt.community_id = 0 and cadt.is_del = 2--> |
| | | <!-- <if test="comActDynTypeDTO.category != null">--> |
| | | <!-- AND cadt.category = #{comActDynTypeDTO.category}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """>--> |
| | | <!-- and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%'))--> |
| | | <!-- </if>--> |
| | | <!-- union all--> |
| | | SELECT |
| | | cadt.id, |
| | | cadt.`name`, |
| | | cadt.color, |
| | | cadt.community_id, |
| | | cadt.create_at, |
| | | cadt.update_at, |
| | | su.`name` AS createBy, |
| | | su1.`name` AS updateBy |
| | | FROM |
| | | com_act_dyn_type AS cadt |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by |
| | | where cadt.community_id = 0 and cadt.is_del = 2 |
| | | <if test="comActDynTypeDTO.area == '2'"> |
| | | AND cadt.area in (1,2) |
| | | </if> |
| | | <if test="comActDynTypeDTO.area == null or comActDynTypeDTO.area == '1' "> |
| | | AND cadt.area in (1) |
| | | </if> |
| | | <if test="comActDynTypeDTO.category != null"> |
| | | AND cadt.category = #{comActDynTypeDTO.category} |
| | | </if> |
| | | <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """> |
| | | and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%')) |
| | | </if> |
| | | union all |
| | | |
| | | SELECT |
| | | cadt.id, |