From 0894b9328ae1c11146175b492ae348bbd4b13404 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期一, 29 四月 2019 16:42:32 +0800
Subject: [PATCH] 加入统一消息提示功能 请用 vc.messege('错误内容')

---
 java110-config/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml |  243 +++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 228 insertions(+), 15 deletions(-)

diff --git a/java110-config/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml b/java110-config/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml
index 39da8a8..605152e 100644
--- a/java110-config/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml
+++ b/java110-config/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml
@@ -6,23 +6,23 @@
     
     <!-- 淇濆瓨鍟嗘埛淇℃伅 add by wuxw 2018-07-03 -->
     <insert id="saveBusinessStoreInfo" parameterType="Map">
-        insert into business_store(store_id,b_id,user_id,name,address,tel,store_type_cd,nearby_landmarks,map_x,map_y,operate)
-        values(#{storeId},#{bId},#{userId},#{name},#{address},#{tel},#{storeTypeCd},#{nearbyLandmarks},#{mapX},#{mapY},#{operate})
+        insert into business_store(store_id,b_id,user_id,name,address,tel,store_type_cd,nearby_landmarks,map_x,map_y,month,operate)
+        values(#{storeId},#{bId},#{userId},#{name},#{address},#{tel},#{storeTypeCd},#{nearbyLandmarks},#{mapX},#{mapY},#{month},#{operate})
     </insert>
     <!-- 淇濆瓨鍟嗘埛灞炴�т俊鎭�  add by wuxw 2018-07-03 -->
     <insert id="saveBusinessStoreAttr" parameterType="Map">
-        insert into business_store_attr(b_id,attr_id,store_id,spec_cd,value,operate)
-        values(#{bId},#{attrId},#{storeId},#{specCd},#{value},#{operate})
+        insert into business_store_attr(b_id,attr_id,store_id,spec_cd,value,month,operate)
+        values(#{bId},#{attrId},#{storeId},#{specCd},#{value},#{month},#{operate})
     </insert>
     <!-- 淇濆瓨鍟嗘埛鐓х墖淇℃伅 add by wuxw 2018-07-03 -->
     <insert id="saveBusinessStorePhoto" parameterType="Map">
-        insert into business_store_photo(store_photo_id,b_id,store_id,store_photo_type_cd,photo,operate)
-        values(#{storePhotoId},#{bId},#{storeId},#{storePhotoTypeCd},#{photo})
+        insert into business_store_photo(store_photo_id,b_id,store_id,store_photo_type_cd,photo,month,operate)
+        values(#{storePhotoId},#{bId},#{storeId},#{storePhotoTypeCd},#{photo},#{month},#{operate})
     </insert>
     <!-- 淇濆瓨鍟嗘埛璇佷欢淇℃伅 add by wuxw 2018-07-03 -->
     <insert id="saveBusinessStoreCerdentials" parameterType="Map">
-        insert into business_store_cerdentials(store_cerdentials_id,b_id,store_id,credentials_cd,value,validity_period,positive_photo,negative_photo,operate)
-        values(#{storeCerdentialsId},#{bId},#{storeId},#{credentialsCd},#{value},#{validityPeriod},#{positivePhoto},#{negativePhoto},#{operate})
+        insert into business_store_cerdentials(store_cerdentials_id,b_id,store_id,credentials_cd,value,validity_period,positive_photo,negative_photo,month,operate)
+        values(#{storeCerdentialsId},#{bId},#{storeId},#{credentialsCd},#{value},#{validityPeriod},#{positivePhoto},#{negativePhoto},#{month},#{operate})
     </insert>
 
     <!-- 鏌ヨ鍟嗘埛淇℃伅锛圔usiness锛� add by wuxw 2018-07-03 -->
@@ -46,7 +46,7 @@
         select sa.b_id,sa.attr_id,sa.store_id,sa.spec_cd,sa.value,sa.operate
         from business_store_attr sa where 1=1
         <if test="operate != null and operate != ''">
-            and s.operate = #{operate}
+            and sa.operate = #{operate}
         </if>
         <if test="bId != null and bId !=''">
             and sa.b_id = #{bId}
@@ -124,7 +124,11 @@
     <select id="getStoreInfo" parameterType="Map" resultType="Map">
         select s.store_id,s.b_id,s.user_id,s.name,s.address,s.tel,s.store_type_cd,s.nearby_landmarks,s.map_x,s.map_y,s.status_cd
         from s_store s
-        where s.status_cd = '0'
+        where 1=1
+        <if test="statusCd != null and statusCd != ''">
+            and s.status_cd = #{statusCd}
+        </if>
+
         <if test="bId != null and bId !=''">
             and s.b_id = #{bId}
         </if>
@@ -134,15 +138,22 @@
     </select>
 
     <!-- 鏌ヨ鍟嗘埛灞炴�т俊鎭� add by wuxw 2018-07-03 -->
-    <select id="getStoreAttr" parameterType="Map" resultType="Map">
+    <select id="getStoreAttrs" parameterType="Map" resultType="Map">
         select sa.b_id,sa.attr_id,sa.store_id,sa.spec_cd,sa.value,sa.status_cd
         from s_store_attr sa
-        where sa.status_cd = '0'
+        where
+        1=1
+        <if test="statusCd != null and statusCd != ''">
+            and sa.status_cd = #{statusCd}
+        </if>
         <if test="bId != null and bId !=''">
             and sa.b_id = #{bId}
         </if>
         <if test="storeId != null and storeId !=''">
             and sa.store_id = #{storeId}
+        </if>
+        <if test="attrId != null and attrId != ''">
+            and sa.attr_id = #{attrId}
         </if>
     </select>
 
@@ -150,7 +161,10 @@
     <select id="getStorePhoto" parameterType="Map" resultType="Map">
         select sp.store_photo_id,sp.b_id,sp.store_id,sp.store_photo_type_cd,sp.photo,sp.status_cd
         from s_store_photo sp
-        where sp.status_cd = '0'
+        where 1=1
+        <if test="statusCd != null and statusCd != ''">
+            and sp.status_cd = #{statusCd}
+        </if>
         <if test="bId != null and bId !=''">
             and sp.b_id = #{bId}
         </if>
@@ -163,7 +177,10 @@
     <select id="getStoreCerdentials" parameterType="Map" resultType="Map">
         select sc.store_cerdentials_id,sc.b_id,sc.store_id,sc.credentials_cd,sc.value,sc.validity_period,sc.positive_photo,sc.negative_photo,sc.status_cd
         from s_store_cerdentials sc
-        where sc.status_cd = '0'
+        where 1=1
+        <if test="statusCd != null and statusCd != ''">
+            and sc.status_cd = #{statusCd}
+        </if>
         <if test="bId != null and bId !=''">
             and sc.b_id = #{bId}
         </if>
@@ -176,6 +193,33 @@
     <!-- 淇敼鍟嗘埛淇℃伅 add by wuxw 2018-07-03 -->
     <update id="updateStoreInfoInstance" parameterType="Map">
         update s_store s set s.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,s.b_id = #{newBId}
+        </if>
+        <if test="userId != null and userId != ''">
+            ,s.user_id = #{userId}
+        </if>
+        <if test="name != null and name != ''">
+            ,s.name = #{name}
+        </if>
+        <if test="address != null and address != ''">
+            ,s.address = #{address}
+        </if>
+        <if test="tel != null and tel != ''">
+            ,s.tel = #{tel}
+        </if>
+        <if test="storeTypeCd != null and storeTypeCd != ''">
+            ,s.store_type_cd = #{storeTypeCd}
+        </if>
+        <if test="nearbyLandmarks != null and nearbyLandmarks != ''">
+            ,s.nearby_landmarks = #{nearbyLandmarks}
+        </if>
+        <if test="mapX != null and mapX != ''">
+            ,s.map_x = #{mapX}
+        </if>
+        <if test="mapY != null and mapY != ''">
+            ,s.map_y = #{mapY}
+        </if>
         where 1=1
         <if test="bId != null and bId !=''">
             and s.b_id = #{bId}
@@ -188,6 +232,12 @@
     <!-- 淇敼鍟嗘埛灞炴�т俊鎭� add by wuxw 2018-07-03 -->
     <update id="updateStoreAttrInstance" parameterType="Map">
         update s_store_attr sa set sa.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,sa.b_id = #{newBId}
+        </if>
+        <if test="value != null and value != ''">
+            ,sa.value = #{value}
+        </if>
         where 1=1
         <if test="bId != null and bId !=''">
             and sa.b_id = #{bId}
@@ -198,11 +248,23 @@
         <if test="specCd != null and specCd !=''">
             and sa.spec_cd = #{specCd}
         </if>
+        <if test="attrId != null and attrId !=''">
+            and sa.attr_id = #{attrId}
+        </if>
     </update>
 
     <!-- 淇敼鍟嗘埛鐓х墖淇℃伅 add by wuxw 2018-07-03 -->
     <update id="updateStorePhotoInstance" parameterType="Map">
         update s_store_photo sp set sp.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,sp.b_id = #{newBId}
+        </if>
+        <if test="storePhotoTypeCd != null and storePhotoTypeCd != ''">
+            ,sp.store_photo_type_cd = #{storePhotoTypeCd}
+        </if>
+        <if test="photo != null and photo != ''">
+            ,sp.photo = #{photo}
+        </if>
         where 1=1
         <if test="bId != null and bId !=''">
             and sp.b_id = #{bId}
@@ -216,8 +278,26 @@
     </update>
 
     <!-- 淇敼鍟嗘埛璇佷欢淇℃伅 add by wuxw 2018-07-03 -->
-    <update id="updateStoreCerdentialsInstance" parameterType="Map">
+    <update id="updateStoreCerdentailsInstance" parameterType="Map">
         update s_store_cerdentials sc set sc.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,sc.b_id = #{newBId}
+        </if>
+        <if test="credentialsCd != null and credentialsCd != ''">
+            ,sc.credentials_cd = #{credentialsCd}
+        </if>
+        <if test="value != null and value != ''">
+            ,sc.value = #{value}
+        </if>
+        <if test="validityPeriod != null">
+            ,sc.validity_period = #{validityPeriod}
+        </if>
+        <if test="positivePhoto != null and positivePhoto != ''">
+            ,sc.positive_photo = #{positivePhoto}
+        </if>
+        <if test="negativePhoto != null and negativePhoto != ''">
+            ,sc.negative_photo = #{negativePhoto}
+        </if>
         where 1=1
         <if test="bId != null and bId !=''">
             and sc.b_id = #{bId}
@@ -229,4 +309,137 @@
             and sc.store_cerdentials_id = #{storeCerdentialsId}
         </if>
     </update>
+
+    <!--鍟嗘埛鎴愬憳鍔犲叆 add by wuxw 2018-10-27 saveBusinessMemberStore-->
+    <insert id="saveBusinessMemberStore" parameterType="Map">
+        insert into business_member_store(member_store_id,b_id,store_id,member_id,month,operate)
+        values(#{memberStoreId},#{bId},#{storeId},#{memberId},#{month},#{operate})
+    </insert>
+
+    <!-- 鍟嗘埛鎴愬憳鍔犲叆 instance琛ㄤ腑 add by wuxw 2018-10-27 -->
+    <insert id="saveMemberStoreInstance" parameterType="Map">
+        insert into s_member_store(member_store_id,b_id,store_id,member_id,status_cd)
+        select ms.member_store_id,ms.b_id,ms.store_id,ms.member_id,'0'
+        from business_member_store ms where
+        ms.operate = 'ADD' and ms.b_id=#{bId}
+    </insert>
+
+    <!-- 鏌ヨ鍟嗘埛鎴愬憳 add by wuxw 2018-10-27 getBusinessMemberStore-->
+    <select id="getBusinessMemberStore" parameterType="Map" resultType="Map">
+        select ms.member_store_id,ms.b_id,ms.store_id,ms.member_id,ms.operate
+        from business_member_store ms where 1 = 1
+        <if test="operate != null and operate != ''">
+            and ms.operate = #{operate}
+        </if>
+        <if test="bId != null and bId !=''">
+            and ms.b_id = #{bId}
+        </if>
+        <if test="storeId != null and storeId != ''">
+            and ms.store_id = #{storeId}
+        </if>
+    </select>
+
+
+    <!-- 鏌ヨ鍟嗘埛鎴愬憳  add by wuxw 2018-07-03 -->
+    <select id="getMemberStore" parameterType="Map" resultType="Map">
+        select ms.member_store_id,ms.b_id,ms.store_id,ms.member_id,ms.status_cd
+        from business_member_store ms
+        where 1=1
+        <if test="statusCd != null and statusCd != ''">
+            and ms.status_cd = #{statusCd}
+        </if>
+
+        <if test="bId != null and bId !=''">
+            and ms.b_id = #{bId}
+        </if>
+        <if test="storeId != null and storeId !=''">
+            and ms.member_store_id = #{memberStoreId}
+        </if>
+    </select>
+
+    <!-- 淇敼鍟嗘埛鎴愬憳 add by wuxw 2018-07-03 -->
+    <update id="updateMemberStoreInstance" parameterType="Map">
+        update s_member_store ms set ms.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,ms.b_id = #{newBId}
+        </if>
+        where 1=1
+        <if test="bId != null and bId !=''">
+            and ms.b_id = #{bId}
+        </if>
+        <if test="memberStoreId != null and memberStoreId !=''">
+            and ms.member_store_id = #{memberStoreId}
+        </if>
+    </update>
+
+
+    <!-- 淇濆瓨鐗╀笟鐢ㄦ埛淇℃伅 add by wuxw 2018-07-03 -->
+    <insert id="saveBusinessStoreUser" parameterType="Map">
+        insert into business_store_user(store_user_id,b_id,store_id,user_id,rel_cd,month,operate)
+        values(#{storeUserId},#{bId},#{storeId},#{userId},#{relCd},#{month},#{operate})
+    </insert>
+
+    <!-- 鏌ヨ鐗╀笟 鐢ㄦ埛淇℃伅 add by wuxw 2018-07-03 -->
+    <select id="getBusinessStoreUser" parameterType="Map" resultType="Map">
+        select sc.store_user_id,sc.b_id,sc.store_id,sc.user_id,sc.rel_cd,sc.operate
+        from business_store_user sc where 1 = 1
+        <if test="bId != null and bId !=''">
+            and sc.b_id = #{bId}
+        </if>
+        <if test="operate != null and operate != ''">
+            and sc.operate = #{operate}
+        </if>
+        <if test="storeId != null and storeId != ''">
+            and sc.store_id = #{storeId}
+        </if>
+    </select>
+
+    <!-- 淇濆瓨 鍟嗘埛鐢ㄦ埛淇℃伅 instance add by wuxw 2018-07-03 -->
+    <insert id="saveStoreUserInstance" parameterType="Map">
+        insert into s_store_user(store_user_id,b_id,store_id,user_id,rel_cd,status_cd)
+        select sc.store_user_id,sc.b_id,sc.store_id,sc.user_id,sc.rel_cd,'0'
+        from business_store_user sc
+        where sc.operate = 'ADD' and sc.b_id=#{bId}
+    </insert>
+
+    <!-- 鏌ヨ鍟嗘埛璇佷欢淇℃伅 add by wuxw 2018-07-03 -->
+    <select id="getStoreUser" parameterType="Map" resultType="Map">
+        select sc.store_user_id,sc.b_id,sc.store_id,sc.user_id,sc.rel_cd,sc.status_cd
+        from s_store_user sc
+        where 1=1
+        <if test="statusCd != null and statusCd != ''">
+            and sc.status_cd = #{statusCd}
+        </if>
+        <if test="bId != null and bId !=''">
+            and sc.b_id = #{bId}
+        </if>
+        <if test="storeId != null and storeId !=''">
+            and sc.store_id = #{storeId}
+        </if>
+        <if test="userId != null and userId !=''">
+            and sc.user_id = #{userId}
+        </if>
+    </select>
+
+    <!-- 淇敼鍟嗘埛鐢ㄦ埛淇℃伅 add by wuxw 2018-07-03 -->
+    <update id="updateStoreUserInstance" parameterType="Map">
+        update s_store_user sc set sc.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,sc.b_id = #{newBId}
+        </if>
+        <if test="relCd != null and relCd != ''">
+            ,sc.rel_cd = #{relCd}
+        </if>
+        where 1=1
+        <if test="bId != null and bId !=''">
+            and sc.b_id = #{bId}
+        </if>
+        <if test="storeId != null and storeId !=''">
+            and sc.store_id = #{storeId}
+        </if>
+        <if test="storeUserId != null and storeUserId !=''">
+            and sc.store_user_id = #{storeUserId}
+        </if>
+    </update>
+
 </mapper>

--
Gitblit v1.8.0