提交相关代码

This commit is contained in:
zfhai 2023-12-07 16:25:04 +08:00
parent a928c49d3c
commit 3b4e9cc0eb
9 changed files with 57 additions and 10 deletions

View File

@ -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));
}

View File

@ -96,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or locate(#{description},d.description) > 0
)
</if>
and d.is_active='1'
</where>
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
</select>
<!-- <select id="selectDevInfoHotList" parameterType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">-->
@ -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'
</select>
<!-- <select id="selectDevInfoByMaId" parameterType="Long" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">-->
<!-- select d.*,c.company_name,c.create_time as company_create_time,c.logo_url as company_logo_url,-->
@ -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'
</select>
<select id="getCompanyUpNum" parameterType="Long" resultType="Long">
select count(up.ma_id) from ma_dev_info d
left join ma_up_off up on d.ma_id = up.ma_id and up.`status`=1
where d.own_co= #{ownCo}
where d.own_co= #{ownCo} and d.is_active='1'
GROUP BY d.own_co
</select>
@ -293,14 +298,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where ma_id = #{maId}
</update>
<delete id="deleteDevInfoByMaId" parameterType="Long">
delete from ma_dev_info where ma_id = #{maId}
</delete>
<update id="deleteDevInfoByMaId" parameterType="Long">
update ma_dev_info set is_active='0' where ma_id = #{maId}
</update>
<delete id="deleteDevInfoByMaIds" parameterType="String">
delete from ma_dev_info where ma_id in
<update id="deleteDevInfoByMaIds" parameterType="String">
update ma_dev_info set is_active='0' where ma_id in
<foreach item="maId" collection="array" open="(" separator="," close=")">
#{maId}
</foreach>
</delete>
</update>
</mapper>

View File

@ -18,6 +18,8 @@
<dependency>
<groupId>com.bonus.zlpt</groupId>
<artifactId>zlpt-common-swagger</artifactId>
<version>3.6.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
@ -38,4 +40,5 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -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" );
}
}

View File

@ -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)
{

View File

@ -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<BmTopicInfo> util = new ExcelUtil<BmTopicInfo>(BmTopicInfo.class);

View File

@ -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<DevInfoVo> list = maDevInfoService.getEquipmentList(maDevInfo);

View File

@ -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) {
//获取更多

View File

@ -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<Tree<Long>> list = maTypeInfoSevice.getMaTypeInfoList();