|
|
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="TCommodityManage" id="TCommodityManageResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="typeId" column="type_id" />
|
|
|
+ <result property="typeSelected" column="type_selected" />
|
|
|
<result property="commodityName" column="commodity_name" />
|
|
|
<result property="departurePlace" column="departure_place" />
|
|
|
<result property="adultPrice" column="adult_price" />
|
|
|
@@ -57,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT
|
|
|
a.id,
|
|
|
a.type_id,
|
|
|
+ a.type_selected,
|
|
|
a.commodity_name,
|
|
|
a.departure_place,
|
|
|
a.adult_price,
|
|
|
@@ -94,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectTCommodityManageVo"/>
|
|
|
where a.del_flag = '0'
|
|
|
<if test="typeId != null "> and a.type_id = #{typeId}</if>
|
|
|
+ <if test="typeSelected != null "> and a.type_selected = #{typeSelected}</if>
|
|
|
<if test="commodityName != null and commodityName != ''"> and a.commodity_name like concat('%', #{commodityName}, '%')</if>
|
|
|
<if test="departurePlace != null and departurePlace != ''"> and a.departure_place = #{departurePlace}</if>
|
|
|
<if test="adultPrice != null "> and a.adult_price = #{adultPrice}</if>
|
|
|
@@ -128,8 +131,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectTCommodityManageList4H5" parameterType="TCommodityManage" resultMap="TCommodityManageResult">
|
|
|
<include refid="selectTCommodityManageVo"/>
|
|
|
- where a.del_flag = '0' and date_format(now(),'%Y-%m-%d') between a.period_start and a.period_end
|
|
|
- <if test="typeId != null "> and a.type_id = #{typeId}</if>
|
|
|
+ where a.del_flag = '0' and date_format(now(),'%Y-%m-%d') <= a.period_end
|
|
|
+ <if test="typeId != null "> and a.type_selected like concat('%', #{typeId},'%')</if>
|
|
|
<if test="commodityName != null and commodityName != ''"> and a.commodity_name like concat('%', #{commodityName}, '%')</if>
|
|
|
<if test="departurePlace != null and departurePlace != ''"> and a.departure_place = #{departurePlace}</if>
|
|
|
<if test="adultPrice != null "> and a.adult_price = #{adultPrice}</if>
|
|
|
@@ -161,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTCommodityManageById" parameterType="Long" resultMap="TCommodityManageTCommodityJourneyInformationResult">
|
|
|
- select a.id, a.type_id, a.commodity_name, a.departure_place, a.adult_price, a.child_price, a.stock, a.child_price_explain, a.face_img, a.commodity_img, a.is_coupon, a.period_start, a.period_end, a.period_week, a.target_people_num, a.advance_period, a.attention, a.specification, a.sale_num, a.is_recommend, a.is_preferred, a.status, a.dept_id, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
|
|
+ select a.id, a.type_id, a.type_selected, a.commodity_name, a.departure_place, a.adult_price, a.child_price, a.stock, a.child_price_explain, a.face_img, a.commodity_img, a.is_coupon, a.period_start, a.period_end, a.period_week, a.target_people_num, a.advance_period, a.attention, a.specification, a.sale_num, a.is_recommend, a.is_preferred, a.status, a.dept_id, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
|
|
b.id as sub_id, b.commodity_id as sub_commodity_id, b.journey_time as sub_journey_time, b.detail as sub_detail, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
|
|
|
from t_commodity_manage a
|
|
|
left join t_commodity_journey_information b on b.commodity_id = a.id
|
|
|
@@ -172,6 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
insert into t_commodity_manage
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="typeId != null">type_id,</if>
|
|
|
+ <if test="typeSelected != null">type_selected,</if>
|
|
|
<if test="commodityName != null and commodityName != ''">commodity_name,</if>
|
|
|
<if test="departurePlace != null and departurePlace != ''">departure_place,</if>
|
|
|
<if test="adultPrice != null">adult_price,</if>
|
|
|
@@ -202,6 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="typeId != null">#{typeId},</if>
|
|
|
+ <if test="typeSelected != null">#{typeSelected},</if>
|
|
|
<if test="commodityName != null and commodityName != ''">#{commodityName},</if>
|
|
|
<if test="departurePlace != null and departurePlace != ''">#{departurePlace},</if>
|
|
|
<if test="adultPrice != null">#{adultPrice},</if>
|
|
|
@@ -236,6 +241,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
update t_commodity_manage
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="typeId != null">type_id = #{typeId},</if>
|
|
|
+ <if test="typeSelected != null">type_selected = #{typeSelected},</if>
|
|
|
<if test="commodityName != null and commodityName != ''">commodity_name = #{commodityName},</if>
|
|
|
<if test="departurePlace != null and departurePlace != ''">departure_place = #{departurePlace},</if>
|
|
|
<if test="adultPrice != null">adult_price = #{adultPrice},</if>
|
|
|
@@ -321,6 +327,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectTCommodityManageVo"/>
|
|
|
where a.del_flag = '0'
|
|
|
<if test="typeId != null "> and a.type_id = #{typeId}</if>
|
|
|
+ <if test="typeSelected != null "> and a.type_selected = #{typeSelected}</if>
|
|
|
<if test="commodityName != null and commodityName != ''"> and a.commodity_name like concat('%', #{commodityName}, '%')</if>
|
|
|
<if test="departurePlace != null and departurePlace != ''"> and a.departure_place = #{departurePlace}</if>
|
|
|
<if test="adultPrice != null "> and a.adult_price = #{adultPrice}</if>
|