From 373513b5e5c32f935320625e35d18abace6c0720 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Thu, 30 Jun 2022 18:02:50 +0800
Subject: [PATCH] 地块管理
---
src/main/java/org/springblade/modules/farm/mapper/FarmMapper.xml | 43 ++++++++++++++++++++++++++++++++++++-------
1 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/springblade/modules/farm/mapper/FarmMapper.xml b/src/main/java/org/springblade/modules/farm/mapper/FarmMapper.xml
index 7ebbece..2ea4b48 100644
--- a/src/main/java/org/springblade/modules/farm/mapper/FarmMapper.xml
+++ b/src/main/java/org/springblade/modules/farm/mapper/FarmMapper.xml
@@ -4,10 +4,17 @@
<!--自定义查询农场分页数据-->
<select id="selectFarmPage" resultType="org.springblade.modules.farm.vo.FarmVO">
- select
- id,farm_name,farm_address,farm_area,slogan,introduce,picture,ST_ASTEXT(position) as position,user_id
+ select id,
+ farm_name,
+ farm_address,
+ farm_area,
+ slogan,
+ introduce,
+ picture,
+ ST_ASTEXT(position) as position,user_id
from
- sys_farm where 1=1
+ sys_farm
+ where 1=1
</select>
<!--自定义修改电子围栏数据-->
@@ -27,11 +34,33 @@
<!--详情信息(自定义查询)-->
<select id="getFarmInfo" resultType="org.springblade.modules.farm.vo.FarmVO">
- select
- id,farm_name,farm_address,farm_area,slogan,introduce,picture,ST_ASTEXT(position) as position,dept_id
+ select id,
+ farm_name,
+ farm_address,
+ farm_area,
+ slogan,
+ introduce,
+ picture,
+ ST_ASTEXT(position) as position,dept_id
from
- sys_farm
+ sys_farm
where 1=1
- and dept_id = #{farm.deptId}
+ and dept_id = #{farm.deptId}
</select>
+
+ <!--农场数量-->
+ <select id="selectCountFarm" resultType="java.lang.Integer">
+ SELECT COUNT(*) as count
+ FROM `blade_dept`
+ WHERE tenant_id='000000' AND is_deleted=0 AND parent_id!=0
+ </select>
+
+ <!--人员数量-->
+ <select id="selectCountUser" resultType="java.lang.Integer">
+ SELECT COUNT(*) as countuser
+ FROM `blade_user`
+ WHERE tenant_id = '000000'
+ AND is_deleted = 0
+ </select>
+
</mapper>
--
Gitblit v1.9.3