系统配置
This commit is contained in:
@@ -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<CsEquipmentDeliveryPO> {
|
||||
Page<ProjectEquipmentVO> queryProjectEquipmentVO(Page<ProjectEquipmentVO> returnpage,@Param("projectEquipmentQueryParm")ProjectEquipmentQueryParm projectEquipmentQueryParm);
|
||||
Page<ProjectEquipmentVO> queryProjectEquipmentVO(Page<ProjectEquipmentVO> returnpage,@Param("projectEquipmentQueryParm")ProjectEquipmentQueryParm projectEquipmentQueryParm,@Param("device")List<String> device);
|
||||
|
||||
Page<CsEquipmentDeliveryVO> page(Page<CsEquipmentDeliveryPO> returnpage, @Param("ew") QueryWrapper<CsEquipmentDeliveryPO> queryWrapper);
|
||||
|
||||
|
||||
@@ -59,6 +59,10 @@
|
||||
<if test="projectEquipmentQueryParm!=null and projectEquipmentQueryParm.engineerId != null and projectEquipmentQueryParm.engineerId !=''">
|
||||
AND a.id = #{projectEquipmentQueryParm.engineerId}
|
||||
</if>
|
||||
and c.id in
|
||||
<foreach collection="device" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by a.create_time desc
|
||||
|
||||
</select>
|
||||
|
||||
@@ -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<CsEquipmentDeliv
|
||||
private final ICsLedgerService csLedgerService;
|
||||
|
||||
private final IMqttUserService mqttUserService;
|
||||
private final RoleEngineerDevService roleEngineerDevService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
@@ -108,11 +110,12 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
@Override
|
||||
public IPage<ProjectEquipmentVO> queryEquipmentByProject(ProjectEquipmentQueryParm projectEquipmentQueryParm) {
|
||||
Page<ProjectEquipmentVO> returnpage = new Page<> (projectEquipmentQueryParm.getPageNum ( ), projectEquipmentQueryParm.getPageSize ( ));
|
||||
if(StringUtils.isEmpty(projectEquipmentQueryParm.getEngineerId())||StringUtils.isEmpty(projectEquipmentQueryParm.getProjectId())){
|
||||
List<String> device = roleEngineerDevService.getDevice();
|
||||
if(CollectionUtils.isEmpty(device)){
|
||||
return returnpage;
|
||||
}
|
||||
|
||||
Page<ProjectEquipmentVO> list = this.baseMapper.queryProjectEquipmentVO(returnpage,projectEquipmentQueryParm);
|
||||
Page<ProjectEquipmentVO> list = this.baseMapper.queryProjectEquipmentVO(returnpage,projectEquipmentQueryParm,device);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<ThdDataVO> queryFisrtCommonStatistical(CommonStatisticalQueryParam commonStatisticalQueryParam) {
|
||||
Optional.ofNullable(commonStatisticalQueryParam.getDevId()).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.DEVICE_LOSE));
|
||||
|
||||
List<CsLinePO> 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<ThdDataVO> queryCommonStatisticalByTime(CommonStatisticalQueryParam commonStatisticalQueryParam) {
|
||||
Optional.ofNullable(commonStatisticalQueryParam.getDevId()).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.DEVICE_LOSE));
|
||||
|
||||
List<CsLinePO> 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<String> collect = csLinePOList.stream().map(CsLinePO::getLineId).collect(Collectors.toList());
|
||||
|
||||
|
||||
@@ -211,8 +217,14 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
|
||||
@Override
|
||||
public List<ThdDataVO> queryLineCommonStatistical(CommonStatisticalQueryParam commonStatisticalQueryParam) {
|
||||
|
||||
if(CollectionUtil.isEmpty(commonStatisticalQueryParam.getLineList())){
|
||||
throw new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR);
|
||||
}
|
||||
List<CsLinePO> 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<String> 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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -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<String> 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;
|
||||
}
|
||||
@@ -55,6 +55,12 @@
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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<Boolean> addAppInfo(@RequestBody @Validated AppBaseInformationAddParm AppBaseInformationAddParm){
|
||||
String methodDescribe = getMethodDescribe("addAppInfo");
|
||||
AppBaseInformationPO appBaseInformationPO = new AppBaseInformationPO ();
|
||||
BeanUtils.copyProperties (AppBaseInformationAddParm, appBaseInformationPO);
|
||||
QueryWrapper<AppBaseInformationPO> query = new QueryWrapper();
|
||||
query.eq("type",AppBaseInformationAddParm.getType());
|
||||
boolean save =false;
|
||||
List<AppBaseInformationPO> 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<Boolean> 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<AppPersonSetPO> queryPersonSet(){
|
||||
String methodDescribe = getMethodDescribe("queryPersonSet");
|
||||
|
||||
List<AppPersonSetPO> 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<AppBaseInformationVO> 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<AppBaseInformationVO> 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);
|
||||
}
|
||||
}
|
||||
@@ -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<AppBaseInformationPO> {
|
||||
}
|
||||
@@ -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<AppPersonSetPO> {
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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.njcn.cssystem.mapper.AppPersonSetMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.cssystem.pojo.po.AppPersonSetPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table app_person_set-->
|
||||
<result column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="user_agreement" jdbcType="TINYINT" property="userAgreement" />
|
||||
<result column="system_introduction" jdbcType="TINYINT" property="systemIntroduction" />
|
||||
<result column="user_manual" jdbcType="TINYINT" property="userManual" />
|
||||
<result column="data_base" jdbcType="TINYINT" property="dataBase" />
|
||||
<result column="company_profile" jdbcType="TINYINT" property="companyProfile" />
|
||||
<result column="about_us" jdbcType="TINYINT" property="aboutUs" />
|
||||
<result column="status" jdbcType="BOOLEAN" property="status" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, user_agreement, system_introduction, user_manual, data_base, company_profile,
|
||||
about_us, `status`, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -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>{
|
||||
|
||||
|
||||
AppBaseInformationPO getByType(String type);
|
||||
}
|
||||
@@ -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<AppPersonSetPO>{
|
||||
|
||||
|
||||
}
|
||||
@@ -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<AppBaseInformationMapper, AppBaseInformationPO> implements AppBaseInformationService {
|
||||
|
||||
@Override
|
||||
public AppBaseInformationPO getByType(String type) {
|
||||
|
||||
return this.lambdaQuery().eq(AppBaseInformationPO::getType,type).one();
|
||||
}
|
||||
}
|
||||
@@ -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<AppPersonSetMapper, AppPersonSetPO> implements AppPersonSetService {
|
||||
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -59,6 +59,11 @@
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user