同步租电平台

This commit is contained in:
2025-08-30 21:33:11 +08:00
parent 9ff8038104
commit 56a6157ca2
19 changed files with 464 additions and 66 deletions

View File

@ -27,7 +27,7 @@
</resultMap>
<sql id="Base_Column_List">
id, user_name, avatar_url, phone_number, role_id, is_store, nick_name,id_no
id, user_name, avatar_url, phone_number, role_id, is_store, nick_name,id_no,real_name,front_photo,back_photo,authed
</sql>
<select id="selectByPhoneNumber" parameterType="java.lang.String" resultMap="BaseResultMap">
@ -38,6 +38,14 @@
AND del_flag = 0
</select>
<select id="selectById" parameterType="java.lang.Long" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM zc_base_user
WHERE id = #{id}
AND del_flag = 0
</select>
<!-- 选择性插入用户信息 -->
<insert id="insertBaseUser" parameterType="com.sczx.sync.po.BaseUser" useGeneratedKeys="true" keyProperty="id">
INSERT INTO zc_base_user

View File

@ -9,13 +9,13 @@
<result column="phone" property="phone" />
<result column="address" property="address" />
<result column="citys" property="citys" />
<result column="is_delete" property="isDelete" />
<result column="del_flag" property="isDelete" />
<result column="b_op_id" property="bOpId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
b_op_id, company_name, contact_name, phone, address, citys, is_delete
b_op_id, company_name, contact_name, phone, address, citys, del_flag
</sql>
<!-- 根据电话号码查询公司信息 -->
@ -27,6 +27,13 @@
AND is_delete = 0
</select>
<select id="selectById" parameterType="java.lang.Long" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM zc_company
WHERE id = #{id}
</select>
<!-- 根据bOpId查询公司信息 -->
<select id="selectByOpId" parameterType="java.lang.Long" resultMap="BaseResultMap">
SELECT

View File

@ -17,6 +17,8 @@
<result column="longitude" property="longitude" />
<result column="del_flag" property="isDelete" />
<result column="bp_store_id" property="bpStoreId" />
<result column="contact_person" property="contact_name" />
<result column="del_flag" property="is_delete" />
</resultMap>
@ -42,6 +44,22 @@
AND del_flag = 0
</select>
<select id="selectByOpId" parameterType="java.lang.Long" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM zc_company_store
WHERE operating_company_id = #{opId}
AND del_flag = 0
</select>
<select id="selectById" parameterType="java.lang.Long" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM zc_company_store
WHERE id = #{id}
AND del_flag = 0
</select>
<!-- 根据门店名称更新门店信息 -->
<update id="updateByName" parameterType="com.sczx.sync.po.StoreInfo">
<selectKey keyProperty='id' resultType='java.lang.Long' order='AFTER'>
@ -179,5 +197,4 @@
update zc_order_sub set b_order_id = #{bOdId} where order_id =#{cId} and suborder_type = "RENTBATTEY"
</update>
</mapper>

View File

@ -0,0 +1,45 @@
<?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="com.sczx.sync.mapper.OrderBatteryInfoMapper">
<!-- 结果映射 -->
<resultMap id="OrderBatteryInfoMap" type="com.sczx.sync.po.OrderBatteryInfo">
<result property="phone" column="phone"/>
<result property="meal_id" column="meal_id"/>
<result property="start_date" column="start_date"/>
<result property="end_date" column="end_date"/>
<result property="city" column="city"/>
<result property="store" column="store"/>
<result property="category" column="category"/>
<result property="operator_id" column="operator_id"/>
<result property="order_no" column="order_no"/>
</resultMap>
<!-- 根据子订单ID查询电池订单信息 -->
<select id="selectOrderBatteryInfoById" resultMap="OrderBatteryInfoMap">
SELECT
zom.customer_phone AS phone,
zrb.meal_id AS meal_id,
zom.start_rent_time AS start_date,
zom.end_rent_time AS end_date,
zcs.city_id as city,
zcs.id as store,
zrb.category_id as category,
zcs.operating_company_id as operator_id,
zos.suborder_no as order_no
FROM
zc_order_main AS zom,
zc_order_sub AS zos,
zc_rent_battey_rule AS zrb,
zc_company_store AS zcs
WHERE
zom.rent_battey_rule_id = zrb.id
AND zom.order_id = zos.order_id
AND suborder_type = 'RENTBATTEY'
and zom.store_id = zcs.id
and zos.suborder_id = #{id}
</select>
</mapper>

View File

@ -25,7 +25,6 @@
SELECT <include refid="Base_Column_List"/>
FROM zc_base_user_store
WHERE user_id = #{userId}
AND del_flag = '0'
</select>
<!-- 根据用户ID更新用户门店信息 -->