This commit is contained in:
2025-07-01 17:54:58 +08:00
commit 57dcd609e2
5136 changed files with 346184 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
<?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.zhwl.store.mapper.HuifuSotreMapper">
<resultMap type="HuifuSotre" id="HuifuSotreResult">
<result property="id" column="id"/>
<result property="storeId" column="storeId"/>
<result property="huifuId" column="huifuId"/>
<result property="percentage" column="percentage"/>
</resultMap>
<sql id="selectHuifuSotreVo">
select id, storeId, huifuId, percentage
from huifu_sotre
</sql>
<select id="selectHuifuSotreList" parameterType="HuifuSotre" resultMap="HuifuSotreResult">
<include refid="selectHuifuSotreVo"/>
<where>
<if test="storeId != null ">
and storeId = #{storeId}
</if>
<if test="huifuId != null ">
and huifuId = #{huifuId}
</if>
<if test="percentage != null ">
and percentage = #{percentage}
</if>
</where>
</select>
<select id="selectHuifuSotreById" parameterType="Long"
resultMap="HuifuSotreResult">
<include refid="selectHuifuSotreVo"/>
where id = #{id}
</select>
<insert id="insertHuifuSotre" parameterType="HuifuSotre" useGeneratedKeys="true"
keyProperty="id">
insert into huifu_sotre
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="storeId != null">storeId,
</if>
<if test="huifuId != null">huifuId,
</if>
<if test="percentage != null">percentage,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="storeId != null">#{storeId},
</if>
<if test="huifuId != null">#{huifuId},
</if>
<if test="percentage != null">#{percentage},
</if>
</trim>
</insert>
<update id="updateHuifuSotre" parameterType="HuifuSotre">
update huifu_sotre
<trim prefix="SET" suffixOverrides=",">
<if test="storeId != null">storeId =
#{storeId},
</if>
<if test="huifuId != null">huifuId =
#{huifuId},
</if>
<if test="percentage != null">percentage =
#{percentage},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHuifuSotreById" parameterType="Long">
delete from huifu_sotre where id = #{id}
</delete>
<delete id="deleteHuifuSotreByIds" parameterType="String">
delete from huifu_sotre where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,468 @@
<?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.zhwl.store.mapper.ZdyStoreBaseInfoMapper">
<resultMap type="ZdyStoreBaseInfo" id="ZdyStoreBaseInfoResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="contactPhone" column="contact_phone"/>
<result property="businessStartHours" column="business_start_hours"/>
<result property="businessEndHours" column="business_end_hours"/>
<result property="businessDaysOnWeekly" column="business_days_on_weekly"/>
<result property="address" column="address"/>
<result property="latitude" column="latitude"/>
<result property="longitude" column="longitude"/>
<result property="images" column="images"/>
<result property="carouselImage" column="carousel_image"/>
<result property="contactName" column="contact_name"/>
<result property="registerType" column="register_type"/>
<result property="legalPersonName" column="legal_person_name"/>
<result property="legalPersonPhone" column="legal_person_phone"/>
<result property="facadeImages" column="facade_images"/>
<result property="businessLicense" column="business_license"/>
<result property="legalPersonIdCardFront" column="legal_person_id_card_front"/>
<result property="legalPersonIdCardBack" column="legal_person_id_card_back"/>
<result property="registerAuditStatus" column="register_audit_status"/>
<result property="registerAuditTime" column="register_audit_time"/>
<result property="registerAuditRejectionDesc" column="register_audit_rejection_desc"/>
<result property="registerAuditorId" column="register_auditor_id"/>
<result property="groundingStatus" column="grounding_status"/>
<result property="flags" column="flags"/>
<result property="deptId" column="dept_id"/>
<result property="lastUpdatedRegistrationTime" column="last_updated_registration_time"/>
<result property="adminId" column="admin_id"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
<sql id="selectZdyStoreBaseInfoVo">
select id,
name,
contact_phone,
business_start_hours,
business_end_hours,
business_days_on_weekly,
address,
latitude,
longitude,
images,
carousel_image,
contact_name,
register_type,
legal_person_name,
legal_person_phone,
facade_images,
business_license,
legal_person_id_card_front,
legal_person_id_card_back,
register_audit_status,
register_audit_time,
register_audit_rejection_desc,
register_auditor_id,
grounding_status,
flags,
dept_id,
last_updated_registration_time,
admin_id,
create_by,
create_time,
update_by,
update_time,
remark,
del_flag
from zdy_store_base_info
</sql>
<select id="selectZdyStoreBaseInfoList" parameterType="ZdyStoreBaseInfo" resultMap="ZdyStoreBaseInfoResult">
<include refid="selectZdyStoreBaseInfoVo"/>
<where>
del_flag = 0
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
<if test="contactPhone != null and contactPhone != ''">
and contact_phone = #{contactPhone}
</if>
<if test="businessStartHours != null ">
and business_start_hours = #{businessStartHours}
</if>
<if test="businessEndHours != null ">
and business_end_hours = #{businessEndHours}
</if>
<if test="businessDaysOnWeekly != null and businessDaysOnWeekly != ''">
and business_days_on_weekly = #{businessDaysOnWeekly}
</if>
<if test="address != null and address != ''">
and address = #{address}
</if>
<if test="latitude != null ">
and latitude = #{latitude}
</if>
<if test="longitude != null ">
and longitude = #{longitude}
</if>
<if test="images != null and images != ''">
and images = #{images}
</if>
<if test="carouselImage != null and carouselImage != ''">
and carousel_image = #{carouselImage}
</if>
<if test="contactName != null and contactName != ''">
and contact_name = #{contactName}
</if>
<if test="registerType != null and registerType != ''">
and register_type = #{registerType}
</if>
<if test="legalPersonName != null and legalPersonName != ''">
and legal_person_name like concat('%', #{legalPersonName}, '%')
</if>
<if test="legalPersonPhone != null and legalPersonPhone != ''">
and legal_person_phone = #{legalPersonPhone}
</if>
<if test="facadeImages != null and facadeImages != ''">
and facade_images = #{facadeImages}
</if>
<if test="businessLicense != null and businessLicense != ''">
and business_license = #{businessLicense}
</if>
<if test="legalPersonIdCardFront != null and legalPersonIdCardFront != ''">
and legal_person_id_card_front = #{legalPersonIdCardFront}
</if>
<if test="legalPersonIdCardBack != null and legalPersonIdCardBack != ''">
and legal_person_id_card_back = #{legalPersonIdCardBack}
</if>
<if test="registerAuditStatus != null and registerAuditStatus != ''">
and register_audit_status = #{registerAuditStatus}
</if>
<if test="registerAuditTime != null ">
and register_audit_time = #{registerAuditTime}
</if>
<if test="registerAuditRejectionDesc != null and registerAuditRejectionDesc != ''">
and register_audit_rejection_desc = #{registerAuditRejectionDesc}
</if>
<choose>
<when test="groundingStatusArray != null and groundingStatusArray.length != 0">
and grounding_status in
<foreach item="groundingStatus" collection="groundingStatusArray" open="(" separator="," close=")">
#{groundingStatus}
</foreach>
</when>
<otherwise>
<if test="groundingStatus != null and groundingStatus != ''">
and grounding_status = #{groundingStatus}
</if>
</otherwise>
</choose>
<if test="flags != null and flags != ''">
and flags = #{flags}
</if>
<if test="deptId != null">
and dept_id = #{deptId}
</if>
<if test="lastUpdatedRegistrationTime != null ">
and last_updated_registration_time = #{lastUpdatedRegistrationTime}
</if>
<if test="adminId != null ">
and admin_id = #{adminId}
</if>
</where>
</select>
<select id="selectZdyStoreBaseInfoById" parameterType="Long"
resultMap="ZdyStoreBaseInfoResult">
<include refid="selectZdyStoreBaseInfoVo"/>
where id = #{id}
</select>
<insert id="insertZdyStoreBaseInfo" parameterType="ZdyStoreBaseInfo" useGeneratedKeys="true"
keyProperty="id">
insert into zdy_store_base_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,
</if>
<if test="contactPhone != null and contactPhone != ''">contact_phone,
</if>
<if test="businessStartHours != null">business_start_hours,
</if>
<if test="businessEndHours != null">business_end_hours,
</if>
<if test="businessDaysOnWeekly != null">business_days_on_weekly,
</if>
<if test="address != null and address != ''">address,
</if>
<if test="latitude != null">latitude,
</if>
<if test="longitude != null">longitude,
</if>
<if test="images != null">images,
</if>
<if test="carouselImage != null">carousel_image,
</if>
<if test="contactName != null">contact_name,
</if>
<if test="registerType != null">register_type,
</if>
<if test="legalPersonName != null and legalPersonName != ''">legal_person_name,
</if>
<if test="legalPersonPhone != null and legalPersonPhone != ''">legal_person_phone,
</if>
<if test="facadeImages != null and facadeImages != ''">facade_images,
</if>
<if test="businessLicense != null and businessLicense != ''">business_license,
</if>
<if test="legalPersonIdCardFront != null">legal_person_id_card_front,
</if>
<if test="legalPersonIdCardBack != null">legal_person_id_card_back,
</if>
<if test="registerAuditStatus != null and registerAuditStatus != ''">register_audit_status,
</if>
<if test="registerAuditTime != null">register_audit_time,
</if>
<if test="registerAuditRejectionDesc != null">register_audit_rejection_desc,
</if>
<if test="registerAuditorId != null">register_auditor_id,
</if>
<if test="groundingStatus != null">grounding_status,
</if>
<if test="flags != null">flags,
</if>
<if test="deptId != null">dept_id,
</if>
<if test="lastUpdatedRegistrationTime != null">last_updated_registration_time,
</if>
<if test="adminId != null">admin_id,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
<if test="remark != null">remark,
</if>
<if test="delFlag != null">del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},
</if>
<if test="contactPhone != null and contactPhone != ''">#{contactPhone},
</if>
<if test="businessStartHours != null">#{businessStartHours},
</if>
<if test="businessEndHours != null">#{businessEndHours},
</if>
<if test="businessDaysOnWeekly != null">#{businessDaysOnWeekly},
</if>
<if test="address != null and address != ''">#{address},
</if>
<if test="latitude != null">#{latitude},
</if>
<if test="longitude != null">#{longitude},
</if>
<if test="images != null">#{images},
</if>
<if test="carouselImage != null">#{carouselImage},
</if>
<if test="contactName != null">#{contactName},
</if>
<if test="registerType != null">#{registerType},
</if>
<if test="legalPersonName != null and legalPersonName != ''">#{legalPersonName},
</if>
<if test="legalPersonPhone != null and legalPersonPhone != ''">#{legalPersonPhone},
</if>
<if test="facadeImages != null and facadeImages != ''">#{facadeImages},
</if>
<if test="businessLicense != null and businessLicense != ''">#{businessLicense},
</if>
<if test="legalPersonIdCardFront != null">#{legalPersonIdCardFront},
</if>
<if test="legalPersonIdCardBack != null">#{legalPersonIdCardBack},
</if>
<if test="registerAuditStatus != null and registerAuditStatus != ''">#{registerAuditStatus},
</if>
<if test="registerAuditTime != null">#{registerAuditTime},
</if>
<if test="registerAuditRejectionDesc != null">#{registerAuditRejectionDesc},
</if>
<if test="registerAuditorId != null">#{registerAuditorId},
</if>
<if test="groundingStatus != null">#{groundingStatus},
</if>
<if test="flags != null">#{flags},
</if>
<if test="deptId != null">#{deptId},
</if>
<if test="lastUpdatedRegistrationTime != null">#{lastUpdatedRegistrationTime},
</if>
<if test="adminId != null">#{adminId},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
<if test="remark != null">#{remark},
</if>
<if test="delFlag != null">#{delFlag},
</if>
</trim>
</insert>
<update id="updateZdyStoreBaseInfo" parameterType="ZdyStoreBaseInfo">
update zdy_store_base_info
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name =
#{name},
</if>
<if test="contactPhone != null and contactPhone != ''">contact_phone =
#{contactPhone},
</if>
<if test="businessStartHours != null">business_start_hours =
#{businessStartHours},
</if>
<if test="businessEndHours != null">business_end_hours =
#{businessEndHours},
</if>
<if test="businessDaysOnWeekly != null">business_days_on_weekly =
#{businessDaysOnWeekly},
</if>
<if test="address != null and address != ''">address =
#{address},
</if>
<if test="latitude != null">latitude =
#{latitude},
</if>
<if test="longitude != null">longitude =
#{longitude},
</if>
<if test="images != null">images =
#{images},
</if>
<if test="carouselImage != null">carousel_image =
#{carouselImage},
</if>
<if test="contactName != null">contact_name =
#{contactName},
</if>
<if test="registerType != null">register_type =
#{registerType},
</if>
<if test="legalPersonName != null and legalPersonName != ''">legal_person_name =
#{legalPersonName},
</if>
<if test="legalPersonPhone != null and legalPersonPhone != ''">legal_person_phone =
#{legalPersonPhone},
</if>
<if test="facadeImages != null and facadeImages != ''">facade_images =
#{facadeImages},
</if>
<if test="businessLicense != null and businessLicense != ''">business_license =
#{businessLicense},
</if>
<if test="legalPersonIdCardFront != null">legal_person_id_card_front =
#{legalPersonIdCardFront},
</if>
<if test="legalPersonIdCardBack != null">legal_person_id_card_back =
#{legalPersonIdCardBack},
</if>
<if test="registerAuditStatus != null and registerAuditStatus != ''">register_audit_status =
#{registerAuditStatus},
</if>
<if test="registerAuditTime != null">register_audit_time =
#{registerAuditTime},
</if>
<if test="registerAuditRejectionDesc != null">register_audit_rejection_desc =
#{registerAuditRejectionDesc},
</if>
<if test="registerAuditorId != null">register_auditor_id =
#{registerAuditorId},
</if>
<if test="groundingStatus != null">grounding_status =
#{groundingStatus},
</if>
<if test="flags != null">flags =
#{flags},
</if>
<if test="deptId != null">dept_id =
#{deptId},
</if>
<if test="lastUpdatedRegistrationTime != null">last_updated_registration_time =
#{lastUpdatedRegistrationTime},
</if>
<if test="adminId != null">admin_id =
#{adminId},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
<if test="remark != null">remark =
#{remark},
</if>
<if test="delFlag != null">del_flag =
#{delFlag},
</if>
</trim>
where id = #{id}
</update>
<update id="deleteZdyStoreBaseInfoById" parameterType="Long">
update zdy_store_base_info
set del_flag = 1
where id = #{id}
</update>
<update id="deleteZdyStoreBaseInfoByIds">
update zdy_store_base_info
set del_flag = 1
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<select id="checkNameUnique" parameterType="ZdyStoreBaseInfo" resultType="java.lang.Integer">
select exists(
select 1 from zdy_store_base_info where name = #{name} and del_flag = 0
<if test="id != null">
and id != #{id}
</if>
)
</select>
<select id="getByAdminIdAndRegisterType" parameterType="ZdyStoreBaseInfo" resultMap="ZdyStoreBaseInfoResult">
<include refid="selectZdyStoreBaseInfoVo"/>
where admin_id = #{adminId}
and register_type = #{registerType}
and del_flag = #{delFlag}
</select>
<select id="selectZdyStoreBaseInfoByIds" resultMap="ZdyStoreBaseInfoResult">
<include refid="selectZdyStoreBaseInfoVo"/>
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>