| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.lf.server.mapper.data.DownloadMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.DownloadMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_download |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPageForUser" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectByPageForUser" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select *, fn_uname(create_user) createName from lf.sys_download |
| | | <where> |
| | | create_user = #{createUser} and type in (${types}) |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectByGuid" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectByGuid" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download where guid = #{guid} limit 1 |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.DownloadEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.data.DownloadEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |
| | | select currval('lf.sys_download_id_seq'::regclass) as id |
| | | </selectKey> |