fix: 茅台预约,功能优化及完善。

This commit is contained in:
tianyongbao
2024-12-10 02:27:03 +08:00
parent a885b707a7
commit 368da37ab6
25 changed files with 600 additions and 44 deletions

View File

@@ -10,11 +10,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="title" column="title" />
<result property="content" column="content" />
<result property="picture" column="picture" />
<result property="pictureV2" column="picture_v2" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectIItemVo">
select a.item_id, a.item_code, a.title, a.content, a.picture, a.create_time from i_item a
select a.item_id, a.item_code, a.title, a.content, a.picture, a.picture_v2, a.create_time from i_item a
</sql>
<select id="selectIItemList" parameterType="IItemDto" resultMap="IItemResult">
@@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="itemCode != null">item_code,</if>
<if test="title != null">title,</if>
<if test="content != null">content,</if>
<if test="pictureV2 != null">picture_v2,</if>
<if test="picture != null">picture,</if>
<if test="createTime != null">create_time,</if>
</trim>
@@ -48,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="itemCode != null">#{itemCode},</if>
<if test="title != null">#{title},</if>
<if test="content != null">#{content},</if>
<if test="pictureV2 != null">#{pictureV2},</if>
<if test="picture != null">#{picture},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
@@ -60,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="title != null">title = #{title},</if>
<if test="content != null">content = #{content},</if>
<if test="picture != null">picture = #{picture},</if>
<if test="pictureV2 != null">picture_v2 = #{pictureV2},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where item_id = #{itemId}
@@ -88,4 +92,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="truncateItem" >
TRUNCATE TABLE i_item
</update>
<select id="selectIItemByItemCode" parameterType="String" resultMap="IItemResult">
<include refid="selectIItemVo"/>
where a.item_code = #{itemCode}
</select>
</mapper>

View File

@@ -12,10 +12,12 @@
<result property="operTime" column="oper_time" />
<result property="createUser" column="create_user" />
<result property="createBy" column="create_by" />
<result property="type" column="type" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectILogVo">
select a.log_id, a.mobile, a.log_content, a.status, a.oper_time, a.create_user, a.create_by from i_log a
select a.log_id, a.mobile, a.log_content, a.status, a.oper_time, a.create_user, a.create_by, a.type, a.create_time from i_log a
</sql>
<select id="selectILogList" parameterType="ILogDto" resultMap="ILogResult">
@@ -25,9 +27,12 @@
<if test="mobile != null and mobile != ''"> and a.mobile like '%'|| #{mobile}||'%'</if>
<if test="logContent != null and logContent != ''"> and a.log_content like '%'|| #{logContent}||'%'</if>
<if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="operTime != null "> and a.oper_time = #{operTime}</if>
</where>
order by a.create_time desc
<!-- 数据范围过滤 -->
${params.dataScope}
order by a.oper_time desc
</select>
<select id="selectILogByLogId" parameterType="Long" resultMap="ILogResult">
@@ -45,6 +50,8 @@
<if test="operTime != null">oper_time,</if>
<if test="createUser != null">create_user,</if>
<if test="createBy != null">create_by,</if>
<if test="type != null">type,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="logId != null">#{logId},</if>
@@ -54,6 +61,8 @@
<if test="operTime != null">#{operTime},</if>
<if test="createUser != null">#{createUser},</if>
<if test="createBy != null">#{createBy},</if>
<if test="type != null">#{type},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
@@ -66,6 +75,8 @@
<if test="operTime != null">oper_time = #{operTime},</if>
<if test="createUser != null">create_user = #{createUser},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="type != null">type = #{type},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where log_id = #{logId}
</update>

View File

