运营商初版
This commit is contained in:
@ -0,0 +1,267 @@
|
||||
<?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.CompanyMapper">
|
||||
|
||||
<resultMap type="Company" id="CompanyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="companyName" column="company_name" />
|
||||
<result property="contactName" column="contact_name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="address" column="address" />
|
||||
<result property="balance" column="balance" />
|
||||
<result property="deposit" column="deposit" />
|
||||
<result property="type" column="type" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
<result property="allowSplitBill" column="allow_split_bill" />
|
||||
<result property="maxPercentage" column="max_percentage" />
|
||||
<result property="isAddRules" column="is_add_rules" />
|
||||
<result property="sharingRatio" column="sharing_ratio" />
|
||||
<result property="wechatPayModel" column="wechat_pay_model" />
|
||||
<result property="wechatReceivingAccount" column="wechat_receiving_account" />
|
||||
<result property="wechatKey" column="wechat_key" />
|
||||
<result property="chargeMode" column="charge_mode" />
|
||||
<result property="chargeParam" column="charge_param" />
|
||||
<result property="allowChange" column="allow_change" />
|
||||
<result property="channelId" column="channel_id" />
|
||||
<result property="citys" column="citys" />
|
||||
<result property="aliPayModel" column="ali_pay_model" />
|
||||
<result property="aliReceivingAccount" column="ali_receiving_account" />
|
||||
<result property="aliKey" column="ali_key" />
|
||||
<result property="serviceOrderType" column="service_order_type" />
|
||||
<result property="splitOrderType" column="split_order_type" />
|
||||
<result property="wechatBalance" column="wechat_balance" />
|
||||
<result property="alipayBalance" column="alipay_balance" />
|
||||
<result property="inviteRewardMode" column="invite_reward_mode" />
|
||||
<result property="inviteRewardParam" column="invite_reward_param" />
|
||||
<result property="rewardType" column="reward_type" />
|
||||
<result property="rewardParam" column="reward_param" />
|
||||
<result property="isReservation" column="is_reservation" />
|
||||
<result property="reservationDuration" column="reservation_duration" />
|
||||
<result property="reservationNumber" column="reservation_number" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<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="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="selectCompanyVo">
|
||||
select id, company_name, contact_name, phone, address, balance, deposit, type, is_delete, allow_split_bill, max_percentage, is_add_rules, sharing_ratio, wechat_pay_model, wechat_receiving_account, wechat_key, charge_mode, charge_param, allow_change, channel_id, citys, ali_pay_model, ali_receiving_account, ali_key, service_order_type, split_order_type, wechat_balance, alipay_balance, invite_reward_mode, invite_reward_param, reward_type, reward_param, is_reservation, reservation_duration, reservation_number, status, del_flag, create_by, create_time, update_by, update_time, extend1, extend2, extend3, extend4, extend5 from company
|
||||
</sql>
|
||||
|
||||
<select id="selectCompanyList" parameterType="Company" resultMap="CompanyResult">
|
||||
<include refid="selectCompanyVo"/>
|
||||
<where>
|
||||
<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>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="balance != null "> and balance = #{balance}</if>
|
||||
<if test="deposit != null "> and deposit = #{deposit}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
|
||||
<if test="allowSplitBill != null "> and allow_split_bill = #{allowSplitBill}</if>
|
||||
<if test="maxPercentage != null "> and max_percentage = #{maxPercentage}</if>
|
||||
<if test="isAddRules != null and isAddRules != ''"> and is_add_rules = #{isAddRules}</if>
|
||||
<if test="sharingRatio != null "> and sharing_ratio = #{sharingRatio}</if>
|
||||
<if test="wechatPayModel != null and wechatPayModel != ''"> and wechat_pay_model = #{wechatPayModel}</if>
|
||||
<if test="wechatReceivingAccount != null and wechatReceivingAccount != ''"> and wechat_receiving_account = #{wechatReceivingAccount}</if>
|
||||
<if test="wechatKey != null and wechatKey != ''"> and wechat_key = #{wechatKey}</if>
|
||||
<if test="chargeMode != null "> and charge_mode = #{chargeMode}</if>
|
||||
<if test="chargeParam != null "> and charge_param = #{chargeParam}</if>
|
||||
<if test="allowChange != null "> and allow_change = #{allowChange}</if>
|
||||
<if test="channelId != null "> and channel_id = #{channelId}</if>
|
||||
<if test="citys != null and citys != ''"> and citys = #{citys}</if>
|
||||
<if test="aliPayModel != null "> and ali_pay_model = #{aliPayModel}</if>
|
||||
<if test="aliReceivingAccount != null and aliReceivingAccount != ''"> and ali_receiving_account = #{aliReceivingAccount}</if>
|
||||
<if test="aliKey != null and aliKey != ''"> and ali_key = #{aliKey}</if>
|
||||
<if test="serviceOrderType != null and serviceOrderType != ''"> and service_order_type = #{serviceOrderType}</if>
|
||||
<if test="splitOrderType != null and splitOrderType != ''"> and split_order_type = #{splitOrderType}</if>
|
||||
<if test="wechatBalance != null "> and wechat_balance = #{wechatBalance}</if>
|
||||
<if test="alipayBalance != null "> and alipay_balance = #{alipayBalance}</if>
|
||||
<if test="inviteRewardMode != null "> and invite_reward_mode = #{inviteRewardMode}</if>
|
||||
<if test="inviteRewardParam != null "> and invite_reward_param = #{inviteRewardParam}</if>
|
||||
<if test="rewardType != null "> and reward_type = #{rewardType}</if>
|
||||
<if test="rewardParam != null "> and reward_param = #{rewardParam}</if>
|
||||
<if test="isReservation != null "> and is_reservation = #{isReservation}</if>
|
||||
<if test="reservationDuration != null "> and reservation_duration = #{reservationDuration}</if>
|
||||
<if test="reservationNumber != null "> and reservation_number = #{reservationNumber}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCompanyById" parameterType="Long" resultMap="CompanyResult">
|
||||
<include refid="selectCompanyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCompany" parameterType="Company" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into company
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="companyName != null and companyName != ''">company_name,</if>
|
||||
<if test="contactName != null">contact_name,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="balance != null">balance,</if>
|
||||
<if test="deposit != null">deposit,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="allowSplitBill != null">allow_split_bill,</if>
|
||||
<if test="maxPercentage != null">max_percentage,</if>
|
||||
<if test="isAddRules != null and isAddRules != ''">is_add_rules,</if>
|
||||
<if test="sharingRatio != null">sharing_ratio,</if>
|
||||
<if test="wechatPayModel != null and wechatPayModel != ''">wechat_pay_model,</if>
|
||||
<if test="wechatReceivingAccount != null and wechatReceivingAccount != ''">wechat_receiving_account,</if>
|
||||
<if test="wechatKey != null and wechatKey != ''">wechat_key,</if>
|
||||
<if test="chargeMode != null">charge_mode,</if>
|
||||
<if test="chargeParam != null">charge_param,</if>
|
||||
<if test="allowChange != null">allow_change,</if>
|
||||
<if test="channelId != null">channel_id,</if>
|
||||
<if test="citys != null">citys,</if>
|
||||
<if test="aliPayModel != null">ali_pay_model,</if>
|
||||
<if test="aliReceivingAccount != null and aliReceivingAccount != ''">ali_receiving_account,</if>
|
||||
<if test="aliKey != null and aliKey != ''">ali_key,</if>
|
||||
<if test="serviceOrderType != null">service_order_type,</if>
|
||||
<if test="splitOrderType != null">split_order_type,</if>
|
||||
<if test="wechatBalance != null">wechat_balance,</if>
|
||||
<if test="alipayBalance != null">alipay_balance,</if>
|
||||
<if test="inviteRewardMode != null">invite_reward_mode,</if>
|
||||
<if test="inviteRewardParam != null">invite_reward_param,</if>
|
||||
<if test="rewardType != null">reward_type,</if>
|
||||
<if test="rewardParam != null">reward_param,</if>
|
||||
<if test="isReservation != null">is_reservation,</if>
|
||||
<if test="reservationDuration != null">reservation_duration,</if>
|
||||
<if test="reservationNumber != null">reservation_number,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="delFlag != null">del_flag,</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="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="companyName != null and companyName != ''">#{companyName},</if>
|
||||
<if test="contactName != null">#{contactName},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="balance != null">#{balance},</if>
|
||||
<if test="deposit != null">#{deposit},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="allowSplitBill != null">#{allowSplitBill},</if>
|
||||
<if test="maxPercentage != null">#{maxPercentage},</if>
|
||||
<if test="isAddRules != null and isAddRules != ''">#{isAddRules},</if>
|
||||
<if test="sharingRatio != null">#{sharingRatio},</if>
|
||||
<if test="wechatPayModel != null and wechatPayModel != ''">#{wechatPayModel},</if>
|
||||
<if test="wechatReceivingAccount != null and wechatReceivingAccount != ''">#{wechatReceivingAccount},</if>
|
||||
<if test="wechatKey != null and wechatKey != ''">#{wechatKey},</if>
|
||||
<if test="chargeMode != null">#{chargeMode},</if>
|
||||
<if test="chargeParam != null">#{chargeParam},</if>
|
||||
<if test="allowChange != null">#{allowChange},</if>
|
||||
<if test="channelId != null">#{channelId},</if>
|
||||
<if test="citys != null">#{citys},</if>
|
||||
<if test="aliPayModel != null">#{aliPayModel},</if>
|
||||
<if test="aliReceivingAccount != null and aliReceivingAccount != ''">#{aliReceivingAccount},</if>
|
||||
<if test="aliKey != null and aliKey != ''">#{aliKey},</if>
|
||||
<if test="serviceOrderType != null">#{serviceOrderType},</if>
|
||||
<if test="splitOrderType != null">#{splitOrderType},</if>
|
||||
<if test="wechatBalance != null">#{wechatBalance},</if>
|
||||
<if test="alipayBalance != null">#{alipayBalance},</if>
|
||||
<if test="inviteRewardMode != null">#{inviteRewardMode},</if>
|
||||
<if test="inviteRewardParam != null">#{inviteRewardParam},</if>
|
||||
<if test="rewardType != null">#{rewardType},</if>
|
||||
<if test="rewardParam != null">#{rewardParam},</if>
|
||||
<if test="isReservation != null">#{isReservation},</if>
|
||||
<if test="reservationDuration != null">#{reservationDuration},</if>
|
||||
<if test="reservationNumber != null">#{reservationNumber},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="delFlag != null">#{delFlag},</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="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="updateCompany" parameterType="Company">
|
||||
update company
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="companyName != null and companyName != ''">company_name = #{companyName},</if>
|
||||
<if test="contactName != null">contact_name = #{contactName},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="balance != null">balance = #{balance},</if>
|
||||
<if test="deposit != null">deposit = #{deposit},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="allowSplitBill != null">allow_split_bill = #{allowSplitBill},</if>
|
||||
<if test="maxPercentage != null">max_percentage = #{maxPercentage},</if>
|
||||
<if test="isAddRules != null and isAddRules != ''">is_add_rules = #{isAddRules},</if>
|
||||
<if test="sharingRatio != null">sharing_ratio = #{sharingRatio},</if>
|
||||
<if test="wechatPayModel != null and wechatPayModel != ''">wechat_pay_model = #{wechatPayModel},</if>
|
||||
<if test="wechatReceivingAccount != null and wechatReceivingAccount != ''">wechat_receiving_account = #{wechatReceivingAccount},</if>
|
||||
<if test="wechatKey != null and wechatKey != ''">wechat_key = #{wechatKey},</if>
|
||||
<if test="chargeMode != null">charge_mode = #{chargeMode},</if>
|
||||
<if test="chargeParam != null">charge_param = #{chargeParam},</if>
|
||||
<if test="allowChange != null">allow_change = #{allowChange},</if>
|
||||
<if test="channelId != null">channel_id = #{channelId},</if>
|
||||
<if test="citys != null">citys = #{citys},</if>
|
||||
<if test="aliPayModel != null">ali_pay_model = #{aliPayModel},</if>
|
||||
<if test="aliReceivingAccount != null and aliReceivingAccount != ''">ali_receiving_account = #{aliReceivingAccount},</if>
|
||||
<if test="aliKey != null and aliKey != ''">ali_key = #{aliKey},</if>
|
||||
<if test="serviceOrderType != null">service_order_type = #{serviceOrderType},</if>
|
||||
<if test="splitOrderType != null">split_order_type = #{splitOrderType},</if>
|
||||
<if test="wechatBalance != null">wechat_balance = #{wechatBalance},</if>
|
||||
<if test="alipayBalance != null">alipay_balance = #{alipayBalance},</if>
|
||||
<if test="inviteRewardMode != null">invite_reward_mode = #{inviteRewardMode},</if>
|
||||
<if test="inviteRewardParam != null">invite_reward_param = #{inviteRewardParam},</if>
|
||||
<if test="rewardType != null">reward_type = #{rewardType},</if>
|
||||
<if test="rewardParam != null">reward_param = #{rewardParam},</if>
|
||||
<if test="isReservation != null">is_reservation = #{isReservation},</if>
|
||||
<if test="reservationDuration != null">reservation_duration = #{reservationDuration},</if>
|
||||
<if test="reservationNumber != null">reservation_number = #{reservationNumber},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</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="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="deleteCompanyById" parameterType="Long">
|
||||
delete from company where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCompanyByIds" parameterType="String">
|
||||
delete from company where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user