门店管理;运营商和门店增加数据权限控制
This commit is contained in:
@ -60,7 +60,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectCompanyList" parameterType="Company" resultMap="CompanyResult">
|
||||
<include refid="selectCompanyVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id}</if>
|
||||
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
||||
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
|
||||
@ -0,0 +1,298 @@
|
||||
<?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.ruoyi.operation.mapper.CompanyStoreMapper">
|
||||
|
||||
<resultMap type="CompanyStore" id="CompanyStoreResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="contactPerson" column="contact_person" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="contactPerson2" column="contact_person2" />
|
||||
<result property="phone2" column="phone2" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="provinceName" column="province_name" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="cityName" column="city_name" />
|
||||
<result property="areaId" column="area_id" />
|
||||
<result property="areaName" column="area_name" />
|
||||
<result property="address" column="address" />
|
||||
<result property="detailedAddress" column="detailed_address" />
|
||||
<result property="image" column="image" />
|
||||
<result property="latitude" column="latitude" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="contractDate" column="contract_date" />
|
||||
<result property="dayTime" column="day_time" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="isShow" column="is_show" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="zucheRatio" column="zuche_ratio" />
|
||||
<result property="zudianRatio" column="zudian_ratio" />
|
||||
<result property="daishouRatio" column="daishou_ratio" />
|
||||
<result property="label" column="label" />
|
||||
<result property="operatingCompanyId" column="operating_company_id" />
|
||||
<result property="operatingCompanyName" column="operating_company_name" />
|
||||
<result property="operatingNature" column="operating_nature" />
|
||||
<result property="introduction" column="introduction" />
|
||||
<result property="bankAccount" column="bank_account" />
|
||||
<result property="storeNumber" column="store_number" />
|
||||
<result property="businessLicenseImg" column="business_license_img" />
|
||||
<result property="auditStatus" column="audit_status" />
|
||||
<result property="auditTime" column="audit_time" />
|
||||
<result property="auditorId" column="auditor_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="isReturnAllowed" column="is_return_allowed" />
|
||||
<result property="mealDepositPrice" column="meal_deposit_price" />
|
||||
<result property="orderNumLimit" column="order_num_limit" />
|
||||
<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="delFlag" column="del_flag" />
|
||||
<result property="status" column="status" />
|
||||
<result property="extend1" column="extend1" />
|
||||
<result property="extend2" column="extend2" />
|
||||
<result property="extend3" column="extend3" />
|
||||
<result property="extend4" column="extend4" />
|
||||
<result property="extend5" column="extend5" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCompanyStoreVo">
|
||||
select id, name, contact_person, phone, province_id, province_name, city_id, city_name, area_id, area_name, address, detailed_address, image, latitude, longitude, contract_date, day_time, start_time, end_time, is_show, is_del, zuche_ratio, zudian_ratio, daishou_ratio, label, operating_company_id, operating_nature, introduction, bank_account, store_number, business_license_img, audit_status, audit_time, auditor_id, user_id, is_return_allowed, meal_deposit_price, order_num_limit, create_by, create_time, update_by, update_time, del_flag, status, extend1, extend2, extend3, extend4, extend5 from company_store
|
||||
</sql>
|
||||
|
||||
<select id="selectCompanyStoreList" parameterType="CompanyStore" resultMap="CompanyStoreResult">
|
||||
select cs.id, cs.name, cs.contact_person, cs.phone, cs.province_id, cs.province_name, cs.city_id, cs.city_name, cs.area_id, cs.area_name, cs.address, cs.detailed_address, cs.image, cs.latitude, cs.longitude, cs.contract_date, cs.day_time, cs.start_time, cs.end_time, cs.is_show, cs.is_del, cs.zuche_ratio, cs.zudian_ratio, cs.daishou_ratio, cs.label, cs.operating_company_id, cs.operating_nature, cs.introduction, cs.bank_account, cs.store_number, cs.business_license_img, cs.audit_status, cs.audit_time, cs.auditor_id, cs.user_id, cs.is_return_allowed, cs.meal_deposit_price, cs.order_num_limit, cs.create_by, cs.create_time, cs.update_by, cs.update_time, cs.del_flag, cs.status, cs.extend1, cs.extend2, cs.extend3, cs.extend4, cs.extend5
|
||||
,c.company_name as operating_company_name
|
||||
from company_store cs
|
||||
left join company c on c.id = cs.operating_company_id
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and cs.name like concat('%', #{name}, '%')</if>
|
||||
<if test="contactPerson != null and contactPerson != ''"> and cs.contact_person = #{contactPerson}</if>
|
||||
<if test="phone != null and phone != ''"> and cs.phone = #{phone}</if>
|
||||
<if test="provinceId != null "> and cs.province_id = #{provinceId}</if>
|
||||
<if test="provinceName != null "> and cs.province_name like concat('%', #{provinceName}, '%')</if>
|
||||
<if test="cityId != null "> and cs.city_id = #{cityId}</if>
|
||||
<if test="cityName != null "> and cs.city_name like concat('%', #{cityName}, '%')</if>
|
||||
<if test="areaId != null "> and cs.area_id = #{areaId}</if>
|
||||
<if test="areaName != null "> and cs.area_name like concat('%', #{areaName}, '%')</if>
|
||||
<if test="address != null and address != ''"> and cs.address = #{address}</if>
|
||||
<if test="detailedAddress != null and detailedAddress != ''"> and cs.detailed_address = #{detailedAddress}</if>
|
||||
<if test="image != null and image != ''"> and cs.image = #{image}</if>
|
||||
<if test="latitude != null and latitude != ''"> and cs.latitude = #{latitude}</if>
|
||||
<if test="longitude != null and longitude != ''"> and cs.longitude = #{longitude}</if>
|
||||
<if test="contractDate != null and contractDate != ''"> and cs.contract_date = #{contractDate}</if>
|
||||
<if test="dayTime != null and dayTime != ''"> and cs.day_time = #{dayTime}</if>
|
||||
<if test="startTime != null and startTime != ''"> and cs.start_time = #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and cs.end_time = #{endTime}</if>
|
||||
<if test="isShow != null "> and cs.is_show = #{isShow}</if>
|
||||
<if test="isDel != null "> and cs.is_del = #{isDel}</if>
|
||||
<if test="zucheRatio != null "> and cs.zuche_ratio = #{zucheRatio}</if>
|
||||
<if test="zudianRatio != null "> and cs.zudian_ratio = #{zudianRatio}</if>
|
||||
<if test="daishouRatio != null "> and cs.daishou_ratio = #{daishouRatio}</if>
|
||||
<if test="label != null and label != ''"> and cs.label = #{label}</if>
|
||||
<if test="operatingCompanyId != null "> and cs.operating_company_id = #{operatingCompanyId}</if>
|
||||
<if test="operatingNature != null "> and cs.operating_nature = #{operatingNature}</if>
|
||||
<if test="introduction != null and introduction != ''"> and cs.introduction = #{introduction}</if>
|
||||
<if test="bankAccount != null and bankAccount != ''"> and cs.bank_account = #{bankAccount}</if>
|
||||
<if test="storeNumber != null and storeNumber != ''"> and cs.store_number = #{storeNumber}</if>
|
||||
<if test="businessLicenseImg != null and businessLicenseImg != ''"> and cs.business_license_img = #{businessLicenseImg}</if>
|
||||
<if test="auditStatus != null "> and cs.audit_status = #{auditStatus}</if>
|
||||
<if test="auditTime != null "> and cs.audit_time = #{auditTime}</if>
|
||||
<if test="auditorId != null "> and cs.auditor_id = #{auditorId}</if>
|
||||
<if test="userId != null "> and cs.user_id = #{userId}</if>
|
||||
<if test="isReturnAllowed != null "> and cs.is_return_allowed = #{isReturnAllowed}</if>
|
||||
<if test="mealDepositPrice != null "> and cs.meal_deposit_price = #{mealDepositPrice}</if>
|
||||
<if test="status != null and status != ''"> and cs.status = #{status}</if>
|
||||
<if test="extend1 != null and extend1 != ''"> and cs.extend1 = #{extend1}</if>
|
||||
<if test="extend2 != null and extend2 != ''"> and cs.extend2 = #{extend2}</if>
|
||||
<if test="extend3 != null and extend3 != ''"> and cs.extend3 = #{extend3}</if>
|
||||
<if test="extend4 != null and extend4 != ''"> and cs.extend4 = #{extend4}</if>
|
||||
<if test="extend5 != null and extend5 != ''"> and cs.extend5 = #{extend5}</if>
|
||||
</where>
|
||||
order by cs.create_time desc
|
||||
</select>
|
||||
<select id="selectCompanyStoreById" parameterType="Long" resultMap="CompanyStoreResult">
|
||||
<include refid="selectCompanyStoreVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCompanyStore" parameterType="CompanyStore" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into company_store
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="contactPerson != null and contactPerson != ''">contact_person,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="contactPerson2 != null and contactPerson2 != ''">contact_person2,</if>
|
||||
<if test="phone2 != null and phone2 != ''">phone2,</if>
|
||||
<if test="provinceId != null">province_id,</if>
|
||||
<if test="provinceName != null">province_name,</if>
|
||||
<if test="cityId != null">city_id,</if>
|
||||
<if test="cityName != null">city_name,</if>
|
||||
<if test="areaId != null">area_id,</if>
|
||||
<if test="areaName != null">area_name,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="detailedAddress != null and detailedAddress != ''">detailed_address,</if>
|
||||
<if test="image != null">image,</if>
|
||||
<if test="latitude != null and latitude != ''">latitude,</if>
|
||||
<if test="longitude != null and longitude != ''">longitude,</if>
|
||||
<if test="contractDate != null">contract_date,</if>
|
||||
<if test="dayTime != null">day_time,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="isShow != null">is_show,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="zucheRatio != null">zuche_ratio,</if>
|
||||
<if test="zudianRatio != null">zudian_ratio,</if>
|
||||
<if test="daishouRatio != null">daishou_ratio,</if>
|
||||
<if test="label != null and label != ''">label,</if>
|
||||
<if test="operatingCompanyId != null">operating_company_id,</if>
|
||||
<if test="operatingNature != null">operating_nature,</if>
|
||||
<if test="introduction != null and introduction != ''">introduction,</if>
|
||||
<if test="bankAccount != null and bankAccount != ''">bank_account,</if>
|
||||
<if test="storeNumber != null and storeNumber != ''">store_number,</if>
|
||||
<if test="businessLicenseImg != null and businessLicenseImg != ''">business_license_img,</if>
|
||||
<if test="auditStatus != null">audit_status,</if>
|
||||
<if test="auditTime != null">audit_time,</if>
|
||||
<if test="auditorId != null">auditor_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="isReturnAllowed != null">is_return_allowed,</if>
|
||||
<if test="mealDepositPrice != null">meal_deposit_price,</if>
|
||||
<if test="orderNumLimit != null">order_num_limit,</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="delFlag != null">del_flag,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="extend1 != null">extend1,</if>
|
||||
<if test="extend2 != null">extend2,</if>
|
||||
<if test="extend3 != null">extend3,</if>
|
||||
<if test="extend4 != null">extend4,</if>
|
||||
<if test="extend5 != null">extend5,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="contactPerson != null and contactPerson != ''">#{contactPerson},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="contactPerson != null and contactPerson2 != ''">#{contactPerson2},</if>
|
||||
<if test="phone2 != null and phone2 != ''">#{phone2},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="provinceName != null">#{provinceName},</if>
|
||||
<if test="cityId != null">#{cityId},</if>
|
||||
<if test="cityName != null">#{cityName},</if>
|
||||
<if test="areaId != null">#{areaId},</if>
|
||||
<if test="areaName != null">#{areaName},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="detailedAddress != null and detailedAddress != ''">#{detailedAddress},</if>
|
||||
<if test="image != null">#{image},</if>
|
||||
<if test="latitude != null and latitude != ''">#{latitude},</if>
|
||||
<if test="longitude != null and longitude != ''">#{longitude},</if>
|
||||
<if test="contractDate != null">#{contractDate},</if>
|
||||
<if test="dayTime != null">#{dayTime},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="isShow != null">#{isShow},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="zucheRatio != null">#{zucheRatio},</if>
|
||||
<if test="zudianRatio != null">#{zudianRatio},</if>
|
||||
<if test="daishouRatio != null">#{daishouRatio},</if>
|
||||
<if test="label != null and label != ''">#{label},</if>
|
||||
<if test="operatingCompanyId != null">#{operatingCompanyId},</if>
|
||||
<if test="operatingNature != null">#{operatingNature},</if>
|
||||
<if test="introduction != null and introduction != ''">#{introduction},</if>
|
||||
<if test="bankAccount != null and bankAccount != ''">#{bankAccount},</if>
|
||||
<if test="storeNumber != null and storeNumber != ''">#{storeNumber},</if>
|
||||
<if test="businessLicenseImg != null and businessLicenseImg != ''">#{businessLicenseImg},</if>
|
||||
<if test="auditStatus != null">#{auditStatus},</if>
|
||||
<if test="auditTime != null">#{auditTime},</if>
|
||||
<if test="auditorId != null">#{auditorId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="isReturnAllowed != null">#{isReturnAllowed},</if>
|
||||
<if test="mealDepositPrice != null">#{mealDepositPrice},</if>
|
||||
<if test="orderNumLimit != null">#{orderNumLimit},</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="delFlag != null">#{delFlag},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="extend1 != null">#{extend1},</if>
|
||||
<if test="extend2 != null">#{extend2},</if>
|
||||
<if test="extend3 != null">#{extend3},</if>
|
||||
<if test="extend4 != null">#{extend4},</if>
|
||||
<if test="extend5 != null">#{extend5},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCompanyStore" parameterType="CompanyStore">
|
||||
update company_store
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="contactPerson != null and contactPerson != ''">contact_person = #{contactPerson},</if>
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="contactPerson2 != null and contactPerson2 != ''">contact_person2 = #{contactPerson2},</if>
|
||||
<if test="phone2 != null and phone2 != ''">phone2 = #{phone2},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="provinceName != null">province_name = #{provinceName},</if>
|
||||
<if test="cityId != null">city_id = #{cityId},</if>
|
||||
<if test="cityName != null">city_name = #{cityName},</if>
|
||||
<if test="areaId != null">area_id = #{areaId},</if>
|
||||
<if test="areaName != null">area_name = #{areaName},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="detailedAddress != null and detailedAddress != ''">detailed_address = #{detailedAddress},</if>
|
||||
<if test="image != null">image = #{image},</if>
|
||||
<if test="latitude != null and latitude != ''">latitude = #{latitude},</if>
|
||||
<if test="longitude != null and longitude != ''">longitude = #{longitude},</if>
|
||||
<if test="contractDate != null">contract_date = #{contractDate},</if>
|
||||
<if test="dayTime != null">day_time = #{dayTime},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="isShow != null">is_show = #{isShow},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="zucheRatio != null">zuche_ratio = #{zucheRatio},</if>
|
||||
<if test="zudianRatio != null">zudian_ratio = #{zudianRatio},</if>
|
||||
<if test="daishouRatio != null">daishou_ratio = #{daishouRatio},</if>
|
||||
<if test="label != null and label != ''">label = #{label},</if>
|
||||
<if test="operatingCompanyId != null">operating_company_id = #{operatingCompanyId},</if>
|
||||
<if test="operatingNature != null">operating_nature = #{operatingNature},</if>
|
||||
<if test="introduction != null and introduction != ''">introduction = #{introduction},</if>
|
||||
<if test="bankAccount != null and bankAccount != ''">bank_account = #{bankAccount},</if>
|
||||
<if test="storeNumber != null and storeNumber != ''">store_number = #{storeNumber},</if>
|
||||
<if test="businessLicenseImg != null and businessLicenseImg != ''">business_license_img = #{businessLicenseImg},</if>
|
||||
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
||||
<if test="auditTime != null">audit_time = #{auditTime},</if>
|
||||
<if test="auditorId != null">auditor_id = #{auditorId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="isReturnAllowed != null">is_return_allowed = #{isReturnAllowed},</if>
|
||||
<if test="mealDepositPrice != null">meal_deposit_price = #{mealDepositPrice},</if>
|
||||
<if test="orderNumLimit != null">order_num_limit = #{orderNumLimit},</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="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="extend1 != null">extend1 = #{extend1},</if>
|
||||
<if test="extend2 != null">extend2 = #{extend2},</if>
|
||||
<if test="extend3 != null">extend3 = #{extend3},</if>
|
||||
<if test="extend4 != null">extend4 = #{extend4},</if>
|
||||
<if test="extend5 != null">extend5 = #{extend5},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCompanyStoreById" parameterType="Long">
|
||||
delete from company_store where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCompanyStoreByIds" parameterType="String">
|
||||
delete from company_store where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user