外食计算器功能优化修改
This commit is contained in:
@ -6,15 +6,13 @@
|
||||
|
||||
<resultMap type="SysFoodHeatStatistics" id="SysFoodHeatStatisticsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerHeatId" column="customer_heat_id" />
|
||||
<result property="ingredient" column="ingredient" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="number" column="number" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="edibleDate" column="edible_date" />
|
||||
<result property="edibleType" column="edible_type" />
|
||||
<result property="heatValue" column="heat_value" />
|
||||
<result property="heatGap" column="heat_gap" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
@ -25,15 +23,14 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysFoodHeatStatisticsVo">
|
||||
select id, customer_id, ingredient, unit, number, quantity, edible_date, edible_type, heat_value, heat_gap, create_time, create_by, update_time, update_by, del_flag from sys_food_heat_statistics
|
||||
select id, customer_heat_id, ingredient, unit, number, quantity, edible_type, heat_value, create_time, create_by, update_time, update_by, del_flag from sys_food_heat_statistics
|
||||
</sql>
|
||||
|
||||
<select id="selectSysFoodHeatStatisticsList" parameterType="SysFoodHeatStatistics" resultMap="SysFoodHeatStatisticsResult">
|
||||
select sfhs.id, sfhs.customer_id, sfhs.ingredient, sfhs.unit, sfhs.number, sfhs.quantity, sfhs.edible_date, sfhs.edible_type, sfhs.heat_value, sfhs.heat_gap,cusUnit.dict_label as unitName
|
||||
select sfhs.id, sfhs.customer_heat_id, sfhs.ingredient, sfhs.unit, sfhs.number, sfhs.quantity, sfhs.edible_type, sfhs.heat_value,cusUnit.dict_label as unitName
|
||||
from sys_food_heat_statistics as sfhs
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_cus_unit') AS cusUnit ON cusUnit.dict_value = sfhs.unit
|
||||
where sfhs.del_flag = 0
|
||||
<if test="customerId != null "> and sfhs.customer_id = #{customerId}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSysFoodHeatStatisticsById" parameterType="Long" resultMap="SysFoodHeatStatisticsResult">
|
||||
@ -44,15 +41,13 @@
|
||||
<insert id="insertSysFoodHeatStatistics" parameterType="SysFoodHeatStatistics" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_food_heat_statistics
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="customerHeatId != null">customer_heat_id,</if>
|
||||
<if test="ingredient != null">ingredient,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="number != null">number,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="edibleDate != null">edible_date,</if>
|
||||
<if test="edibleType != null">edible_type,</if>
|
||||
<if test="heatValue != null">heat_value,</if>
|
||||
<if test="heatGap != null">heat_gap,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
@ -60,15 +55,13 @@
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="customerHeatId != null">#{customerHeatId},</if>
|
||||
<if test="ingredient != null">#{ingredient},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="number != null">#{number},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="edibleDate != null">#{edibleDate},</if>
|
||||
<if test="edibleType != null">#{edibleType},</if>
|
||||
<if test="heatValue != null">#{heatValue},</if>
|
||||
<if test="heatGap != null">#{heatGap},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
@ -80,15 +73,13 @@
|
||||
<update id="updateSysFoodHeatStatistics" parameterType="SysFoodHeatStatistics">
|
||||
update sys_food_heat_statistics
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="customerHeatId != null">customer_heat_id = #{customerHeatId},</if>
|
||||
<if test="ingredient != null">ingredient = #{ingredient},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="number != null">number = #{number},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="edibleDate != null">edible_date = #{edibleDate},</if>
|
||||
<if test="edibleType != null">edible_type = #{edibleType},</if>
|
||||
<if test="heatValue != null">heat_value = #{heatValue},</if>
|
||||
<if test="heatGap != null">heat_gap = #{heatGap},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
@ -110,9 +101,9 @@
|
||||
</update>
|
||||
|
||||
<insert id="insertFoodHeatBatch" parameterType="java.util.List">
|
||||
insert into sys_food_heat_statistics(customer_id,ingredient,unit,number,quantity) values
|
||||
insert into sys_food_heat_statistics(customer_heat_id,ingredient,unit,number,quantity) values
|
||||
<foreach collection ="list" item="food" index= "index" separator =",">
|
||||
(#{food.customerId}, #{food.ingredient},#{food.unit},#{food.number},#{food.quantity})
|
||||
(#{food.customerHeatId}, #{food.ingredient},#{food.unit},#{food.number},#{food.quantity})
|
||||
</foreach >
|
||||
</insert>
|
||||
|
||||
|
Reference in New Issue
Block a user