sadjv3_java/src/main/resources/mapper/bl/massage/MassagePackageDao.xml

53 lines
2.2 KiB
XML

<?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.sqx.modules.bl.massage.dao.MassagePackageDao">
<select id="findPage" resultType="com.sqx.modules.bl.massage.entity.MassagePackage">
select *
from bl_massage_package m
where 1=1
<if test="params.status!=null and params.status!=0">
and m.status=#{params.status}
</if>
<if test="params.type!=null and params.type!=''">
and m.type=#{params.type}
</if>
<if test="params.city!=null and params.city!=''">
and (m.city like concat('%',#{params.city},'%') or m.city='不限')
</if>
<if test="params.title!=null and params.title!=''">
and m.title like concat('%',#{params.title},'%')
</if>
order by type
</select>
<update id="updateSales" parameterType="com.sqx.modules.bl.massage.entity.MassagePackage">
update bl_massage_package set sales=#{sales} where id=#{id}
</update>
<update id="updateEsteemRate" parameterType="com.sqx.modules.bl.massage.entity.MassagePackage">
update bl_massage_package set esteem_rate=#{esteemRate} where id=#{id}
</update>
<update id="updateCoupon" parameterType="com.sqx.modules.bl.massage.entity.MassagePackage">
update bl_massage_package set is_can_coupon=#{isCanCoupon} where id=#{id}
</update>
<update id="updateVip" parameterType="com.sqx.modules.bl.massage.entity.MassagePackage">
update bl_massage_package set is_can_vip=#{isCanVip} where id=#{id}
</update>
<update id="updateStatus" parameterType="com.sqx.modules.bl.massage.entity.MassagePackage">
update bl_massage_package set status=#{status} where id=#{id}
</update>
<update id="updatePrice" parameterType="com.sqx.modules.bl.massage.entity.MassagePackage">
update bl_massage_package set price=#{price} where id=#{id}
</update>
<delete id="delete" parameterType="com.sqx.modules.bl.massage.entity.MassagePackage">
delete from bl_massage_package where id=#{id}
</delete>
</mapper>