浏览代码

Update MastNokaMapper.xml

zoubz 3 周之前
父节点
当前提交
0895f5b59a
共有 1 个文件被更改,包括 50 次插入44 次删除
  1. 50 44
      farm-crm-biz/src/main/resources/mapper/crm/MastNokaMapper.xml

+ 50 - 44
farm-crm-biz/src/main/resources/mapper/crm/MastNokaMapper.xml

@@ -1,7 +1,7 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="jp.yamoto.farm.crm.biz.master.mapper.MastNokaMapper">
 
     <resultMap type="MastNoka" id="MastNokaResult">
@@ -33,29 +33,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <sql id="selectMastNokaVo">
         select
-            noka_cd,
-            noka_mei,
-            noka_mei_kn,
-            tenwabango,
-            mail_address,
-            jukyo,
-            daihyo_sya_mei,
-            daihyo_sya_mei_kn,
-            tokki_jiko,
-            hakko_sya,
-            hakko_ri,
-            status,
-            user_pwd,
-            haisi_flg,
-            haisi_dt,
-            haisi_riyu,
-            create_time,
-            create_by,
-            create_pg_id,
-            update_time,
-            update_by,
-            update_pg_id,
-            version
+        noka_cd,
+        noka_mei,
+        noka_mei_kn,
+        tenwabango,
+        mail_address,
+        jukyo,
+        daihyo_sya_mei,
+        daihyo_sya_mei_kn,
+        tokki_jiko,
+        hakko_sya,
+        hakko_ri,
+        status,
+        user_pwd,
+        haisi_flg,
+        haisi_dt,
+        haisi_riyu,
+        create_time,
+        create_by,
+        create_pg_id,
+        update_time,
+        update_by,
+        update_pg_id,
+        version
         from mast_noka
     </sql>
 
@@ -66,9 +66,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and noka_cd = #{nokaCd}
             </if>
             <if test="nokaMei != null  and nokaMei != ''">
-                and noka_mei like STRING_AGG('%', #{nokaMei}, '%')
+                and noka_mei like '%' || #{nokaMei} || '%'
             </if>
-            <if test="status != null  and status != ''">
+            <if test="status != null ">
                 and status = #{status}
             </if>
             <if test="haisiFlg != null  ">
@@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insert" parameterType="MastNoka">
         insert into mast_noka
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="noka_cd != null">
+            <if test="nokaCd != null">
                 noka_cd,
             </if>
             <if test="nokaMei != null">
@@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="mailAddress != null">
                 mail_address,
             </if>
-            <if test="daihyoSyaMmei != null">
+            <if test="daihyoSyaMei != null">
                 daihyo_sya_mei,
             </if>
             <if test="daihyoSyaMeiKn != null">
@@ -119,6 +119,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null">
                 status,
             </if>
+            <if test="userPwd != null">
+                user_pwd,
+            </if>
             <if test="haisiFlg != null">
                 haisi_flg,
             </if>
@@ -145,8 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="noka_cd != null">
-                #{noka_cd},
+            <if test="nokaCd != null">
+                #{nokaCd},
             </if>
             <if test="nokaMei != null">
                 #{nokaMei},
@@ -160,8 +163,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="mailAddress != null">
                 #{mailAddress},
             </if>
-            <if test="daihyoSyaMmei != null">
-                #{daihyoSyaMmei},
+            <if test="daihyoSyaMei != null">
+                #{daihyoSyaMei},
             </if>
             <if test="daihyoSyaMeiKn != null">
                 #{daihyoSyaMeiKn},
@@ -178,6 +181,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null">
                 #{status},
             </if>
+            <if test="userPwd != null">
+                #{userPwd},
+            </if>
             <if test="haisiFlg != null">
                 #{haisiFlg},
             </if>
@@ -230,10 +236,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 daihyo_sya_mei = #{daihyoSyaMei},
             </if>
             <if test="daihyoSyaMeiKn != null">
-                daihyoSyaMeiKn = #{daihyoSyaMeiKn},
+                daihyo_sya_mei_kn = #{daihyoSyaMeiKn},
             </if>
             <if test="tokkiJiko != null">
-                tokkiJiko = #{tokkiJiko},
+                tokki_Jiko = #{tokkiJiko},
             </if>
             <if test="hakkoSya != null">
                 hakko_sya = #{hakkoSya},
@@ -251,7 +257,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 haisi_flg = #{haisiFlg},
             </if>
             <if test="haisiDt != null">
-                haisiDt = #{haisiDt},
+                haisi_dt = #{haisiDt},
             </if>
             <if test="haisiRiyu != null">
                 haisi_riyu = #{haisiRiyu},
@@ -273,15 +279,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </if>
         </trim>
         where
-            noka_cd = #{nokaCd}
+        noka_cd = #{nokaCd}
         and version = #{version}
     </update>
 
     <select id="getNokaCdCount" parameterType="String" resultType="java.lang.Integer">
         SELECT
-        	count(1)
+        count(1)
         FROM
-			mast_noka
+        mast_noka
         <where>
             <if test="nokaCd != null  and nokaCd != ''">
                 and noka_cd = #{nokaCd}
@@ -292,17 +298,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <delete id="deleteById" parameterType="String">
         delete
         from
-            mast_noka
+        mast_noka
         where noka_cd = #{nokaCd}
     </delete>
 
     <!--廃止-->
     <update id="deleteLogicByIdAndVersion" parameterType="MastNoka">
         update
-            mast_noka
+        mast_noka
         set
-            haisi_flg = 1,
-        	version = version + 1,
+        haisi_flg = 1,
+        version = version + 1,
 
         <if test="updateBy != null">update_by =
             #{updateBy},
@@ -319,4 +325,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and haisi_flg = 0
         </where>
     </update>
-</mapper> 
+</mapper>