@@ -16,10 +16,16 @@
<result property="name" column="name" />
<result property="tenantName" column="tenant_name" />
<result property="createTime" column="create_time" />
<result property="openStartTime" column="open_start_time" />
<result property="openEndTime" column="open_end_time" />
<result property="address" column="address" />
<result property="city" column="city" />
<result property="district" column="district" />
<result property="province" column="province" />
</resultMap>
<sql id="selectIShopVo">
select a.shop_id, a.i_shop_id, a.province_name, a.city_name, a.district_name, a.full_address, a.lat, a.lng, a.name, a.tenant_name, a.create_time from i_shop a
select a.shop_id, a.i_shop_id, a.open_start_time, a.open_end_time, a.address, a.city, a.district, a.province, a.province_name, a.city_name, a.district_name, a.full_address, a.lat, a.lng, a.name, a.tenant_name, a.create_time from i_shop a
</sql>
<select id="selectIShopList" parameterType="IShopDto" resultMap="IShopResult">
@@ -27,10 +33,15 @@
<where>
a.del_flag='0'
<if test="iShopId != null and iShopId != ''"> and a.i_shop_id = #{iShopId}</if>
<if test="address != null and address != ''"> and a.address like '%'|| #{address}||'%'</if>
<if test="city != null and city != ''"> and a.city = #{city}</if>
<if test="district != null and district != ''"> and a.district = #{district}</if>
<if test="province != null and province != ''"> and a.province = #{province}</if>
<if test="provinceName != null and provinceName != ''"> and a.province_name like '%'|| #{provinceName}||'%'</if>
<if test="cityName != null and cityName != ''"> and a.city_name like '%'|| #{cityName}||'%'</if>
<if test="districtName != null and districtName != ''"> and a.district_name like '%'|| #{districtName}||'%'</if>
<if test="tenantName != null and tenantName != ''"> and a.tenant_name like '%'|| #{tenantName}||'%'</if>
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
</where>
order by a.create_time desc
</select>
@@ -54,6 +65,12 @@
<if test="name != null">name,</if>
<if test="tenantName != null">tenant_name,</if>
<if test="createTime != null">create_time,</if>
<if test="openStartTime != null">open_start_time,</if>
<if test="openEndTime != null">open_end_time,</if>
<if test="address != null">address,</if>
<if test="city != null">city,</if>
<if test="district != null">district,</if>
<if test="province != null">province,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="shopId != null">#{shopId},</if>
@@ -67,6 +84,12 @@
<if test="name != null">#{name},</if>
<if test="tenantName != null">#{tenantName},</if>
<if test="createTime != null">#{createTime},</if>
<if test="openStartTime != null">#{openStartTime},</if>
<if test="openEndTime != null">#{openEndTime},</if>
<if test="address != null">#{address},</if>
<if test="city != null">#{city},</if>
<if test="district != null">#{district},</if>
<if test="province != null">#{province},</if>
</trim>
</insert>
@@ -83,6 +106,12 @@
<if test="name != null">name = #{name},</if>
<if test="tenantName != null">tenant_name = #{tenantName},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="openStartTime != null">open_start_time = #{openStartTime},</if>
<if test="openEndTime != null">open_end_time = #{openEndTime},</if>
<if test="address != null">address = #{address},</if>
<if test="city != null">city = #{city},</if>
<if test="district != null">district = #{district},</if>
<if test="province != null">province = #{province},</if>
</trim>
where shop_id = #{shopId}
</update>
@@ -113,7 +142,7 @@
</update>
<insert id="batchInsertIShop">
insert into i_shop(shop_id, i_shop_id, province_name, city_name, district_name, full_address, lat, lng, name, tenant_name, create_time) values
insert into i_shop(shop_id, i_shop_id, province_name, city_name, district_name, full_address, lat, lng, name, tenant_name, create_time, open_end_time, open_start_time, address, city, district, province) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.shopId},
#{item.iShopId},
@@ -125,7 +154,13 @@
#{item.lng},
#{item.name},
#{item.tenantName},
#{item.createTime})
#{item.createTime},
#{item.openEndTime},
#{item.openStartTime},
#{item.address},
#{item.city},
#{item.district},
#{item.province})
</foreach>
</insert>
@@ -133,4 +168,68 @@
<include refid="selectIShopVo"/>
where a.i_shop_id = #{iShopId}
</select>
<select id="selectProvinceVoList" parameterType="IShopDto" resultType="com.ruoyi.invest.domain.vo.IProvinceVo">
select
distinct
a.province_name as provinceName
from
i_shop a
<where>
a.province_name != ''
and a.province_name is not null
<if test="city != null and city != ''"> and a.city = #{city}</if>
<if test="district != null and district != ''"> and a.district = #{district}</if>
<if test="cityName != null and cityName != ''"> and a.city_name like '%'|| #{cityName}||'%'</if>
<if test="districtName != null and districtName != ''"> and a.district_name like '%'|| #{districtName}||'%'</if>
</where>
order by a.province_name desc
</select>
<select id="selectCityVoList" parameterType="IShopDto" resultType="com.ruoyi.invest.domain.vo.ICityVo">
select
distinct
a.city_name as cityName
from
i_shop a
<where>
a.province_name != ''
and a.province_name is not null
and a.city_name != ''
and a.city_name is not null
<if test="province != null and province != ''"> and a.province = #{province}</if>
<if test="provinceName != null and provinceName != ''"> and a.province_name like '%'|| #{provinceName}||'%'</if>
<if test="city != null and city != ''"> and a.city = #{city}</if>
<if test="district != null and district != ''"> and a.district = #{district}</if>
<if test="cityName != null and cityName != ''"> and a.city_name like '%'|| #{cityName}||'%'</if>
<if test="districtName != null and districtName != ''"> and a.district_name like '%'|| #{districtName}||'%'</if>
</where>
order by a.city_name desc
</select>
<select id="selectDistrictVoList" parameterType="IShopDto" resultType="com.ruoyi.invest.domain.vo.IDistrictVo">
select
distinct
a.district_name as districtName
from
i_shop a
<where>
a.province_name != ''
and a.province_name is not null
and a.city_name != ''
and a.city_name is not null
and a.district_name != ''
and a.district_name is not null
<if test="province != null and province != ''"> and a.province = #{province}</if>
<if test="provinceName != null and provinceName != ''"> and a.province_name like '%'|| #{provinceName}||'%'</if>
<if test="city != null and city != ''"> and a.city = #{city}</if>
<if test="district != null and district != ''"> and a.district = #{district}</if>
<if test="cityName != null and cityName != ''"> and a.city_name like '%'|| #{cityName}||'%'</if>
<if test="districtName != null and districtName != ''"> and a.district_name like '%'|| #{districtName}||'%'</if>
</where>
order by a.district_name desc
</select>
</mapper>

