瀏覽代碼

오더킨 키값 null처리함

dwkim 2 年之前
父節點
當前提交
5e54ec8301

+ 2 - 2
src/main/java/com/oqpo/api/service/stinfo/StoreBaseInfoService.java

@@ -163,13 +163,13 @@ public class StoreBaseInfoService extends CommonService {
163 163
             entity.setOwacNm(saveStoreInfolRequest.getOwacNm());
164 164
             entity.setOwnerNm(saveStoreInfolRequest.getOwnerNm());
165 165
 
166
-            if (StringUtil.isEmpty(saveStoreInfolRequest.getOqBrandId())) {
166
+            if (StringUtil.isBlankEmpty(saveStoreInfolRequest.getOqBrandId())) {
167 167
                 entity.setOqBrandId(null);
168 168
             } else {
169 169
                 entity.setOqBrandId(saveStoreInfolRequest.getOqBrandId());
170 170
             }
171 171
 
172
-            if (StringUtil.isEmpty(saveStoreInfolRequest.getOqStoreId())) {
172
+            if (StringUtil.isBlankEmpty(saveStoreInfolRequest.getOqStoreId())) {
173 173
                 entity.setOqStoreId(null);
174 174
             } else {
175 175
                 entity.setOqStoreId(saveStoreInfolRequest.getOqStoreId());

+ 4 - 3
src/main/resources/mybatis/sqlmaps/stinfo/Store.xml

@@ -157,7 +157,8 @@
157 157
             #{entity.zipNo},#{entity.addr1},#{entity.addr2},#{entity.telNo},#{entity.faxNo},
158 158
             #{entity.emalAddr},#{entity.storeStCd},#{entity.bsnsRegNo},#{entity.corpRegNo},#{entity.ctgrBsns},
159 159
             #{entity.bsnsCndt},#{entity.bnkCd}, #{entity.acctNo}, #{entity.owacNm}, #{entity.ownerNm},'N',#{entity.areaCd},#{entity.latX},#{entity.whsUseYn},
160
-            #{entity.longY},#{entity.oqBrandId},#{entity.oqStoreId},now(),#{userId},now(),#{userId}
160
+            #{entity.longY}, case when  #{entity.oqBrandId} is null or #{entity.oqBrandId} = '' then null else #{entity.oqBrandId}   end
161
+            ,case when  #{entity.oqStoreId} is null or #{entity.oqStoreId} = '' then null else #{entity.oqStoreId}   end ,now(),#{userId},now(),#{userId}
161 162
         )
162 163
     </insert>
163 164
 
@@ -189,8 +190,8 @@
189 190
             ,lat_x		= #{entity.latX}
190 191
             ,long_y		= #{entity.longY}
191 192
             ,whs_use_yn = #{entity.whsUseYn}
192
-            ,oq_brand_id = #{entity.oqBrandId}
193
-            ,oq_store_id = #{entity.oqStoreId}
193
+            ,oq_brand_id = case when  #{entity.oqBrandId} is null or #{entity.oqBrandId} = '' then null else #{entity.oqBrandId}   end
194
+            ,oq_store_id = case when  #{entity.oqStoreId} is null or #{entity.oqStoreId} = '' then null else #{entity.oqStoreId}   end
194 195
             ,sys_chg_dttm	= now()
195 196
             ,sys_chg_id	= #{userId}
196 197
         where brand_id = #{entity.brandId}