From 6256c863f7c21247ee27a730b233fee31360bb9a Mon Sep 17 00:00:00 2001 From: lqy <3431632001@qq,com> Date: Sun, 24 Nov 2024 11:44:12 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=94=B9=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/skyeye/eve/dao/SchoolDao.java | 1 - .../eve/service/impl/SchoolServiceImpl.java | 18 +++++++++++++----- .../resources/mapper/eve/CoverBackground.xml | 13 ------------- 3 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 skyeye-school/school-pro/src/main/resources/mapper/eve/CoverBackground.xml diff --git a/skyeye-school/school-pro/src/main/java/com/skyeye/eve/dao/SchoolDao.java b/skyeye-school/school-pro/src/main/java/com/skyeye/eve/dao/SchoolDao.java index de88d9da..2f75d3a0 100644 --- a/skyeye-school/school-pro/src/main/java/com/skyeye/eve/dao/SchoolDao.java +++ b/skyeye-school/school-pro/src/main/java/com/skyeye/eve/dao/SchoolDao.java @@ -17,6 +17,5 @@ import java.util.Map; * 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的 */ public interface SchoolDao extends SkyeyeBaseMapper { - int coverBackground(Map params); } diff --git a/skyeye-school/school-pro/src/main/java/com/skyeye/eve/service/impl/SchoolServiceImpl.java b/skyeye-school/school-pro/src/main/java/com/skyeye/eve/service/impl/SchoolServiceImpl.java index 8c77913e..6410c6f5 100644 --- a/skyeye-school/school-pro/src/main/java/com/skyeye/eve/service/impl/SchoolServiceImpl.java +++ b/skyeye-school/school-pro/src/main/java/com/skyeye/eve/service/impl/SchoolServiceImpl.java @@ -4,10 +4,13 @@ package com.skyeye.eve.service.impl; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.skyeye.annotation.service.SkyeyeService; import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.common.constans.CommonConstants; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; +import com.skyeye.common.util.mybatisplus.MybatisPlusUtil; import com.skyeye.eve.dao.SchoolDao; import com.skyeye.eve.entity.School; import com.skyeye.eve.service.SchoolService; @@ -29,9 +32,6 @@ import java.util.Map; @SkyeyeService(name = "学校管理", groupName = "学校管理") public class SchoolServiceImpl extends SkyeyeBusinessServiceImpl implements SchoolService { - @Autowired - private SchoolDao schoolDao; - /** * 获取所有学校列表展示为下拉选择框 * @@ -47,8 +47,16 @@ public class SchoolServiceImpl extends SkyeyeBusinessServiceImpl params = inputObject.getParams(); - schoolDao.coverBackground(params); + Map map = inputObject.getParams(); + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq(CommonConstants.ID, map.get("id").toString()); + updateWrapper.set(MybatisPlusUtil.toColumns(School::getBackground), map.get("background").toString()); + updateWrapper.set(MybatisPlusUtil.toColumns(School::getNeLongitude),map.get("neLongitude").toString()); + updateWrapper.set(MybatisPlusUtil.toColumns(School::getNeLatitude), map.get("neLatitude").toString()); + updateWrapper.set(MybatisPlusUtil.toColumns(School::getSwLongitude), map.get("swLongitude").toString()); + updateWrapper.set(MybatisPlusUtil.toColumns(School::getSwLatitude), map.get("swLatitude").toString()); + update(updateWrapper); + refreshCache(map.get("id").toString()); } } diff --git a/skyeye-school/school-pro/src/main/resources/mapper/eve/CoverBackground.xml b/skyeye-school/school-pro/src/main/resources/mapper/eve/CoverBackground.xml deleted file mode 100644 index ea16a7c2..00000000 --- a/skyeye-school/school-pro/src/main/resources/mapper/eve/CoverBackground.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - UPDATE school_mation as s SET - s.background = #{background}, - s.ne_longitude = #{neLongitude}, - s.ne_latitude = #{neLatitude}, - s.sw_longitude = #{swLongitude}, - s.sw_latitude = #{swLatitude} - WHERE s.id = #{id} - - \ No newline at end of file