运营平台/客户业务系统

master
Jiang Peng 2024-05-27 22:30:34 +08:00
parent 10341472e9
commit af242f1193
29 changed files with 1216 additions and 19 deletions

View File

@ -14,10 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -0,0 +1,65 @@
package com.muyu.common.core.utils;
import org.apache.commons.lang3.ObjectUtils;
import java.math.BigDecimal;
/**
* @author DongZl
* @description:
* @Date 2023-10-9 04:56
*/
public class ObjUtils {
/**
*
* CharSequence:
* Array:
* Collection:
* Map:
* @param o
* @return nulltruefalse
*/
public static boolean notNull(Object o){
return ObjectUtils.isNotEmpty(o);
}
/**
* long0
* @param val
* @return 0
*/
public static boolean notNull(Long val){
return ObjectUtils.isNotEmpty(val) && val != 0;
}
/**
* Integer0
* @param val
* @return 0
*/
public static boolean notNull(Integer val){
return ObjectUtils.isNotEmpty(val) && val != 0;
}
/**
* BigDecimal0
* @param val
* @return 0
*/
public static boolean notNull(BigDecimal val){
return ObjectUtils.isNotEmpty(val) && val.doubleValue() == 0.00;
}
/**
* BigDecimal0
* @param val
* @return 0
*/
public static boolean notChildNull(Object[] val){
for (Object o : val) {
if (!notNull(o)){
return false;
}
}
return true;
}
}

View File

@ -58,7 +58,7 @@ public class IpUtils {
ip = request.getRemoteAddr();
}
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : getMultistageReverseProxyIp(ip);
return "0:0:0:0:0:0:0:1".equals(ip) ? "115.159.67.205" : getMultistageReverseProxyIp(ip);
}
/**
@ -70,7 +70,7 @@ public class IpUtils {
*/
public static boolean internalIp (String ip) {
byte[] addr = textToNumericFormatV4(ip);
return internalIp(addr) || "127.0.0.1".equals(ip);
return internalIp(addr) || "115.159.67.205".equals(ip);
}
/**
@ -197,7 +197,7 @@ public class IpUtils {
return InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) {
}
return "127.0.0.1";
return "115.159.67.205";
}
/**

View File

@ -132,6 +132,19 @@ public class SysUser extends BaseEntity {
*/
private Long[] postIds;
/**
*
* */
private String userType;
public String getUserType() {
return userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
/**
* ID
*/
@ -323,6 +336,7 @@ public class SysUser extends BaseEntity {
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("dept", getDept())
.append("userType", getUserType())
.toString();
}
}

View File

@ -14,10 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74
# 配置文件格式
file-extension: yml
# 共享配置
@ -28,12 +29,12 @@ spring:
eager: true
transport:
# 控制台地址
dashboard: 127.0.0.1:8718
dashboard: 101.34.248.9:8718
# nacos配置持久化
datasource:
ds1:
nacos:
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
dataId: sentinel-muyu-gateway
groupId: DEFAULT_GROUP
data-type: json

View File