View File

@@ -30,10 +30,13 @@
<result property="updateTime" column="update_time" />
<result property="updateUser" column="update_user" />
<result property="createBy" column="create_by" />
<result property="districtName" column="district_name" />
<result property="userName" column="user_name" />
<result property="itemName" column="item_name" />
</resultMap>
<sql id="selectIUserVo">
select a.mobile, a.user_id, a.token, a.cookie, a.device_id, a.item_code, a.ishop_id, a.province_name, a.city_name, a.address, a.lat, a.lng, a.minute, a.shop_type, a.random_minute, a.push_plus_token, a.json_result, a.remark, a.expire_time, a.del_flag, a.create_time, a.create_user, a.update_time, a.update_user, a.create_by from i_user a
select a.mobile, a.user_id,a.district_name,a.user_name,a.item_name, a.token, a.cookie, a.device_id, a.item_code, a.ishop_id, a.province_name, a.city_name, a.address, a.lat, a.lng, a.minute, a.shop_type, a.random_minute, a.push_plus_token, a.json_result, a.remark, a.expire_time, a.del_flag, a.create_time, a.create_user, a.update_time, a.update_user, a.create_by from i_user a
</sql>
<select id="selectIUserList" parameterType="IUserDto" resultMap="IUserResult">
@@ -60,6 +63,8 @@
<if test="createUser != null and createUser != ''"> and a.create_user = #{createUser}</if>
<if test="updateUser != null and updateUser != ''"> and a.update_user = #{updateUser}</if>
</where>
<!-- 数据范围过滤 -->
${params.dataScope}
order by a.create_time desc
</select>
@@ -96,6 +101,9 @@
<if test="updateTime != null">update_time,</if>
<if test="updateUser != null">update_user,</if>
<if test="createBy != null">create_by,</if>
<if test="districtName != null">district_name,</if>
<if test="userName != null">user_name,</if>
<if test="itemName != null">item_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="mobile != null">#{mobile},</if>
@@ -123,6 +131,9 @@
<if test="updateTime != null">#{updateTime},</if>
<if test="updateUser != null">#{updateUser},</if>
<if test="createBy != null">#{createBy},</if>
<if test="districtName != null">#{districtName},</if>
<if test="userName != null">#{createBy},</if>
<if test="itemName != null">#{itemName},</if>
</trim>
</insert>
@@ -153,6 +164,9 @@
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateUser != null">update_user = #{updateUser},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="districtName != null">district_name = #{districtName},</if>
<if test="userName != null">user_name = #{userName},</if>
<if test="itemName != null">item_name = #{itemName},</if>
</trim>
where mobile = #{mobile}
</update>