You've already forked FrameTour-BE
价格配置
This commit is contained in:
@ -70,9 +70,6 @@ wx:
|
||||
miniProgramSecret: 5252fbbc68513bc77b7cc0052b9f9695
|
||||
# 申请openid授权
|
||||
grandType: authorization_code
|
||||
# 推送模板
|
||||
push:
|
||||
templateId: 5b8vTm7kvwYubqDxb3dxBqFIhc3Swt5l7QHSK5r-ZRI
|
||||
# 商户号
|
||||
mchId: 1700540331
|
||||
# 商户证书序列号
|
||||
|
59
src/main/resources/mapper/PriceConfigMapper.xml
Normal file
59
src/main/resources/mapper/PriceConfigMapper.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?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.ycwl.basic.mapper.PriceConfigMapper">
|
||||
|
||||
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into price_config (scenic_id, type, goods_ids, price, slash_price, create_time, update_time)
|
||||
values (#{scenicId}, #{type}, #{goodsIds}, #{price}, #{slashPrice}, now(), now())
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update price_config
|
||||
<set>
|
||||
<if test="scenicId != null">scenic_id = #{scenicId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="goodsIds != null">goods_ids = #{goodsIds},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="slashPrice != null">slash_price = #{slashPrice},</if>
|
||||
update_time = now()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
delete from price_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.price.resp.PriceConfigRespVO">
|
||||
select p.*, s.name as scenic_name from price_config p
|
||||
left join scenic s on s.id = p.scenic_id
|
||||
where p.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="listByCondition" resultType="com.ycwl.basic.model.pc.price.resp.PriceConfigRespVO">
|
||||
select p.*, s.name as scenic_name from price_config p
|
||||
left join scenic s on s.id = p.scenic_id
|
||||
<where>
|
||||
<if test="req.scenicId != null">
|
||||
and p.scenic_id = #{req.scenicId}
|
||||
</if>
|
||||
<if test="req.type != null">
|
||||
and p.type = #{req.type}
|
||||
</if>
|
||||
<if test="req.goodsId != null">
|
||||
and p.goods_ids like concat('%', #{req.goodsId}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getPriceByScenicTypeGoods" resultType="com.ycwl.basic.model.pc.price.entity.PriceConfigEntity">
|
||||
select * from price_config
|
||||
where scenic_id = #{scenicId}
|
||||
and type = #{type}
|
||||
<if test="goodsId != null">
|
||||
and goods_ids like concat('%', #{goodsId}, '%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user