@ -14,10 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -14,10 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -14,10 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>muyu-net-working</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>muyu-net-working-client</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>muyu-net-working</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>muyu-net-working-common</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,196 @@
package com.muyu.net.working.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import io.swagger.annotations.*;
import com.muyu.common.core.annotation.Excel;
import com.muyu.net.working.domain.req.EnterpriseQueryReq;
import com.muyu.net.working.domain.req.EnterpriseSaveReq;
import com.muyu.net.working.domain.req.EnterpriseEditReq;
import com.muyu.common.core.web.domain.BaseEntity;
/**
* enterprise
*
* @author muyu
* @date 2024-05-27
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("enterprise")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Enterprise", description = "企业信息")
public class Enterprise extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
@TableId(value = "id",type = IdType.AUTO)
@ApiModelProperty(name = "主键", value = "主键")
private String id;
/** 企业名称 */
@Excel(name = "企业名称")
@ApiModelProperty(name = "企业名称", value = "企业名称")
private String ebterpriseName;
/** 法定代表人 */
@Excel(name = "法定代表人")
@ApiModelProperty(name = "法定代表人", value = "法定代表人")
private String legalPerson;
/** 经营执照凭证号码 */
@Excel(name = "经营执照凭证号码")
@ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码")
private String businessLincenseNumber;
/** 企业成立时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "企业成立时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(name = "企业成立时间", value = "企业成立时间")
private Date estabinessDate;
/** 经营范围 */
@Excel(name = "经营范围")
@ApiModelProperty(name = "经营范围", value = "经营范围")
private String businessScope;
/** 注册地址 */
@Excel(name = "注册地址")
@ApiModelProperty(name = "注册地址", value = "注册地址")
private String address;
/** 企业联系方式 */
@Excel(name = "企业联系方式")
@ApiModelProperty(name = "企业联系方式", value = "企业联系方式")
private String contactPhone;
/** 公司邮箱 */
@Excel(name = "公司邮箱")
@ApiModelProperty(name = "公司邮箱", value = "公司邮箱")
private String email;
/** 企业当前状态 */
@Excel(name = "企业当前状态")
@ApiModelProperty(name = "企业当前状态", value = "企业当前状态")
private String status;
/** 企业入驻平台时期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "企业入驻平台时期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期")
private Date registrationDate;
/** 企业认证id */
@Excel(name = "企业认证id")
@ApiModelProperty(name = "企业认证id", value = "企业认证id")
private Long certificationId;
/** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(name = "认证时间", value = "认证时间")
private Date authenticationDate;
/** 服务级别 */
@Excel(name = "服务级别")
@ApiModelProperty(name = "服务级别", value = "服务级别")
private Long serviceLevel;
/** 开通服务id */
@Excel(name = "开通服务id")
@ApiModelProperty(name = "开通服务id", value = "开通服务id")
private Long openServerId;
/** 增值服务id */
@Excel(name = "增值服务id")
@ApiModelProperty(name = "增值服务id", value = "增值服务id")
private Long addServerId;
/**
*
*/
public static Enterprise queryBuild( EnterpriseQueryReq enterpriseQueryReq){
return Enterprise.builder()
.ebterpriseName(enterpriseQueryReq.getEbterpriseName())
.legalPerson(enterpriseQueryReq.getLegalPerson())
.businessLincenseNumber(enterpriseQueryReq.getBusinessLincenseNumber())
.estabinessDate(enterpriseQueryReq.getEstabinessDate())
.businessScope(enterpriseQueryReq.getBusinessScope())
.address(enterpriseQueryReq.getAddress())
.contactPhone(enterpriseQueryReq.getContactPhone())
.email(enterpriseQueryReq.getEmail())
.status(enterpriseQueryReq.getStatus())
.registrationDate(enterpriseQueryReq.getRegistrationDate())
.certificationId(enterpriseQueryReq.getCertificationId())
.authenticationDate(enterpriseQueryReq.getAuthenticationDate())
.serviceLevel(enterpriseQueryReq.getServiceLevel())
.openServerId(enterpriseQueryReq.getOpenServerId())
.addServerId(enterpriseQueryReq.getAddServerId())
.build();
}
/**
*
*/
public static Enterprise saveBuild(EnterpriseSaveReq enterpriseSaveReq){
return Enterprise.builder()
.ebterpriseName(enterpriseSaveReq.getEbterpriseName())
.legalPerson(enterpriseSaveReq.getLegalPerson())
.businessLincenseNumber(enterpriseSaveReq.getBusinessLincenseNumber())
.estabinessDate(enterpriseSaveReq.getEstabinessDate())
.businessScope(enterpriseSaveReq.getBusinessScope())
.address(enterpriseSaveReq.getAddress())
.contactPhone(enterpriseSaveReq.getContactPhone())
.email(enterpriseSaveReq.getEmail())
.status(enterpriseSaveReq.getStatus())
.registrationDate(enterpriseSaveReq.getRegistrationDate())
.certificationId(enterpriseSaveReq.getCertificationId())
.authenticationDate(enterpriseSaveReq.getAuthenticationDate())
.serviceLevel(enterpriseSaveReq.getServiceLevel())
.openServerId(enterpriseSaveReq.getOpenServerId())
.addServerId(enterpriseSaveReq.getAddServerId())
.createBy(enterpriseSaveReq.getCreateBy())
.createTime(new Date())
.remark(enterpriseSaveReq.getRemark())
.build();
}
/**
*
*/
public static Enterprise editBuild(String id, EnterpriseEditReq enterpriseEditReq){
return Enterprise.builder()
.id(id)
.ebterpriseName(enterpriseEditReq.getEbterpriseName())
.legalPerson(enterpriseEditReq.getLegalPerson())
.businessLincenseNumber(enterpriseEditReq.getBusinessLincenseNumber())
.estabinessDate(enterpriseEditReq.getEstabinessDate())
.businessScope(enterpriseEditReq.getBusinessScope())
.address(enterpriseEditReq.getAddress())
.contactPhone(enterpriseEditReq.getContactPhone())
.email(enterpriseEditReq.getEmail())
.status(enterpriseEditReq.getStatus())
.registrationDate(enterpriseEditReq.getRegistrationDate())
.certificationId(enterpriseEditReq.getCertificationId())
.authenticationDate(enterpriseEditReq.getAuthenticationDate())
.serviceLevel(enterpriseEditReq.getServiceLevel())
.openServerId(enterpriseEditReq.getOpenServerId())
.addServerId(enterpriseEditReq.getAddServerId())
.updateBy(enterpriseEditReq.getUpdateBy())
.updateTime(new Date())
.remark(enterpriseEditReq.getRemark())
.build();
}
}

