@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi; | package com.ningdatech.kqapi; | ||||
import com.ningdatech.basic.util.SpringUtils; | |||||
import com.ningdatech.kqapi.common.util.SpringContextHolder; | import com.ningdatech.kqapi.common.util.SpringContextHolder; | ||||
import com.ningdatech.kqapi.common.util.SpringUtils; | |||||
import org.mybatis.spring.annotation.MapperScan; | import org.mybatis.spring.annotation.MapperScan; | ||||
import org.springframework.boot.SpringApplication; | import org.springframework.boot.SpringApplication; | ||||
import org.springframework.boot.autoconfigure.SpringBootApplication; | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||||
@@ -0,0 +1,61 @@ | |||||
package com.ningdatech.kqapi.admin.controller; | |||||
import com.ningdatech.basic.model.IdVo; | |||||
import com.ningdatech.kqapi.admin.manage.WindowManage; | |||||
import com.ningdatech.kqapi.admin.model.req.ListWindowReq; | |||||
import com.ningdatech.kqapi.admin.model.req.WindowSaveReq; | |||||
import com.ningdatech.kqapi.admin.model.vo.WindowDetailVO; | |||||
import com.ningdatech.log.annotation.WebLog; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.AllArgsConstructor; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* 前端控制器 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
@Api(tags = "窗口管理") | |||||
@RestController | |||||
@AllArgsConstructor | |||||
@RequestMapping("/api/v1/window") | |||||
public class WindowController { | |||||
private final WindowManage windowManage; | |||||
@PostMapping("/save") | |||||
@WebLog("窗口新增或修改") | |||||
@ApiOperation("窗口新增或修改") | |||||
public void saveOrUpdate(@RequestBody WindowSaveReq req) { | |||||
windowManage.windowSaveOrUpdate(req); | |||||
} | |||||
@DeleteMapping("/del") | |||||
@WebLog("窗口删除") | |||||
@ApiOperation("窗口删除") | |||||
public void delete(@RequestBody IdVo<Integer> id) { | |||||
windowManage.delete(id); | |||||
} | |||||
@GetMapping("/page") | |||||
@WebLog("窗口列表") | |||||
@ApiOperation("窗口列表") | |||||
public void page(ListWindowReq req) { | |||||
windowManage.pageWindow(req); | |||||
} | |||||
@GetMapping("/option") | |||||
@WebLog("窗口下拉选择") | |||||
@ApiOperation("窗口下拉选择") | |||||
public List<WindowDetailVO> option(ListWindowReq req) { | |||||
return windowManage.windowOption(req); | |||||
} | |||||
} |
@@ -0,0 +1,60 @@ | |||||
package com.ningdatech.kqapi.admin.controller; | |||||
import com.ningdatech.basic.model.IdVo; | |||||
import com.ningdatech.basic.model.PageVo; | |||||
import com.ningdatech.kqapi.admin.manage.ZoneManage; | |||||
import com.ningdatech.kqapi.admin.model.req.ListZoneReq; | |||||
import com.ningdatech.kqapi.admin.model.req.ZoneSaveReq; | |||||
import com.ningdatech.kqapi.admin.model.vo.ZoneDetailVO; | |||||
import com.ningdatech.log.annotation.WebLog; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.AllArgsConstructor; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* 前端控制器 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
@Api(tags = "专区管理") | |||||
@RestController | |||||
@AllArgsConstructor | |||||
@RequestMapping("/api/v1/zone") | |||||
public class ZoneController { | |||||
private final ZoneManage zoneManage; | |||||
@PostMapping("/save") | |||||
@WebLog("专区保存或修改") | |||||
@ApiOperation("专区保存或修改") | |||||
public void zoneSaveOrUpdate(@RequestBody ZoneSaveReq req) { | |||||
zoneManage.zoneSaveOrUpdate(req); | |||||
} | |||||
@DeleteMapping("/del") | |||||
public void delete(@RequestBody IdVo<Integer> id) { | |||||
zoneManage.delete(id); | |||||
} | |||||
@GetMapping("/page") | |||||
@WebLog("专区列表") | |||||
@ApiOperation("专区列表") | |||||
public PageVo<ZoneDetailVO> pageZone(ListZoneReq req) { | |||||
return zoneManage.pageZone(req); | |||||
} | |||||
@GetMapping("/option") | |||||
@WebLog("专区下拉选择") | |||||
@ApiOperation("专区下拉选择") | |||||
public List<ZoneDetailVO> zoneOption(ListZoneReq req) { | |||||
return zoneManage.zoneOption(req); | |||||
} | |||||
} |
@@ -0,0 +1,84 @@ | |||||
package com.ningdatech.kqapi.admin.manage; | |||||
import cn.hutool.core.bean.BeanUtil; | |||||
import cn.hutool.core.util.StrUtil; | |||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||||
import com.ningdatech.basic.model.IdVo; | |||||
import com.ningdatech.basic.model.PageVo; | |||||
import com.ningdatech.basic.util.CollUtils; | |||||
import com.ningdatech.kqapi.admin.model.entity.Window; | |||||
import com.ningdatech.kqapi.admin.model.entity.Zone; | |||||
import com.ningdatech.kqapi.admin.model.req.ListWindowReq; | |||||
import com.ningdatech.kqapi.admin.model.req.WindowSaveReq; | |||||
import com.ningdatech.kqapi.admin.model.vo.WindowDetailVO; | |||||
import com.ningdatech.kqapi.admin.service.IWindowService; | |||||
import com.ningdatech.kqapi.admin.service.IZoneService; | |||||
import lombok.RequiredArgsConstructor; | |||||
import org.springframework.stereotype.Component; | |||||
import java.util.*; | |||||
import java.util.stream.Collectors; | |||||
/** | |||||
* <p> | |||||
* WindowManage | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 12:17 2024/4/20 | |||||
*/ | |||||
@Component | |||||
@RequiredArgsConstructor | |||||
public class WindowManage { | |||||
private final IWindowService windowService; | |||||
private final IZoneService zoneService; | |||||
public void windowSaveOrUpdate(WindowSaveReq req) { | |||||
Window win = BeanUtil.copyProperties(req, Window.class); | |||||
windowService.saveOrUpdate(win); | |||||
} | |||||
public void delete(IdVo<Integer> id) { | |||||
windowService.removeById(id.getId()); | |||||
} | |||||
public PageVo<WindowDetailVO> pageWindow(ListWindowReq req) { | |||||
Wrapper<Window> query = buildWindowQuery(req); | |||||
Page<Window> page = windowService.page(req.page(), query); | |||||
if (page.getTotal() == 0) { | |||||
return PageVo.empty(); | |||||
} | |||||
List<Window> records = page.getRecords(); | |||||
List<Integer> windowIds = CollUtils.fieldList(records, Window::getId); | |||||
List<WindowDetailVO> data = records.stream().map(w -> { | |||||
WindowDetailVO window = BeanUtil.copyProperties(w, WindowDetailVO.class); | |||||
window.setItemCount(0); | |||||
return window; | |||||
}).collect(Collectors.toList()); | |||||
return PageVo.of(data, page.getTotal()); | |||||
} | |||||
public List<WindowDetailVO> windowOption(ListWindowReq req) { | |||||
Wrapper<Window> query = buildWindowQuery(req); | |||||
Page<Window> page = windowService.page(req.page(), query); | |||||
if (page.getTotal() == 0) { | |||||
return Collections.emptyList(); | |||||
} | |||||
return page.getRecords().stream().map(w -> WindowDetailVO.builder() | |||||
.windowName(w.getWindowName()) | |||||
.id(w.getId()) | |||||
.build()).collect(Collectors.toList()); | |||||
} | |||||
private static Wrapper<Window> buildWindowQuery(ListWindowReq req) { | |||||
return Wrappers.lambdaQuery(Window.class) | |||||
.like(StrUtil.isNotBlank(req.getWindowName()), Window::getWindowName, req.getWindowName()) | |||||
.eq(req.getZoneId() != null, Window::getZoneId, req.getZoneId()) | |||||
.orderByDesc(Window::getUpdateOn); | |||||
} | |||||
} |
@@ -0,0 +1,102 @@ | |||||
package com.ningdatech.kqapi.admin.manage; | |||||
import cn.hutool.core.bean.BeanUtil; | |||||
import cn.hutool.core.collection.CollUtil; | |||||
import cn.hutool.core.util.StrUtil; | |||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||||
import com.ningdatech.basic.model.IdVo; | |||||
import com.ningdatech.basic.model.PageVo; | |||||
import com.ningdatech.basic.util.CollUtils; | |||||
import com.ningdatech.kqapi.admin.mapper.ZoneMapper; | |||||
import com.ningdatech.kqapi.admin.model.entity.Window; | |||||
import com.ningdatech.kqapi.admin.model.entity.Zone; | |||||
import com.ningdatech.kqapi.admin.model.req.ListZoneReq; | |||||
import com.ningdatech.kqapi.admin.model.req.ZoneSaveReq; | |||||
import com.ningdatech.kqapi.admin.model.vo.ZoneDetailVO; | |||||
import com.ningdatech.kqapi.admin.service.IWindowService; | |||||
import com.ningdatech.kqapi.admin.service.IZoneService; | |||||
import lombok.RequiredArgsConstructor; | |||||
import org.springframework.stereotype.Component; | |||||
import org.springframework.transaction.annotation.Transactional; | |||||
import java.util.Collections; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
import java.util.stream.Collectors; | |||||
/** | |||||
* <p> | |||||
* ZoneManage | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 12:17 2024/4/20 | |||||
*/ | |||||
@Component | |||||
@RequiredArgsConstructor | |||||
public class ZoneManage { | |||||
private final IZoneService zoneService; | |||||
private final ZoneMapper zoneMapper; | |||||
private final IWindowService windowService; | |||||
@Transactional(rollbackFor = Exception.class) | |||||
public synchronized void zoneSaveOrUpdate(ZoneSaveReq req) { | |||||
Zone zone = BeanUtil.copyProperties(req, Zone.class); | |||||
if (zone.getId() != null) { | |||||
Zone oldZone = zoneService.getById(req.getId()); | |||||
if (!StrUtil.equals(zone.getZoneName(), oldZone.getZoneName())) { | |||||
Wrapper<Window> wUpdate = Wrappers.lambdaUpdate(Window.class) | |||||
.set(Window::getZoneName, req.getZoneName()) | |||||
.eq(Window::getZoneId, req.getId()); | |||||
windowService.update(wUpdate); | |||||
} | |||||
} | |||||
zoneService.saveOrUpdate(zone); | |||||
} | |||||
public void delete(IdVo<Integer> id) { | |||||
zoneService.removeById(id.getId()); | |||||
} | |||||
public PageVo<ZoneDetailVO> pageZone(ListZoneReq req) { | |||||
Wrapper<Zone> query = buildZoneQuery(req); | |||||
Page<Zone> page = zoneService.page(req.page(), query); | |||||
if (page.getTotal() == 0) { | |||||
return PageVo.empty(); | |||||
} | |||||
List<Zone> records = page.getRecords(); | |||||
List<Integer> zoneIds = CollUtils.fieldList(records, Zone::getId); | |||||
Map<Integer, Integer> windowCountMap = windowService.windowCountByZoneIds(zoneIds); | |||||
List<ZoneDetailVO> data = records.stream().map(w -> { | |||||
ZoneDetailVO zone = BeanUtil.copyProperties(w, ZoneDetailVO.class); | |||||
zone.setWindowCount(windowCountMap.getOrDefault(w.getId(), 0)); | |||||
return zone; | |||||
}).collect(Collectors.toList()); | |||||
return PageVo.of(data, page.getTotal()); | |||||
} | |||||
public List<ZoneDetailVO> zoneOption(ListZoneReq req) { | |||||
Wrapper<Zone> query = buildZoneQuery(req); | |||||
Page<Zone> page = zoneService.page(req.page(), query); | |||||
if (page.getTotal() == 0) { | |||||
return Collections.emptyList(); | |||||
} | |||||
return CollUtils.convert(page.getRecords(), | |||||
w -> ZoneDetailVO.builder() | |||||
.id(w.getId()) | |||||
.zoneName(w.getZoneName()) | |||||
.build()); | |||||
} | |||||
private static Wrapper<Zone> buildZoneQuery(ListZoneReq req) { | |||||
return Wrappers.lambdaQuery(Zone.class) | |||||
.like(StrUtil.isNotBlank(req.getZoneName()), Zone::getZoneName, req.getZoneName()) | |||||
.orderByDesc(Zone::getUpdateOn); | |||||
} | |||||
} |
@@ -0,0 +1,23 @@ | |||||
package com.ningdatech.kqapi.admin.mapper; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
import com.ningdatech.kqapi.admin.model.dto.WindowCountByZoneIdDTO; | |||||
import com.ningdatech.kqapi.admin.model.entity.Window; | |||||
import org.apache.ibatis.annotations.Param; | |||||
import java.util.Collection; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* Mapper 接口 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
public interface WindowMapper extends BaseMapper<Window> { | |||||
List<WindowCountByZoneIdDTO> selectWindowCountByZoneIds(@Param("zoneIds") Collection<Integer> zoneIds); | |||||
} |
@@ -0,0 +1,13 @@ | |||||
<?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.ningdatech.kqapi.admin.mapper.WindowMapper"> | |||||
<select id="selectWindowCountByZoneIds" resultType="com.ningdatech.kqapi.admin.model.dto.WindowCountByZoneIdDTO"> | |||||
select zone_id, count(1) as window_count from nd_window where zone_id in | |||||
<foreach collection="zoneIds" item="zoneId" open="(" separator="," close=")"> | |||||
#{zoneId} | |||||
</foreach> | |||||
group by zone_id | |||||
</select> | |||||
</mapper> |
@@ -0,0 +1,16 @@ | |||||
package com.ningdatech.kqapi.admin.mapper; | |||||
import com.ningdatech.kqapi.admin.model.entity.Zone; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
/** | |||||
* <p> | |||||
* Mapper 接口 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
public interface ZoneMapper extends BaseMapper<Zone> { | |||||
} |
@@ -0,0 +1,5 @@ | |||||
<?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.ningdatech.kqapi.admin.mapper.ZoneMapper"> | |||||
</mapper> |
@@ -0,0 +1,20 @@ | |||||
package com.ningdatech.kqapi.admin.model.dto; | |||||
import lombok.Data; | |||||
/** | |||||
* <p> | |||||
* WindowCountByZoneIdDTO | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 14:14 2024/4/20 | |||||
*/ | |||||
@Data | |||||
public class WindowCountByZoneIdDTO { | |||||
private Integer zoneId; | |||||
private Integer windowCount; | |||||
} |
@@ -0,0 +1,54 @@ | |||||
package com.ningdatech.kqapi.admin.model.entity; | |||||
import com.baomidou.mybatisplus.annotation.*; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.time.LocalDateTime; | |||||
/** | |||||
* <p> | |||||
* 窗口对象 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
@Data | |||||
@TableName("nd_window") | |||||
@ApiModel(value = "Window对象") | |||||
public class Window implements Serializable { | |||||
private static final long serialVersionUID = 1L; | |||||
@ApiModelProperty("主键") | |||||
@TableId(value = "id", type = IdType.AUTO) | |||||
private Integer id; | |||||
@ApiModelProperty("窗口名称") | |||||
private String windowName; | |||||
@ApiModelProperty("专区ID") | |||||
private Integer zoneId; | |||||
@ApiModelProperty("专区名称") | |||||
private String zoneName; | |||||
@TableLogic | |||||
private Boolean deleted; | |||||
@TableField(fill = FieldFill.INSERT) | |||||
private LocalDateTime createOn; | |||||
@TableField(fill = FieldFill.INSERT) | |||||
private Long createBy; | |||||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||||
private LocalDateTime updateOn; | |||||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||||
private Long updateBy; | |||||
} |
@@ -0,0 +1,52 @@ | |||||
package com.ningdatech.kqapi.admin.model.entity; | |||||
import com.baomidou.mybatisplus.annotation.*; | |||||
import java.io.Serializable; | |||||
import java.time.LocalDateTime; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
/** | |||||
* <p> | |||||
* 专区对象 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
@Data | |||||
@TableName("nd_zone") | |||||
@ApiModel(value = "Zone对象") | |||||
public class Zone implements Serializable { | |||||
private static final long serialVersionUID = 1L; | |||||
@ApiModelProperty("主键") | |||||
@TableId(value = "id", type = IdType.AUTO) | |||||
private Integer id; | |||||
@ApiModelProperty("专区名称") | |||||
private String zoneName; | |||||
@ApiModelProperty("专区图标") | |||||
private String zoneIcon; | |||||
@TableLogic | |||||
private Boolean deleted; | |||||
@TableField(fill = FieldFill.INSERT) | |||||
private LocalDateTime createOn; | |||||
@TableField(fill = FieldFill.INSERT) | |||||
private Long createBy; | |||||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||||
private LocalDateTime updateOn; | |||||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||||
private Long updateBy; | |||||
} |
@@ -0,0 +1,26 @@ | |||||
package com.ningdatech.kqapi.admin.model.req; | |||||
import com.ningdatech.kqapi.common.model.PagePo; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import lombok.EqualsAndHashCode; | |||||
/** | |||||
* <p> | |||||
* WindowSaveReq | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 13:25 2024/4/20 | |||||
*/ | |||||
@Data | |||||
@EqualsAndHashCode(callSuper = true) | |||||
public class ListWindowReq extends PagePo { | |||||
@ApiModelProperty("专区ID") | |||||
private Integer zoneId; | |||||
@ApiModelProperty("窗口名称") | |||||
private String windowName; | |||||
} |
@@ -0,0 +1,23 @@ | |||||
package com.ningdatech.kqapi.admin.model.req; | |||||
import com.ningdatech.kqapi.common.model.PagePo; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import lombok.EqualsAndHashCode; | |||||
/** | |||||
* <p> | |||||
* ListZoneReq | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 13:25 2024/4/20 | |||||
*/ | |||||
@Data | |||||
@EqualsAndHashCode(callSuper = true) | |||||
public class ListZoneReq extends PagePo { | |||||
@ApiModelProperty("专区名称") | |||||
private String zoneName; | |||||
} |
@@ -0,0 +1,29 @@ | |||||
package com.ningdatech.kqapi.admin.model.req; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
/** | |||||
* <p> | |||||
* WindowSaveReq | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 13:25 2024/4/20 | |||||
*/ | |||||
@Data | |||||
public class WindowSaveReq { | |||||
@ApiModelProperty("窗口ID") | |||||
private Integer id; | |||||
@ApiModelProperty("专区ID") | |||||
private Integer zoneId; | |||||
@ApiModelProperty("专区名称") | |||||
private String zoneName; | |||||
@ApiModelProperty("窗口名称") | |||||
private String windowName; | |||||
} |
@@ -0,0 +1,26 @@ | |||||
package com.ningdatech.kqapi.admin.model.req; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
/** | |||||
* <p> | |||||
* ZoneSaveReq | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 13:25 2024/4/20 | |||||
*/ | |||||
@Data | |||||
public class ZoneSaveReq { | |||||
@ApiModelProperty("专区ID") | |||||
private Integer id; | |||||
@ApiModelProperty("专区名称") | |||||
private String zoneName; | |||||
@ApiModelProperty("专区图标") | |||||
private String zoneIcon; | |||||
} |
@@ -0,0 +1,34 @@ | |||||
package com.ningdatech.kqapi.admin.model.vo; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Builder; | |||||
import lombok.Data; | |||||
/** | |||||
* <p> | |||||
* WindowDetailVO | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 13:47 2024/4/20 | |||||
*/ | |||||
@Builder | |||||
@Data | |||||
public class WindowDetailVO { | |||||
@ApiModelProperty("窗口ID") | |||||
private Integer id; | |||||
@ApiModelProperty("窗口名称") | |||||
private String windowName; | |||||
@ApiModelProperty("专区ID") | |||||
private Integer zoneId; | |||||
@ApiModelProperty("专区名称") | |||||
private String zoneName; | |||||
@ApiModelProperty("事项数量") | |||||
private Integer itemCount; | |||||
} |
@@ -0,0 +1,31 @@ | |||||
package com.ningdatech.kqapi.admin.model.vo; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Builder; | |||||
import lombok.Data; | |||||
/** | |||||
* <p> | |||||
* ZoneDetailVO | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 13:48 2024/4/20 | |||||
*/ | |||||
@Data | |||||
@Builder | |||||
public class ZoneDetailVO { | |||||
@ApiModelProperty("专区ID") | |||||
private Integer id; | |||||
@ApiModelProperty("专区名称") | |||||
private String zoneName; | |||||
@ApiModelProperty("专区图标") | |||||
private String zoneIcon; | |||||
@ApiModelProperty("窗口数量") | |||||
private Integer windowCount; | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package com.ningdatech.kqapi.admin.service; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | |||||
import com.ningdatech.kqapi.admin.model.entity.Window; | |||||
import java.util.Collection; | |||||
import java.util.Map; | |||||
/** | |||||
* <p> | |||||
* 服务类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
public interface IWindowService extends IService<Window> { | |||||
Map<Integer, Integer> windowCountByZoneIds(Collection<Integer> zoneIds); | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.ningdatech.kqapi.admin.service; | |||||
import com.ningdatech.kqapi.admin.model.entity.Zone; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | |||||
/** | |||||
* <p> | |||||
* 服务类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
public interface IZoneService extends IService<Zone> { | |||||
} |
@@ -0,0 +1,38 @@ | |||||
package com.ningdatech.kqapi.admin.service.impl; | |||||
import cn.hutool.core.collection.CollUtil; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
import com.ningdatech.basic.util.CollUtils; | |||||
import com.ningdatech.kqapi.admin.mapper.WindowMapper; | |||||
import com.ningdatech.kqapi.admin.model.dto.WindowCountByZoneIdDTO; | |||||
import com.ningdatech.kqapi.admin.model.entity.Window; | |||||
import com.ningdatech.kqapi.admin.service.IWindowService; | |||||
import org.springframework.stereotype.Service; | |||||
import java.util.Collection; | |||||
import java.util.Collections; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
/** | |||||
* <p> | |||||
* 服务实现类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
@Service | |||||
public class WindowServiceImpl extends ServiceImpl<WindowMapper, Window> implements IWindowService { | |||||
@Override | |||||
public Map<Integer, Integer> windowCountByZoneIds(Collection<Integer> zoneIds) { | |||||
if (CollUtil.isEmpty(zoneIds)) { | |||||
return Collections.emptyMap(); | |||||
} | |||||
List<WindowCountByZoneIdDTO> counts = baseMapper.selectWindowCountByZoneIds(zoneIds); | |||||
return CollUtils.listToMap(counts, WindowCountByZoneIdDTO::getZoneId, | |||||
WindowCountByZoneIdDTO::getWindowCount); | |||||
} | |||||
} |
@@ -0,0 +1,20 @@ | |||||
package com.ningdatech.kqapi.admin.service.impl; | |||||
import com.ningdatech.kqapi.admin.model.entity.Zone; | |||||
import com.ningdatech.kqapi.admin.mapper.ZoneMapper; | |||||
import com.ningdatech.kqapi.admin.service.IZoneService; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* <p> | |||||
* 服务实现类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-04-20 | |||||
*/ | |||||
@Service | |||||
public class ZoneServiceImpl extends ServiceImpl<ZoneMapper, Zone> implements IZoneService { | |||||
} |
@@ -7,7 +7,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; | |||||
import com.fasterxml.jackson.databind.SerializationFeature; | import com.fasterxml.jackson.databind.SerializationFeature; | ||||
import com.ningdatech.kqapi.common.util.NdDateUtils; | import com.ningdatech.kqapi.common.util.NdDateUtils; | ||||
import com.ningdatech.kqapi.common.util.NdJacksonModule; | import com.ningdatech.kqapi.common.util.NdJacksonModule; | ||||
import com.ningdatech.kqapi.common.util.SpringUtils; | |||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.http.Header; | import org.apache.http.Header; | ||||
import org.apache.http.client.HttpClient; | import org.apache.http.client.HttpClient; | ||||
@@ -21,11 +20,9 @@ import org.springframework.boot.autoconfigure.AutoConfigureBefore; | |||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | ||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||||
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; | import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; | ||||
import org.springframework.context.ApplicationContext; | |||||
import org.springframework.context.annotation.Bean; | import org.springframework.context.annotation.Bean; | ||||
import org.springframework.context.annotation.Configuration; | import org.springframework.context.annotation.Configuration; | ||||
import org.springframework.context.annotation.Primary; | import org.springframework.context.annotation.Primary; | ||||
import org.springframework.core.convert.converter.Converter; | |||||
import org.springframework.http.MediaType; | import org.springframework.http.MediaType; | ||||
import org.springframework.http.client.ClientHttpRequestFactory; | import org.springframework.http.client.ClientHttpRequestFactory; | ||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; | import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; | ||||
@@ -33,16 +30,12 @@ import org.springframework.http.converter.HttpMessageConverter; | |||||
import org.springframework.http.converter.StringHttpMessageConverter; | import org.springframework.http.converter.StringHttpMessageConverter; | ||||
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; | import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; | ||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; | import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; | ||||
import org.springframework.lang.NonNull; | |||||
import org.springframework.web.client.RestTemplate; | import org.springframework.web.client.RestTemplate; | ||||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||||
import java.nio.charset.StandardCharsets; | import java.nio.charset.StandardCharsets; | ||||
import java.text.SimpleDateFormat; | import java.text.SimpleDateFormat; | ||||
import java.time.LocalDate; | |||||
import java.time.LocalDateTime; | |||||
import java.time.LocalTime; | |||||
import java.time.ZoneId; | import java.time.ZoneId; | ||||
import java.util.*; | import java.util.*; | ||||
import java.util.concurrent.TimeUnit; | import java.util.concurrent.TimeUnit; | ||||
@@ -76,7 +69,7 @@ public class BeanConfig implements WebMvcConfigurer { | |||||
converterList.remove(converterTarget); | converterList.remove(converterTarget); | ||||
} | } | ||||
HttpMessageConverter<?> converter = new StringHttpMessageConverter(StandardCharsets.UTF_8); | HttpMessageConverter<?> converter = new StringHttpMessageConverter(StandardCharsets.UTF_8); | ||||
converterList.add(1,converter); | |||||
converterList.add(1, converter); | |||||
MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter(); | MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter(); | ||||
mappingJackson2HttpMessageConverter.setSupportedMediaTypes(Arrays.asList( | mappingJackson2HttpMessageConverter.setSupportedMediaTypes(Arrays.asList( | ||||
@@ -182,7 +175,7 @@ public class BeanConfig implements WebMvcConfigurer { | |||||
} | } | ||||
//解决跨域方式二 | //解决跨域方式二 | ||||
static final String ORIGINS[] = new String[]{"GET", "POST", "PUT", "DELETE","OPTIONS"}; | |||||
static final String ORIGINS[] = new String[]{"GET", "POST", "PUT", "DELETE", "OPTIONS"}; | |||||
@Override | @Override | ||||
public void addCorsMappings(CorsRegistry registry) { | public void addCorsMappings(CorsRegistry registry) { | ||||
@@ -4,14 +4,17 @@ import com.ningdatech.kqapi.common.model.ApiResponse; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* 业务常量 | |||||
* BizConst | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
* @since 13:42 2022/12/1 | |||||
* @since 11:46 2024/4/20 | |||||
*/ | */ | ||||
public class BizConst { | public class BizConst { | ||||
private BizConst() { | |||||
} | |||||
/** | /** | ||||
* SQL查询一条 | * SQL查询一条 | ||||
*/ | */ | ||||
@@ -0,0 +1,49 @@ | |||||
package com.ningdatech.kqapi.common.handler; | |||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; | |||||
import com.ningdatech.kqapi.user.util.LoginUserUtil; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.apache.ibatis.reflection.MetaObject; | |||||
import org.springframework.stereotype.Component; | |||||
import java.time.LocalDateTime; | |||||
import static com.ningdatech.kqapi.common.constant.BaseFieldConst.*; | |||||
/** | |||||
* <p> | |||||
* BaseFieldFillHandler | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 14:36 2024/4/20 | |||||
*/ | |||||
@Slf4j | |||||
@Component | |||||
public class BaseFieldFillHandler implements MetaObjectHandler { | |||||
private Long getUserId() { | |||||
if (LoginUserUtil.isLogin()) { | |||||
return LoginUserUtil.getUserId(); | |||||
} | |||||
return 0L; | |||||
} | |||||
@Override | |||||
public void insertFill(MetaObject metaObject) { | |||||
long userId = getUserId(); | |||||
LocalDateTime now = LocalDateTime.now(); | |||||
this.fillStrategy(metaObject, CREATE_BY, userId); | |||||
this.fillStrategy(metaObject, CREATE_ON, now); | |||||
this.fillStrategy(metaObject, UPDATE_BY, userId); | |||||
this.fillStrategy(metaObject, UPDATE_ON, now); | |||||
} | |||||
@Override | |||||
public void updateFill(MetaObject metaObject) { | |||||
this.fillStrategy(metaObject, UPDATE_BY, getUserId()); | |||||
this.fillStrategy(metaObject, UPDATE_ON, LocalDateTime.now()); | |||||
} | |||||
} |
@@ -19,9 +19,12 @@ import javax.validation.ConstraintViolationException; | |||||
import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||
/** | /** | ||||
* @description: 统一错误处理 | |||||
* @author: liuxinxin | |||||
* @date: 2023/01/03 11:39 | |||||
* <p> | |||||
* GlobalExceptionHandler | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 15:16 2024/4/20 | |||||
*/ | */ | ||||
@Slf4j | @Slf4j | ||||
@ControllerAdvice | @ControllerAdvice | ||||
@@ -11,11 +11,17 @@ import org.springframework.web.bind.annotation.RestControllerAdvice; | |||||
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; | import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; | ||||
/** | /** | ||||
* @Author liuxinxin | |||||
* @Date 2021/7/21 11:26 | |||||
* @Version 1.0 | |||||
**/ | |||||
* <p> | |||||
* GlobalResponseHandler | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 15:16 2024/4/20 | |||||
*/ | |||||
@RestControllerAdvice(basePackages = { | @RestControllerAdvice(basePackages = { | ||||
"com.ningdatech.kqapi.admin.controller", | |||||
"com.ningdatech.kqapi.user.controller", | |||||
"com.ningdatech.kqapi.security.controller", | |||||
"com.ningdatech.kqapi.zzsfw.controller", | "com.ningdatech.kqapi.zzsfw.controller", | ||||
"com.ningdatech.kqapi.scheduler.controller" | "com.ningdatech.kqapi.scheduler.controller" | ||||
}) | }) | ||||
@@ -24,24 +30,18 @@ public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | |||||
private static final String SWAGGER_CLASS_PREFIX = "springfox.documentation"; | private static final String SWAGGER_CLASS_PREFIX = "springfox.documentation"; | ||||
@Override | @Override | ||||
public boolean supports(MethodParameter methodParameter, Class<? extends HttpMessageConverter<?>> aClass) { | |||||
public boolean supports(MethodParameter methodParameter, | |||||
Class<? extends HttpMessageConverter<?>> aClass) { | |||||
return filter(methodParameter); | return filter(methodParameter); | ||||
} | } | ||||
@Override | @Override | ||||
public Object beforeBodyWrite(Object o, MethodParameter methodParameter, MediaType mediaType, | |||||
Class<? extends HttpMessageConverter<?>> aClass, ServerHttpRequest serverHttpRequest, | |||||
public Object beforeBodyWrite(Object o, MethodParameter methodParameter, | |||||
MediaType mediaType, | |||||
Class<? extends HttpMessageConverter<?>> aClass, | |||||
ServerHttpRequest serverHttpRequest, | |||||
ServerHttpResponse serverHttpResponse) { | ServerHttpResponse serverHttpResponse) { | ||||
ApiResponse<Object> apiResponse = ApiResponse.ofSuccess(o); | |||||
// 处理字符串时,遇到了类型转换的问题,debug一步一步跟踪,原来是对于字符串的ContentType是“text-plain”, | |||||
// ConverterType是StringHttpMessageConverter这个类型转换, | |||||
// 由于将结果封装成了自定义的ApiResponse类型,所以有ApiResponse转换成String报错 | |||||
// 所以需要对String类型的返回值单独进行处理 | |||||
// if (o instanceof String) { | |||||
// return JSONUtil.toJsonStr(apiResponse); | |||||
// } | |||||
return ApiResponse.ofSuccess(o); | return ApiResponse.ofSuccess(o); | ||||
// return o; | |||||
} | } | ||||
private Boolean filter(MethodParameter methodParameter) { | private Boolean filter(MethodParameter methodParameter) { | ||||
@@ -1,8 +1,7 @@ | |||||
package com.ningdatech.kqapi.common.helper; | package com.ningdatech.kqapi.common.helper; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
import java.util.List; | import java.util.List; | ||||
@@ -5,11 +5,11 @@ import com.github.benmanes.caffeine.cache.Caffeine; | |||||
import com.github.benmanes.caffeine.cache.LoadingCache; | import com.github.benmanes.caffeine.cache.LoadingCache; | ||||
import com.google.common.collect.Lists; | import com.google.common.collect.Lists; | ||||
import com.ningdatech.kqapi.common.constant.BizConst; | import com.ningdatech.kqapi.common.constant.BizConst; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.ComponentsMatterEliminateEntity; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.ComponentsMatterEliminateEntity; | |||||
import com.ningdatech.kqapi.zzsfw.service.ComponentsMatterEliminateService; | import com.ningdatech.kqapi.zzsfw.service.ComponentsMatterEliminateService; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.MatterKey; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.MatterKey; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
@@ -2,7 +2,7 @@ package com.ningdatech.kqapi.common.helper.impl; | |||||
import com.ningdatech.kqapi.common.helper.MatterCacheHelper; | import com.ningdatech.kqapi.common.helper.MatterCacheHelper; | ||||
import com.ningdatech.kqapi.common.helper.basic.AbstractMatterCacheHelper; | import com.ningdatech.kqapi.common.helper.basic.AbstractMatterCacheHelper; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
@@ -1,95 +0,0 @@ | |||||
package com.ningdatech.kqapi.common.util; | |||||
import org.springframework.context.ApplicationContext; | |||||
import org.springframework.util.Assert; | |||||
import java.util.Map; | |||||
/** | |||||
* Spring工具类 | |||||
* | |||||
* @author WendyYang | |||||
* @date 2017-12-25 16:27 | |||||
*/ | |||||
public final class SpringUtils { | |||||
private SpringUtils() { | |||||
} | |||||
/** | |||||
* 单例Holder模式: 优点:将懒加载和线程安全完美结合的一种方式(无锁)。(推荐) | |||||
* | |||||
* @return 实实例 | |||||
*/ | |||||
public static SpringUtils getInstance() { | |||||
return SpringUtilsHolder.INSTANCE; | |||||
} | |||||
private static ApplicationContext applicationContext; | |||||
private static ApplicationContext parentApplicationContext; | |||||
public static ApplicationContext getApplicationContext() { | |||||
return applicationContext; | |||||
} | |||||
public static void setApplicationContext(ApplicationContext ctx) { | |||||
Assert.notNull(ctx, "SpringUtil injection ApplicationContext is null"); | |||||
applicationContext = ctx; | |||||
parentApplicationContext = ctx.getParent(); | |||||
} | |||||
public static Object getBean(String name) { | |||||
Assert.hasText(name, "SpringUtil name is null or empty"); | |||||
try { | |||||
return applicationContext.getBean(name); | |||||
} catch (Exception e) { | |||||
return parentApplicationContext.getBean(name); | |||||
} | |||||
} | |||||
public static <T> T getBean(String name, Class<T> type) { | |||||
Assert.hasText(name, "SpringUtil name is null or empty"); | |||||
Assert.notNull(type, "SpringUtil type is null"); | |||||
try { | |||||
return applicationContext.getBean(name, type); | |||||
} catch (Exception e) { | |||||
return parentApplicationContext.getBean(name, type); | |||||
} | |||||
} | |||||
public static <T> T getBean(Class<T> type) { | |||||
Assert.notNull(type, "SpringUtil type is null"); | |||||
try { | |||||
return applicationContext.getBean(type); | |||||
} catch (Exception e) { | |||||
return parentApplicationContext.getBean(type); | |||||
} | |||||
} | |||||
public static <T> Map<String, T> getBeansOfType(Class<T> type) { | |||||
Assert.notNull(type, "SpringUtil type is null"); | |||||
try { | |||||
return applicationContext.getBeansOfType(type); | |||||
} catch (Exception e) { | |||||
return parentApplicationContext.getBeansOfType(type); | |||||
} | |||||
} | |||||
public static ApplicationContext publishEvent(Object event) { | |||||
applicationContext.publishEvent(event); | |||||
return applicationContext; | |||||
} | |||||
/** | |||||
* <p> | |||||
* 类级的内部类,也就是静态的成员式内部类,该内部类的实例与外部类的实例 | |||||
* 没有绑定关系,而且只有被调用到才会装载,从而实现了延迟加载 | |||||
*/ | |||||
private static class SpringUtilsHolder { | |||||
/** | |||||
* 静态初始化器,由JVM来保证线程安全 | |||||
*/ | |||||
private static final SpringUtils INSTANCE = new SpringUtils(); | |||||
} | |||||
} |
@@ -1,14 +1,13 @@ | |||||
package com.ningdatech.kqapi.scheduler.manage; | package com.ningdatech.kqapi.scheduler.manage; | ||||
import cn.hutool.core.bean.BeanUtil; | import cn.hutool.core.bean.BeanUtil; | ||||
import cn.hutool.core.collection.CollUtil; | |||||
import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMattersDeduplicateDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMenuDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwPolicyDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.NdKqZzsfwMattersDeduplicateDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.NdKqZzsfwMenuDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.NdKqZzsfwPolicyDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwPolicyService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwPolicyService; | ||||
@@ -4,8 +4,7 @@ import cn.hutool.core.date.StopWatch; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.google.common.collect.Lists; | import com.google.common.collect.Lists; | ||||
import com.ningdatech.kqapi.common.model.entity.Item; | import com.ningdatech.kqapi.common.model.entity.Item; | ||||
import com.ningdatech.kqapi.common.util.HttpUtil; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
@@ -30,17 +29,11 @@ import org.springframework.util.MultiValueMap; | |||||
import org.springframework.web.client.RestTemplate; | import org.springframework.web.client.RestTemplate; | ||||
import javax.net.ssl.SSLContext; | import javax.net.ssl.SSLContext; | ||||
import java.io.BufferedReader; | |||||
import java.io.IOException; | |||||
import java.io.InputStreamReader; | |||||
import java.net.*; | import java.net.*; | ||||
import java.util.HashMap; | import java.util.HashMap; | ||||
import java.util.List; | import java.util.List; | ||||
import java.util.Map; | import java.util.Map; | ||||
import java.util.Objects; | import java.util.Objects; | ||||
import java.util.concurrent.CompletableFuture; | |||||
import java.util.regex.Matcher; | |||||
import java.util.regex.Pattern; | |||||
/** | /** | ||||
* @author ZPF | * @author ZPF | ||||
@@ -3,7 +3,7 @@ package com.ningdatech.kqapi.scheduler.task; | |||||
import cn.hutool.core.date.StopWatch; | import cn.hutool.core.date.StopWatch; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.kqapi.scheduler.contants.TaskContant; | import com.ningdatech.kqapi.scheduler.contants.TaskContant; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
@@ -7,12 +7,12 @@ import com.github.benmanes.caffeine.cache.LoadingCache; | |||||
import com.ningdatech.kqapi.common.constant.BizConst; | import com.ningdatech.kqapi.common.constant.BizConst; | ||||
import com.ningdatech.kqapi.common.enumeration.CommonEnum; | import com.ningdatech.kqapi.common.enumeration.CommonEnum; | ||||
import com.ningdatech.kqapi.common.helper.MatterCacheHelper; | import com.ningdatech.kqapi.common.helper.MatterCacheHelper; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.ComponentsMatterEliminateEntity; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.ComponentsMatterEliminateEntity; | |||||
import com.ningdatech.kqapi.zzsfw.service.ComponentsMatterEliminateService; | import com.ningdatech.kqapi.zzsfw.service.ComponentsMatterEliminateService; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.MatterKey; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.MatterKey; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.manage.MatterManage; | import com.ningdatech.kqapi.zzsfw.manage.MatterManage; | ||||
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | ||||
@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.controller; | package com.ningdatech.kqapi.zzsfw.controller; | ||||
import com.ningdatech.kqapi.zzsfw.entity.dto.DscSxAdsShareItemQltQlsxCommonIDVKqDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.DscSxAdsShareItemQltQlsxCommonIDVKqDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.manage.QlManage; | import com.ningdatech.kqapi.zzsfw.manage.QlManage; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
@@ -1,12 +1,11 @@ | |||||
package com.ningdatech.kqapi.zzsfw.controller; | package com.ningdatech.kqapi.zzsfw.controller; | ||||
import cn.hutool.core.collection.CollUtil; | |||||
import com.ningdatech.kqapi.common.exception.BizException; | import com.ningdatech.kqapi.common.exception.BizException; | ||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMattersDeduplicateDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMenuDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.MatterTopVO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.MattersVO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.TreeVO; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.NdKqZzsfwMattersDeduplicateDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.NdKqZzsfwMenuDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.vo.MatterTopVO; | |||||
import com.ningdatech.kqapi.zzsfw.model.vo.MattersVO; | |||||
import com.ningdatech.kqapi.zzsfw.model.vo.TreeVO; | |||||
import com.ningdatech.kqapi.zzsfw.manage.MatterManage; | import com.ningdatech.kqapi.zzsfw.manage.MatterManage; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
@@ -1,8 +1,8 @@ | |||||
package com.ningdatech.kqapi.zzsfw.controller; | package com.ningdatech.kqapi.zzsfw.controller; | ||||
import com.ningdatech.kqapi.common.model.PageVo; | import com.ningdatech.kqapi.common.model.PageVo; | ||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwPolicyDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.NdKqZzsfwPolicyVO; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.NdKqZzsfwPolicyDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.vo.NdKqZzsfwPolicyVO; | |||||
import com.ningdatech.kqapi.zzsfw.manage.PolicyManage; | import com.ningdatech.kqapi.zzsfw.manage.PolicyManage; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
@@ -2,19 +2,16 @@ package com.ningdatech.kqapi.zzsfw.manage; | |||||
import cn.hutool.core.bean.BeanUtil; | import cn.hutool.core.bean.BeanUtil; | ||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import cn.hutool.core.date.StopWatch; | |||||
import cn.hutool.core.lang.Assert; | import cn.hutool.core.lang.Assert; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.kqapi.common.enumeration.CommonEnum; | |||||
import com.ningdatech.kqapi.common.helper.MatterCacheHelper; | |||||
import com.ningdatech.kqapi.zzsfw.constants.ZzsfwMenuConstant; | import com.ningdatech.kqapi.zzsfw.constants.ZzsfwMenuConstant; | ||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMattersDeduplicateDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMenuDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.MatterTopVO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.MattersVO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.TreeVO; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.NdKqZzsfwMattersDeduplicateDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.NdKqZzsfwMenuDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.model.vo.MatterTopVO; | |||||
import com.ningdatech.kqapi.zzsfw.model.vo.MattersVO; | |||||
import com.ningdatech.kqapi.zzsfw.model.vo.TreeVO; | |||||
import com.ningdatech.kqapi.zzsfw.enumeration.ItemTypeEnum; | import com.ningdatech.kqapi.zzsfw.enumeration.ItemTypeEnum; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | ||||
@@ -102,13 +99,12 @@ public class MatterManage { | |||||
(!m.getType().equals(ItemTypeEnum.GOV.getCode()) || Objects.nonNull(m.getWebapplyurl()))) | (!m.getType().equals(ItemTypeEnum.GOV.getCode()) || Objects.nonNull(m.getWebapplyurl()))) | ||||
.collect(Collectors.toList()); | .collect(Collectors.toList()); | ||||
Set<String> zoneSet = new HashSet<>(); | Set<String> zoneSet = new HashSet<>(); | ||||
List<TreeVO> res = finalMatters.stream().filter(m -> zoneSet.add(m.getZoneName())).map(m -> { | |||||
return finalMatters.stream().filter(m -> zoneSet.add(m.getZoneName())).map(m -> { | |||||
TreeVO zone = new TreeVO(); | TreeVO zone = new TreeVO(); | ||||
zone.setName(m.getZoneName()); | zone.setName(m.getZoneName()); | ||||
zone.setType(ZzsfwMenuConstant.MENU_TYPE_ZONE); | zone.setType(ZzsfwMenuConstant.MENU_TYPE_ZONE); | ||||
return zone; | return zone; | ||||
}).collect(Collectors.toList()); | }).collect(Collectors.toList()); | ||||
return res; | |||||
} | } | ||||
public List<TreeVO> getWindows(String zoneName) { | public List<TreeVO> getWindows(String zoneName) { | ||||
@@ -5,9 +5,9 @@ import cn.hutool.core.collection.CollUtil; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
import com.ningdatech.kqapi.common.model.PageVo; | import com.ningdatech.kqapi.common.model.PageVo; | ||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwPolicyDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.NdKqZzsfwPolicyVO; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.NdKqZzsfwPolicyDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.model.vo.NdKqZzsfwPolicyVO; | |||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwPolicyService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwPolicyService; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
@@ -1,27 +1,15 @@ | |||||
package com.ningdatech.kqapi.zzsfw.manage; | package com.ningdatech.kqapi.zzsfw.manage; | ||||
import cn.hutool.core.bean.BeanUtil; | |||||
import cn.hutool.core.collection.CollUtil; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.kqapi.zzsfw.constants.ZzsfwMenuConstant; | |||||
import com.ningdatech.kqapi.zzsfw.entity.dto.DscSxAdsShareItemQltQlsxCommonIDVKqDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMattersDeduplicateDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMenuDTO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.MatterTopVO; | |||||
import com.ningdatech.kqapi.zzsfw.entity.vo.TreeVO; | |||||
import com.ningdatech.kqapi.zzsfw.model.dto.DscSxAdsShareItemQltQlsxCommonIDVKqDTO; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | |||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | |||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import java.util.*; | import java.util.*; | ||||
import java.util.stream.Collectors; | |||||
/** | /** | ||||
* @Classname MatterManage | * @Classname MatterManage | ||||
@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.mapper; | package com.ningdatech.kqapi.zzsfw.mapper; | ||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.ComponentsMatterEliminateEntity; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.ComponentsMatterEliminateEntity; | |||||
/** | /** | ||||
* @author wangrenkang | * @author wangrenkang | ||||
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.kqapi.zzsfw.mapper; | package com.ningdatech.kqapi.zzsfw.mapper; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
/** | /** | ||||
@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.mapper; | package com.ningdatech.kqapi.zzsfw.mapper; | ||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.kqapi.zzsfw.mapper; | package com.ningdatech.kqapi.zzsfw.mapper; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMenu; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
/** | /** | ||||
@@ -1,8 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.mapper; | package com.ningdatech.kqapi.zzsfw.mapper; | ||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwPolicy; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.dto; | |||||
package com.ningdatech.kqapi.zzsfw.model.dto; | |||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.dto; | |||||
package com.ningdatech.kqapi.zzsfw.model.dto; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.dto; | |||||
package com.ningdatech.kqapi.zzsfw.model.dto; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.dto; | |||||
package com.ningdatech.kqapi.zzsfw.model.dto; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; |
@@ -1,9 +1,8 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.entity; | |||||
package com.ningdatech.kqapi.zzsfw.model.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.entity; | |||||
package com.ningdatech.kqapi.zzsfw.model.entity; | |||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.entity; | |||||
package com.ningdatech.kqapi.zzsfw.model.entity; | |||||
import lombok.Data; | import lombok.Data; | ||||
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.entity; | |||||
package com.ningdatech.kqapi.zzsfw.model.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.entity; | |||||
package com.ningdatech.kqapi.zzsfw.model.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
@@ -19,7 +19,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@TableName("nd_kq_zzsfw_menu") | @TableName("nd_kq_zzsfw_menu") | ||||
@ApiModel(value = "NdKqZzsfwMenu对象", description = "") | |||||
@ApiModel(value = "NdKqZzsfwMenu对象") | |||||
public class NdKqZzsfwMenu implements Serializable { | public class NdKqZzsfwMenu implements Serializable { | ||||
private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.entity; | |||||
package com.ningdatech.kqapi.zzsfw.model.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.vo; | |||||
package com.ningdatech.kqapi.zzsfw.model.vo; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.vo; | |||||
package com.ningdatech.kqapi.zzsfw.model.vo; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.vo; | |||||
package com.ningdatech.kqapi.zzsfw.model.vo; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.vo; | |||||
package com.ningdatech.kqapi.zzsfw.model.vo; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.vo; | |||||
package com.ningdatech.kqapi.zzsfw.model.vo; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; |
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.kqapi.zzsfw.entity.vo; | |||||
package com.ningdatech.kqapi.zzsfw.model.vo; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; |
@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service; | package com.ningdatech.kqapi.zzsfw.service; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.ComponentsMatterEliminateEntity; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.ComponentsMatterEliminateEntity; | |||||
// ComponentsMatterEliminateService.java | // ComponentsMatterEliminateService.java | ||||
public interface ComponentsMatterEliminateService extends IService<ComponentsMatterEliminateEntity> { | public interface ComponentsMatterEliminateService extends IService<ComponentsMatterEliminateEntity> { | ||||
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service; | package com.ningdatech.kqapi.zzsfw.service; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
/** | /** | ||||
@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service; | package com.ningdatech.kqapi.zzsfw.service; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service; | package com.ningdatech.kqapi.zzsfw.service; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMenu; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
/** | /** | ||||
@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service; | package com.ningdatech.kqapi.zzsfw.service; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwPolicy; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service.impl; | package com.ningdatech.kqapi.zzsfw.service.impl; | ||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.ComponentsMatterEliminateEntity; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.ComponentsMatterEliminateEntity; | |||||
import com.ningdatech.kqapi.zzsfw.mapper.ComponentsMatterEliminateMapper; | import com.ningdatech.kqapi.zzsfw.mapper.ComponentsMatterEliminateMapper; | ||||
import com.ningdatech.kqapi.zzsfw.service.ComponentsMatterEliminateService; | import com.ningdatech.kqapi.zzsfw.service.ComponentsMatterEliminateService; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service.impl; | package com.ningdatech.kqapi.zzsfw.service.impl; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.mapper.DscSxAdsShareItemQltQlsxCommonIDVKqMapper; | import com.ningdatech.kqapi.zzsfw.mapper.DscSxAdsShareItemQltQlsxCommonIDVKqMapper; | ||||
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | ||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service.impl; | package com.ningdatech.kqapi.zzsfw.service.impl; | ||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.mapper.NdKqZzsfwMatterDeduplicateMapper; | import com.ningdatech.kqapi.zzsfw.mapper.NdKqZzsfwMatterDeduplicateMapper; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service.impl; | package com.ningdatech.kqapi.zzsfw.service.impl; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.mapper.NdKqZzsfwMenuMapper; | import com.ningdatech.kqapi.zzsfw.mapper.NdKqZzsfwMenuMapper; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | ||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
@@ -1,7 +1,7 @@ | |||||
package com.ningdatech.kqapi.zzsfw.service.impl; | package com.ningdatech.kqapi.zzsfw.service.impl; | ||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.mapper.NdKqZzsfwPolicyMapper; | import com.ningdatech.kqapi.zzsfw.mapper.NdKqZzsfwPolicyMapper; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwPolicyService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwPolicyService; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
@@ -76,6 +76,7 @@ mybatis-plus: | |||||
db-config: | db-config: | ||||
logic-delete-value: true | logic-delete-value: true | ||||
logic-not-delete-value: false | logic-not-delete-value: false | ||||
logic-delete-field: deleted | |||||
logging: | logging: | ||||
config: classpath:logback-spring.xml | config: classpath:logback-spring.xml | ||||
#日志配置 | #日志配置 | ||||
@@ -77,6 +77,7 @@ mybatis-plus: | |||||
db-config: | db-config: | ||||
logic-delete-value: true | logic-delete-value: true | ||||
logic-not-delete-value: false | logic-not-delete-value: false | ||||
logic-delete-field: deleted | |||||
logging: | logging: | ||||
config: classpath:logback-spring.xml | config: classpath:logback-spring.xml | ||||
#日志配置 | #日志配置 | ||||
@@ -3,8 +3,8 @@ package com.ningdatech.kqapi.menu; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.google.common.collect.Sets; | import com.google.common.collect.Sets; | ||||
import com.ningdatech.kqapi.AppTests; | import com.ningdatech.kqapi.AppTests; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMattersDeduplicate; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService; | ||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
@@ -2,10 +2,8 @@ package com.ningdatech.kqapi.menu; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.kqapi.AppTests; | import com.ningdatech.kqapi.AppTests; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.enumeration.ItemTypeEnum; | import com.ningdatech.kqapi.zzsfw.enumeration.ItemTypeEnum; | ||||
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | |||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | ||||
import org.apache.poi.ss.usermodel.*; | import org.apache.poi.ss.usermodel.*; | ||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook; | import org.apache.poi.xssf.usermodel.XSSFWorkbook; | ||||
@@ -19,7 +17,6 @@ import java.sql.DriverManager; | |||||
import java.sql.Statement; | import java.sql.Statement; | ||||
import java.text.DecimalFormat; | import java.text.DecimalFormat; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.Objects; | |||||
/** | /** | ||||
* @Classname MenuTest | * @Classname MenuTest | ||||
@@ -3,11 +3,7 @@ package com.ningdatech.kqapi.menu; | |||||
import cn.hutool.core.date.DateUtil; | import cn.hutool.core.date.DateUtil; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.kqapi.AppTests; | import com.ningdatech.kqapi.AppTests; | ||||
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; | |||||
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; | |||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; | |||||
import com.ningdatech.kqapi.zzsfw.model.entity.NdKqZzsfwPolicy; | |||||
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwPolicyService; | import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwPolicyService; | ||||
import org.apache.poi.ss.usermodel.Row; | import org.apache.poi.ss.usermodel.Row; | ||||
import org.apache.poi.ss.usermodel.Sheet; | import org.apache.poi.ss.usermodel.Sheet; | ||||
@@ -76,6 +76,7 @@ mybatis-plus: | |||||
db-config: | db-config: | ||||
logic-delete-value: true | logic-delete-value: true | ||||
logic-not-delete-value: false | logic-not-delete-value: false | ||||
logic-delete-field: deleted | |||||
logging: | logging: | ||||
config: classpath:logback-spring.xml | config: classpath:logback-spring.xml | ||||
#日志配置 | #日志配置 | ||||
@@ -77,6 +77,7 @@ mybatis-plus: | |||||
db-config: | db-config: | ||||
logic-delete-value: true | logic-delete-value: true | ||||
logic-not-delete-value: false | logic-not-delete-value: false | ||||
logic-delete-field: deleted | |||||
logging: | logging: | ||||
config: classpath:logback-spring.xml | config: classpath:logback-spring.xml | ||||
#日志配置 | #日志配置 | ||||
@@ -76,6 +76,7 @@ mybatis-plus: | |||||
db-config: | db-config: | ||||
logic-delete-value: true | logic-delete-value: true | ||||
logic-not-delete-value: false | logic-not-delete-value: false | ||||
logic-delete-field: deleted | |||||
logging: | logging: | ||||
config: classpath:logback-spring.xml | config: classpath:logback-spring.xml | ||||
#日志配置 | #日志配置 | ||||
@@ -77,6 +77,7 @@ mybatis-plus: | |||||
db-config: | db-config: | ||||
logic-delete-value: true | logic-delete-value: true | ||||
logic-not-delete-value: false | logic-not-delete-value: false | ||||
logic-delete-field: deleted | |||||
logging: | logging: | ||||
config: classpath:logback-spring.xml | config: classpath:logback-spring.xml | ||||
#日志配置 | #日志配置 | ||||