feat:ASW-48 attribute接口开发
This commit is contained in:
48
src/main/resources/db/mapper/attribute/AttributeMapper.xml
Normal file
48
src/main/resources/db/mapper/attribute/AttributeMapper.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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.attribute.dao.AttributeDao">
|
||||
<resultMap id="attributeResult" type="net.geedge.asw.module.attribute.entity.AttributeEntity">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="protocol" column="protocol"/>
|
||||
<result property="layer" column="layer"/>
|
||||
<result property="stage" column="stage"/>
|
||||
<result property="objectType" column="object_type"/>
|
||||
<result property="createTimestamp" column="create_timestamp"/>
|
||||
<result property="updateTimestamp" column="update_timestamp"/>
|
||||
<result property="createUserId" column="create_user_id"/>
|
||||
<result property="updateUserId" column="update_user_id"/>
|
||||
|
||||
<association property="createUser" columnPrefix="c_" javaType="net.geedge.asw.module.sys.entity.SysUserEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
</association>
|
||||
|
||||
<association property="updateUser" columnPrefix="u_" javaType="net.geedge.asw.module.sys.entity.SysUserEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryList" resultMap="attributeResult">
|
||||
SELECT
|
||||
ad.*,
|
||||
c.id as c_id,
|
||||
c.name as c_name,
|
||||
u.id as u_id,
|
||||
u.id as u_name
|
||||
FROM
|
||||
attribute_dict ad
|
||||
left join sys_user c on ad.create_user_id = c.id
|
||||
left join sys_user u on ad.update_user_id = u.id
|
||||
<where>
|
||||
<if test="params.name != null and params.name != ''">
|
||||
ad.name = #{params.name}
|
||||
</if>
|
||||
</where>
|
||||
<if test="params.orderBy == null or params.orderBy == ''">
|
||||
ORDER BY ad.id
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user