View File

@ -0,0 +1,91 @@
package com.muyu.net.working.domain.req;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import io.swagger.annotations.*;
import com.muyu.common.core.web.domain.BaseEntity;
/**
* enterprise
*
* @author muyu
* @date 2024-05-27
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "EnterpriseEditReq", description = "企业信息")
public class EnterpriseEditReq extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 企业名称 */
@ApiModelProperty(name = "企业名称", value = "企业名称")
private String ebterpriseName;
/** 法定代表人 */
@ApiModelProperty(name = "法定代表人", value = "法定代表人")
private String legalPerson;
/** 经营执照凭证号码 */
@ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码")
private String businessLincenseNumber;
/** 企业成立时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业成立时间", value = "企业成立时间")
private Date estabinessDate;
/** 经营范围 */
@ApiModelProperty(name = "经营范围", value = "经营范围")
private String businessScope;
/** 注册地址 */
@ApiModelProperty(name = "注册地址", value = "注册地址")
private String address;
/** 企业联系方式 */
@ApiModelProperty(name = "企业联系方式", value = "企业联系方式")
private String contactPhone;
/** 公司邮箱 */
@ApiModelProperty(name = "公司邮箱", value = "公司邮箱")
private String email;
/** 企业当前状态 */
@ApiModelProperty(name = "企业当前状态", value = "企业当前状态")
private String status;
/** 企业入驻平台时期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期")
private Date registrationDate;
/** 企业认证id */
@ApiModelProperty(name = "企业认证id", value = "企业认证id")
private Long certificationId;
/** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "认证时间", value = "认证时间")
private Date authenticationDate;
/** 服务级别 */
@ApiModelProperty(name = "服务级别", value = "服务级别")
private Long serviceLevel;
/** 开通服务id */
@ApiModelProperty(name = "开通服务id", value = "开通服务id")
private Long openServerId;
/** 增值服务id */
@ApiModelProperty(name = "增值服务id", value = "增值服务id")
private Long addServerId;
}

View File

@ -0,0 +1,91 @@
package com.muyu.net.working.domain.req;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import io.swagger.annotations.*;
import com.muyu.common.core.web.domain.BaseEntity;
/**
* enterprise
*
* @author muyu
* @date 2024-05-27
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "EnterpriseQueryReq", description = "企业信息")
public class EnterpriseQueryReq extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 企业名称 */
@ApiModelProperty(name = "企业名称", value = "企业名称")
private String ebterpriseName;
/** 法定代表人 */
@ApiModelProperty(name = "法定代表人", value = "法定代表人")
private String legalPerson;
/** 经营执照凭证号码 */
@ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码")
private String businessLincenseNumber;
/** 企业成立时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业成立时间", value = "企业成立时间")
private Date estabinessDate;
/** 经营范围 */
@ApiModelProperty(name = "经营范围", value = "经营范围")
private String businessScope;
/** 注册地址 */
@ApiModelProperty(name = "注册地址", value = "注册地址")
private String address;
/** 企业联系方式 */
@ApiModelProperty(name = "企业联系方式", value = "企业联系方式")
private String contactPhone;
/** 公司邮箱 */
@ApiModelProperty(name = "公司邮箱", value = "公司邮箱")
private String email;
/** 企业当前状态 */
@ApiModelProperty(name = "企业当前状态", value = "企业当前状态")
private String status;
/** 企业入驻平台时期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期")
private Date registrationDate;
/** 企业认证id */
@ApiModelProperty(name = "企业认证id", value = "企业认证id")
private Long certificationId;
/** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "认证时间", value = "认证时间")
private Date authenticationDate;
/** 服务级别 */
@ApiModelProperty(name = "服务级别", value = "服务级别")
private Long serviceLevel;
/** 开通服务id */
@ApiModelProperty(name = "开通服务id", value = "开通服务id")
private Long openServerId;
/** 增值服务id */
@ApiModelProperty(name = "增值服务id", value = "增值服务id")
private Long addServerId;
}

