仓库2
commit
98acf286ab
|
@ -0,0 +1,32 @@
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea/
|
||||||
|
logs
|
||||||
|
### Eclipse ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Mac OS ###
|
||||||
|
.DS_Store
|
|
@ -0,0 +1,16 @@
|
||||||
|
#指定构建镜像的起始镜像
|
||||||
|
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/dragonwell:17.0.4.0.4.8-standard-ga-8.6
|
||||||
|
#定义时区参数
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
#设置时区
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
|
||||||
|
|
||||||
|
#挂载目录
|
||||||
|
VOLUME ["/home/logs/cloud-market2"]
|
||||||
|
|
||||||
|
#拷贝执行jar报
|
||||||
|
COPY ./cloud-market2-server/target/cloud-market2.jar /home/app.jar
|
||||||
|
|
||||||
|
ENTRYPOINT ["java","-Dfile.encoding=utf-8","-jar"]
|
||||||
|
|
||||||
|
CMD ["/home/app.jar"]
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?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>cloud-market2</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>cloud-market2-client</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<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>cloud-market2-common</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.muyu;
|
||||||
|
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello world!");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?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>cloud-market2</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>cloud-market2-common</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
|
||||||
|
<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>cloud-common-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.muyu;
|
||||||
|
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello world!");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,119 @@
|
||||||
|
package com.muyu.market.admain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.market.admain.request.MyapiSaveReq;
|
||||||
|
import com.muyu.market.admain.request.MyapiUpdReq;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "market_myapi",autoResultMap = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class Myapi extends BaseEntity{
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "api_id",type = IdType.AUTO)
|
||||||
|
private Long apiId;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "接口名称")
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 价钱
|
||||||
|
*/
|
||||||
|
@Schema(description = "价钱/次",type = "BigDecimal")
|
||||||
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 介绍
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "介绍")
|
||||||
|
private String test;
|
||||||
|
/**
|
||||||
|
* 商品描述
|
||||||
|
*/
|
||||||
|
@Schema(description = "商品描述",type = "String")
|
||||||
|
private String data;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口名称",type = "String")
|
||||||
|
private String apiName;
|
||||||
|
/**
|
||||||
|
* 接口地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口地址",type = "String")
|
||||||
|
private String ip;
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*/
|
||||||
|
@Schema(description = "请求方式",type = "String")
|
||||||
|
private String mode;
|
||||||
|
/**
|
||||||
|
* 购买字段
|
||||||
|
*/
|
||||||
|
@Schema(description = "购买字段(当修改成功触发)",type = "Integer")
|
||||||
|
private int auth;
|
||||||
|
/*
|
||||||
|
API类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "API类型",type = "String")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private String createBy;
|
||||||
|
private Date createTime;
|
||||||
|
private String updateBy;
|
||||||
|
private Date updateTime;
|
||||||
|
private String remark;
|
||||||
|
public static Myapi SaveMyapiList(MyapiSaveReq myapiSaveReq){
|
||||||
|
|
||||||
|
return Myapi
|
||||||
|
.builder()
|
||||||
|
.name( myapiSaveReq.getName())
|
||||||
|
.price( myapiSaveReq.getPrice())
|
||||||
|
.test( myapiSaveReq.getTest())
|
||||||
|
.data( myapiSaveReq.getData())
|
||||||
|
.apiName( myapiSaveReq.getApiName())
|
||||||
|
.ip( myapiSaveReq.getIp())
|
||||||
|
.mode( myapiSaveReq.getMode())
|
||||||
|
.auth( myapiSaveReq.getAuth() )
|
||||||
|
.type( myapiSaveReq.getType())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Myapi UpdMyapiList(MyapiUpdReq myapiUpdReq, Supplier<Long> apiId){
|
||||||
|
|
||||||
|
return Myapi
|
||||||
|
.builder()
|
||||||
|
.apiId(apiId.get())
|
||||||
|
.name( myapiUpdReq.getName())
|
||||||
|
.price( myapiUpdReq.getPrice())
|
||||||
|
.test( myapiUpdReq.getTest())
|
||||||
|
.data( myapiUpdReq.getData())
|
||||||
|
.apiName( myapiUpdReq.getApiName())
|
||||||
|
.ip( myapiUpdReq.getIp())
|
||||||
|
.mode( myapiUpdReq.getMode())
|
||||||
|
.auth( myapiUpdReq.getAuth() )
|
||||||
|
.type( myapiUpdReq.getType())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.muyu.market.admain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SelectByPhone {
|
||||||
|
// 省份
|
||||||
|
private String province;
|
||||||
|
// 城市
|
||||||
|
private String city;
|
||||||
|
// 区号
|
||||||
|
private String areacode;
|
||||||
|
// 邮编
|
||||||
|
private String zip;
|
||||||
|
// 运营商
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.muyu.market.admain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SelectWeather {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城市
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
/**
|
||||||
|
* 天气
|
||||||
|
*/
|
||||||
|
private String info;
|
||||||
|
/**
|
||||||
|
* 温度
|
||||||
|
*/
|
||||||
|
private String temperature;
|
||||||
|
/**
|
||||||
|
* 湿度
|
||||||
|
*/
|
||||||
|
private String humidity;
|
||||||
|
/**
|
||||||
|
* 风向
|
||||||
|
*/
|
||||||
|
private String direct;
|
||||||
|
/**
|
||||||
|
* 风力
|
||||||
|
*/
|
||||||
|
private String power;
|
||||||
|
/**
|
||||||
|
* 空气质量
|
||||||
|
*/
|
||||||
|
private String aqi;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.muyu.market.admain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName(value = "sys_logininfor",autoResultMap = true)
|
||||||
|
@Tag( name="登录日志",description = "记录登录操作")
|
||||||
|
public class SysLogininfor extends BaseEntity {
|
||||||
|
/*
|
||||||
|
访问ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "info_id",type = IdType.AUTO)
|
||||||
|
private Long infoId;
|
||||||
|
/*
|
||||||
|
用户账号
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户名",type = "String")
|
||||||
|
private String userName;
|
||||||
|
/*
|
||||||
|
登录IP地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户账号",type = "String")
|
||||||
|
private String ipaddr;
|
||||||
|
/*
|
||||||
|
登录状态(0成功 1失败)
|
||||||
|
*/
|
||||||
|
@Schema(description = "登录IP地址",type = "char")
|
||||||
|
private Character status;
|
||||||
|
/*
|
||||||
|
提示信息
|
||||||
|
*/
|
||||||
|
@Schema(description = "登录状态(0成功 1失败)",type = "String")
|
||||||
|
private String msg;
|
||||||
|
/*
|
||||||
|
访问时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "提示信息",type = "Date")
|
||||||
|
private Data accessTime;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,130 @@
|
||||||
|
package com.muyu.market.admain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "sys_user",autoResultMap = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class SysUser extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "user_id",type = IdType.AUTO)
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "部门ID",type = "Long")
|
||||||
|
private Long deptId;
|
||||||
|
/**
|
||||||
|
* 用户账号
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户账号",type = "String")
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 用户昵称
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户昵称",type = "String")
|
||||||
|
private String nickName;
|
||||||
|
/**
|
||||||
|
* 用户类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户类型(00系统用户)",type = "String")
|
||||||
|
private String userType;
|
||||||
|
/**
|
||||||
|
* 余额
|
||||||
|
*/
|
||||||
|
@Schema(description = "余额",type = "BigDecimal")
|
||||||
|
private BigDecimal money;
|
||||||
|
/**
|
||||||
|
* 用户邮箱
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户邮箱",type = "String")
|
||||||
|
private String email;
|
||||||
|
/**
|
||||||
|
* 手机号码
|
||||||
|
*/
|
||||||
|
@Schema(description = "手机号码",type = "String")
|
||||||
|
private String phonenumber;
|
||||||
|
/**
|
||||||
|
* 用户性别(0男 1女 2未知)
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户性别(0男 1女 2未知)",type = "String")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "头像地址",type = "String")
|
||||||
|
private String avatar;
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
@Schema(description = "密码",type = "String")
|
||||||
|
private String password;
|
||||||
|
/**
|
||||||
|
* 帐号状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
@Schema(description = "帐号状态(0正常 1停用)",type = "Character")
|
||||||
|
private Character status;
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
@Schema(description = "删除标志(0代表存在 2代表删除)",type = "Character")
|
||||||
|
private Character delFlag;
|
||||||
|
/**
|
||||||
|
* 最后登录IP
|
||||||
|
*/
|
||||||
|
@Schema(description = "最后登录IP",type = "String")
|
||||||
|
private String loginIp;
|
||||||
|
/**
|
||||||
|
* 最后登录时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "最后登录时间",type = "Date")
|
||||||
|
private Date loginDate;
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@Schema(description = "创建者",type = "String")
|
||||||
|
private String createBy;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "创建时间",type = "Date")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/*
|
||||||
|
更新者
|
||||||
|
*/
|
||||||
|
@Schema(description = "更新者",type = "String")
|
||||||
|
private String updateBy;
|
||||||
|
/*
|
||||||
|
更新时间
|
||||||
|
*/
|
||||||
|
@Schema(description = "更新时间",type = "Date")
|
||||||
|
private Date updateTime;
|
||||||
|
/*
|
||||||
|
备注
|
||||||
|
*/
|
||||||
|
@Schema(description = "备注",type = "String")
|
||||||
|
private String remark;
|
||||||
|
}
|
|
@ -0,0 +1,75 @@
|
||||||
|
package com.muyu.market.admain.request;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@Tag(name = "商品展示请求", description = "商品展示请求")
|
||||||
|
public class MyapiListReq {
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "api_id",type = IdType.AUTO)
|
||||||
|
private Long apiId;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "接口名称")
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 价钱
|
||||||
|
*/
|
||||||
|
@Schema(description = "价钱/次",type = "BigDecimal")
|
||||||
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 介绍
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "介绍")
|
||||||
|
private String test;
|
||||||
|
/**
|
||||||
|
* 商品描述
|
||||||
|
*/
|
||||||
|
@Schema(description = "商品描述",type = "String")
|
||||||
|
private String data;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口名称",type = "String")
|
||||||
|
private String apiName;
|
||||||
|
/**
|
||||||
|
* 接口地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口地址",type = "String")
|
||||||
|
private String ip;
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*/
|
||||||
|
@Schema(description = "请求方式",type = "String")
|
||||||
|
private String mode;
|
||||||
|
/**
|
||||||
|
* 购买字段
|
||||||
|
*/
|
||||||
|
@Schema(description = "购买字段(当修改成功触发)",type = "Integer")
|
||||||
|
private int auth;
|
||||||
|
/*
|
||||||
|
API类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "API类型",type = "String")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
package com.muyu.market.admain.request;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@Tag(name = "商品添加", description = "商品添加")
|
||||||
|
public class MyapiSaveReq {
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "api_id",type = IdType.AUTO)
|
||||||
|
private Long apiId;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "接口名称")
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 价钱
|
||||||
|
*/
|
||||||
|
@Schema(description = "价钱/次",type = "BigDecimal")
|
||||||
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 介绍
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "介绍")
|
||||||
|
private String test;
|
||||||
|
/**
|
||||||
|
* 商品描述
|
||||||
|
*/
|
||||||
|
@Schema(description = "商品描述",type = "String")
|
||||||
|
private String data;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口名称",type = "String")
|
||||||
|
private String apiName;
|
||||||
|
/**
|
||||||
|
* 接口地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口地址",type = "String")
|
||||||
|
private String ip;
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*/
|
||||||
|
@Schema(description = "请求方式",type = "String")
|
||||||
|
private String mode;
|
||||||
|
/**
|
||||||
|
* 购买字段
|
||||||
|
*/
|
||||||
|
@Schema(description = "购买字段(当修改成功触发)",type = "Integer")
|
||||||
|
private int auth;
|
||||||
|
/*
|
||||||
|
API类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "API类型",type = "String")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.muyu.market.admain.request;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@Tag(name = "商品修改", description = "商品修改")
|
||||||
|
public class MyapiUpdReq {
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "api_id",type = IdType.AUTO)
|
||||||
|
private Long apiId;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "接口名称")
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 价钱
|
||||||
|
*/
|
||||||
|
@Schema(description = "价钱/次",type = "BigDecimal")
|
||||||
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 介绍
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "介绍")
|
||||||
|
private String test;
|
||||||
|
/**
|
||||||
|
* 商品描述
|
||||||
|
*/
|
||||||
|
@Schema(description = "商品描述",type = "String")
|
||||||
|
private String data;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口名称",type = "String")
|
||||||
|
private String apiName;
|
||||||
|
/**
|
||||||
|
* 接口地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口地址",type = "String")
|
||||||
|
private String ip;
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*/
|
||||||
|
@Schema(description = "请求方式",type = "String")
|
||||||
|
private String mode;
|
||||||
|
/**
|
||||||
|
* 购买字段
|
||||||
|
*/
|
||||||
|
@Schema(description = "购买字段(当修改成功触发)",type = "Integer")
|
||||||
|
private int auth;
|
||||||
|
/*
|
||||||
|
API类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "API类型",type = "String")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.muyu.market.admain.request;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@Tag(name = "充值余额", description = "用于发送充值请求参数")
|
||||||
|
public class updUserMoneyReq {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "user_id",type = IdType.AUTO)
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "部门ID",type = "Long")
|
||||||
|
private Long deptId;
|
||||||
|
/**
|
||||||
|
* 用户账号
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户账号",type = "String")
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 用户昵称
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户昵称",type = "String")
|
||||||
|
private String nickName;
|
||||||
|
/**
|
||||||
|
* 用户类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户类型(00系统用户)",type = "String")
|
||||||
|
private String userType;
|
||||||
|
/**
|
||||||
|
* 余额
|
||||||
|
*/
|
||||||
|
@Schema(description = "余额",type = "BigDecimal")
|
||||||
|
private BigDecimal money;
|
||||||
|
/**
|
||||||
|
* 用户邮箱
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户邮箱",type = "String")
|
||||||
|
private String email;
|
||||||
|
/**
|
||||||
|
* 手机号码
|
||||||
|
*/
|
||||||
|
@Schema(description = "手机号码",type = "String")
|
||||||
|
private String phonenumber;
|
||||||
|
/**
|
||||||
|
* 用户性别(0男 1女 2未知)
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户性别(0男 1女 2未知)",type = "String")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "头像地址",type = "String")
|
||||||
|
private String avatar;
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
@Schema(description = "密码",type = "String")
|
||||||
|
private String password;
|
||||||
|
/**
|
||||||
|
* 帐号状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
@Schema(description = "帐号状态(0正常 1停用)",type = "Character")
|
||||||
|
private Character status;
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
@Schema(description = "删除标志(0代表存在 2代表删除)",type = "Character")
|
||||||
|
private Character delFlag;
|
||||||
|
/**
|
||||||
|
* 最后登录IP
|
||||||
|
*/
|
||||||
|
@Schema(description = "最后登录IP",type = "String")
|
||||||
|
private String loginIp;
|
||||||
|
/**
|
||||||
|
* 最后登录时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "最后登录时间",type = "Date")
|
||||||
|
private Date loginDate;
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@Schema(description = "创建者",type = "String")
|
||||||
|
private String createBy;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "创建时间",type = "Date")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/*
|
||||||
|
更新者
|
||||||
|
*/
|
||||||
|
@Schema(description = "更新者",type = "String")
|
||||||
|
private String updateBy;
|
||||||
|
/*
|
||||||
|
更新时间
|
||||||
|
*/
|
||||||
|
@Schema(description = "更新时间",type = "Date")
|
||||||
|
private Date updateTime;
|
||||||
|
/*
|
||||||
|
备注
|
||||||
|
*/
|
||||||
|
@Schema(description = "备注",type = "String")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.muyu.market.admain.response;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.muyu.market.admain.Myapi;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@Tag(name = "商品展示", description = "商品展示")
|
||||||
|
public class MyapiListResp {
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "api_id",type = IdType.AUTO)
|
||||||
|
private Long apiId;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "接口名称")
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 价钱
|
||||||
|
*/
|
||||||
|
@Schema(description = "价钱/次",type = "BigDecimal")
|
||||||
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 介绍
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "介绍")
|
||||||
|
private String test;
|
||||||
|
/**
|
||||||
|
* 商品描述
|
||||||
|
*/
|
||||||
|
@Schema(description = "商品描述",type = "String")
|
||||||
|
private String data;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口名称",type = "String")
|
||||||
|
private String apiName;
|
||||||
|
/**
|
||||||
|
* 接口地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口地址",type = "String")
|
||||||
|
private String ip;
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*/
|
||||||
|
@Schema(description = "请求方式",type = "String")
|
||||||
|
private String mode;
|
||||||
|
/**
|
||||||
|
* 购买字段
|
||||||
|
*/
|
||||||
|
@Schema(description = "购买字段(当修改成功触发)",type = "Integer")
|
||||||
|
private int auth;
|
||||||
|
/*
|
||||||
|
API类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "API类型",type = "String")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static MyapiListResp selProductList(Myapi myapi){
|
||||||
|
|
||||||
|
return MyapiListResp
|
||||||
|
.builder()
|
||||||
|
.apiId( myapi.getApiId())
|
||||||
|
.name( myapi.getName())
|
||||||
|
.price( myapi.getPrice())
|
||||||
|
.test( myapi.getTest())
|
||||||
|
.data( myapi.getData())
|
||||||
|
.apiName( myapi.getApiName())
|
||||||
|
.ip( myapi.getIp())
|
||||||
|
.mode( myapi.getMode())
|
||||||
|
.auth( myapi.getAuth())
|
||||||
|
.type( myapi.getType())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
private String createBy;
|
||||||
|
private Date createTime;
|
||||||
|
private String updateBy;
|
||||||
|
private Date updateTime;
|
||||||
|
private String remark;
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
package com.muyu.market.admain.response;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@Tag(name = "商品添加", description = "商品添加")
|
||||||
|
public class MyapiSaveResp {
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "api_id",type = IdType.AUTO)
|
||||||
|
private Long apiId;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "接口名称")
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 价钱
|
||||||
|
*/
|
||||||
|
@Schema(description = "价钱/次",type = "BigDecimal")
|
||||||
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 介绍
|
||||||
|
*/
|
||||||
|
@Schema(type = "String",description = "介绍")
|
||||||
|
private String test;
|
||||||
|
/**
|
||||||
|
* 商品描述
|
||||||
|
*/
|
||||||
|
@Schema(description = "商品描述",type = "String")
|
||||||
|
private String data;
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口名称",type = "String")
|
||||||
|
private String apiName;
|
||||||
|
/**
|
||||||
|
* 接口地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "接口地址",type = "String")
|
||||||
|
private String ip;
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*/
|
||||||
|
@Schema(description = "请求方式",type = "String")
|
||||||
|
private String mode;
|
||||||
|
/**
|
||||||
|
* 购买字段
|
||||||
|
*/
|
||||||
|
@Schema(description = "购买字段(当修改成功触发)",type = "Integer")
|
||||||
|
private int auth;
|
||||||
|
/*
|
||||||
|
API类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "API类型",type = "String")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
private String createBy;
|
||||||
|
private Date createTime;
|
||||||
|
private String updateBy;
|
||||||
|
private Date updateTime;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.muyu.market.admain.response;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName(value = "sys_logininfor",autoResultMap = true)
|
||||||
|
@Tag( name="登录日志",description = "记录登录操作")
|
||||||
|
public class SysLogininforResp extends BaseEntity {
|
||||||
|
/*
|
||||||
|
访问ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "info_id",type = IdType.AUTO)
|
||||||
|
private Long infoId;
|
||||||
|
/*
|
||||||
|
用户账号
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户名",type = "String")
|
||||||
|
private String userName;
|
||||||
|
/*
|
||||||
|
登录IP地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户账号",type = "String")
|
||||||
|
private String ipaddr;
|
||||||
|
/*
|
||||||
|
登录状态(0成功 1失败)
|
||||||
|
*/
|
||||||
|
@Schema(description = "登录IP地址",type = "char")
|
||||||
|
private Character status;
|
||||||
|
/*
|
||||||
|
提示信息
|
||||||
|
*/
|
||||||
|
@Schema(description = "登录状态(0成功 1失败)",type = "String")
|
||||||
|
private String msg;
|
||||||
|
/*
|
||||||
|
访问时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "提示信息",type = "Date")
|
||||||
|
private Data accessTime;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.muyu.market.admain.response;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@Tag(name = "充值余额返回", description = "用于响应充值请求参数")
|
||||||
|
public class updSysUserMoneyResp {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "user_id",type = IdType.AUTO)
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "部门ID",type = "Long")
|
||||||
|
private Long deptId;
|
||||||
|
/**
|
||||||
|
* 用户账号
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户账号",type = "String")
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 用户昵称
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户昵称",type = "String")
|
||||||
|
private String nickName;
|
||||||
|
/**
|
||||||
|
* 用户类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户类型",type = "String")
|
||||||
|
private String userType;
|
||||||
|
/**
|
||||||
|
* 余额
|
||||||
|
*/
|
||||||
|
@Schema(description = "余额",type = "BigDecimal")
|
||||||
|
private BigDecimal money;
|
||||||
|
/**
|
||||||
|
* 用户邮箱
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户邮箱",type = "String")
|
||||||
|
private String email;
|
||||||
|
/**
|
||||||
|
* 手机号码
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户邮箱",type = "String")
|
||||||
|
private String phonenumber;
|
||||||
|
/**
|
||||||
|
* 用户性别(0男 1女 2未知)
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户性别",type = "String")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像地址
|
||||||
|
*/
|
||||||
|
@Schema(description = "头像地址",type = "String")
|
||||||
|
private String avatar;
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
@Schema(description = "密码",type = "String")
|
||||||
|
private String password;
|
||||||
|
/**
|
||||||
|
* 帐号状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
@Schema(description = "帐号状态",type = "String")
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
@Schema(description = "删除标志",type = "String")
|
||||||
|
private String delFlag;
|
||||||
|
/**
|
||||||
|
* 最后登录IP
|
||||||
|
*/
|
||||||
|
@Schema(description = "最后登录IP",type = "String")
|
||||||
|
private String loginIp;
|
||||||
|
/**
|
||||||
|
* 最后登录时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "最后登录时间",defaultValue = "2024-5-15 10:00:52",type = "Date")
|
||||||
|
private Date loginDate;
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@Schema(description = "创建者",type = "String")
|
||||||
|
private String createBy;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "创建时间",defaultValue = "2024-5-15 10:00:52",type = "Date")
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@Schema(description = "更新者",type = "String")
|
||||||
|
private String updateBy;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "更新时间",defaultValue = "2024-5-15 10:00:52",type = "Date")
|
||||||
|
private Date updateTime;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@Schema(description = "备注",type = "String")
|
||||||
|
private String remark;
|
||||||
|
}
|
|
@ -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>cloud-market2</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>cloud-market2-remote</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<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>cloud-market2-common</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.muyu;
|
||||||
|
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello world!");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,151 @@
|
||||||
|
<?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>cloud-market2</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>cloud-market2-server</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- api接口 需要用到的依赖 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-beanutils</groupId>
|
||||||
|
<artifactId>commons-beanutils</artifactId>
|
||||||
|
<version>1.9.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-lang</groupId>
|
||||||
|
<artifactId>commons-lang</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.json-lib</groupId>
|
||||||
|
<artifactId>json-lib</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<classifier>jdk13</classifier>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<!-- Mysql Connector -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common DataSource -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>cloud-common-datasource</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common DataScope -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>cloud-common-datascope</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common Log -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>cloud-common-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 接口模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>cloud-common-api-doc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- XllJob定时任务 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>cloud-common-xxl</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>cloud-common-rabbit</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>cloud-market2-common</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>cloud-common-nacos-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>cloud-market2</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>
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.muyu.market.server;
|
||||||
|
|
||||||
|
import com.muyu.common.security.annotation.EnableCustomConfig;
|
||||||
|
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
@EnableCustomConfig
|
||||||
|
@EnableMyFeignClients
|
||||||
|
public class MarketApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(MarketApplication.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package com.muyu.market.server.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.market.admain.Myapi;
|
||||||
|
import com.muyu.market.admain.request.MyapiListReq;
|
||||||
|
import com.muyu.market.admain.request.MyapiSaveReq;
|
||||||
|
import com.muyu.market.admain.request.MyapiUpdReq;
|
||||||
|
import com.muyu.market.admain.response.MyapiListResp;
|
||||||
|
import com.muyu.market.server.service.MyapiService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/myapi")
|
||||||
|
@Tag(name = "产品展示控制层",description = "产品展示控制层")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class MyapiController {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MyapiService myapiService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示商品
|
||||||
|
* @param myapiListReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(path = "/myapiList",method = RequestMethod.POST)
|
||||||
|
@Operation(summary = "查询产品接口",description = "根据接口数据可以查看产品信息")
|
||||||
|
public Result<List<MyapiListResp>> findByMyapiList(@Validated @RequestBody MyapiListReq myapiListReq){
|
||||||
|
return Result.success( myapiService.findByMyapiList( myapiListReq ));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加接口
|
||||||
|
* @param myapiSaveReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
@Operation(summary = "接口信息添加",description = "添加接口信息,添加成功才可以使用")
|
||||||
|
public Result<String> save(@Validated @RequestBody MyapiSaveReq myapiSaveReq){
|
||||||
|
myapiService.save( Myapi.SaveMyapiList( myapiSaveReq ));
|
||||||
|
return Result.success(null,"操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改接口
|
||||||
|
* @param myapiId
|
||||||
|
* @param myapiUpdReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/{myapiId}")
|
||||||
|
@Operation(summary = "接口信息的修改",description = "通过Id修改接口信息")
|
||||||
|
public Result<String> update(
|
||||||
|
@Schema(title = "商品ID",type = "Long",description = "修改商品信息",defaultValue = "1")
|
||||||
|
@PathVariable("myapiId") Long myapiId,
|
||||||
|
@RequestBody @Validated MyapiUpdReq myapiUpdReq){
|
||||||
|
|
||||||
|
myapiService.updateById( Myapi.UpdMyapiList( myapiUpdReq,()->myapiId));
|
||||||
|
return Result.success(null,"操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param myapiId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DeleteMapping
|
||||||
|
@Operation(summary = "产品删除",description = "根据ID删除")
|
||||||
|
public Result<String> removeById(@Validated @RequestParam(value = "myapiId") Long myapiId){
|
||||||
|
myapiService.removeById(myapiId);
|
||||||
|
return Result.success(null,"操作成功");
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 回显接口
|
||||||
|
* @param myapiId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/selectById")
|
||||||
|
@Operation(summary = "产品详细信息",description = "根据ID查询产品")
|
||||||
|
public Result<Myapi> selectById(@Validated @RequestParam(value = "myapiId") Long myapiId){
|
||||||
|
Myapi byId = myapiService.getById( myapiId );
|
||||||
|
return Result.success(byId,"操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.muyu.market.server.controller;
|
||||||
|
|
||||||
|
import com.muyu.market.admain.SelectByPhone;
|
||||||
|
import com.muyu.market.server.util.SelectPhoneUtil;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/party")
|
||||||
|
@Tag(name = "查询手机号",description = "订单查询")
|
||||||
|
public class PartyController {
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/selparty")
|
||||||
|
@Operation(summary = "查询手机号",description = "查询手机号")
|
||||||
|
public SelectByPhone selparty(@RequestParam("phoneNumber") String phoneNumber){
|
||||||
|
|
||||||
|
return SelectPhoneUtil.queryMobileLocation(phoneNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//测试
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SelectPhoneUtil.queryMobileLocation("18790307917");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
//package com.muyu.market.server.controller;
|
||||||
|
//
|
||||||
|
//public class SysLogininforController {
|
||||||
|
//}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.muyu.market.server.controller;
|
||||||
|
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.market.admain.SysUser;
|
||||||
|
import com.muyu.market.server.service.SysUserService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/sysUser")
|
||||||
|
@Tag( name = "个人信息控制层",description = "用于操作用户个人信息")
|
||||||
|
public class SysUserController {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/findById")
|
||||||
|
@Operation(summary = "显示用户信息",description = "显示用户基本信息")
|
||||||
|
public Result<SysUser> findById(@RequestParam(value = "userId") Integer userId){
|
||||||
|
SysUser byId = sysUserService.getById( userId );
|
||||||
|
return Result.success(byId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/updSysUserMoney")
|
||||||
|
@Operation(summary = "充值",description = "通过修改余额达到充值效果")
|
||||||
|
public Result updSysUserMoney(@Validated @RequestBody SysUser sysUser){
|
||||||
|
Integer i = sysUserService.updSysUserMoney( sysUser );
|
||||||
|
return i>0?Result.success():Result.error(500,"充值失败 请联系管理员");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.muyu.market.server.controller;
|
||||||
|
|
||||||
|
import com.muyu.market.admain.SelectWeather;
|
||||||
|
import com.muyu.market.server.util.SelectWeatherUtil;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/weather")
|
||||||
|
@Tag(name = "查询天气",description = "查询天气")
|
||||||
|
public class WeatherController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/selweather")
|
||||||
|
@Operation(summary = "查询天气",description = "查询天气")
|
||||||
|
public SelectWeather selweather(@RequestParam("cityName") String cityName){
|
||||||
|
|
||||||
|
return SelectWeatherUtil.queryWeather(cityName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SelectWeatherUtil.queryWeather("南京");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.muyu.market.server.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.market.admain.Myapi;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface MyapiMapper extends BaseMapper<Myapi> {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
//package com.muyu.market.server.mapper;
|
||||||
|
//
|
||||||
|
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
//import com.muyu.market.admain.SysLogininfor;
|
||||||
|
//import org.apache.ibatis.annotations.Mapper;
|
||||||
|
//
|
||||||
|
//@Mapper
|
||||||
|
//public interface SysLogininforMapper extends BaseMapper<SysLogininfor> {
|
||||||
|
//}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.muyu.market.server.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.market.admain.SysUser;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.muyu.market.server.service.Impl;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.common.utils.StringUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.market.admain.Myapi;
|
||||||
|
import com.muyu.market.admain.request.MyapiListReq;
|
||||||
|
import com.muyu.market.admain.response.MyapiListResp;
|
||||||
|
import com.muyu.market.server.mapper.MyapiMapper;
|
||||||
|
import com.muyu.market.server.service.MyapiService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class MyapiServiceImpl extends ServiceImpl<MyapiMapper, Myapi> implements MyapiService {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MyapiMapper myapiMapper;
|
||||||
|
@Override
|
||||||
|
public List<MyapiListResp> findByMyapiList(MyapiListReq myapiListReq) {
|
||||||
|
|
||||||
|
|
||||||
|
LambdaQueryWrapper<Myapi> lambdaQueryWrapperlist = new LambdaQueryWrapper<>();
|
||||||
|
/**
|
||||||
|
* 查询接口名称
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank( myapiListReq.getName())) {
|
||||||
|
lambdaQueryWrapperlist.like( Myapi::getName, myapiListReq.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Myapi> productlist = this.list(lambdaQueryWrapperlist);
|
||||||
|
|
||||||
|
return productlist.stream()
|
||||||
|
.map( MyapiListResp::selProductList)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
//package com.muyu.market.server.service.Impl;
|
||||||
|
//
|
||||||
|
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
//import com.muyu.market.admain.SysLogininfor;
|
||||||
|
//
|
||||||
|
//import com.muyu.market.admain.response.SysLogininforResp;
|
||||||
|
//import com.muyu.market.server.mapper.SysLogininforMapper;
|
||||||
|
//import com.muyu.market.server.service.SysLogininforService;
|
||||||
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
|
//@Service
|
||||||
|
//public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper,SysLogininfor> implements SysLogininforService {
|
||||||
|
// @Autowired
|
||||||
|
// private SysLogininforMapper sysLogininforMapper;
|
||||||
|
// @Override
|
||||||
|
// public SysLogininforResp selectLogininforByUserName(String userName) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
//}
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.muyu.market.server.service.Impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.common.core.utils.JwtUtils;
|
||||||
|
import com.muyu.market.admain.SysUser;
|
||||||
|
import com.muyu.market.server.mapper.SysUserMapper;
|
||||||
|
import com.muyu.market.server.service.SysUserService;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
|
||||||
|
@Autowired
|
||||||
|
private HttpServletRequest request;
|
||||||
|
@Autowired
|
||||||
|
private StringRedisTemplate redisTemplate;
|
||||||
|
@Autowired
|
||||||
|
private SysUserMapper sysUserMapper;
|
||||||
|
|
||||||
|
//充值余额
|
||||||
|
@Override
|
||||||
|
public Integer updSysUserMoney(SysUser sysUser) {
|
||||||
|
//获取请求头Token
|
||||||
|
String token = request.getHeader( "token" );
|
||||||
|
//转userkey
|
||||||
|
String userKey = JwtUtils.getUserKey( token );
|
||||||
|
//通过key名字和Token取值
|
||||||
|
String s = redisTemplate.opsForValue().get( "token:" + userKey );
|
||||||
|
//转实体类类型
|
||||||
|
SysUser user = JSONObject.parseObject( s, SysUser.class );
|
||||||
|
UpdateWrapper<SysUser> sysUserUpdateWrapper = new UpdateWrapper<>();
|
||||||
|
UpdateWrapper<SysUser> money = sysUserUpdateWrapper.setSql("money=money+"+sysUser.getMoney()).
|
||||||
|
eq( "user_id",user.getUserId() );
|
||||||
|
return sysUserMapper.update( money );
|
||||||
|
}
|
||||||
|
//回显用户信息
|
||||||
|
@Override
|
||||||
|
public SysUser selectByUserId(Integer userId) {
|
||||||
|
return sysUserMapper.selectById( userId );
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.muyu.market.server.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.market.admain.Myapi;
|
||||||
|
import com.muyu.market.admain.request.MyapiListReq;
|
||||||
|
import com.muyu.market.admain.response.MyapiListResp;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MyapiService extends IService<Myapi> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品接口
|
||||||
|
*
|
||||||
|
* @param myapiListReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MyapiListResp> findByMyapiList(MyapiListReq myapiListReq);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
//package com.muyu.market.server.service;
|
||||||
|
//
|
||||||
|
//import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
//import com.muyu.market.admain.SysLogininfor;
|
||||||
|
//import com.muyu.market.admain.response.SysLogininforResp;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//public interface SysLogininforService extends IService<SysLogininfor> {
|
||||||
|
// /*
|
||||||
|
// 根据名字查询登录日志表
|
||||||
|
// */
|
||||||
|
// SysLogininforResp selectLogininforByUserName(String userName);
|
||||||
|
//}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.muyu.market.server.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.market.admain.SysUser;
|
||||||
|
|
||||||
|
public interface SysUserService extends IService<SysUser> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充值用户余额
|
||||||
|
*
|
||||||
|
* @param sysUser
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
Integer updSysUserMoney(SysUser sysUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回显用户余额
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return SysUser
|
||||||
|
*/
|
||||||
|
SysUser selectByUserId(Integer userId);
|
||||||
|
}
|
|
@ -0,0 +1,154 @@
|
||||||
|
package com.muyu.market.server.util;
|
||||||
|
|
||||||
|
import com.muyu.market.admain.SelectByPhone;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class SelectPhoneUtil {
|
||||||
|
// 手机归属地查询接口地址
|
||||||
|
public static String API_URL = "http://apis.juhe.cn/mobile/get";
|
||||||
|
// 接口请求Key
|
||||||
|
public static String API_KEY = "4cfc25ee624fc08ad83b61a3a0ab1bcb";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据手机号码/手机号码前7位查询号码归属地
|
||||||
|
* @param mobile
|
||||||
|
*/
|
||||||
|
public static SelectByPhone queryMobileLocation(String mobile)
|
||||||
|
{
|
||||||
|
Map<String, Object> params = new HashMap<>();//组合参数
|
||||||
|
params.put("phone", mobile);
|
||||||
|
params.put("key", API_KEY);
|
||||||
|
String queryParams = urlencode(params);
|
||||||
|
|
||||||
|
String response = doGet(API_URL, queryParams);
|
||||||
|
SelectByPhone selectByPhone = new SelectByPhone();
|
||||||
|
try {
|
||||||
|
JSONObject jsonObject = JSONObject.fromObject(response);
|
||||||
|
int error_code = jsonObject.getInt("error_code");
|
||||||
|
if (error_code == 0) {
|
||||||
|
System.out.println("调用接口成功");
|
||||||
|
|
||||||
|
JSONObject result = jsonObject.getJSONObject("result");
|
||||||
|
|
||||||
|
System.out.printf("省份:%s%n", result.getString("province"));
|
||||||
|
System.out.printf("城市:%s%n", result.getString("city"));
|
||||||
|
System.out.printf("区号:%s%n", result.getString("areacode"));
|
||||||
|
System.out.printf("邮编:%s%n", result.getString("zip"));
|
||||||
|
System.out.printf("运营商:%s%n", result.getString("company"));
|
||||||
|
// 设置编码(仅在需要时启用)
|
||||||
|
try {
|
||||||
|
System.setOut(new java.io.PrintStream(System.out,true,"UTF-8"));
|
||||||
|
} catch (java.io.UnsupportedEncodingException e) {
|
||||||
|
System.err.println("无法设置UTF-8编码:" + e.getMessage());
|
||||||
|
}
|
||||||
|
selectByPhone.setCompany(result.getString("company"));
|
||||||
|
selectByPhone.setCity(result.getString("city"));
|
||||||
|
selectByPhone.setZip(result.getString("zip"));
|
||||||
|
selectByPhone.setAreacode(result.getString("areacode"));
|
||||||
|
selectByPhone.setProvince(result.getString("province"));
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
System.out.println("调用接口失败:" + jsonObject.getString("reason"));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return selectByPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get方式的http请求
|
||||||
|
*
|
||||||
|
* @param httpUrl 请求地址
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
public static String doGet(String httpUrl, String queryParams) {
|
||||||
|
HttpURLConnection connection = null;
|
||||||
|
InputStream inputStream = null;
|
||||||
|
BufferedReader bufferedReader = null;
|
||||||
|
String result = null;// 返回结果字符串
|
||||||
|
try {
|
||||||
|
// 创建远程url连接对象
|
||||||
|
URL url = new URL(new StringBuffer(httpUrl).append("?").append(queryParams).toString());
|
||||||
|
// 通过远程url连接对象打开一个连接,强转成httpURLConnection类
|
||||||
|
connection = (HttpURLConnection) url.openConnection();
|
||||||
|
// 设置连接方式:get
|
||||||
|
connection.setRequestMethod("GET");
|
||||||
|
// 设置连接主机服务器的超时时间:15000毫秒
|
||||||
|
connection.setConnectTimeout(5000);
|
||||||
|
// 设置读取远程返回的数据时间:60000毫秒
|
||||||
|
connection.setReadTimeout(6000);
|
||||||
|
// 发送请求
|
||||||
|
connection.connect();
|
||||||
|
// 通过connection连接,获取输入流
|
||||||
|
if (connection.getResponseCode() == 200) {
|
||||||
|
inputStream = connection.getInputStream();
|
||||||
|
// 封装输入流,并指定字符集
|
||||||
|
bufferedReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
|
||||||
|
// 存放数据
|
||||||
|
StringBuilder sbf = new StringBuilder();
|
||||||
|
String temp;
|
||||||
|
while ((temp = bufferedReader.readLine()) != null) {
|
||||||
|
sbf.append(temp);
|
||||||
|
sbf.append(System.getProperty("line.separator"));
|
||||||
|
}
|
||||||
|
result = sbf.toString();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
// 关闭资源
|
||||||
|
if (null != bufferedReader) {
|
||||||
|
try {
|
||||||
|
bufferedReader.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (null != inputStream) {
|
||||||
|
try {
|
||||||
|
inputStream.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (connection != null) {
|
||||||
|
connection.disconnect();// 关闭远程连接
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将map型转为请求参数型
|
||||||
|
*
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String urlencode(Map<String, ?> data) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (Map.Entry<String, ?> i : data.entrySet()) {
|
||||||
|
try {
|
||||||
|
sb.append(i.getKey()).append("=").append(URLEncoder.encode(i.getValue() + "", "UTF-8")).append("&");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String result = sb.toString();
|
||||||
|
result = result.substring(0, result.lastIndexOf("&"));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,148 @@
|
||||||
|
package com.muyu.market.server.util;
|
||||||
|
import com.muyu.market.admain.SelectWeather;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
@RestController
|
||||||
|
public class SelectWeatherUtil {
|
||||||
|
|
||||||
|
|
||||||
|
// 天气情况查询接口地址
|
||||||
|
public static String API_URL = "http://apis.juhe.cn/simpleWeather/query";
|
||||||
|
// 接口请求Key
|
||||||
|
public static String API_KEY = "2e7b031d32a2eac211c099bf4918a4dd";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据城市名查询天气情况
|
||||||
|
*
|
||||||
|
* @param cityName
|
||||||
|
*/
|
||||||
|
public static SelectWeather queryWeather(String cityName) {
|
||||||
|
Map<String, Object> params = new HashMap<>();//组合参数
|
||||||
|
params.put("city", cityName);
|
||||||
|
params.put("key", API_KEY);
|
||||||
|
String queryParams = urlencode(params);
|
||||||
|
|
||||||
|
String response = doGet(API_URL, queryParams);
|
||||||
|
SelectWeather selectWeather = new SelectWeather();
|
||||||
|
|
||||||
|
try {
|
||||||
|
JSONObject jsonObject = JSONObject.fromObject(response);
|
||||||
|
int error_code = jsonObject.getInt("error_code");
|
||||||
|
if (error_code == 0) {
|
||||||
|
System.out.println("调用接口成功");
|
||||||
|
|
||||||
|
JSONObject result = jsonObject.getJSONObject("result");
|
||||||
|
JSONObject realtime = result.getJSONObject("realtime");
|
||||||
|
|
||||||
|
System.out.printf("城市:%s%n", result.getString("city"));
|
||||||
|
System.out.printf("天气:%s%n", realtime.getString("info"));
|
||||||
|
System.out.printf("温度:%s%n", realtime.getString("temperature"));
|
||||||
|
System.out.printf("湿度:%s%n", realtime.getString("humidity"));
|
||||||
|
System.out.printf("风向:%s%n", realtime.getString("direct"));
|
||||||
|
System.out.printf("风力:%s%n", realtime.getString("power"));
|
||||||
|
System.out.printf("空气质量:%s%n", realtime.getString("aqi"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
System.out.println("调用接口失败:" + jsonObject.getString("reason"));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return selectWeather;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get方式的http请求
|
||||||
|
*
|
||||||
|
* @param httpUrl 请求地址
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
public static String doGet(String httpUrl, String queryParams) {
|
||||||
|
HttpURLConnection connection = null;
|
||||||
|
InputStream inputStream = null;
|
||||||
|
BufferedReader bufferedReader = null;
|
||||||
|
String result = null;// 返回结果字符串
|
||||||
|
try {
|
||||||
|
// 创建远程url连接对象
|
||||||
|
URL url = new URL(new StringBuffer(httpUrl).append("?").append(queryParams).toString());
|
||||||
|
// 通过远程url连接对象打开一个连接,强转成httpURLConnection类
|
||||||
|
connection = (HttpURLConnection) url.openConnection();
|
||||||
|
// 设置连接方式:get
|
||||||
|
connection.setRequestMethod("GET");
|
||||||
|
// 设置连接主机服务器的超时时间:15000毫秒
|
||||||
|
connection.setConnectTimeout(5000);
|
||||||
|
// 设置读取远程返回的数据时间:60000毫秒
|
||||||
|
connection.setReadTimeout(6000);
|
||||||
|
// 发送请求
|
||||||
|
connection.connect();
|
||||||
|
// 通过connection连接,获取输入流
|
||||||
|
if (connection.getResponseCode() == 200) {
|
||||||
|
inputStream = connection.getInputStream();
|
||||||
|
// 封装输入流,并指定字符集
|
||||||
|
bufferedReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
|
||||||
|
// 存放数据
|
||||||
|
StringBuilder sbf = new StringBuilder();
|
||||||
|
String temp;
|
||||||
|
while ((temp = bufferedReader.readLine()) != null) {
|
||||||
|
sbf.append(temp);
|
||||||
|
sbf.append(System.getProperty("line.separator"));
|
||||||
|
}
|
||||||
|
result = sbf.toString();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
// 关闭资源
|
||||||
|
if (null != bufferedReader) {
|
||||||
|
try {
|
||||||
|
bufferedReader.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (null != inputStream) {
|
||||||
|
try {
|
||||||
|
inputStream.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (connection != null) {
|
||||||
|
connection.disconnect();// 关闭远程连接
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将map型转为请求参数型
|
||||||
|
*
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String urlencode(Map<String, ?> data) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (Map.Entry<String, ?> i : data.entrySet()) {
|
||||||
|
try {
|
||||||
|
sb.append(i.getKey()).append("=").append(URLEncoder.encode(i.getValue() + "", "UTF-8")).append("&");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String result = sb.toString();
|
||||||
|
result = result.substring(0, result.lastIndexOf("&"));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
com.muyu.market.server.MarketApplication
|
||||||
|
com.muyu.Main
|
|
@ -0,0 +1,2 @@
|
||||||
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
Spring Application Name: ${spring.application.name}
|
|
@ -0,0 +1,56 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 6666
|
||||||
|
|
||||||
|
# nacos线上地址
|
||||||
|
nacos:
|
||||||
|
addr: 12.2.0.252:8848
|
||||||
|
user-name: nacos
|
||||||
|
password: nacos
|
||||||
|
namespace: muyu-cloud
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: cloud-market2
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: ${nacos.addr}
|
||||||
|
# nacos用户名
|
||||||
|
username: ${nacos.user-name}
|
||||||
|
# nacos密码
|
||||||
|
password: ${nacos.password}
|
||||||
|
# 命名空间
|
||||||
|
namespace: ${nacos.namespace}
|
||||||
|
config:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: ${nacos.addr}
|
||||||
|
# nacos用户名
|
||||||
|
username: ${nacos.user-name}
|
||||||
|
# nacos密码
|
||||||
|
password: ${nacos.password}
|
||||||
|
# 命名空间
|
||||||
|
namespace: ${nacos.namespace}
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
# 系统共享配置
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
# 系统环境Config共享配置
|
||||||
|
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
# xxl-job 配置文件
|
||||||
|
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
# rabbit 配置文件
|
||||||
|
- application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.muyu.system.mapper: DEBUG
|
|
@ -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/cloud-pay"/>
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<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>
|
|
@ -0,0 +1,81 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<!-- 日志存放路径 -->
|
||||||
|
<property name="log.path" value="logs/cloud-pay"/>
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.sky.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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>ERROR</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 使用gRpc将日志发送到skywalking服务端 -->
|
||||||
|
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
||||||
|
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||||
|
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
||||||
|
<Pattern>${log.sky.pattern}</Pattern>
|
||||||
|
</layout>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统模块日志级别控制 -->
|
||||||
|
<logger name="com.muyu" level="info"/>
|
||||||
|
<!-- Spring日志级别控制 -->
|
||||||
|
<logger name="org.springframework" level="warn"/>
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="GRPC_LOG"/>
|
||||||
|
<appender-ref ref="console"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!--系统操作日志-->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="file_info"/>
|
||||||
|
<appender-ref ref="file_error"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,81 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<!-- 日志存放路径 -->
|
||||||
|
<property name="log.path" value="logs/cloud-pay"/>
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.sky.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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>ERROR</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 使用gRpc将日志发送到skywalking服务端 -->
|
||||||
|
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
||||||
|
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||||
|
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
||||||
|
<Pattern>${log.sky.pattern}</Pattern>
|
||||||
|
</layout>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统模块日志级别控制 -->
|
||||||
|
<logger name="com.muyu" level="info"/>
|
||||||
|
<!-- Spring日志级别控制 -->
|
||||||
|
<logger name="org.springframework" level="warn"/>
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="GRPC_LOG"/>
|
||||||
|
<appender-ref ref="console"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!--系统操作日志-->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="file_info"/>
|
||||||
|
<appender-ref ref="file_error"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?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>cloud-server-parent</artifactId>
|
||||||
|
<version>3.6.4</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>cloud-market2</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<modules>
|
||||||
|
<module>cloud-market2-client</module>
|
||||||
|
<module>cloud-market2-common</module>
|
||||||
|
<module>cloud-market2-remote</module>
|
||||||
|
<module>cloud-market2-server</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>
|
Loading…
Reference in New Issue