From 3b4e9cc0eb370df70287f33ed5a051dfb761afac Mon Sep 17 00:00:00 2001 From: zfhai <15856818120@163.com> Date: Thu, 7 Dec 2023 16:25:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=9B=B8=E5=85=B3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equip/controller/DevInfoController.java | 4 ++-- .../main/resources/mapper/DevInfoMapper.xml | 21 ++++++++++++------- zlpt-modules/zlpt-home/pom.xml | 3 +++ .../com/bonus/zlpt/ZlptHomeApplication.java | 1 + .../controller/BmCarouselSetController.java | 8 +++++++ .../controller/BmTopicInfoController.java | 9 ++++++++ .../home/controller/MaDevInfoController.java | 7 +++++++ .../controller/MaHotSearchController.java | 7 +++++++ .../home/controller/MaTypeInfoController.java | 7 +++++++ 9 files changed, 57 insertions(+), 10 deletions(-) diff --git a/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/controller/DevInfoController.java b/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/controller/DevInfoController.java index 3b026a8..e1eae46 100644 --- a/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/controller/DevInfoController.java +++ b/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/controller/DevInfoController.java @@ -112,8 +112,8 @@ public class DevInfoController extends BaseController @RequiresPermissions("equip:info:remove") @ApiOperation(value = "删除装备") @Log(title = "设备信息", businessType = BusinessType.DELETE) - @DeleteMapping("/{maIds}") - public AjaxResult remove(@PathVariable Long[] maIds) + @PostMapping("/remove") + public AjaxResult remove(@RequestBody Long[] maIds) { return toAjax(devInfoService.deleteDevInfoByMaIds(maIds)); } diff --git a/zlpt-modules/zlpt-equip/src/main/resources/mapper/DevInfoMapper.xml b/zlpt-modules/zlpt-equip/src/main/resources/mapper/DevInfoMapper.xml index 5fb68bf..cf55bd7 100644 --- a/zlpt-modules/zlpt-equip/src/main/resources/mapper/DevInfoMapper.xml +++ b/zlpt-modules/zlpt-equip/src/main/resources/mapper/DevInfoMapper.xml @@ -96,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" or locate(#{description},d.description) > 0 ) + and d.is_active='1' order by d.is_active @@ -121,6 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join ma_type_info p on t.parent_id=p.type_id) t on d.type_id = t.type_id left join bm_company_info c on d.own_co = c.company_id left join ma_hot_search h on d.ma_id = h.ma_id + left join ma_type_info t on d.type_id = t.type_id + where d.is_active='1' order by h.search_num @@ -150,6 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join ma_type_info pp on tt.p_parent_id = pp.type_id ) ty on d.type_id=ty.type_id where d.ma_id = #{maId} + left join ma_type_info t on d.type_id = t.type_id + where d.ma_id = #{maId} and d.is_active='1' @@ -168,13 +173,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT s.dic_id, s.file_name as name,s.file_url as url from ma_dev_info d left join sys_file_info s on d.ma_id = s.model_id - WHERE d.ma_id = #{maId} + WHERE d.ma_id = #{maId} and d.is_active='1' @@ -293,14 +298,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where ma_id = #{maId} - - delete from ma_dev_info where ma_id = #{maId} - + + update ma_dev_info set is_active='0' where ma_id = #{maId} + - - delete from ma_dev_info where ma_id in + + update ma_dev_info set is_active='0' where ma_id in #{maId} - + \ No newline at end of file diff --git a/zlpt-modules/zlpt-home/pom.xml b/zlpt-modules/zlpt-home/pom.xml index 1aa4e74..dc38127 100644 --- a/zlpt-modules/zlpt-home/pom.xml +++ b/zlpt-modules/zlpt-home/pom.xml @@ -18,6 +18,8 @@ com.bonus.zlpt zlpt-common-swagger + 3.6.3 + compile cn.hutool @@ -38,4 +40,5 @@ UTF-8 + \ No newline at end of file diff --git a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/ZlptHomeApplication.java b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/ZlptHomeApplication.java index 46bde61..4e6bff4 100644 --- a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/ZlptHomeApplication.java +++ b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/ZlptHomeApplication.java @@ -13,6 +13,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; public class ZlptHomeApplication { public static void main(String[] args) { SpringApplication.run(ZlptHomeApplication.class, args); + System.out.println("(♥◠‿◠)ノ゙ 首页模块启动成功 ლ(´ڡ`ლ)゙ \n" ); } } \ No newline at end of file diff --git a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/BmCarouselSetController.java b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/BmCarouselSetController.java index 5a1f51e..f735576 100644 --- a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/BmCarouselSetController.java +++ b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/BmCarouselSetController.java @@ -7,6 +7,8 @@ import com.bonus.zlpt.common.security.utils.SecurityUtils; import com.bonus.zlpt.home.pojo.BmCarouselDto; import com.bonus.zlpt.home.pojo.BmCarouselSet; import com.bonus.zlpt.home.service.BmCarouselSetService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -18,6 +20,7 @@ import java.util.List; * @author makejava * @since 2023-12-03 15:24:10 */ +@Api(value = " 轮播图配置",tags = {"轮播图"}) @RestController @RequestMapping("bmCarouselSet") public class BmCarouselSetController extends BaseController { @@ -32,6 +35,7 @@ public class BmCarouselSetController extends BaseController { * @param * @return */ + @ApiOperation("获取轮播图列表") @PostMapping("/list") public TableDataInfo getCarouselChartList(@RequestBody BmCarouselDto bmCarouselDto) { @@ -45,6 +49,7 @@ public class BmCarouselSetController extends BaseController { * @param bmCarouselSet * @return */ + @ApiOperation("新增轮播图信息") @PostMapping("/add") public AjaxResult addCarouselChartInfo(@RequestBody BmCarouselSet bmCarouselSet) { @@ -58,6 +63,7 @@ public class BmCarouselSetController extends BaseController { * @param id * @return */ + @ApiOperation("根据id查询轮播图信息") @GetMapping("/{id}") public AjaxResult getCarouselChartInfo(@PathVariable("id") int id) { @@ -70,6 +76,7 @@ public class BmCarouselSetController extends BaseController { * @param bmCarouselSet * @return */ + @ApiOperation("编辑轮播图信息") @PutMapping("/update") public AjaxResult updateCarouselChartInfo(@RequestBody BmCarouselSet bmCarouselSet) { @@ -81,6 +88,7 @@ public class BmCarouselSetController extends BaseController { * @param id * @return */ + @ApiOperation("删除轮播图信息") @DeleteMapping("/{id}") public AjaxResult delCarouselChartInfo(@PathVariable("id") String id) { diff --git a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/BmTopicInfoController.java b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/BmTopicInfoController.java index 52a3fe3..2b48c5e 100644 --- a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/BmTopicInfoController.java +++ b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/BmTopicInfoController.java @@ -8,6 +8,8 @@ import com.bonus.zlpt.common.security.utils.SecurityUtils; import com.bonus.zlpt.home.pojo.BmTopicDto; import com.bonus.zlpt.home.pojo.BmTopicInfo; import com.bonus.zlpt.home.service.BmTopicInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -22,6 +24,7 @@ import java.util.concurrent.atomic.AtomicInteger; * @author makejava * @since 2023-12-04 09:48:36 */ +@Api(value = "专题资讯表(BmTopicInfo)表控制层", tags = {"专题资讯表"}) @RestController @RequestMapping("bmTopicInfo") public class BmTopicInfoController extends BaseController { @@ -36,6 +39,7 @@ public class BmTopicInfoController extends BaseController { * @param bmTopicDto * @return */ + @ApiOperation("获取专题资讯列表") @PostMapping("/list") public TableDataInfo getSpecialInfoList(@RequestBody BmTopicDto bmTopicDto) { @@ -49,6 +53,7 @@ public class BmTopicInfoController extends BaseController { * @param bmTopicInfo * @return */ + @ApiOperation("新增专题资讯信息") @PostMapping("/add") public AjaxResult addCarouselChartInfo(@RequestBody BmTopicInfo bmTopicInfo) { @@ -62,6 +67,7 @@ public class BmTopicInfoController extends BaseController { * @param id * @return */ + @ApiOperation("根据id查询资讯信息") @GetMapping("/{id}") public AjaxResult getSpecialInfo(@PathVariable("id") String id) { @@ -77,6 +83,7 @@ public class BmTopicInfoController extends BaseController { * @param bmTopicInfo * @return */ + @ApiOperation("编辑专题资讯信息") @PutMapping("/update") public AjaxResult updateCarouselChartInfo(@RequestBody BmTopicInfo bmTopicInfo) { @@ -88,6 +95,7 @@ public class BmTopicInfoController extends BaseController { * @param id * @return */ + @ApiOperation("删除专题资讯信息") @DeleteMapping("/{id}") public AjaxResult delSpecialInfo(@PathVariable("id") String id) { @@ -99,6 +107,7 @@ public class BmTopicInfoController extends BaseController { * @param response * @param */ + @ApiOperation("导出专题资讯信息") @GetMapping("/export") public void expSpecialInfo(HttpServletResponse response) throws UnsupportedEncodingException { ExcelUtil util = new ExcelUtil(BmTopicInfo.class); diff --git a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaDevInfoController.java b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaDevInfoController.java index 608f26a..5bb6dc2 100644 --- a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaDevInfoController.java +++ b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaDevInfoController.java @@ -6,6 +6,8 @@ import com.bonus.zlpt.common.core.web.controller.BaseController; import com.bonus.zlpt.common.core.web.page.TableDataInfo; import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo; import com.bonus.zlpt.home.service.MaDevInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; @@ -15,6 +17,10 @@ import org.springframework.web.bind.annotation.RestController; import java.util.List; +/** + * 设备类型 + */ +@Api(value = "设备类型",tags = {"设备类型"}) @RestController @RequestMapping("/devInfo") public class MaDevInfoController extends BaseController { @@ -28,6 +34,7 @@ public class MaDevInfoController extends BaseController { * 搜索栏 * @return */ + @ApiOperation("搜索栏") @PostMapping("/getEquipmentList") public TableDataInfo getEquipmentList(@Validated @RequestBody DevInfoVo maDevInfo) { List list = maDevInfoService.getEquipmentList(maDevInfo); diff --git a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaHotSearchController.java b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaHotSearchController.java index 9d55ba0..b0d6838 100644 --- a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaHotSearchController.java +++ b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaHotSearchController.java @@ -4,12 +4,18 @@ import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo; import com.bonus.zlpt.common.core.web.controller.BaseController; import com.bonus.zlpt.common.core.web.page.TableDataInfo; import com.bonus.zlpt.home.service.MaHotSearchService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.websocket.server.PathParam; import java.util.List; +/** + * 首页热搜装备 + */ +@Api(value = "首页热搜装备",tags = {"首页热搜装备"}) @RestController @RequestMapping("/hotSearch") public class MaHotSearchController extends BaseController { @@ -21,6 +27,7 @@ public class MaHotSearchController extends BaseController { * 热搜装备 * @return */ + @ApiOperation("热搜装备和更多") @GetMapping("/getHotEquipList") public TableDataInfo getHotEquipList(@PathParam("more")String more) { //获取更多 diff --git a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaTypeInfoController.java b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaTypeInfoController.java index 91a7273..9b71d77 100644 --- a/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaTypeInfoController.java +++ b/zlpt-modules/zlpt-home/src/main/java/com/bonus/zlpt/home/controller/MaTypeInfoController.java @@ -4,6 +4,8 @@ import cn.hutool.core.lang.tree.Tree; import com.bonus.zlpt.common.core.web.controller.BaseController; import com.bonus.zlpt.common.core.web.page.TableDataInfo; import com.bonus.zlpt.home.service.MaTypeInfoSevice; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -11,6 +13,10 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; +/** + * 搜索分类 + */ +@Api(value = "搜索分类",tags = {"搜索分类"}) @RestController @RequestMapping("/maType") public class MaTypeInfoController extends BaseController { @@ -22,6 +28,7 @@ public class MaTypeInfoController extends BaseController { * 搜索分类 * @return */ + @ApiOperation("搜索分类树") @GetMapping("/getEquipmentType") public TableDataInfo getEquipmentType() { List> list = maTypeInfoSevice.getMaTypeInfoList();