View File

@ -0,0 +1,111 @@
package com.muyu.net.working.domain.req;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import io.swagger.annotations.*;
import com.muyu.common.core.web.domain.BaseEntity;
/**
* enterprise
*
* @author muyu
* @date 2024-05-27
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "EnterpriseSaveReq", description = "企业信息")
public class EnterpriseSaveReq extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
@ApiModelProperty(name = "主键", value = "主键")
private String id;
/** 企业名称 */
@ApiModelProperty(name = "企业名称", value = "企业名称")
private String ebterpriseName;
/** 法定代表人 */
@ApiModelProperty(name = "法定代表人", value = "法定代表人")
private String legalPerson;
/** 经营执照凭证号码 */
@ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码")
private String businessLincenseNumber;
/** 企业成立时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业成立时间", value = "企业成立时间")
private Date estabinessDate;
/** 经营范围 */
@ApiModelProperty(name = "经营范围", value = "经营范围")
private String businessScope;
/** 注册地址 */
@ApiModelProperty(name = "注册地址", value = "注册地址")
private String address;
/** 企业联系方式 */
@ApiModelProperty(name = "企业联系方式", value = "企业联系方式")
private String contactPhone;
/** 公司邮箱 */
@ApiModelProperty(name = "公司邮箱", value = "公司邮箱")
private String email;
/** 企业当前状态 */
@ApiModelProperty(name = "企业当前状态", value = "企业当前状态")
private String status;
/** 企业入驻平台时期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期")
private Date registrationDate;
/** 企业认证id */
@ApiModelProperty(name = "企业认证id", value = "企业认证id")
private Long certificationId;
/** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "认证时间", value = "认证时间")
private Date authenticationDate;
/** 服务级别 */
@ApiModelProperty(name = "服务级别", value = "服务级别")
private Long serviceLevel;
/** 开通服务id */
@ApiModelProperty(name = "开通服务id", value = "开通服务id")
private Long openServerId;
/** 增值服务id */
@ApiModelProperty(name = "增值服务id", value = "增值服务id")
private Long addServerId;
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>muyu-net-working</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>muyu-net-working-remote</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>muyu-net-working</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>muyu-net-working-server</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-net-working-common</artifactId>
<version>3.6.3</version>
</dependency>
<!-- SpringCloud Alibaba Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- SpringCloud Alibaba Nacos Config -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- SpringBoot Actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Swagger UI -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.fox.version}</version>
</dependency>
<!-- Mysql Connector -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<!-- MuYu Common DataSource -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-datasource</artifactId>
</dependency>
<!-- MuYu Common DataScope -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-datascope</artifactId>
</dependency>
<!-- MuYu Common Log -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-log</artifactId>
</dependency>
<!-- MuYu Common Swagger -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-swagger</artifactId>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 加入maven deploy插件当在deploy时忽略些model-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,23 @@
package com.muyu.net.working;
import com.muyu.common.security.annotation.EnableCustomConfig;
import com.muyu.common.security.annotation.EnableMyFeignClients;
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* MuYuNetWorkingApplication
*
* @author DeKangLiu
* Date 2024/5/26 21:45
*/
@EnableCustomConfig
@EnableCustomSwagger2
@EnableMyFeignClients
@SpringBootApplication
public class MuYuNetWorkingApplication {
public static void main (String[] args) {
SpringApplication.run(MuYuNetWorkingApplication.class, args);
}
}

View File

