|
@@ -5,155 +5,175 @@
|
|
|
<mapper namespace="com.jjt.biz.mapper.BizObjMapper">
|
|
|
|
|
|
<resultMap type="BizObj" id="BizObjResult">
|
|
|
- <result property="objId" column="OBJ_ID"/>
|
|
|
- <result property="objType" column="OBJ_TYPE"/>
|
|
|
- <result property="appId" column="APP_ID"/>
|
|
|
- <result property="objName" column="OBJ_NAME"/>
|
|
|
- <result property="objAddr" column="OBJ_ADDR"/>
|
|
|
- <result property="objPort" column="OBJ_PORT"/>
|
|
|
- <result property="createBy" column="CREATE_BY"/>
|
|
|
- <result property="createTime" column="CREATE_TIME"/>
|
|
|
- <result property="updateBy" column="UPDATE_BY"/>
|
|
|
- <result property="updateTime" column="UPDATE_TIME"/>
|
|
|
- <result property="remark" column="REMARK"/>
|
|
|
+ <result property="objId" column="OBJ_ID"/>
|
|
|
+ <result property="objType" column="OBJ_TYPE"/>
|
|
|
+ <result property="appId" column="APP_ID"/>
|
|
|
+ <result property="accessTimes" column="ACCESS_TIMES"/>
|
|
|
+ <result property="objName" column="OBJ_NAME"/>
|
|
|
+ <result property="objAddr" column="OBJ_ADDR"/>
|
|
|
+ <result property="objPort" column="OBJ_PORT"/>
|
|
|
+ <result property="createBy" column="CREATE_BY"/>
|
|
|
+ <result property="createTime" column="CREATE_TIME"/>
|
|
|
+ <result property="updateBy" column="UPDATE_BY"/>
|
|
|
+ <result property="updateTime" column="UPDATE_TIME"/>
|
|
|
+ <result property="remark" column="REMARK"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectBizObjVo">
|
|
|
- select OBJ_ID, OBJ_TYPE, APP_ID, OBJ_NAME, OBJ_ADDR, OBJ_PORT, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK
|
|
|
+ select OBJ_ID,
|
|
|
+ OBJ_TYPE,
|
|
|
+ APP_ID,
|
|
|
+ ACCESS_TIMES,
|
|
|
+ OBJ_NAME,
|
|
|
+ OBJ_ADDR,
|
|
|
+ OBJ_PORT,
|
|
|
+ CREATE_BY,
|
|
|
+ CREATE_TIME,
|
|
|
+ UPDATE_BY,
|
|
|
+ UPDATE_TIME,
|
|
|
+ REMARK
|
|
|
from biz_obj
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectBizObjList" parameterType="BizObj" resultMap="BizObjResult">
|
|
|
<include refid="selectBizObjVo"/>
|
|
|
<where>
|
|
|
- <if test="objType != null and objType != ''">
|
|
|
- and OBJ_TYPE = #{objType}
|
|
|
- </if>
|
|
|
- <if test="appId != null ">
|
|
|
- and APP_ID = #{appId}
|
|
|
- </if>
|
|
|
- <if test="objName != null and objName != ''">
|
|
|
- and OBJ_NAME like concat('%', #{objName}, '%')
|
|
|
- </if>
|
|
|
- <if test="objAddr != null and objAddr != ''">
|
|
|
- and OBJ_ADDR = #{objAddr}
|
|
|
- </if>
|
|
|
- <if test="objPort != null ">
|
|
|
- and OBJ_PORT = #{objPort}
|
|
|
- </if>
|
|
|
- <if test="params.beginCreateBy != null and params.beginCreateBy != '' and params.endCreateBy != null and params.endCreateBy != ''">
|
|
|
- and CREATE_BY between #{params.beginCreateBy} and #{params.endCreateBy}
|
|
|
- </if>
|
|
|
- <if test="createTime != null ">
|
|
|
- and CREATE_TIME = #{createTime}
|
|
|
- </if>
|
|
|
- <if test="updateBy != null and updateBy != ''">
|
|
|
- and UPDATE_BY = #{updateBy}
|
|
|
- </if>
|
|
|
- <if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''">
|
|
|
- and UPDATE_TIME between #{params.beginUpdateTime} and #{params.endUpdateTime}
|
|
|
- </if>
|
|
|
- <if test="remark != null and remark != ''">
|
|
|
- and REMARK = #{remark}
|
|
|
- </if>
|
|
|
+ <if test="objType != null and objType != ''">
|
|
|
+ and OBJ_TYPE = #{objType}
|
|
|
+ </if>
|
|
|
+ <if test="appId != null ">
|
|
|
+ and APP_ID = #{appId}
|
|
|
+ </if>
|
|
|
+ <if test="objName != null and objName != ''">
|
|
|
+ and OBJ_NAME like concat('%', #{objName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="objAddr != null and objAddr != ''">
|
|
|
+ and OBJ_ADDR = #{objAddr}
|
|
|
+ </if>
|
|
|
+ <if test="objPort != null ">
|
|
|
+ and OBJ_PORT = #{objPort}
|
|
|
+ </if>
|
|
|
+ <if test="params.beginCreateBy != null and params.beginCreateBy != '' and params.endCreateBy != null and params.endCreateBy != ''">
|
|
|
+ and CREATE_BY between #{params.beginCreateBy} and #{params.endCreateBy}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null ">
|
|
|
+ and CREATE_TIME = #{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null and updateBy != ''">
|
|
|
+ and UPDATE_BY = #{updateBy}
|
|
|
+ </if>
|
|
|
+ <if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''">
|
|
|
+ and UPDATE_TIME between #{params.beginUpdateTime} and #{params.endUpdateTime}
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and REMARK = #{remark}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectBizObjByObjId" parameterType="Long"
|
|
|
resultMap="BizObjResult">
|
|
|
- <include refid="selectBizObjVo"/>
|
|
|
- where OBJ_ID = #{objId}
|
|
|
+ <include refid="selectBizObjVo"/>
|
|
|
+ where OBJ_ID = #{objId}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertBizObj" parameterType="BizObj" useGeneratedKeys="true"
|
|
|
keyProperty="objId">
|
|
|
insert into biz_obj
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="objType != null and objType != ''">OBJ_TYPE,
|
|
|
- </if>
|
|
|
- <if test="appId != null">APP_ID,
|
|
|
- </if>
|
|
|
- <if test="objName != null and objName != ''">OBJ_NAME,
|
|
|
- </if>
|
|
|
- <if test="objAddr != null and objAddr != ''">OBJ_ADDR,
|
|
|
- </if>
|
|
|
- <if test="objPort != null">OBJ_PORT,
|
|
|
- </if>
|
|
|
- <if test="createBy != null">CREATE_BY,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">CREATE_TIME,
|
|
|
- </if>
|
|
|
- <if test="updateBy != null">UPDATE_BY,
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">UPDATE_TIME,
|
|
|
- </if>
|
|
|
- <if test="remark != null">REMARK,
|
|
|
- </if>
|
|
|
+ <if test="objType != null and objType != ''">OBJ_TYPE,
|
|
|
+ </if>
|
|
|
+ <if test="appId != null">APP_ID,
|
|
|
+ </if>
|
|
|
+ <if test="accessTimes != null">ACCESS_TIMES,
|
|
|
+ </if>
|
|
|
+ <if test="objName != null and objName != ''">OBJ_NAME,
|
|
|
+ </if>
|
|
|
+ <if test="objAddr != null and objAddr != ''">OBJ_ADDR,
|
|
|
+ </if>
|
|
|
+ <if test="objPort != null">OBJ_PORT,
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">CREATE_BY,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">CREATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">UPDATE_BY,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">UPDATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">REMARK,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="objType != null and objType != ''">#{objType},
|
|
|
- </if>
|
|
|
- <if test="appId != null">#{appId},
|
|
|
- </if>
|
|
|
- <if test="objName != null and objName != ''">#{objName},
|
|
|
- </if>
|
|
|
- <if test="objAddr != null and objAddr != ''">#{objAddr},
|
|
|
- </if>
|
|
|
- <if test="objPort != null">#{objPort},
|
|
|
- </if>
|
|
|
- <if test="createBy != null">#{createBy},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">#{createTime},
|
|
|
- </if>
|
|
|
- <if test="updateBy != null">#{updateBy},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">#{updateTime},
|
|
|
- </if>
|
|
|
- <if test="remark != null">#{remark},
|
|
|
- </if>
|
|
|
+ <if test="objType != null and objType != ''">#{objType},
|
|
|
+ </if>
|
|
|
+ <if test="appId != null">#{appId},
|
|
|
+ </if>
|
|
|
+ <if test="accessTimes != null">#{accessTimes},
|
|
|
+ </if>
|
|
|
+ <if test="objName != null and objName != ''">#{objName},
|
|
|
+ </if>
|
|
|
+ <if test="objAddr != null and objAddr != ''">#{objAddr},
|
|
|
+ </if>
|
|
|
+ <if test="objPort != null">#{objPort},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">#{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">#{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">#{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">#{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">#{remark},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateBizObj" parameterType="BizObj">
|
|
|
update biz_obj
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="objType != null and objType != ''">OBJ_TYPE =
|
|
|
- #{objType},
|
|
|
- </if>
|
|
|
- <if test="appId != null">APP_ID =
|
|
|
- #{appId},
|
|
|
- </if>
|
|
|
- <if test="objName != null and objName != ''">OBJ_NAME =
|
|
|
- #{objName},
|
|
|
- </if>
|
|
|
- <if test="objAddr != null and objAddr != ''">OBJ_ADDR =
|
|
|
- #{objAddr},
|
|
|
- </if>
|
|
|
- <if test="objPort != null">OBJ_PORT =
|
|
|
- #{objPort},
|
|
|
- </if>
|
|
|
- <if test="createBy != null">CREATE_BY =
|
|
|
- #{createBy},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">CREATE_TIME =
|
|
|
- #{createTime},
|
|
|
- </if>
|
|
|
- <if test="updateBy != null">UPDATE_BY =
|
|
|
- #{updateBy},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">UPDATE_TIME =
|
|
|
- #{updateTime},
|
|
|
- </if>
|
|
|
- <if test="remark != null">REMARK =
|
|
|
- #{remark},
|
|
|
- </if>
|
|
|
+ <if test="objType != null and objType != ''">OBJ_TYPE =
|
|
|
+ #{objType},
|
|
|
+ </if>
|
|
|
+ <if test="appId != null">APP_ID =
|
|
|
+ #{appId},
|
|
|
+ </if>
|
|
|
+ <if test="accessTimes != null">ACCESS_TIMES =
|
|
|
+ #{accessTimes},
|
|
|
+ </if>
|
|
|
+ <if test="objName != null and objName != ''">OBJ_NAME =
|
|
|
+ #{objName},
|
|
|
+ </if>
|
|
|
+ <if test="objAddr != null and objAddr != ''">OBJ_ADDR =
|
|
|
+ #{objAddr},
|
|
|
+ </if>
|
|
|
+ <if test="objPort != null">OBJ_PORT =
|
|
|
+ #{objPort},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">CREATE_BY =
|
|
|
+ #{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">CREATE_TIME =
|
|
|
+ #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">UPDATE_BY =
|
|
|
+ #{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">UPDATE_TIME =
|
|
|
+ #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">REMARK =
|
|
|
+ #{remark},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
where OBJ_ID = #{objId}
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteBizObjByObjId" parameterType="Long">
|
|
|
delete
|
|
|
- from biz_obj where OBJ_ID = #{objId}
|
|
|
+ from biz_obj
|
|
|
+ where OBJ_ID = #{objId}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteBizObjByObjIds" parameterType="String">
|