From b9c4585f61f50860b80c1a4dc42f9cbd5e01c063 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期四, 26 九月 2024 14:02:49 +0800
Subject: [PATCH] 1.财务报表框架
---
src/main/resources/mapper/flower/FlowerMapper.xml | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/flower/FlowerMapper.xml b/src/main/resources/mapper/flower/FlowerMapper.xml
index 3cb549a..1da83a9 100644
--- a/src/main/resources/mapper/flower/FlowerMapper.xml
+++ b/src/main/resources/mapper/flower/FlowerMapper.xml
@@ -1,6 +1,13 @@
<?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.mzl.flower.mapper.flower.FlowerMapper">
+ <delete id="deleteBatchPhysics">
+ DELETE FROM t_flower
+ WHERE id IN
+ <foreach collection="list" item="id" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </delete>
<select id="selectFlowerList" resultType="com.mzl.flower.dto.response.flower.FlowerListDTO">
SELECT f.*, s.name supplierName, st.name supplierType, fc.name categoryStr
@@ -37,6 +44,12 @@
</if>
<if test="condition.recommend != null and !condition.recommend">
AND (f.recommend = 0 or f.recommend is null)
+ </if>
+ <if test="condition.isLimited != null and condition.isLimited">
+ AND f.limited > 0
+ </if>
+ <if test="condition.isLimited != null and !condition.isLimited">
+ AND (f.limited = 0 or f.limited is null)
</if>
<if test="condition.statusList != null and condition.statusList.size > 0">
and f.status in
@@ -386,10 +399,35 @@
FROM t_browse_his c left join t_flower f on c.flower_id = f.id
WHERE f.deleted = 0 and c.deleted = 0 and f.status != 'UP' and c.user_id = #{userId}
</select>
+ <select id="getDeletdFlowByIds" resultType="com.mzl.flower.entity.flower.Flower">
+ select * from t_flower
+ WHERE id IN
+ <foreach collection="list" item="id" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </select>
<update id="updateFlowerCategoryInfo">
update t_flower f, t_flower_category fc
set f.unit = fc.unit, f.color = fc.color
where f.category = fc.id and fc.id = #{category}
</update>
+ <update id="updateBatchTypeRank">
+ <foreach collection="list" item="item" separator=";">
+ UPDATE t_flower
+ SET type_rank = #{item.typeRank}
+ WHERE id = #{item.id}
+ </foreach>
+ </update>
+
+ <update id="restoreFlowerBatch">
+ update t_flower set deleted = 0
+ WHERE id IN
+ <foreach collection="list" item="id" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </update>
+ <update id="updateTypeRankNull">
+ update t_flower set type_rank=null where category=#{category} and level=#{level}
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3