@ -0,0 +1,111 @@
package com.muyu.net.working.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.net.working.domain.Enterprise;
import com.muyu.net.working.domain.req.EnterpriseQueryReq;
import com.muyu.net.working.domain.req.EnterpriseSaveReq;
import com.muyu.net.working.domain.req.EnterpriseEditReq;
import com.muyu.net.working.service.EnterpriseService;
import com.muyu.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author muyu
* @date 2024-05-27
*/
@Api(tags = "企业信息")
@RestController
@RequestMapping("/car")
public class EnterpriseController extends BaseController {
@Autowired
private EnterpriseService enterpriseService;
/**
*
*/
@ApiOperation("获取企业信息列表")
@RequiresPermissions("netWorking:car:list")
@GetMapping("/list")
public Result<TableDataInfo<Enterprise>> list(EnterpriseQueryReq enterpriseQueryReq) {
startPage();
List<Enterprise> list = enterpriseService.list(Enterprise.queryBuild(enterpriseQueryReq));
return getDataTable(list);
}
/**
*
*/
@ApiOperation("导出企业信息列表")
@RequiresPermissions("netWorking:car:export")
@Log(title = "企业信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Enterprise enterprise) {
List<Enterprise> list = enterpriseService.list(enterprise);
ExcelUtil<Enterprise> util = new ExcelUtil<Enterprise>(Enterprise.class);
util.exportExcel(response, list, "企业信息数据");
}
/**
*
*/
@ApiOperation("获取企业信息详细信息")
@RequiresPermissions("netWorking:car:query")
@GetMapping(value = "/{id}")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class)
public Result<Enterprise> getInfo(@PathVariable("id") String id) {
return Result.success(enterpriseService.getById(id));
}
/**
*
*/
@RequiresPermissions("netWorking:car:add")
@Log(title = "企业信息", businessType = BusinessType.INSERT)
@PostMapping
@ApiOperation("新增企业信息")
public Result<String> add(@RequestBody EnterpriseSaveReq enterpriseSaveReq) {
return toAjax(enterpriseService.save(Enterprise.saveBuild(enterpriseSaveReq)));
}
/**
*
*/
@RequiresPermissions("netWorking:car:edit")
@Log(title = "企业信息", businessType = BusinessType.UPDATE)
@PutMapping("/{id}")
@ApiOperation("修改企业信息")
public Result<String> edit(@PathVariable String id, @RequestBody EnterpriseEditReq enterpriseEditReq) {
return toAjax(enterpriseService.updateById(Enterprise.editBuild(id,enterpriseEditReq)));
}
/**
*
*/
@RequiresPermissions("netWorking:car:remove")
@Log(title = "企业信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@ApiOperation("删除企业信息")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
public Result<String> remove(@PathVariable List<String> ids) {
return toAjax(enterpriseService.removeBatchByIds(ids));
}
}

View File

@ -0,0 +1,15 @@
package com.muyu.net.working.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.net.working.domain.Enterprise;
/**
* Mapper
*
* @author muyu
* @date 2024-05-27
*/
public interface EnterpriseMapper extends BaseMapper<Enterprise> {
}

View File

@ -0,0 +1,22 @@
package com.muyu.net.working.service;
import java.util.List;
import com.muyu.net.working.domain.Enterprise;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* Service
*
* @author muyu
* @date 2024-05-27
*/
public interface EnterpriseService extends IService<Enterprise> {
/**
*
*
* @param enterprise
* @return
*/
public List<Enterprise> list(Enterprise enterprise);
}

View File

