From 58d67bbe03b85ee9eea4321816c778ec2157b6f4 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 28 三月 2019 09:13:52 +0800
Subject: [PATCH] 商户 员工功能开发完成

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

diff --git a/java110-config/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml b/java110-config/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml
index 5ff3fa4..bd5f4bc 100644
--- a/java110-config/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml
+++ b/java110-config/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml
@@ -372,4 +372,71 @@
         </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 p_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 p_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>
+    </select>
+
+    <!-- 淇敼鍟嗘埛鐢ㄦ埛淇℃伅 add by wuxw 2018-07-03 -->
+    <update id="updateStoreUserInstance" parameterType="Map">
+        update p_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