增加地址
This commit is contained in:
7
.idea/jarRepositories.xml
generated
7
.idea/jarRepositories.xml
generated
@ -11,6 +11,11 @@
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
@ -22,4 +27,4 @@
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
</project>
|
||||
|
@ -4,14 +4,16 @@ package com.chinaunicom.zyhy.ebtp.supplier.base.controller;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.LinksClassificationVo;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.PublicStatus;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.*;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页数据controller
|
||||
*/
|
||||
@ -34,6 +36,8 @@ public class HomePageController {
|
||||
|
||||
@Autowired
|
||||
private ICoscoPortalsDownloadsService coscoPortalsDownloadsService;
|
||||
@Autowired
|
||||
private ICoscoPortalsLinksClassificationService coscoPortalsLinksClassificationService;
|
||||
|
||||
|
||||
/**
|
||||
@ -127,6 +131,16 @@ public class HomePageController {
|
||||
return BaseResponse.success(coscoPortalsDownloadsService.selectCoscoPortalsDownloadsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有列表
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/coscoPortalsLinksClassification/getAll")
|
||||
public BaseResponse getAllList() {
|
||||
|
||||
List<LinksClassificationVo> list = coscoPortalsLinksClassificationService.getAll();
|
||||
return BaseResponse.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.base.vo;
|
||||
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinks;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class LinksClassificationVo {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 分类详情
|
||||
*/
|
||||
private List<CoscoPortalsLinks> links;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.dict.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.mall.ebtp.common.base.controller.BaseController;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.dict.service.IDictProjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目字典Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cosco/dictProject")
|
||||
public class DictProjectController extends BaseController {
|
||||
@Autowired
|
||||
private IDictProjectService dictProjectService;
|
||||
|
||||
/**
|
||||
* 顶级列表查询
|
||||
* @param dictProject
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getTopLevelList")
|
||||
public BaseResponse<IPage<DictProject>> getTopLevelList(@RequestBody DictProject dictProject){
|
||||
dictProject.setParentCode("/");
|
||||
return BaseResponse.success(dictProjectService.getPage(dictProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 二级列表查询
|
||||
* @param dictProject
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getSecondaryList")
|
||||
public BaseResponse<IPage<DictProject>> getSecondaryList(@RequestBody DictProject dictProject){
|
||||
return BaseResponse.success(dictProjectService.getPage(dictProject));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有列表
|
||||
* @param parentCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getAllList/{parentCode}")
|
||||
public BaseResponse getAllList(@PathVariable String parentCode) {
|
||||
DictProject dictProject = new DictProject();
|
||||
dictProject.setParentCode(parentCode);
|
||||
List<DictProject> list = dictProjectService.selectDictProjectList(dictProject);
|
||||
return BaseResponse.success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取项目字典详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public BaseResponse getInfo(@PathVariable("id") Long id) {
|
||||
return BaseResponse.success(dictProjectService.selectDictProjectById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目字典
|
||||
*/
|
||||
@PostMapping
|
||||
public BaseResponse add(@RequestBody DictProject dictProject) {
|
||||
return BaseResponse.success(dictProjectService.insertDictProject(dictProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目字典
|
||||
*/
|
||||
@PutMapping
|
||||
public BaseResponse edit(@RequestBody DictProject dictProject) {
|
||||
return BaseResponse.success(dictProjectService.updateDictProject(dictProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目字典
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
public BaseResponse remove(@PathVariable Long[] ids) {
|
||||
return BaseResponse.success(dictProjectService.deleteDictProjectByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.dict.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目字典Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface DictProjectMapper {
|
||||
/**
|
||||
* 查询项目字典
|
||||
*
|
||||
* @param id 项目字典主键
|
||||
* @return 项目字典
|
||||
*/
|
||||
public DictProject selectDictProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询项目字典列表
|
||||
*
|
||||
* @param dictProject 项目字典
|
||||
* @return 项目字典集合
|
||||
*/
|
||||
public List<DictProject> selectDictProjectList(DictProject dictProject);
|
||||
|
||||
/**
|
||||
* 新增项目字典
|
||||
*
|
||||
* @param dictProject 项目字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictProject(DictProject dictProject);
|
||||
|
||||
/**
|
||||
* 修改项目字典
|
||||
*
|
||||
* @param dictProject 项目字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictProject(DictProject dictProject);
|
||||
|
||||
/**
|
||||
* 删除项目字典
|
||||
*
|
||||
* @param id 项目字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除项目字典
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictProjectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 列表信息
|
||||
* @param p
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
IPage<DictProject> selectPage(IPage<DictProject> p,@Param("vo") DictProject vo);
|
||||
}
|
@ -0,0 +1,180 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chinaunicom.zyhy.ebtp.supplier.dict.dao.DictProjectMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject" id="DictProjectResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="code" column="code"/>
|
||||
<result property="dicName" column="dic_name"/>
|
||||
<result property="parentCode" column="parent_code"/>
|
||||
<result property="parentType" column="parent_type"/>
|
||||
<result property="defaultFlag" column="default_flag"/>
|
||||
<result property="useFlag" column="use_flag"/>
|
||||
<result property="orderFlag" column="order_flag"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="dictTypeCode" column="dict_type_code"/>
|
||||
<result property="dictTypeName" column="dict_type_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictProjectVo">
|
||||
select id,
|
||||
code,
|
||||
dic_name,
|
||||
parent_code,
|
||||
parent_type,
|
||||
default_flag,
|
||||
use_flag,
|
||||
order_flag,
|
||||
description,
|
||||
dict_type_code,
|
||||
dict_type_name
|
||||
from dict_project
|
||||
</sql>
|
||||
|
||||
<select id="selectPage" parameterType="map"
|
||||
resultMap="DictProjectResult">
|
||||
<include refid="selectDictProjectVo"/>
|
||||
<where>
|
||||
<if test="vo.dicName != null and vo.dicName != ''">
|
||||
and dic_name like concat('%', #{vo.dicName}, '%')
|
||||
</if>
|
||||
<if test="vo.parentCode != null and vo.parentCode != ''">
|
||||
and parent_code = #{vo.parentCode}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictProjectList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject"
|
||||
resultMap="DictProjectResult">
|
||||
<include refid="selectDictProjectVo"/>
|
||||
<where>
|
||||
<if test="code != null and code != ''">
|
||||
and code = #{code}
|
||||
</if>
|
||||
<if test="dicName != null and dicName != ''">
|
||||
and dic_name like concat('%', #{dicName}, '%')
|
||||
</if>
|
||||
<if test="parentCode != null and parentCode != ''">
|
||||
and parent_code = #{parentCode}
|
||||
</if>
|
||||
<if test="parentType != null and parentType != ''">
|
||||
and parent_type = #{parentType}
|
||||
</if>
|
||||
<if test="defaultFlag != null and defaultFlag != ''">
|
||||
and default_flag = #{defaultFlag}
|
||||
</if>
|
||||
<if test="useFlag != null and useFlag != ''">
|
||||
and use_flag = #{useFlag}
|
||||
</if>
|
||||
<if test="orderFlag != null ">
|
||||
and order_flag = #{orderFlag}
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
and description = #{description}
|
||||
</if>
|
||||
<if test="dictTypeCode != null and dictTypeCode != ''">
|
||||
and dict_type_code = #{dictTypeCode}
|
||||
</if>
|
||||
<if test="dictTypeName != null and dictTypeName != ''">
|
||||
and dict_type_name like concat('%', #{dictTypeName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictProjectById" parameterType="Long"
|
||||
resultMap="DictProjectResult">
|
||||
<include refid="selectDictProjectVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDictProject" parameterType="com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject"
|
||||
useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into dict_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">code,</if>
|
||||
<if test="dicName != null">dic_name,</if>
|
||||
<if test="parentCode != null">parent_code,</if>
|
||||
<if test="parentType != null">parent_type,</if>
|
||||
<if test="defaultFlag != null">default_flag,</if>
|
||||
<if test="useFlag != null">use_flag,</if>
|
||||
<if test="orderFlag != null">order_flag,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="dictTypeCode != null">dict_type_code,</if>
|
||||
<if test="dictTypeName != null">dict_type_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="dicName != null">#{dicName},</if>
|
||||
<if test="parentCode != null">#{parentCode},</if>
|
||||
<if test="parentType != null">#{parentType},</if>
|
||||
<if test="defaultFlag != null">#{defaultFlag},</if>
|
||||
<if test="useFlag != null">#{useFlag},</if>
|
||||
<if test="orderFlag != null">#{orderFlag},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="dictTypeCode != null">#{dictTypeCode},</if>
|
||||
<if test="dictTypeName != null">#{dictTypeName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchDictProject" parameterType="java.util.List">
|
||||
insert into dict_project
|
||||
( id, code, dic_name, parent_code, parent_type, default_flag, use_flag, order_flag, description, dict_type_code,
|
||||
dict_type_name)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.code}, #{item.dicName}, #{item.parentCode}, #{item.parentType}, #{item.defaultFlag},
|
||||
#{item.useFlag}, #{item.orderFlag}, #{item.description}, #{item.dictTypeCode}, #{item.dictTypeName})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateDictProject" parameterType="com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject">
|
||||
update dict_project
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null">code =
|
||||
#{code},
|
||||
</if>
|
||||
<if test="dicName != null">dic_name =
|
||||
#{dicName},
|
||||
</if>
|
||||
<if test="parentCode != null">parent_code =
|
||||
#{parentCode},
|
||||
</if>
|
||||
<if test="parentType != null">parent_type =
|
||||
#{parentType},
|
||||
</if>
|
||||
<if test="defaultFlag != null">default_flag =
|
||||
#{defaultFlag},
|
||||
</if>
|
||||
<if test="useFlag != null">use_flag =
|
||||
#{useFlag},
|
||||
</if>
|
||||
<if test="orderFlag != null">order_flag =
|
||||
#{orderFlag},
|
||||
</if>
|
||||
<if test="description != null">description =
|
||||
#{description},
|
||||
</if>
|
||||
<if test="dictTypeCode != null">dict_type_code =
|
||||
#{dictTypeCode},
|
||||
</if>
|
||||
<if test="dictTypeName != null">dict_type_name =
|
||||
#{dictTypeName},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteDictProjectById" parameterType="Long">
|
||||
update dict_project
|
||||
set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteDictProjectByIds" parameterType="String">
|
||||
update dict_project set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,53 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.dict.entity;
|
||||
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BasePageRequest;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 项目字典对象 dict_project
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
public class DictProject extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 字典code */
|
||||
private String code;
|
||||
|
||||
/** 字典名称 */
|
||||
private String dicName;
|
||||
|
||||
/** 父类code */
|
||||
private String parentCode;
|
||||
|
||||
/** 父类类型 */
|
||||
private String parentType;
|
||||
|
||||
/** 是否默认 */
|
||||
private String defaultFlag;
|
||||
|
||||
/** 是否应用 */
|
||||
private String useFlag;
|
||||
|
||||
/** 排序 */
|
||||
private Long orderFlag;
|
||||
|
||||
/** 描述 */
|
||||
private String description;
|
||||
|
||||
/** 分组编码 */
|
||||
private String dictTypeCode;
|
||||
|
||||
/** 分组名称 */
|
||||
private String dictTypeName;
|
||||
|
||||
@ApiModelProperty(value = "分页对象信息")
|
||||
private BasePageRequest basePageRequest;
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.dict.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目字典Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface IDictProjectService {
|
||||
/**
|
||||
* 查询项目字典
|
||||
*
|
||||
* @param id 项目字典主键
|
||||
* @return 项目字典
|
||||
*/
|
||||
public DictProject selectDictProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询项目字典列表
|
||||
*
|
||||
* @param dictProject 项目字典
|
||||
* @return 项目字典集合
|
||||
*/
|
||||
public List<DictProject> selectDictProjectList(DictProject dictProject);
|
||||
|
||||
/**
|
||||
* 新增项目字典
|
||||
*
|
||||
* @param dictProject 项目字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictProject(DictProject dictProject);
|
||||
|
||||
/**
|
||||
* 修改项目字典
|
||||
*
|
||||
* @param dictProject 项目字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictProject(DictProject dictProject);
|
||||
|
||||
/**
|
||||
* 批量删除项目字典
|
||||
*
|
||||
* @param ids 需要删除的项目字典主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictProjectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除项目字典信息
|
||||
*
|
||||
* @param id 项目字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 顶级列表
|
||||
* @param dictProject
|
||||
* @return
|
||||
*/
|
||||
IPage<DictProject> getPage(DictProject dictProject);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.dict.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.dict.dao.DictProjectMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.dict.service.IDictProjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目字典Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Service
|
||||
public class DictProjectServiceImpl implements IDictProjectService {
|
||||
@Autowired
|
||||
private DictProjectMapper dictProjectMapper;
|
||||
|
||||
/**
|
||||
* 查询项目字典
|
||||
*
|
||||
* @param id 项目字典主键
|
||||
* @return 项目字典
|
||||
*/
|
||||
@Override
|
||||
public DictProject selectDictProjectById(Long id) {
|
||||
return dictProjectMapper.selectDictProjectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目字典列表
|
||||
*
|
||||
* @param dictProject 项目字典
|
||||
* @return 项目字典
|
||||
*/
|
||||
@Override
|
||||
public List<DictProject> selectDictProjectList(DictProject dictProject) {
|
||||
return dictProjectMapper.selectDictProjectList(dictProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目字典
|
||||
*
|
||||
* @param dictProject 项目字典
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDictProject(DictProject dictProject) {
|
||||
return dictProjectMapper.insertDictProject(dictProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目字典
|
||||
*
|
||||
* @param dictProject 项目字典
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDictProject(DictProject dictProject) {
|
||||
return dictProjectMapper.updateDictProject(dictProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目字典
|
||||
*
|
||||
* @param ids 需要删除的项目字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDictProjectByIds(Long[] ids) {
|
||||
return dictProjectMapper.deleteDictProjectByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目字典信息
|
||||
*
|
||||
* @param id 项目字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDictProjectById(Long id) {
|
||||
return dictProjectMapper.deleteDictProjectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<DictProject> getPage(DictProject dictProject) {
|
||||
IPage<DictProject> p = new Page<>(dictProject.getBasePageRequest().getPageNo(),
|
||||
dictProject.getBasePageRequest().getPageSize());
|
||||
return dictProjectMapper.selectPage(p, dictProject);
|
||||
}
|
||||
}
|
@ -1,18 +1,12 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.portals.controller;
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.chinaunicom.mall.ebtp.common.base.controller.BaseController;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsAboutUs;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsAboutUsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 中远门户_关于我们信息Controller
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.portals.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.LinksClassificationVo;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinksClassification;
|
||||
|
||||
import java.util.List;
|
||||
@ -66,4 +68,11 @@ public interface ICoscoPortalsLinksClassificationService {
|
||||
* @return
|
||||
*/
|
||||
IPage<CoscoPortalsLinksClassification> getPage(CoscoPortalsLinksClassification coscoPortalsLinksClassification);
|
||||
|
||||
/**
|
||||
* 获取首页分类详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
List<LinksClassificationVo> getAll();
|
||||
}
|
||||
|
@ -1,12 +1,17 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.portals.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.LinksClassificationVo;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsKeywordsMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsLinksClassificationMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsKeywords;
|
||||
@ -115,4 +120,22 @@ public class CoscoPortalsLinksClassificationServiceImpl extends BaseServiceImpl<
|
||||
coscoPortalsLinksClassification.getBasePageRequest().getPageSize());
|
||||
return coscoPortalsLinksClassificationMapper.getPageList(p,coscoPortalsLinksClassification);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LinksClassificationVo> getAll() {
|
||||
List<CoscoPortalsLinksClassification> coscoPortalsLinksClassifications = coscoPortalsLinksClassificationMapper.selectCoscoPortalsLinksClassificationList(new CoscoPortalsLinksClassification());
|
||||
CoscoPortalsLinks coscoPortalsLinks = new CoscoPortalsLinks();
|
||||
coscoPortalsLinks.setStatus(UpConstant.ENABLE);
|
||||
List<CoscoPortalsLinks> coscoPortalsLinks1 = coscoPortalsLinkService.selectCoscoPortalsLinksList(coscoPortalsLinks);
|
||||
List<LinksClassificationVo> returnList=new ArrayList<>();
|
||||
for (CoscoPortalsLinksClassification coscoPortalsLinksClassification : coscoPortalsLinksClassifications) {
|
||||
LinksClassificationVo vo=new LinksClassificationVo();
|
||||
vo.setId(coscoPortalsLinksClassification.getId());
|
||||
vo.setName(coscoPortalsLinksClassification.getName());
|
||||
List<CoscoPortalsLinks> collect = coscoPortalsLinks1.stream().filter(coscoPortalsLink -> coscoPortalsLink.getClassificationId().equals(coscoPortalsLinksClassification.getId())).collect(Collectors.toList());
|
||||
vo.setLinks(collect);
|
||||
returnList.add(vo);
|
||||
}
|
||||
return returnList;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user