From 933fa90d3a51911a193d70bf95e01f6f32161463 Mon Sep 17 00:00:00 2001 From: xiejunyu Date: Fri, 11 Feb 2022 18:01:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=AE=A1=E7=90=86-=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/OnlCgformAreaController.java | 16 ++++++ .../modules/tag/entity/OnlCgformArea.java | 5 -- .../tag/mapper/OnlCgformAreaMapper.java | 4 +- .../tag/mapper/xml/OnlCgformAreaMapper.xml | 4 -- .../tag/service/IOnlCgformAreaService.java | 7 +++ .../impl/OnlCgformAreaServiceImpl.java | 56 +++++++++++-------- 6 files changed, 57 insertions(+), 35 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformAreaController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformAreaController.java index 840997531..8dd300240 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformAreaController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformAreaController.java @@ -169,4 +169,20 @@ public class OnlCgformAreaController extends JeroController selectShowAreaById(@RequestParam(name="id",required=true) String id) { + OnlCgformArea onlCgformArea = (OnlCgformArea) onlCgformAreaService.selectShowAreaById(id); + if(onlCgformArea==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(onlCgformArea); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/entity/OnlCgformArea.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/entity/OnlCgformArea.java index 223ce70c0..6c010719a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/entity/OnlCgformArea.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/entity/OnlCgformArea.java @@ -63,11 +63,6 @@ public class OnlCgformArea implements Serializable { @ApiModelProperty(value = "展示区域(1基本信息,2文本信息,3关联关系)") private java.lang.String showArea; - /**展示区域对应flag*/ - /* @Excel(name = "展示区域对应flag", width = 15) - @ApiModelProperty(value = "展示区域对应flag") - private java.lang.Integer showAreaFlag;*/ - /**英文名称*/ @Excel(name = "英文名称", width = 15) @ApiModelProperty(value = "英文名称") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/OnlCgformAreaMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/OnlCgformAreaMapper.java index e64f9adda..f1021fe4b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/OnlCgformAreaMapper.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/OnlCgformAreaMapper.java @@ -1,10 +1,8 @@ package com.jero.modules.tag.mapper; -import java.util.List; -import org.apache.ibatis.annotations.Param; -import com.jero.modules.tag.entity.OnlCgformArea; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jero.modules.tag.entity.OnlCgformArea; /** * @Description: 区域管理表 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/xml/OnlCgformAreaMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/xml/OnlCgformAreaMapper.xml index 9a97773d2..fb114c081 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/xml/OnlCgformAreaMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/xml/OnlCgformAreaMapper.xml @@ -13,8 +13,4 @@ - - \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/IOnlCgformAreaService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/IOnlCgformAreaService.java index 1cb4f7ed7..0829b4610 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/IOnlCgformAreaService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/IOnlCgformAreaService.java @@ -59,4 +59,11 @@ public interface IOnlCgformAreaService extends IService { */ List queryList(OnlCgformArea onlCgformArea); + /** + * 展示区域查询 + * + * @param id + * @return + */ + List selectShowAreaById(String id); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/impl/OnlCgformAreaServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/impl/OnlCgformAreaServiceImpl.java index b08a062e0..5e6ebac55 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/impl/OnlCgformAreaServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/impl/OnlCgformAreaServiceImpl.java @@ -1,6 +1,7 @@ package com.jero.modules.tag.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.modules.tag.entity.OnlCgformArea; import com.jero.modules.tag.mapper.OnlCgformAreaMapper; @@ -27,12 +28,12 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl ids) { - removeByIds(ids); - } + public void deleteByIds(List ids) { + removeByIds(ids); + } /** * 通过id查询 @@ -76,22 +77,31 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl queryList(OnlCgformArea onlCgformArea) { + public List queryList(OnlCgformArea onlCgformArea) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); if(StringUtils.isNotBlank(onlCgformArea.getIsModel())){ lambdaQueryWrapper.eq(OnlCgformArea::getIsModel,onlCgformArea.getIsModel()) .orderByAsc(OnlCgformArea::getSort); } return list(lambdaQueryWrapper); - } + } + /** + * 展示区域查询 + * + * @return + */ + public List selectShowAreaById(String id) { + QueryWrapper list=new QueryWrapper().select(id,"showArea"); + return list(list); + } }