diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/CsEquipmentDeliveryMapper.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/CsEquipmentDeliveryMapper.java index 23690a9..2956430 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/CsEquipmentDeliveryMapper.java +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/CsEquipmentDeliveryMapper.java @@ -11,6 +11,8 @@ import com.njcn.csdevice.pojo.vo.ProjectEquipmentVO; import com.njcn.system.pojo.vo.EleEpdPqdVO; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * * Description: @@ -21,7 +23,7 @@ import org.apache.ibatis.annotations.Param; * @version V1.0.0 */ public interface CsEquipmentDeliveryMapper extends BaseMapper { - Page queryProjectEquipmentVO(Page returnpage,@Param("projectEquipmentQueryParm")ProjectEquipmentQueryParm projectEquipmentQueryParm); + Page queryProjectEquipmentVO(Page returnpage,@Param("projectEquipmentQueryParm")ProjectEquipmentQueryParm projectEquipmentQueryParm,@Param("device")List device); Page page(Page returnpage, @Param("ew") QueryWrapper queryWrapper); diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/CsEquipmentDeliveryMapper.xml b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/CsEquipmentDeliveryMapper.xml index 62b8c1d..3cb57b7 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/CsEquipmentDeliveryMapper.xml +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/CsEquipmentDeliveryMapper.xml @@ -59,6 +59,10 @@ AND a.id = #{projectEquipmentQueryParm.engineerId} + and c.id in + + #{item} + order by a.create_time desc diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java index 5f8b832..e5075ee 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java @@ -3,6 +3,7 @@ package com.njcn.csdevice.service.impl; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.cloud.commons.lang.StringUtils; +import com.alibaba.nacos.client.naming.utils.CollectionUtils; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; @@ -63,6 +64,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl queryEquipmentByProject(ProjectEquipmentQueryParm projectEquipmentQueryParm) { Page returnpage = new Page<> (projectEquipmentQueryParm.getPageNum ( ), projectEquipmentQueryParm.getPageSize ( )); - if(StringUtils.isEmpty(projectEquipmentQueryParm.getEngineerId())||StringUtils.isEmpty(projectEquipmentQueryParm.getProjectId())){ + List device = roleEngineerDevService.getDevice(); + if(CollectionUtils.isEmpty(device)){ return returnpage; } - Page list = this.baseMapper.queryProjectEquipmentVO(returnpage,projectEquipmentQueryParm); + Page list = this.baseMapper.queryProjectEquipmentVO(returnpage,projectEquipmentQueryParm,device); return list; } diff --git a/cs-harmonic/cs-harmonic-api/src/main/java/com/njcn/csharmonic/pojo/vo/ThdDataVO.java b/cs-harmonic/cs-harmonic-api/src/main/java/com/njcn/csharmonic/pojo/vo/ThdDataVO.java index 1972059..4b6fa7f 100644 --- a/cs-harmonic/cs-harmonic-api/src/main/java/com/njcn/csharmonic/pojo/vo/ThdDataVO.java +++ b/cs-harmonic/cs-harmonic-api/src/main/java/com/njcn/csharmonic/pojo/vo/ThdDataVO.java @@ -20,6 +20,8 @@ public class ThdDataVO { private LocalDateTime time; private String lineId; private String position; + private String lineName; + private String phase; private String statMethod; diff --git a/cs-harmonic/cs-harmonic-boot/src/main/java/com/njcn/csharmonic/service/impl/StableDataServiceImpl.java b/cs-harmonic/cs-harmonic-boot/src/main/java/com/njcn/csharmonic/service/impl/StableDataServiceImpl.java index 6dbbd36..27f3b77 100644 --- a/cs-harmonic/cs-harmonic-boot/src/main/java/com/njcn/csharmonic/service/impl/StableDataServiceImpl.java +++ b/cs-harmonic/cs-harmonic-boot/src/main/java/com/njcn/csharmonic/service/impl/StableDataServiceImpl.java @@ -1,5 +1,6 @@ package com.njcn.csharmonic.service.impl; +import cn.hutool.core.collection.CollectionUtil; import com.njcn.common.pojo.exception.BusinessException; import com.njcn.csdevice.api.CsLedgerFeignClient; import com.njcn.csdevice.api.CsLineFeignClient; @@ -154,6 +155,7 @@ public class StableDataServiceImpl implements StableDataService { @Override public List queryFisrtCommonStatistical(CommonStatisticalQueryParam commonStatisticalQueryParam) { + Optional.ofNullable(commonStatisticalQueryParam.getDevId()).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.DEVICE_LOSE)); List csLinePOList = csLineFeignClient.queryLineByDevId(commonStatisticalQueryParam.getDevId()).getData(); Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR)); @@ -183,8 +185,12 @@ public class StableDataServiceImpl implements StableDataService { @Override public List queryCommonStatisticalByTime(CommonStatisticalQueryParam commonStatisticalQueryParam) { + Optional.ofNullable(commonStatisticalQueryParam.getDevId()).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.DEVICE_LOSE)); + List csLinePOList = csLineFeignClient.queryLineByDevId(commonStatisticalQueryParam.getDevId()).getData(); - Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR)); + if(CollectionUtil.isEmpty(csLinePOList)){ + throw new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR); + } List collect = csLinePOList.stream().map(CsLinePO::getLineId).collect(Collectors.toList()); @@ -211,8 +217,14 @@ public class StableDataServiceImpl implements StableDataService { @Override public List queryLineCommonStatistical(CommonStatisticalQueryParam commonStatisticalQueryParam) { + + if(CollectionUtil.isEmpty(commonStatisticalQueryParam.getLineList())){ + throw new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR); + } List csLinePOList = csLineFeignClient.queryLineById(commonStatisticalQueryParam.getLineList()).getData(); - Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR)); + if(CollectionUtil.isEmpty(csLinePOList)){ + throw new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR); + } List collect = csLinePOList.stream().map(CsLinePO::getLineId).collect(Collectors.toList()); @@ -226,6 +238,9 @@ public class StableDataServiceImpl implements StableDataService { vo.setLineId(temp.getLineId()); vo.setPhase(temp.getPhaseType()); String position = csLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), vo.getLineId())).collect(Collectors.toList()).get(0).getPosition(); + String lineName = csLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), vo.getLineId())).collect(Collectors.toList()).get(0).getName(); + + vo.setLineName(lineName); vo.setPosition(position); vo.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime()); vo.setStatMethod(temp.getValueType()); diff --git a/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/param/AppBaseInformationAddParm.java b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/param/AppBaseInformationAddParm.java new file mode 100644 index 0000000..799199f --- /dev/null +++ b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/param/AppBaseInformationAddParm.java @@ -0,0 +1,39 @@ +package com.njcn.cssystem.pojo.param; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ + +/** + * app基础信息表 + */ +@Data +public class AppBaseInformationAddParm { + + /** + * 内容 + */ + @ApiModelProperty(value = "内容") + @NotBlank(message="内容不能为空!") + private String content; + + /** + * 类型(字典数据) + */ + @ApiModelProperty(value = "类型") + @NotBlank(message="类型不能为空!") + private String type; + + +} \ No newline at end of file diff --git a/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/param/AppPersonSetAddParm.java b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/param/AppPersonSetAddParm.java new file mode 100644 index 0000000..45d7593 --- /dev/null +++ b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/param/AppPersonSetAddParm.java @@ -0,0 +1,69 @@ +package com.njcn.cssystem.pojo.param; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ + +/** + * app个人中心-设置信息 + */ +@Data +public class AppPersonSetAddParm { + + + /** + * 用户协议(基础信息id) + */ + @ApiModelProperty(value = "用户协议(基础信息id)") + @NotBlank(message="用户协议不能为空!") + private String userAgreement; + + /** + * 系统介绍(基础信息id) + */ + @ApiModelProperty(value = "系统介绍(基础信息id)") + @NotBlank(message="系统介绍不能为空!") + private String systemIntroduction; + + /** + * 使用手册(基础信息id) + */ + @ApiModelProperty(value = "使用手册(基础信息id)") + @NotBlank(message="使用手册不能为空!") + private String userManual; + + /** + * 资料库(基础信息id) + */ + @ApiModelProperty(value = "资料库(基础信息id)") + @NotBlank(message="资料库不能为空!") + private String dataBase; + + /** + * 公司介绍(基础信息id) + */ + @ApiModelProperty(value = "公司介绍(基础信息id)") + @NotBlank(message="公司介绍不能为空!") + private String companyProfile; + + /** + * 关于我们(基础信息id) + */ + @ApiModelProperty(value = "关于我们(基础信息id)") + @NotBlank(message="关于我们id不能为空!") + private String aboutUs; + + + +} \ No newline at end of file diff --git a/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/po/AppBaseInformationPO.java b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/po/AppBaseInformationPO.java new file mode 100644 index 0000000..07f131e --- /dev/null +++ b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/po/AppBaseInformationPO.java @@ -0,0 +1,45 @@ +package com.njcn.cssystem.pojo.po; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.njcn.db.bo.BaseEntity; +import lombok.Data; +import org.influxdb.annotation.Column; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +/** + * app基础信息表 + */ +@Data +@TableName(value = "app_base_information") +public class AppBaseInformationPO extends BaseEntity { + /** + * id + */ + @TableId(value = "id", type = IdType.ASSIGN_UUID) + private String id; + + /** + * 内容 + */ + @TableField(value = "content") + private String content; + + /** + * 类型(字典数据) + */ + @TableField(value = "type") + private String type; + + +} \ No newline at end of file diff --git a/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/po/AppPersonSetPO.java b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/po/AppPersonSetPO.java new file mode 100644 index 0000000..4a901f1 --- /dev/null +++ b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/po/AppPersonSetPO.java @@ -0,0 +1,72 @@ +package com.njcn.cssystem.pojo.po; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.njcn.db.bo.BaseEntity; +import lombok.Data; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +/** + * app个人中心-设置信息 + */ +@Data +@TableName(value = "app_person_set") +public class AppPersonSetPO extends BaseEntity { + /** + * id + */ + @TableField(value = "id") + private String id; + + /** + * 用户协议(基础信息id) + */ + @TableField(value = "user_agreement") + private String userAgreement; + + /** + * 系统介绍(基础信息id) + */ + @TableField(value = "system_introduction") + private String systemIntroduction; + + /** + * 使用手册(基础信息id) + */ + @TableField(value = "user_manual") + private String userManual; + + /** + * 资料库(基础信息id) + */ + @TableField(value = "data_base") + private String dataBase; + + /** + * 公司介绍(基础信息id) + */ + @TableField(value = "company_profile") + private String companyProfile; + + /** + * 关于我们(基础信息id) + */ + @TableField(value = "about_us") + private String aboutUs; + + /** + * 状态(0:删除 1:正常) + */ + @TableField(value = "status") + private String status; + + +} \ No newline at end of file diff --git a/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/vo/AppBaseInformationVO.java b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/vo/AppBaseInformationVO.java new file mode 100644 index 0000000..91d4925 --- /dev/null +++ b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/vo/AppBaseInformationVO.java @@ -0,0 +1,41 @@ +package com.njcn.cssystem.pojo.vo; + +import com.njcn.db.bo.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ + +/** + * app基础信息表 + */ +@Data +public class AppBaseInformationVO extends BaseEntity { + /** + * id + */ + @ApiModelProperty(value = "id") + private String id; + + /** + * 内容 + */ + @ApiModelProperty(value = "内容") + private String content; + + /** + * 类型(字典数据) + */ + @ApiModelProperty(value = "类型") + private String type; + + +} \ No newline at end of file diff --git a/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/vo/AppProjectVO.java b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/vo/AppProjectVO.java new file mode 100644 index 0000000..394dd28 --- /dev/null +++ b/cs-system/cs-system-api/src/main/java/com/njcn/cssystem/pojo/vo/AppProjectVO.java @@ -0,0 +1,86 @@ +package com.njcn.cssystem.pojo.vo; + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/3/27 10:24【需求编号】 + * + * @author clam + * @version V1.0.0 + */ + + +@Data +public class AppProjectVO { + /** + * 项目Id + */ + private String id; + /** + * 项目名称 + */ + private String name; + + private String engineeringId; + + private String engineeringName; + + /** + * 用户名称 + */ + private String userName; + + + /** + * 区域名称 + */ + private String area; + /** + * 拓扑图路径 + */ + private List topologyDiagramPaths; + + /** + * 中心点经度 + */ + private BigDecimal lng; + + /** + * 中心点纬度 + */ + private BigDecimal lat; + + /** + * 0:删除 1:正常 + */ + private String status; + + /** + * 创建用户 + */ + private String createBy; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新用户 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateTime; + + private String description; +} \ No newline at end of file diff --git a/cs-system/cs-system-boot/pom.xml b/cs-system/cs-system-boot/pom.xml index e7e6ff8..e05c31e 100644 --- a/cs-system/cs-system-boot/pom.xml +++ b/cs-system/cs-system-boot/pom.xml @@ -55,6 +55,12 @@ compile + + com.baomidou + dynamic-datasource-spring-boot-starter + 3.5.1 + + diff --git a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/CsSystemBootApplication.java b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/CsSystemBootApplication.java index f759970..2330097 100644 --- a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/CsSystemBootApplication.java +++ b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/CsSystemBootApplication.java @@ -6,6 +6,7 @@ import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.DependsOn; /** @@ -17,7 +18,6 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @MapperScan("com.njcn.**.mapper") @EnableFeignClients(basePackages = "com.njcn") @SpringBootApplication(scanBasePackages = "com.njcn") -@EnableMPP public class CsSystemBootApplication { public static void main(String[] args) { diff --git a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/controller/baseinfo/AppInfoController.java b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/controller/baseinfo/AppInfoController.java new file mode 100644 index 0000000..d7f7924 --- /dev/null +++ b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/controller/baseinfo/AppInfoController.java @@ -0,0 +1,118 @@ +package com.njcn.cssystem.controller.baseinfo; + + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.cssystem.pojo.param.AppBaseInformationAddParm; +import com.njcn.cssystem.pojo.param.AppPersonSetAddParm; +import com.njcn.cssystem.pojo.po.AppBaseInformationPO; +import com.njcn.cssystem.pojo.po.AppPersonSetPO; +import com.njcn.cssystem.pojo.vo.AppBaseInformationVO; +import com.njcn.cssystem.service.AppBaseInformationService; +import com.njcn.cssystem.service.AppPersonSetService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/4 9:02【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Slf4j +@RestController +@RequestMapping("/appinfo") +@Api(tags = "app信息") +@AllArgsConstructor +public class AppInfoController extends BaseController { + + private final AppBaseInformationService appBaseInformationService; + private final AppPersonSetService appPersonSetService; + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/addAppInfo") + @ApiOperation("新增/更新app基础信息") + @ApiImplicitParam(name = "AppBaseInformationAddParm", value = "新增app基础信息参数", required = true) + public HttpResult addAppInfo(@RequestBody @Validated AppBaseInformationAddParm AppBaseInformationAddParm){ + String methodDescribe = getMethodDescribe("addAppInfo"); + AppBaseInformationPO appBaseInformationPO = new AppBaseInformationPO (); + BeanUtils.copyProperties (AppBaseInformationAddParm, appBaseInformationPO); + QueryWrapper query = new QueryWrapper(); + query.eq("type",AppBaseInformationAddParm.getType()); + boolean save =false; + List list = appBaseInformationService.list(query); + if (CollectionUtil.isNotEmpty(list)) { + appBaseInformationPO = list.get(0); + appBaseInformationPO.setContent(AppBaseInformationAddParm.getContent()); + save = appBaseInformationService.updateById(appBaseInformationPO); + }else{ + save = appBaseInformationService.save (appBaseInformationPO); + + } + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, save, methodDescribe); + } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/addPersonSet") + @ApiOperation("新增app个人中心信息") + @ApiImplicitParam(name = "appPersonSetAddParm", value = "新增apppp个人中心信参数", required = true) + public HttpResult addPersonSet(@RequestBody @Validated AppPersonSetAddParm appPersonSetAddParm){ + String methodDescribe = getMethodDescribe("addPersonSet"); + AppPersonSetPO appPersonSetPO = new AppPersonSetPO (); + BeanUtils.copyProperties (appPersonSetAddParm, appPersonSetPO); + appPersonSetPO.setStatus ("1"); + boolean save = appPersonSetService.save (appPersonSetPO); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, save, methodDescribe); + } + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryPersonSet") + @ApiOperation("查询app个人中心信息") + public HttpResult queryPersonSet(){ + String methodDescribe = getMethodDescribe("queryPersonSet"); + + List list = appPersonSetService.list ( ); + AppPersonSetPO appPersonSetPO = list.stream ( ).filter (temp -> Objects.equals ("1", temp.getStatus ( ))).collect (Collectors.toList ( )).get (0); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, appPersonSetPO, methodDescribe); + } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryAppInfo") + @ApiOperation("查询app个人中心信息详情") + public HttpResult queryPersonSet(@RequestParam("id")String id ){ + String methodDescribe = getMethodDescribe("queryPersonSet"); + AppBaseInformationVO appBaseInformationVO = new AppBaseInformationVO(); + AppBaseInformationPO byId = appBaseInformationService.getById (id); + BeanUtils.copyProperties (byId,appBaseInformationVO); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, appBaseInformationVO, methodDescribe); + } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryAppInfoByType") + @ApiOperation("查询app个人中心信息详情") + public HttpResult queryAppInfoByType(@RequestParam("type")String type ){ + String methodDescribe = getMethodDescribe("queryAppInfoByType"); + AppBaseInformationVO appBaseInformationVO = new AppBaseInformationVO(); + + AppBaseInformationPO byId = appBaseInformationService.getByType(type); + BeanUtils.copyProperties (byId,appBaseInformationVO); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, appBaseInformationVO, methodDescribe); + } +} diff --git a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/mapper/AppBaseInformationMapper.java b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/mapper/AppBaseInformationMapper.java new file mode 100644 index 0000000..1eb3581 --- /dev/null +++ b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/mapper/AppBaseInformationMapper.java @@ -0,0 +1,16 @@ +package com.njcn.cssystem.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.cssystem.pojo.po.AppBaseInformationPO; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface AppBaseInformationMapper extends BaseMapper { +} \ No newline at end of file diff --git a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/mapper/AppPersonSetMapper.java b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/mapper/AppPersonSetMapper.java new file mode 100644 index 0000000..acdf91e --- /dev/null +++ b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/mapper/AppPersonSetMapper.java @@ -0,0 +1,16 @@ +package com.njcn.cssystem.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.cssystem.pojo.po.AppPersonSetPO; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface AppPersonSetMapper extends BaseMapper { +} \ No newline at end of file diff --git a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/mapper/mapping/AppPersonSetMapper.xml b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/mapper/mapping/AppPersonSetMapper.xml new file mode 100644 index 0000000..d410964 --- /dev/null +++ b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/mapper/mapping/AppPersonSetMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + id, user_agreement, system_introduction, user_manual, data_base, company_profile, + about_us, `status`, create_by, create_time, update_by, update_time + + \ No newline at end of file diff --git a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/AppBaseInformationService.java b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/AppBaseInformationService.java new file mode 100644 index 0000000..3c61478 --- /dev/null +++ b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/AppBaseInformationService.java @@ -0,0 +1,19 @@ +package com.njcn.cssystem.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.cssystem.pojo.po.AppBaseInformationPO; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface AppBaseInformationService extends IService{ + + + AppBaseInformationPO getByType(String type); +} diff --git a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/AppPersonSetService.java b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/AppPersonSetService.java new file mode 100644 index 0000000..c38c70b --- /dev/null +++ b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/AppPersonSetService.java @@ -0,0 +1,18 @@ +package com.njcn.cssystem.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.cssystem.pojo.po.AppPersonSetPO; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface AppPersonSetService extends IService{ + + +} diff --git a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/impl/AppBaseInformationServiceImpl.java b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/impl/AppBaseInformationServiceImpl.java new file mode 100644 index 0000000..ba74a4f --- /dev/null +++ b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/impl/AppBaseInformationServiceImpl.java @@ -0,0 +1,28 @@ +package com.njcn.cssystem.service.impl; + +import com.njcn.cssystem.mapper.AppBaseInformationMapper; +import com.njcn.cssystem.pojo.po.AppBaseInformationPO; +import com.njcn.cssystem.service.AppBaseInformationService; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +public class AppBaseInformationServiceImpl extends ServiceImpl implements AppBaseInformationService { + + @Override + public AppBaseInformationPO getByType(String type) { + + return this.lambdaQuery().eq(AppBaseInformationPO::getType,type).one(); + } +} diff --git a/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/impl/AppPersonSetServiceImpl.java b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/impl/AppPersonSetServiceImpl.java new file mode 100644 index 0000000..a689887 --- /dev/null +++ b/cs-system/cs-system-boot/src/main/java/com/njcn/cssystem/service/impl/AppPersonSetServiceImpl.java @@ -0,0 +1,23 @@ +package com.njcn.cssystem.service.impl; + +import com.njcn.cssystem.mapper.AppPersonSetMapper; +import com.njcn.cssystem.pojo.po.AppPersonSetPO; +import com.njcn.cssystem.service.AppPersonSetService; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/3 19:17【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service +public class AppPersonSetServiceImpl extends ServiceImpl implements AppPersonSetService { + +} diff --git a/cs-system/cs-system-boot/src/main/resources/bootstrap.yml b/cs-system/cs-system-boot/src/main/resources/bootstrap.yml index b65e9ac..61f96e0 100644 --- a/cs-system/cs-system-boot/src/main/resources/bootstrap.yml +++ b/cs-system/cs-system-boot/src/main/resources/bootstrap.yml @@ -29,7 +29,7 @@ spring: shared-configs: - data-id: share-config.yaml refresh: true - - data-Id: share-config-datasource-db.yaml + - data-Id: algorithm-config.yaml refresh: true main: allow-bean-definition-overriding: true diff --git a/cs-warn/cs-warn-boot/pom.xml b/cs-warn/cs-warn-boot/pom.xml index 999d74c..127d737 100644 --- a/cs-warn/cs-warn-boot/pom.xml +++ b/cs-warn/cs-warn-boot/pom.xml @@ -59,6 +59,11 @@ 1.0.0 compile + + com.baomidou + dynamic-datasource-spring-boot-starter + 3.5.1 + diff --git a/cs-warn/cs-warn-boot/src/main/java/com/njcn/cswarn/CsWarnBootApplication.java b/cs-warn/cs-warn-boot/src/main/java/com/njcn/cswarn/CsWarnBootApplication.java index 49a57ba..38cb6f2 100644 --- a/cs-warn/cs-warn-boot/src/main/java/com/njcn/cswarn/CsWarnBootApplication.java +++ b/cs-warn/cs-warn-boot/src/main/java/com/njcn/cswarn/CsWarnBootApplication.java @@ -5,6 +5,7 @@ import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.DependsOn; /**