diff --git a/flower_back/src/main/java/com/example/flower/mapper/xml/DiscountMapper.xml b/flower_back/src/main/java/com/example/flower/mapper/xml/DiscountMapper.xml new file mode 100644 index 0000000..8c5a1a4 --- /dev/null +++ b/flower_back/src/main/java/com/example/flower/mapper/xml/DiscountMapper.xml @@ -0,0 +1,49 @@ + + + + + + + insert into flower.discount(discount_name, discount_num,discount_f_id,discount_c_id,discount_start_time,discount_end_time) + value (#{discount_name},#{discount_num},#{discount_f_id},#{discount_c_id},#{discount_start_time},#{discount_end_time}) + + + delete + from flower.discount + where discount_id = #{discount_id} + + + delete from flower.discount where discount.discount_id in + + #{id} + + + + + update flower.discount + set discount_name=if(#{discount_name} is not null and #{discount_name} != '',#{discount_name},discount_name), + discount_num=#{discount_num}, + discount_f_id=#{discount_f_id}, + discount_c_id=#{discount_c_id}, + discount_start_time=if(#{discount_start_time} is not null and #{discount_start_time} != '',#{discount_start_time},discount_start_time), + discount_end_time=if(#{discount_end_time} is not null and #{discount_end_time} != '',#{discount_end_time},discount_end_time) + where discount.discount_id = #{discount_id} + + \ No newline at end of file