Bladeren bron

应用程序 增加按appId查询

wukai 9 maanden geleden
bovenliggende
commit
ad0905848b
1 gewijzigde bestanden met toevoegingen van 117 en 104 verwijderingen
  1. 117 104
      jjt-biz/src/main/resources/mapper/obj/BizObjAppMapper.xml

+ 117 - 104
jjt-biz/src/main/resources/mapper/obj/BizObjAppMapper.xml

@@ -5,144 +5,157 @@
 <mapper namespace="com.jjt.biz.mapper.BizObjAppMapper">
 
     <resultMap type="BizObjApp" id="BizObjAppResult">
-            <result property="appId" column="APP_ID"/>
-            <result property="appName" column="APP_NAME"/>
-            <result property="appCode" column="APP_CODE"/>
-            <result property="appAddr" column="APP_ADDR"/>
-            <result property="appPort" column="APP_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="appId" column="APP_ID"/>
+        <result property="appName" column="APP_NAME"/>
+        <result property="appCode" column="APP_CODE"/>
+        <result property="appAddr" column="APP_ADDR"/>
+        <result property="appPort" column="APP_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="selectBizObjAppVo">
-        select APP_ID, APP_NAME, APP_CODE, APP_ADDR, APP_PORT, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK
+        select APP_ID,
+               APP_NAME,
+               APP_CODE,
+               APP_ADDR,
+               APP_PORT,
+               CREATE_BY,
+               CREATE_TIME,
+               UPDATE_BY,
+               UPDATE_TIME,
+               REMARK
         from biz_obj_app
     </sql>
 
     <select id="selectBizObjAppList" parameterType="BizObjApp" resultMap="BizObjAppResult">
         <include refid="selectBizObjAppVo"/>
         <where>
-                        <if test="appName != null  and appName != ''">
-                            and APP_NAME like concat('%', #{appName}, '%')
-                        </if>
-                        <if test="appCode != null  and appCode != ''">
-                            and APP_CODE = #{appCode}
-                        </if>
-                        <if test="appAddr != null  and appAddr != ''">
-                            and APP_ADDR like concat('%', #{appAddr}, '%')
-                        </if>
-                        <if test="appPort != null ">
-                            and APP_PORT = #{appPort}
-                        </if>
-                        <if test="createBy != null  and createBy != ''">
-                            and CREATE_BY = #{createBy}
-                        </if>
-                        <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
-                            and CREATE_TIME between #{params.beginCreateTime} and #{params.endCreateTime}
-                        </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="appId != null  and appId != ''">
+                and APP_ID=#{appId}
+            </if>
+            <if test="appName != null  and appName != ''">
+                and APP_NAME like concat('%', #{appName}, '%')
+            </if>
+            <if test="appCode != null  and appCode != ''">
+                and APP_CODE = #{appCode}
+            </if>
+            <if test="appAddr != null  and appAddr != ''">
+                and APP_ADDR like concat('%', #{appAddr}, '%')
+            </if>
+            <if test="appPort != null ">
+                and APP_PORT = #{appPort}
+            </if>
+            <if test="createBy != null  and createBy != ''">
+                and CREATE_BY = #{createBy}
+            </if>
+            <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
+                and CREATE_TIME between #{params.beginCreateTime} and #{params.endCreateTime}
+            </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="selectBizObjAppByAppId" parameterType="Long"
             resultMap="BizObjAppResult">
-            <include refid="selectBizObjAppVo"/>
-            where APP_ID = #{appId}
+        <include refid="selectBizObjAppVo"/>
+        where APP_ID = #{appId}
     </select>
 
     <insert id="insertBizObjApp" parameterType="BizObjApp" useGeneratedKeys="true"
             keyProperty="appId">
         insert into biz_obj_app
         <trim prefix="(" suffix=")" suffixOverrides=",">
-                    <if test="appName != null and appName != ''">APP_NAME,
-                    </if>
-                    <if test="appCode != null and appCode != ''">APP_CODE,
-                    </if>
-                    <if test="appAddr != null and appAddr != ''">APP_ADDR,
-                    </if>
-                    <if test="appPort != null">APP_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="appName != null and appName != ''">APP_NAME,
+            </if>
+            <if test="appCode != null and appCode != ''">APP_CODE,
+            </if>
+            <if test="appAddr != null and appAddr != ''">APP_ADDR,
+            </if>
+            <if test="appPort != null">APP_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="appName != null and appName != ''">#{appName},
-                    </if>
-                    <if test="appCode != null and appCode != ''">#{appCode},
-                    </if>
-                    <if test="appAddr != null and appAddr != ''">#{appAddr},
-                    </if>
-                    <if test="appPort != null">#{appPort},
-                    </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="appName != null and appName != ''">#{appName},
+            </if>
+            <if test="appCode != null and appCode != ''">#{appCode},
+            </if>
+            <if test="appAddr != null and appAddr != ''">#{appAddr},
+            </if>
+            <if test="appPort != null">#{appPort},
+            </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="updateBizObjApp" parameterType="BizObjApp">
         update biz_obj_app
         <trim prefix="SET" suffixOverrides=",">
-                    <if test="appName != null and appName != ''">APP_NAME =
-                        #{appName},
-                    </if>
-                    <if test="appCode != null and appCode != ''">APP_CODE =
-                        #{appCode},
-                    </if>
-                    <if test="appAddr != null and appAddr != ''">APP_ADDR =
-                        #{appAddr},
-                    </if>
-                    <if test="appPort != null">APP_PORT =
-                        #{appPort},
-                    </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="appName != null and appName != ''">APP_NAME =
+                #{appName},
+            </if>
+            <if test="appCode != null and appCode != ''">APP_CODE =
+                #{appCode},
+            </if>
+            <if test="appAddr != null and appAddr != ''">APP_ADDR =
+                #{appAddr},
+            </if>
+            <if test="appPort != null">APP_PORT =
+                #{appPort},
+            </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 APP_ID = #{appId}
     </update>
 
     <delete id="deleteBizObjAppByAppId" parameterType="Long">
         delete
-        from biz_obj_app where APP_ID = #{appId}
+        from biz_obj_app
+        where APP_ID = #{appId}
     </delete>
 
     <delete id="deleteBizObjAppByAppIds" parameterType="String">