| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.ApiConfig"> |
| | | <id column="id" property="id" /> |
| | | <result column="url" property="url" /> |
| | | <result column="status" property="status" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <id column="ID" property="id" /> |
| | | <result column="URL" property="url" /> |
| | | <result column="STATUS" property="status" /> |
| | | <result column="MEMO" property="memo" /> |
| | | <result column="CREATE_TIME" property="createTime" /> |
| | | <result column="UPDATE_TIME" property="updateTime" /> |
| | | <result column="CREATE_BY" property="createBy" /> |
| | | <result column="UPDATE_BY" property="updateBy" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="batchSeq"> |
| | | <if test="id != null and id != 0"> |
| | | and ID = #{id} |
| | | </if> |
| | | <if test="url != null and url != ''"> |
| | | and URL = #{url} |
| | | </if> |
| | | </sql> |
| | | |
| | | <select id="selectByUrl" resultMap="BaseResultMap"> |
| | | select top 1 * from "SOURCE"."wcs_api_config" |
| | | where "url" = #{url} |
| | | order by "create_time" desc |
| | | where "URL" = #{url} |
| | | order by "CREATE_TIME" desc |
| | | </select> |
| | | |
| | | <select id="selectApiConfigList" resultMap="BaseResultMap"> |
| | | SELECT * FROM "SOURCE"."wcs_api_config" |
| | | WHERE 1=1 |
| | | <include refid="batchSeq"></include> |
| | | ORDER BY CREATE_TIME DESC |
| | | LIMIT #{pageSize} OFFSET ((#{pageNumber} - 1) * #{pageSize}); |
| | | </select> |
| | | |
| | | <select id="selectApiConfigListTotal" resultType="Long"> |
| | | SELECT count(1) FROM "SOURCE"."wcs_api_config" |
| | | WHERE 1=1 |
| | | <include refid="batchSeq"></include> |
| | | </select> |
| | | |
| | | </mapper> |