java110
2022-01-17 d937205d5824dc44ab1567cf6f84fbfa817baa92
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?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">
<mapper namespace="storeServiceDaoImpl">
    
    <!-- 保存商户信息 add by wuxw 2018-07-03 -->
    <insert id="saveBusinessStoreInfo" parameterType="Map">
        $saveBusinessInfo$
    </insert>
 
 
    <!-- 查询商户信息(Business) add by wuxw 2018-07-03 -->
    <select id="getBusinessStoreInfo" parameterType="Map" resultType="Map">
        $getBusinessInfo$
    </select>
 
 
 
 
    <!-- 保存商户信息至 instance表中 add by wuxw 2018-07-03 -->
    <insert id="saveStoreInfoInstance" parameterType="Map">
        insert into s_store(store_id,b_id,user_id,name,address,tel,store_type_cd,nearby_landmarks,map_x,map_y,status_cd)
        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,'0'
        from business_store s where 
        s.operate = 'ADD' and s.b_id=#{bId}
    </insert>
 
 
 
    <!-- 查询商户信息 add by wuxw 2018-07-03 -->
    <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 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>
        <if test="storeId != null and storeId !=''">
            and s.store_id = #{storeId}
        </if>
    </select>
 
 
 
 
    <!-- 修改商户信息 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}
        </if>
        <if test="storeId != null and storeId !=''">
            and s.store_id = #{storeId}
        </if>
    </update>
 
</mapper>