@ -0,0 +1,101 @@
package com.muyu.net.working.service.impl;
import java.util.List;
import com.muyu.common.core.utils.ObjUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.muyu.net.working.mapper.EnterpriseMapper;
import com.muyu.net.working.domain.Enterprise;
import com.muyu.net.working.service.EnterpriseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
/**
* Service
*
* @author muyu
* @date 2024-05-27
*/
@Slf4j
@Service
public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper, Enterprise> implements EnterpriseService {
/**
*
*
* @param enterprise
* @return
*/
@Override
public List<Enterprise> list(Enterprise enterprise) {
LambdaQueryWrapper<Enterprise> queryWrapper = new LambdaQueryWrapper<>();
if (ObjUtils.notNull(enterprise.getEbterpriseName())){
queryWrapper.like(Enterprise::getEbterpriseName, enterprise.getEbterpriseName());
}
if (ObjUtils.notNull(enterprise.getLegalPerson())){
queryWrapper.eq(Enterprise::getLegalPerson, enterprise.getLegalPerson());
}
if (ObjUtils.notNull(enterprise.getBusinessLincenseNumber())){
queryWrapper.eq(Enterprise::getBusinessLincenseNumber, enterprise.getBusinessLincenseNumber());
}
if (ObjUtils.notNull(enterprise.getEstabinessDate())){
queryWrapper.eq(Enterprise::getEstabinessDate, enterprise.getEstabinessDate());
}
if (ObjUtils.notNull(enterprise.getBusinessScope())){
queryWrapper.eq(Enterprise::getBusinessScope, enterprise.getBusinessScope());
}
if (ObjUtils.notNull(enterprise.getAddress())){
queryWrapper.eq(Enterprise::getAddress, enterprise.getAddress());
}
if (ObjUtils.notNull(enterprise.getContactPhone())){
queryWrapper.eq(Enterprise::getContactPhone, enterprise.getContactPhone());
}
if (ObjUtils.notNull(enterprise.getEmail())){
queryWrapper.eq(Enterprise::getEmail, enterprise.getEmail());
}
if (ObjUtils.notNull(enterprise.getStatus())){
queryWrapper.eq(Enterprise::getStatus, enterprise.getStatus());
}
if (ObjUtils.notNull(enterprise.getRegistrationDate())){
queryWrapper.eq(Enterprise::getRegistrationDate, enterprise.getRegistrationDate());
}
if (ObjUtils.notNull(enterprise.getCertificationId())){
queryWrapper.eq(Enterprise::getCertificationId, enterprise.getCertificationId());
}
if (ObjUtils.notNull(enterprise.getAuthenticationDate())){
queryWrapper.eq(Enterprise::getAuthenticationDate, enterprise.getAuthenticationDate());
}
if (ObjUtils.notNull(enterprise.getServiceLevel())){
queryWrapper.eq(Enterprise::getServiceLevel, enterprise.getServiceLevel());
}
if (ObjUtils.notNull(enterprise.getOpenServerId())){
queryWrapper.eq(Enterprise::getOpenServerId, enterprise.getOpenServerId());
}
if (ObjUtils.notNull(enterprise.getAddServerId())){
queryWrapper.eq(Enterprise::getAddServerId, enterprise.getAddServerId());
}
return list(queryWrapper);
}
}

View File

@ -0,0 +1,2 @@
Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name}

View File

@ -0,0 +1,29 @@
# Tomcat
server:
port: 9204
# Spring
spring:
application:
# 应用名称
name: muyu-net-working
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 101.34.248.9:8848
config:
# 配置中心地址
server-addr: 101.34.248.9:8848
namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
logging:
level:
com.muyu.net.working.mapper: DEBUG

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/muyu-system"/>
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.muyu" level="info"/>
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn"/>
<root level="info">
<appender-ref ref="console"/>
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info"/>
<appender-ref ref="file_error"/>
</root>
</configuration>

View File

@ -0,0 +1,34 @@
<?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.muyu.net.working.mapper.EnterpriseMapper">
<resultMap type="com.muyu.net.working.domain.Enterprise" id="EnterpriseResult">
<result property="id" column="id" />
<result property="ebterpriseName" column="ebterprise_name" />
<result property="legalPerson" column="legal_person" />
<result property="businessLincenseNumber" column="business_lincense_number" />
<result property="estabinessDate" column="estabiness_date" />
<result property="businessScope" column="business_scope" />
<result property="address" column="address" />
<result property="contactPhone" column="contact_phone" />
<result property="email" column="email" />
<result property="status" column="status" />
<result property="registrationDate" column="registration_date" />
<result property="certificationId" column="certification_id" />
<result property="authenticationDate" column="authentication_date" />
<result property="serviceLevel" column="service_level" />
<result property="openServerId" column="open_server_id" />
<result property="addServerId" column="add_server_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectEnterpriseVo">
select id, ebterprise_name, legal_person, business_lincense_number, estabiness_date, business_scope, address, contact_phone, email, status, registration_date, certification_id, authentication_date, service_level, open_server_id, add_server_id, create_by, create_time, update_by, update_time, remark from enterprise
</sql>
</mapper>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>muyu-modules</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>muyu-net-working</artifactId>
<packaging>pom</packaging>
<modules>
<module>muyu-net-working-common</module>
<module>muyu-net-working-server</module>
<module>muyu-net-working-client</module>
<module>muyu-net-working-remote</module>
</modules>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -14,10 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -13,6 +13,7 @@
<module>muyu-gen</module>
<module>muyu-job</module>
<module>muyu-file</module>
<module>muyu-net-working</module>
</modules>
<artifactId>muyu-modules</artifactId>

View File

@ -14,10 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
server-addr: 101.34.248.9:8848
namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74
# 配置文件格式
file-extension: yml
# 共享配置