feat: ASW-40 application接口开发
This commit is contained in:
@@ -5,13 +5,12 @@
|
||||
<resultMap id="appResult" type="net.geedge.asw.module.app.entity.ApplicationEntity">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="longName" column="long_name"/>
|
||||
<result property="properties" column="properties"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="tags" column="tags"/>
|
||||
<result property="packageName" column="package_name"/>
|
||||
<result property="website" column="website"/>
|
||||
<result property="provider" column="provider"/>
|
||||
<result property="surrogates" column="surrogates"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="createTimestamp" column="create_timestamp"/>
|
||||
<result property="updateTimestamp" column="update_timestamp"/>
|
||||
<result property="createUserId" column="create_user_id"/>
|
||||
@@ -48,13 +47,9 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="params.q != null and params.q != ''">
|
||||
AND ( locate(#{params.q}, app.name) OR locate(#{params.q}, app.description) )
|
||||
</if>
|
||||
<if test="params.id != null and params.id != ''">
|
||||
AND app.id = #{params.id}
|
||||
</if>
|
||||
<if test="params.workspaceId != null and params.workspaceId != ''">
|
||||
AND app.workspace_id = #{params.workspaceId}
|
||||
</if>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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="net.geedge.asw.module.app.dao.ApplicationSignatureDao">
|
||||
<resultMap id="signatureResult" type="net.geedge.asw.module.app.entity.ApplicationSignatureEntity">
|
||||
<result property="id" column="id"/>
|
||||
<result property="applicationId" column="application_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="createTimestamp" column="create_timestamp"/>
|
||||
<result property="createUserId" column="create_user_id"/>
|
||||
<result property="opVersion" column="op_version"/>
|
||||
|
||||
<association property="createUser" columnPrefix="c_" javaType="net.geedge.asw.module.sys.entity.SysUserEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryList" resultMap="signatureResult">
|
||||
SELECT
|
||||
asg.*,
|
||||
cu.id as c_id,
|
||||
cu.name as c_name
|
||||
FROM
|
||||
application_signature asg
|
||||
left join sys_user cu on asg.create_user_id = cu.id
|
||||
<where>
|
||||
<if test="params.applicationId != null and params.applicationId != ''">
|
||||
AND asg.application_id = #{params.applicationId}
|
||||
</if>
|
||||
<if test="params.versions != null and params.versions != ''">
|
||||
AND asg.op_version in
|
||||
<foreach item="version" collection="params.versions" separator="," open="(" close=")">
|
||||
#{version}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY asg.op_version DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user