This commit is contained in:
Lemon
2023-08-03 19:32:17 +08:00
24 changed files with 213 additions and 35 deletions

View File

@@ -6,6 +6,8 @@
<resultMap type="com.jsowell.pile.domain.PileMerchantInfo" id="PileMerchantInfoResult">
<result property="id" column="id"/>
<result property="merchantName" column="merchant_name"/>
<result property="merchantLevel" column="merchant_level"/>
<result property="parentId" column="parent_id"/>
<result property="address" column="address"/>
<result property="status" column="status"/>
<result property="organizationCode" column="organization_code"/>
@@ -25,6 +27,8 @@
<sql id="Base_Column_List">
id,
merchant_name,
merchant_level,
parent_id,
address,
status,
organization_code,
@@ -99,6 +103,12 @@
<if test="merchantName != null">
merchant_name,
</if>
<if test="merchantLevel != null">
merchant_level,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="address != null">
address,
</if>
@@ -149,6 +159,12 @@
<if test="merchantName != null">
#{merchantName},
</if>
<if test="merchantLevel != null">
#{merchantLevel},
</if>
<if test="parentId != null">
#{parentId},
</if>
<if test="address != null">
#{address},
</if>
@@ -200,6 +216,12 @@
<if test="merchantName != null">
merchant_name = #{merchantName},
</if>
<if test="merchantLevel != null">
merchant_level = #{merchantLevel},
</if>
<if test="parentId != null">
parent_id = #{parentId},
</if>
<if test="address != null">
address = #{address},
</if>
@@ -302,4 +324,13 @@
</foreach>
</if>
</select>
<select id="queryFirstLevelMerchant" resultMap="PileMerchantInfoResult">
select
<include refid="Base_Column_List"/>
from
pile_merchant_info
where del_flag = '0'
and merchant_level = '1'
</select>
</mapper>

View File

@@ -6,6 +6,7 @@
<resultMap type="com.jsowell.pile.domain.PileStationWhitelist" id="PileStationWhitelistResult">
<result property="id" column="id" />
<result property="merchantId" column="merchant_id" />
<result property="stationId" column="station_id" />
<result property="memberId" column="member_id" />
<result property="mobileNumber" column="mobile_number" />
@@ -17,7 +18,7 @@
</resultMap>
<sql id="Base_Column_List">
id, station_id, member_id, mobile_number, create_time, create_by, update_time, update_by, del_flag
id, merchant_id, station_id, member_id, mobile_number, create_time, create_by, update_time, update_by, del_flag
</sql>
<sql id="selectPileStationWhitelistVo">
@@ -29,6 +30,7 @@
<select id="selectPileStationWhitelistList" parameterType="com.jsowell.pile.domain.PileStationWhitelist" resultMap="PileStationWhitelistResult">
<include refid="selectPileStationWhitelistVo"/>
<where>
<if test="merchantId != null and merchantId != ''"> and merchant_id = #{merchantId}</if>
<if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
<if test="mobileNumber != null and mobileNumber != ''"> and mobile_number = #{mobileNumber}</if>
@@ -44,6 +46,7 @@
insert into pile_station_whitelist
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="merchantId != null">merchant_id,</if>
<if test="stationId != null">station_id,</if>
<if test="memberId != null">member_id,</if>
<if test="mobileNumber != null">mobile_number,</if>
@@ -55,6 +58,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="merchantId != null">#{merchantId},</if>
<if test="stationId != null">#{stationId},</if>
<if test="memberId != null">#{memberId},</if>
<if test="mobileNumber != null">#{mobileNumber},</if>
@@ -69,6 +73,7 @@
<update id="updatePileStationWhitelist" parameterType="com.jsowell.pile.domain.PileStationWhitelist">
update pile_station_whitelist
<trim prefix="SET" suffixOverrides=",">
<if test="merchantId != null">merchant_id = #{merchantId},</if>
<if test="stationId != null">station_id = #{stationId},</if>
<if test="memberId != null">member_id = #{memberId},</if>
<if test="mobileNumber != null">mobile_number = #{mobileNumber},</if>