| | |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_res |
| | | <where> |
| | | 1 = 1 |
| | | <if test="name != null"> |
| | | upper(cn_name) like #{name} or upper(en_name) like #{name} |
| | | and (upper(cn_name) like #{name} or upper(en_name) like #{name}) |
| | | </if> |
| | | <if test="status != null"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="category != null"> |
| | | and category = #{category} |
| | | </if> |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="data != null"> |
| | | and data = #{data} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | <select id="selectByPage" resultType="com.moon.server.entity.sys.ResEntity"> |
| | | select a.*, fn_uname(a.create_user) createName, fn_uname(a.update_user) updateName from lf.sys_res a |
| | | <where> |
| | | 1 = 1 |
| | | <if test="name != null"> |
| | | upper(cn_name) like #{name} or upper(en_name) like #{name} |
| | | and (upper(cn_name) like #{name} or upper(en_name) like #{name}) |
| | | </if> |
| | | <if test="status != null"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="category != null"> |
| | | and category = #{category} |
| | | </if> |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="data != null"> |
| | | and data = #{data} |
| | | </if> |
| | | </where> |
| | | order by a.id desc |