Initial commit
This commit is contained in:
commit
8d21ba1a21
17
.gitignore
vendored
Normal file
17
.gitignore
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
.DS_Store
|
||||||
|
|
||||||
|
**/*.iml
|
||||||
|
|
||||||
|
**/.idea/
|
||||||
|
**/.vscode/
|
||||||
|
|
||||||
|
**/target/
|
||||||
|
**/logs/
|
||||||
|
|
||||||
|
**/node_modules/
|
||||||
|
**/dist/
|
||||||
|
|
||||||
|
**/*.log
|
||||||
|
*.log
|
||||||
|
|
||||||
|
rebel.xml
|
29
.gitlab-ci.yml
Normal file
29
.gitlab-ci.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
stages: # List of stages for jobs, and their order of execution
|
||||||
|
- pre-build
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
pre-build-job:
|
||||||
|
stage: pre-build
|
||||||
|
script:
|
||||||
|
- rm -rf /home/gitlab-runner/uthmeta-temp/
|
||||||
|
- mkdir -p /home/gitlab-runner/uthmeta-temp/
|
||||||
|
|
||||||
|
build-job: # This job runs in the build stage, which runs first.
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- echo "packaging jar package."
|
||||||
|
- cd java/
|
||||||
|
- mvn package '-Dmaven.test.skip=true'
|
||||||
|
- cp ./nft-admin/target/nft-admin.jar /home/gitlab-runner/uthmeta-temp/
|
||||||
|
- cp ./nft-api/target/nft-api.jar /home/gitlab-runner/uthmeta-temp/
|
||||||
|
- echo "package complete."
|
||||||
|
|
||||||
|
deploy-job: # This job runs in the deploy stage.
|
||||||
|
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
||||||
|
script:
|
||||||
|
- echo "Deploying application..."
|
||||||
|
- cd java
|
||||||
|
- scp -r /home/gitlab-runner/uthmeta-temp/*.jar root@10.0.0.20:/root/uthmeta/
|
||||||
|
- ssh -l root 10.0.0.20 "sh /root/uthmeta/deploy.sh"
|
||||||
|
- echo "Application successfully deployed."
|
52
java/README.md
Normal file
52
java/README.md
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# 普普-数元项目
|
||||||
|
|
||||||
|
## 介绍
|
||||||
|
普普数元项目启动类在对应的模块里面 \
|
||||||
|
测试环境: http://test.uthmeta.com \
|
||||||
|
正式环境: https://collection.smdmeta.com
|
||||||
|
<p>
|
||||||
|
已经集成<text style="color:red">Gitlab-Cli</text>
|
||||||
|
提交代码后自动部署到<text style="color:red">测试环境</text>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## 模块说明
|
||||||
|
### <text style="color:red">code-generation
|
||||||
|
代码生成器模块, 基于freemark反射mysql, <text style="color:red">resources/template</text> 可以定制各端代码
|
||||||
|
|
||||||
|
### <text style="color:red">common 通用模块
|
||||||
|
>* 文件上传
|
||||||
|
>* 短信发送(策略模式 + 模板方法)
|
||||||
|
>* 实名认证
|
||||||
|
>* 线程池
|
||||||
|
>* 文昌链
|
||||||
|
>* 有赞
|
||||||
|
>* 支付 (枚举 策略模式)
|
||||||
|
>* SSE 主动推送短连接
|
||||||
|
>* 数盒
|
||||||
|
>* 工具类
|
||||||
|
>* redis操作封装
|
||||||
|
>* 基于redis实现的mq队列
|
||||||
|
>* 多数据源filter
|
||||||
|
|
||||||
|
### <text style="color:red">nft-admin 后台服务
|
||||||
|
>包含定时任务 \
|
||||||
|
SpringBoot + MybatisPlus + knife4j + Shiro
|
||||||
|
|
||||||
|
### <text style="color:red">nft-api 前端服务
|
||||||
|
> 方便集群拓展 \
|
||||||
|
SpringBoot + MybatisPlus + knife4j + JWT \
|
||||||
|
OpenAPI为开放接口,后台配置securityKey \
|
||||||
|
Header说明:
|
||||||
|
>* PLATFORM: 后台配置的平台号
|
||||||
|
>* TIMESTAMP:时间戳,验签使用
|
||||||
|
>* SIGN:对方平台的摘要信息
|
||||||
|
|
||||||
|
## 部署说明
|
||||||
|
>1. maven打包后上传至Linux服务器。
|
||||||
|
>2. 运行publish.bat脚本上传文件到服务器。
|
||||||
|
>3. <text style='color:red'>ps -ef | grep nft</text> 找到所有nft的进程 kill掉。千万不要 -9,避免数据丢失
|
||||||
|
>4. 服务器运行start.sh脚本启动。
|
||||||
|
|
||||||
|
admin端口: 8088 \
|
||||||
|
api端口: 8081
|
||||||
|
knife4j地址:
|
52
java/code-generation/pom.xml
Normal file
52
java/code-generation/pom.xml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?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">
|
||||||
|
<parent>
|
||||||
|
<artifactId>cpop-nftmeta</artifactId>
|
||||||
|
<groupId>com.cpop</groupId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.cpop.nftmeta</groupId>
|
||||||
|
<artifactId>code-generation</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.cpop.nftmeta</groupId>
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!--代码生成模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.freemarker</groupId>
|
||||||
|
<artifactId>freemarker</artifactId>
|
||||||
|
<version>2.3.30</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate;
|
||||||
|
|
||||||
|
import freemarker.template.Configuration;
|
||||||
|
import freemarker.template.TemplateExceptionHandler;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class FreeMarkerConfig {
|
||||||
|
private static final Configuration configuration;
|
||||||
|
|
||||||
|
static {
|
||||||
|
configuration = new Configuration(Configuration.VERSION_2_3_0);
|
||||||
|
|
||||||
|
configuration.setClassForTemplateLoading(FreeMarkerConfig.class, "/templates");
|
||||||
|
// Set the preferred charset template files are stored in. UTF-8 is
|
||||||
|
// a good choice in most applications:
|
||||||
|
configuration.setDefaultEncoding("UTF-8");
|
||||||
|
|
||||||
|
// Sets how errors will appear.
|
||||||
|
// During web page *development* TemplateExceptionHandler.HTML_DEBUG_HANDLER is better.
|
||||||
|
configuration.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Configuration getInstance() {
|
||||||
|
return configuration;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.codegenerate.dto.GenerateMeta;
|
||||||
|
import com.cpop.nftmeta.codegenerate.service.MysqlService;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/code")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class CodeController {
|
||||||
|
private final MysqlService mysqlService;
|
||||||
|
|
||||||
|
@GetMapping("tables")
|
||||||
|
public R tables(Page page, String query) {
|
||||||
|
return R.success(mysqlService.getTables(page, query));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("gen")
|
||||||
|
public ResponseEntity code(@RequestBody List<GenerateMeta> metas) {
|
||||||
|
return mysqlService.codeGen(metas);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.dto;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.utils.StringUtils;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class FieldMeta {
|
||||||
|
private String columnName;
|
||||||
|
private String columnDescribe;
|
||||||
|
|
||||||
|
public String getFieldName() {
|
||||||
|
return StringUtils.lineToHump(this.columnName);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.dto;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.utils.StringUtils;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GenerateMeta {
|
||||||
|
private String basePackage;
|
||||||
|
private String author;
|
||||||
|
|
||||||
|
private String tableName;
|
||||||
|
private String tableComment;
|
||||||
|
|
||||||
|
public String getDescribe(){
|
||||||
|
return tableComment;
|
||||||
|
}
|
||||||
|
|
||||||
|
private LocalDate creationTime = LocalDate.now();
|
||||||
|
|
||||||
|
private List<FieldMeta> fieldMetas;
|
||||||
|
|
||||||
|
public String getEntityName() {
|
||||||
|
String entityName = StringUtils.lineToHump(this.tableName);
|
||||||
|
return Character.toUpperCase(entityName.charAt(0)) + entityName.substring(1);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.factory;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.codegenerate.dto.GenerateMeta;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public abstract class BaseFactory {
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
private GenerateMeta generateMeta;
|
||||||
|
|
||||||
|
private Map<String, String> buildList;
|
||||||
|
|
||||||
|
protected BaseFactory() {
|
||||||
|
buildList = new HashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> build() {
|
||||||
|
if (this.generateMeta == null) {
|
||||||
|
throw new RuntimeException("元数据为空,无法生成");
|
||||||
|
}
|
||||||
|
this.doBuild();
|
||||||
|
|
||||||
|
return this.buildList;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setBuild(String buildPath, String templateName) {
|
||||||
|
this.buildList.put(buildPath, templateName);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void doBuild();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.factory;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.codegenerate.FreeMarkerConfig;
|
||||||
|
import com.cpop.nftmeta.common.exception.CpopException;
|
||||||
|
import com.cpop.nftmeta.common.utils.ZipUtils;
|
||||||
|
import freemarker.template.Configuration;
|
||||||
|
import freemarker.template.Template;
|
||||||
|
import freemarker.template.TemplateException;
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
public class FactoryWrapper {
|
||||||
|
private Configuration freeMarkerConfig = FreeMarkerConfig.getInstance();
|
||||||
|
|
||||||
|
private List<BaseFactory> factories;
|
||||||
|
|
||||||
|
{
|
||||||
|
factories = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addFactory(BaseFactory factory) {
|
||||||
|
if (factory == null) return;
|
||||||
|
this.factories.add(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 压缩
|
||||||
|
private ByteArrayOutputStream toZip() {
|
||||||
|
int bufferCapacity = 1024;
|
||||||
|
// 最终压缩流
|
||||||
|
ByteArrayOutputStream outTemp = new ByteArrayOutputStream(bufferCapacity);
|
||||||
|
// 临时压缩流
|
||||||
|
ZipOutputStream zipOutputStream = new ZipOutputStream(outTemp);
|
||||||
|
zipOutputStream.setComment("代码生成");
|
||||||
|
try {
|
||||||
|
for (BaseFactory factory : factories) {
|
||||||
|
Map<String, String> buildList = factory.build();
|
||||||
|
for (String buildPath : buildList.keySet()) {
|
||||||
|
// freemarker模板生成
|
||||||
|
Template temp = this.freeMarkerConfig.getTemplate(buildList.get(buildPath));
|
||||||
|
// 模板内容缓冲区
|
||||||
|
StringWriter tempStream = new StringWriter(bufferCapacity);
|
||||||
|
temp.process(factory.getGenerateMeta(), tempStream);
|
||||||
|
// 加入压缩包
|
||||||
|
ZipUtils.addFile(zipOutputStream, buildPath, tempStream.getBuffer().toString().getBytes());
|
||||||
|
// 清除缓冲区
|
||||||
|
tempStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭缓冲区
|
||||||
|
zipOutputStream.close();
|
||||||
|
} catch (IOException | TemplateException e) {
|
||||||
|
throw new CpopException(e.getMessage());
|
||||||
|
}
|
||||||
|
return outTemp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ByteArrayOutputStream proxyBuild() {
|
||||||
|
if (this.freeMarkerConfig == null) {
|
||||||
|
throw new RuntimeException("FreeMarker配置为空,无法生成");
|
||||||
|
}
|
||||||
|
return this.toZip();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.factory;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.codegenerate.dto.GenerateMeta;
|
||||||
|
|
||||||
|
public class JavaFactory extends BaseFactory {
|
||||||
|
private String ROOT_PATH = "/java";
|
||||||
|
private String CODE_PATH = "/java";
|
||||||
|
private String RESOURCE_PATH = "/resources/";
|
||||||
|
|
||||||
|
private String MAPPER_PATH = "/mapper";
|
||||||
|
private String SERVICE_PATH = "/service";
|
||||||
|
private String CONTROLLER_PATH = "/controller";
|
||||||
|
private String ENTITY_PATH = "/entity";
|
||||||
|
|
||||||
|
public JavaFactory(GenerateMeta generateMeta) {
|
||||||
|
super();
|
||||||
|
super.setGenerateMeta(generateMeta);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doBuild() {
|
||||||
|
String PACKAGE_PATH = "/" + this.getGenerateMeta().getBasePackage().replace(".", "/");
|
||||||
|
|
||||||
|
String BASE_PATH = ROOT_PATH + CODE_PATH + PACKAGE_PATH;
|
||||||
|
String fileName = "/" + this.getGenerateMeta().getEntityName();
|
||||||
|
// mapper
|
||||||
|
super.setBuild( BASE_PATH + MAPPER_PATH + fileName + "Mapper.java", "/java/mapper/mapper.ftl");
|
||||||
|
super.setBuild(ROOT_PATH + RESOURCE_PATH + MAPPER_PATH + fileName + "Mapper.xml", "/java/mapper/mapper-xml.ftl");
|
||||||
|
// // service
|
||||||
|
super.setBuild(BASE_PATH + SERVICE_PATH + fileName + "Service.java", "/java/service/service.ftl");
|
||||||
|
super.setBuild(BASE_PATH + SERVICE_PATH + "/impl" + fileName + "ServiceImpl.java", "/java/service/service-impl.ftl");
|
||||||
|
// // controller
|
||||||
|
super.setBuild(BASE_PATH + CONTROLLER_PATH + fileName + "Controller.java", "/java/controller.ftl");
|
||||||
|
// entity
|
||||||
|
super.setBuild(BASE_PATH + ENTITY_PATH + fileName + ".java", "/java/entity.ftl");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.factory;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.codegenerate.dto.GenerateMeta;
|
||||||
|
import com.cpop.nftmeta.common.utils.StringUtils;
|
||||||
|
|
||||||
|
public class VueFactory extends BaseFactory {
|
||||||
|
private String ROOT_PATH = "/vue";
|
||||||
|
|
||||||
|
private String API_PATH = "/api";
|
||||||
|
private String VIEW_PATH = "/views";
|
||||||
|
|
||||||
|
public VueFactory(GenerateMeta generateMeta) {
|
||||||
|
super();
|
||||||
|
super.setGenerateMeta(generateMeta);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doBuild() {
|
||||||
|
String fileName = "/" + StringUtils.lineToHump(this.getGenerateMeta().getTableName());
|
||||||
|
super.setBuild(ROOT_PATH + API_PATH + fileName + ".js", "/vue/api.ftl");
|
||||||
|
super.setBuild(ROOT_PATH + VIEW_PATH + fileName + "/index.vue", "/vue/index.ftl");
|
||||||
|
super.setBuild(ROOT_PATH + VIEW_PATH + fileName + "/form.vue", "/vue/form.ftl");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.codegenerate.dto.FieldMeta;
|
||||||
|
import com.cpop.nftmeta.codegenerate.vo.MySqlTableVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MysqlMapper {
|
||||||
|
IPage<MySqlTableVo> getAllTable(Page<MySqlTableVo> page, @Param("schemaName")String schemaName, @Param("query") String query);
|
||||||
|
|
||||||
|
List<FieldMeta> getTableColumn(@Param("schemaName") String schemaName,@Param("tableName") String tableName);
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.codegenerate.dto.GenerateMeta;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MysqlService {
|
||||||
|
IPage getTables(Page page,String query);
|
||||||
|
|
||||||
|
ResponseEntity codeGen(List<GenerateMeta> metas);
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.codegenerate.dto.FieldMeta;
|
||||||
|
import com.cpop.nftmeta.codegenerate.dto.GenerateMeta;
|
||||||
|
import com.cpop.nftmeta.codegenerate.factory.FactoryWrapper;
|
||||||
|
import com.cpop.nftmeta.codegenerate.factory.JavaFactory;
|
||||||
|
import com.cpop.nftmeta.codegenerate.factory.VueFactory;
|
||||||
|
import com.cpop.nftmeta.codegenerate.mapper.MysqlMapper;
|
||||||
|
import com.cpop.nftmeta.codegenerate.service.MysqlService;
|
||||||
|
import com.cpop.nftmeta.common.exception.CpopException;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class MysqlServiceImpl implements MysqlService {
|
||||||
|
private final String schemaName = "nft";
|
||||||
|
@Autowired
|
||||||
|
private MysqlMapper mysqlMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage getTables(@NotNull Page page, String query) {
|
||||||
|
return mysqlMapper.getAllTable(page, schemaName, query);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity codeGen(List<GenerateMeta> metas) {
|
||||||
|
FactoryWrapper factoryWrapper = new FactoryWrapper();
|
||||||
|
for (GenerateMeta meta : metas) {
|
||||||
|
List<FieldMeta> fieldMetas = mysqlMapper.getTableColumn(schemaName, meta.getTableName());
|
||||||
|
if (fieldMetas == null) throw new CpopException("表不存在");
|
||||||
|
meta.setFieldMetas(fieldMetas);
|
||||||
|
|
||||||
|
factoryWrapper.addFactory(new JavaFactory(meta));
|
||||||
|
factoryWrapper.addFactory(new VueFactory(meta));
|
||||||
|
}
|
||||||
|
ByteArrayOutputStream outputStream = factoryWrapper.proxyBuild();
|
||||||
|
|
||||||
|
// 返回响应
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.add("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||||
|
headers.add("Content-Disposition", "attachment; filename=wooya-code-" + System.currentTimeMillis() + ".zip");
|
||||||
|
headers.add("Pragma", "no-cache");
|
||||||
|
headers.add("Expires", "0");
|
||||||
|
headers.add("Last-Modified", new Date().toString());
|
||||||
|
headers.add("ETag", String.valueOf(System.currentTimeMillis()));
|
||||||
|
|
||||||
|
return ResponseEntity
|
||||||
|
.ok()
|
||||||
|
.headers(headers)
|
||||||
|
.contentLength(outputStream.size())
|
||||||
|
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
|
.body(outputStream.toByteArray());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.cpop.nftmeta.codegenerate.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class MySqlTableVo {
|
||||||
|
private String tableName;
|
||||||
|
private String tableComment;
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
<?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.cpop.nftmeta.codegenerate.mapper.MysqlMapper">
|
||||||
|
<resultMap id="ColumnResultMapper" type="com.cpop.nftmeta.codegenerate.dto.FieldMeta">
|
||||||
|
<result column="column_name" property="columnName" />
|
||||||
|
<result column="column_comment" property="columnDescribe" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getAllTable" resultType="com.cpop.nftmeta.codegenerate.vo.MySqlTableVo">
|
||||||
|
SELECT table_name,table_comment FROM information_schema.TABLES
|
||||||
|
<where>
|
||||||
|
table_schema=#{schemaName}
|
||||||
|
<if test="query != null and query !=''">
|
||||||
|
AND (
|
||||||
|
table_name LIKE "%${query}%"
|
||||||
|
OR table_comment LIKE "%${query}%"
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getTableColumn" resultMap="ColumnResultMapper">
|
||||||
|
select
|
||||||
|
column_name,
|
||||||
|
column_comment,
|
||||||
|
column_type
|
||||||
|
from information_schema.columns
|
||||||
|
where table_schema = #{schemaName}
|
||||||
|
and table_name = #{tableName}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,51 @@
|
|||||||
|
<#assign common="com.cpop.nftmeta.common">
|
||||||
|
package ${basePackage!}.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import ${common}.vo.R;
|
||||||
|
import ${basePackage!}.entity.${entityName!};
|
||||||
|
import ${basePackage!}.service.${entityName!}Service;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ${describe!}
|
||||||
|
* Created on ${creationTime}
|
||||||
|
* @author ${author!}
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/${(entityName!)?lower_case}")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ${entityName!}Controller {
|
||||||
|
private final ${entityName!}Service ${(entityName!)?uncap_first}Service;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list() {
|
||||||
|
return R.success(${(entityName!)?uncap_first}Service.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(${(entityName!)?uncap_first}Service.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(${(entityName!)?uncap_first}Service.getBy${entityName!}Id(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public R insert(@RequestBody ${entityName!} ${(entityName!)?uncap_first}) {
|
||||||
|
return R.success(${(entityName!)?uncap_first}Service.add(${(entityName!)?uncap_first}), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
public R update(@RequestBody ${entityName!} ${(entityName!)?uncap_first}) {
|
||||||
|
return R.success(${(entityName!)?uncap_first}Service.update(${(entityName!)?uncap_first}), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
public R delete(@PathVariable Integer Id) {
|
||||||
|
return R.success(${(entityName!)?uncap_first}Service.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package ${basePackage!}.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* ${describe!}
|
||||||
|
* Created on ${creationTime}
|
||||||
|
* @author ${author!}
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("${tableName}")
|
||||||
|
public class ${entityName!} extends Model<${entityName!}> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
<#list fieldMetas as field>
|
||||||
|
// ${field.columnDescribe!}
|
||||||
|
private String ${field.fieldName!};
|
||||||
|
</#list>
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
<?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="${basePackage!}.mapper.${entityName!}Mapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- ${describe!}<#list 0..(30 - (describe!)?length * 2)!0 as i> </#list> -->
|
||||||
|
<!-- Created on ${creationTime} -->
|
||||||
|
<!-- Author ${author!}<#list 0..(23 - (author!)?length)!0 as i> </#list>-->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="${basePackage!}.entity.${entityName!}">
|
||||||
|
<#list fieldMetas as field>
|
||||||
|
<result column="${field.columnName!}" property="${field.fieldName!}" />
|
||||||
|
</#list>
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
@ -0,0 +1,12 @@
|
|||||||
|
package ${basePackage!}.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import ${basePackage!}.entity.${entityName!};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ${describe!}
|
||||||
|
* Created on ${creationTime!}
|
||||||
|
* @author ${author!}
|
||||||
|
*/
|
||||||
|
public interface ${entityName!}Mapper extends BaseMapper<${entityName!}> {
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package ${basePackage!}.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import ${basePackage!}.entity.${entityName!};
|
||||||
|
import ${basePackage!}.mapper.${entityName!}Mapper;
|
||||||
|
import ${basePackage!}.service.${entityName!}Service;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ${describe!}
|
||||||
|
* Created on ${creationTime}
|
||||||
|
* @author ${author!}
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ${entityName!}ServiceImpl extends ServiceImpl<${entityName!}Mapper,${entityName!}> implements ${entityName!}Service {
|
||||||
|
@Override
|
||||||
|
public List<${entityName!}> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<${entityName!}> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(${entityName!}::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ${entityName!} getBy${entityName!}Id(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ${entityName!} add(@NotNull(message = "实体不能为空") ${entityName!} ${(entityName!)?uncap_first}) {
|
||||||
|
this.baseMapper.insert(${entityName?uncap_first});
|
||||||
|
return ${(entityName!)?uncap_first};
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ${entityName!} update(@NotNull(message = "实体不能为空") ${entityName!} ${(entityName!)?uncap_first}) {
|
||||||
|
this.baseMapper.updateById(${(entityName!)?uncap_first});
|
||||||
|
return ${(entityName!)?uncap_first};
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package ${basePackage!}.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import ${basePackage!}.entity.${entityName!};
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ${describe!}
|
||||||
|
* Created on ${creationTime}
|
||||||
|
* @author ${author!}
|
||||||
|
*/
|
||||||
|
public interface ${entityName!}Service extends IService<${entityName!}> {
|
||||||
|
List<${entityName!}> getList();
|
||||||
|
IPage<${entityName!}> getPage(Page page);
|
||||||
|
${entityName!} getBy${entityName!}Id(Integer id);
|
||||||
|
|
||||||
|
${entityName!} add(${entityName!} ${(entityName!)?uncap_first});
|
||||||
|
${entityName!} update(${entityName!} ${(entityName!)?uncap_first});
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
<#assign prefix="admin"/>
|
||||||
|
/**
|
||||||
|
* @description ${describe!}
|
||||||
|
* Created on ${creationTime}
|
||||||
|
* @author ${author!}
|
||||||
|
*/
|
||||||
|
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function fetchList() {
|
||||||
|
return request({
|
||||||
|
url: '/${prefix}/${(entityName!)?lower_case}/list',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fetPage(page) {
|
||||||
|
return request({
|
||||||
|
url: '/${prefix}/${(entityName!)?lower_case}/page',
|
||||||
|
method: 'get',
|
||||||
|
params: page
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getObj (id) {
|
||||||
|
return request({
|
||||||
|
url: '/${prefix}/${(entityName!)?lower_case}/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addObj (obj) {
|
||||||
|
return request({
|
||||||
|
url: '/${prefix}/${(entityName!)?lower_case}',
|
||||||
|
method: 'post',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function putObj (obj) {
|
||||||
|
return request({
|
||||||
|
url: '/${prefix}/${(entityName!)?lower_case}',
|
||||||
|
method: 'put',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delObj (id) {
|
||||||
|
return request({
|
||||||
|
url: '/${prefix}/${(entityName!)?lower_case}/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="${describe!}" :visible.sync="show" width="600px">
|
||||||
|
<el-form ref="form" :model="form" label-width="90px" :rules="rules">
|
||||||
|
<#list fieldMetas as field>
|
||||||
|
<el-form-item label="${field.columnDescribe!}" prop="${field.fieldName!}">
|
||||||
|
<el-input v-model="form.${field.fieldName!}"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</#list>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button v-loading="loading" type="primary" @click="saveHandler">{{btn_title}}</el-button>
|
||||||
|
<el-button @click="close">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* Created on ${creationTime}
|
||||||
|
* @description ${describe!}
|
||||||
|
* @author ${author!}
|
||||||
|
*/
|
||||||
|
import { addObj, putObj } from "@/api/${entityName?uncap_first}";
|
||||||
|
import customSelect from "@/components/CustomSelect";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { customSelect },
|
||||||
|
name: "${(entityName!)?uncap_first}Form",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {},
|
||||||
|
show: false,
|
||||||
|
loading: false,
|
||||||
|
rules: {
|
||||||
|
// example :
|
||||||
|
// field: [{ required: true, trigger: "blur" }],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
formState() {
|
||||||
|
return !this.form.${(entityName!)?uncap_first}Id;
|
||||||
|
},
|
||||||
|
btn_title() {
|
||||||
|
return this.formState ? "新建" : "保存";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open(origin) {
|
||||||
|
if (origin) {
|
||||||
|
// 编辑初始化
|
||||||
|
let form = Object.assign({}, origin);
|
||||||
|
this.form = form;
|
||||||
|
} else {
|
||||||
|
// 新建初始化
|
||||||
|
this.form = {};
|
||||||
|
}
|
||||||
|
this.show = true;
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.show = false;
|
||||||
|
},
|
||||||
|
saveHandler() {
|
||||||
|
this.$refs.form.validate(valid => {
|
||||||
|
if(!valid) return;
|
||||||
|
this.loading = true;
|
||||||
|
if (this.formState) this.createHandler();
|
||||||
|
else this.editHandler();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
createHandler() {
|
||||||
|
addObj(this.form).then(res => {
|
||||||
|
if (res.code === 'success') {
|
||||||
|
this.finish();
|
||||||
|
}
|
||||||
|
}).finally(()=> {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
editHandler() {
|
||||||
|
putObj(this.form).then(res => {
|
||||||
|
if (res.code === 'success') {
|
||||||
|
this.finish();
|
||||||
|
}
|
||||||
|
}).finally(()=> {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
finish() {
|
||||||
|
this.close();
|
||||||
|
this.$emit("reloadTable");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
114
java/code-generation/src/main/resources/templates/vue/index.ftl
Normal file
114
java/code-generation/src/main/resources/templates/vue/index.ftl
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div class="${(entityName!)?lower_case}">
|
||||||
|
<el-form :inline="true" :model="page" class="demo-form-inline">
|
||||||
|
<!-- <el-form-item>
|
||||||
|
<el-input v-model="page.keyword" clearable placeholder="" prefix-icon="el-icon-search"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="find" type="primary">查找</el-button>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="createHandler" type="primary">新建</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<custom-table
|
||||||
|
ref="table"
|
||||||
|
index
|
||||||
|
:loading="loading"
|
||||||
|
:columns="columns"
|
||||||
|
:data="listData"
|
||||||
|
:page="page"
|
||||||
|
@loadHandler="fetPage"
|
||||||
|
>
|
||||||
|
<template #operation="{row, index}">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit-outline"
|
||||||
|
size="small"
|
||||||
|
plain
|
||||||
|
@click="editHandler(row , index)"
|
||||||
|
>编辑</el-button>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="small"
|
||||||
|
plain
|
||||||
|
@click="deleteHandler(row, index)"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</custom-table>
|
||||||
|
<${(entityName!)?uncap_first}Form ref="form" @reloadTable="$refs.table.refreshTable()" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* Created on ${creationTime}
|
||||||
|
* @description ${describe!}
|
||||||
|
* @author ${author!}
|
||||||
|
*/
|
||||||
|
import { fetPage, delObj } from "@/api/${entityName?uncap_first}";
|
||||||
|
|
||||||
|
import customTable from "@/components/CustomTable";
|
||||||
|
import ${entityName?uncap_first}Form from "./form";
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
<#list fieldMetas as field>
|
||||||
|
{
|
||||||
|
label: "${field.columnDescribe!}",
|
||||||
|
prop: "${field.fieldName!}"
|
||||||
|
},
|
||||||
|
</#list>
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "${(entityName!)?uncap_first}Info",
|
||||||
|
components: { customTable, ${(entityName!)?uncap_first}Form },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
columns,
|
||||||
|
listData: [],
|
||||||
|
page: {
|
||||||
|
current: 1,
|
||||||
|
size: 10
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetPage() {
|
||||||
|
this.loading = true;
|
||||||
|
fetPage(this.page).then(res => {
|
||||||
|
const { records, total } = res.data;
|
||||||
|
this.listData = records;
|
||||||
|
this.page.total = total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
createHandler() {
|
||||||
|
this.$refs.form.open();
|
||||||
|
},
|
||||||
|
editHandler(row, index) {
|
||||||
|
this.$refs.form.open(row);
|
||||||
|
},
|
||||||
|
deleteHandler(row, index) {
|
||||||
|
<#noparse>this.$confirm(`是否删除第 ${index + 1} 行?`, "提示", {</noparse>
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
delObj(row.${(entityName!)?uncap_first}Id).then(res => {
|
||||||
|
if (res.code === 'success') {
|
||||||
|
this.$message.success('删除成功!');
|
||||||
|
this.$refs.table.refreshTable();
|
||||||
|
}else{
|
||||||
|
this.$message.error('删除失败');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
112
java/common/pom.xml
Normal file
112
java/common/pom.xml
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
<?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">
|
||||||
|
<parent>
|
||||||
|
<artifactId>cpop-nftmeta</artifactId>
|
||||||
|
<groupId>com.cpop</groupId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.cpop.nftmeta</groupId>
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
|
<artifactId>poi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-aop</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-spring</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
<artifactId>gson</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.qcloud</groupId>
|
||||||
|
<artifactId>cos-sts_api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.qcloud</groupId>
|
||||||
|
<artifactId>cos_api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.tencentcloudapi</groupId>
|
||||||
|
<artifactId>tencentcloud-sdk-java</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.wxpay</groupId>
|
||||||
|
<artifactId>wxpay-sdk</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.bianjieai</groupId>
|
||||||
|
<artifactId>opb-sdk</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.protobuf</groupId>
|
||||||
|
<artifactId>protobuf-java</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.zxing</groupId>
|
||||||
|
<artifactId>core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.zxing</groupId>
|
||||||
|
<artifactId>javase</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-collections</groupId>
|
||||||
|
<artifactId>commons-collections</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<!--使用Swagger2-->
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.common.aspect;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.utils.IPUtils;
|
||||||
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
|
import org.aspectj.lang.annotation.Around;
|
||||||
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.aspectj.lang.annotation.Pointcut;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切面日志
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Aspect
|
||||||
|
@Component
|
||||||
|
public class WebLogAspect {
|
||||||
|
final Logger logger = LoggerFactory.getLogger("api");
|
||||||
|
@Autowired
|
||||||
|
private HttpServletRequest request;
|
||||||
|
|
||||||
|
@Pointcut("execution(public * com.cpop.nftmeta.*.controller..*.*(..))")
|
||||||
|
public void webLog(){}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口性能统计+异常入参捕获
|
||||||
|
* @param joinPoint 代理的controller对象
|
||||||
|
* @return controller返回结果
|
||||||
|
*/
|
||||||
|
@Around("webLog()")
|
||||||
|
public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
try {
|
||||||
|
return joinPoint.proceed();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
logger.error("接口异常:{}, 入参:{}\n异常详情:",
|
||||||
|
request.getRequestURI(), joinPoint.getArgs());
|
||||||
|
e.printStackTrace();
|
||||||
|
throw e;
|
||||||
|
} finally {
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
logger.info("请求IP:{}, 接口:{}, 响应时间:{}ms", IPUtils.getClientIP(request), request.getRequestURI(), endTime - startTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
package com.cpop.nftmeta.common.balefm;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.HexUtil;
|
||||||
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.cpop.nftmeta.common.exception.CpopException;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
|
import java.security.MessageDigest;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
@Deprecated
|
||||||
|
public class BalefmHelper {
|
||||||
|
private static BalefmSDKConfig balefmSDKConfig;
|
||||||
|
|
||||||
|
private void setBalefmSDKConfig() {
|
||||||
|
BalefmHelper.balefmSDKConfig = SpringUtil.getBean(BalefmSDKConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static HttpRequest getRequest(HttpRequest request, String xAuthData) {
|
||||||
|
request.header("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
|
||||||
|
request.header("X-Auth-Id", balefmSDKConfig.getAccessId());
|
||||||
|
try {
|
||||||
|
String sign = signWhitSHA256(xAuthData + "&" + balefmSDKConfig.getAccessKey());
|
||||||
|
request.header("X-Auth-Data", sign);
|
||||||
|
return request;
|
||||||
|
} catch (NoSuchAlgorithmException e) {
|
||||||
|
throw new CpopException("数据签名失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String signWhitSHA256(String unSignStr) throws NoSuchAlgorithmException {
|
||||||
|
MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
|
||||||
|
messageDigest.reset();
|
||||||
|
messageDigest.update(unSignStr.getBytes());
|
||||||
|
return HexUtil.encodeHexStr(messageDigest.digest());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getUnSignStr(Map<String, Object> formObjs) {
|
||||||
|
String[] sortedKeys = formObjs.keySet().toArray(new String[]{});
|
||||||
|
Arrays.sort(sortedKeys);
|
||||||
|
StringBuilder signStr = new StringBuilder();
|
||||||
|
|
||||||
|
for (String key : sortedKeys) {
|
||||||
|
signStr.append(key).append("=").append(formObjs.get(key)).append("&");
|
||||||
|
}
|
||||||
|
return signStr.substring(0, signStr.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> T getPost(String url, Map<String, Object> formObjs, Class<T> clazz) {
|
||||||
|
String unSignStr = getUnSignStr(formObjs);
|
||||||
|
HttpRequest request = getRequest(HttpRequest.post(url), unSignStr);
|
||||||
|
String body = request.form(formObjs).execute().body();
|
||||||
|
return new Gson().fromJson(body, clazz);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.cpop.nftmeta.common.balefm;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Deprecated
|
||||||
|
@ConfigurationProperties("balefm")
|
||||||
|
public class BalefmSDKConfig {
|
||||||
|
private String baseUrl;
|
||||||
|
private String accessId;
|
||||||
|
private String accessKey;
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.CharsetUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.crypto.SecureUtil;
|
||||||
|
import cn.hutool.crypto.asymmetric.Sign;
|
||||||
|
import cn.hutool.crypto.asymmetric.SignAlgorithm;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
import java.util.Base64;
|
||||||
|
import java.util.SortedMap;
|
||||||
|
|
||||||
|
public class SignUtils {
|
||||||
|
public static boolean verifySign(Object resData, String signData, String publicKey) {
|
||||||
|
if(ObjectUtil.isEmpty(resData) || ObjectUtil.isEmpty(signData)) {
|
||||||
|
return Boolean.FALSE;
|
||||||
|
}
|
||||||
|
Sign sign = SecureUtil.sign(SignAlgorithm.SHA1withRSA, null, publicKey);
|
||||||
|
//注意Base64
|
||||||
|
return sign.verify(JSONObject.toJSONString(resData).getBytes(CharsetUtil.CHARSET_UTF_8), Base64.getDecoder().decode(signData));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String sign(SortedMap<String, Object> resData, String platformPrivateKey, String platformPublicKey) {
|
||||||
|
Sign sign = SecureUtil.sign(SignAlgorithm.SHA1withRSA, platformPrivateKey, platformPublicKey);
|
||||||
|
byte[] signed = sign.sign(JSONObject.toJSONString(resData).getBytes(CharsetUtil.CHARSET_UTF_8));
|
||||||
|
//注意Base64
|
||||||
|
return Base64.getEncoder().encodeToString(signed);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ConfigurationProperties("nft.wenshu")
|
||||||
|
public class WenshuConfig {
|
||||||
|
private String baseUrl;
|
||||||
|
private String platformCode;
|
||||||
|
private String chainId;
|
||||||
|
private String securityKey;
|
||||||
|
private String privateKey;
|
||||||
|
public String getPrivateKey() {
|
||||||
|
return this.privateKey.replaceAll("\\s*|\t|\r|\n","").trim();
|
||||||
|
}
|
||||||
|
private String publicKey;
|
||||||
|
public String getPublicKey() {
|
||||||
|
return this.publicKey.replaceAll("\\s*|\t|\r|\n","").trim();
|
||||||
|
}
|
||||||
|
private String wenshuPublicKey;
|
||||||
|
public String getWenshuPublicKey() {
|
||||||
|
return this.wenshuPublicKey.replaceAll("\\s*|\t|\r|\n","").trim();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.TypeReference;
|
||||||
|
import com.cpop.nftmeta.common.bigdatatrade.dto.ReqDTO;
|
||||||
|
import com.cpop.nftmeta.common.bigdatatrade.vo.ResVo;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.SortedMap;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class WenshuHelper {
|
||||||
|
public static final String GREEN_REGISTER = "/user/green/channel";
|
||||||
|
public static final String CHECKBOX = "/nft/boxhash/check";
|
||||||
|
public static final String NFT_TRANSFER_CHECK = "/nft/check";
|
||||||
|
public static final String NFT_TRANSFER_NOTICE = "/nft/notice";
|
||||||
|
@Getter
|
||||||
|
private static WenshuConfig config;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setConfig(WenshuConfig config) {
|
||||||
|
WenshuHelper.config = config;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <D,R> ResVo<R> Post(String url, D dto, Class<R> clazz) {
|
||||||
|
HttpRequest request = HttpRequest.post( config.getBaseUrl() + url);
|
||||||
|
SortedMap<String, Object> reqData = transferToMap(dto);
|
||||||
|
reqData.put("chainId", config.getChainId());
|
||||||
|
ReqDTO reqDTO = new ReqDTO(reqData);
|
||||||
|
request.body(JSONObject.toJSONString(reqDTO));
|
||||||
|
String resStr = request.execute().body();
|
||||||
|
log.info("文数交返回参数:{}", resStr);
|
||||||
|
return JSONObject.parseObject(resStr, new TypeReference<ResVo<R>>(clazz){});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> SortedMap<String, Object> transferToMap(T object) {
|
||||||
|
SortedMap<String, Object> data = new TreeMap<>();
|
||||||
|
Class<?> clazz = object.getClass();
|
||||||
|
for (Field field : clazz.getDeclaredFields()) {
|
||||||
|
try {
|
||||||
|
Object filedVal = clazz.getMethod(getFieldMethod(field)).invoke(object);
|
||||||
|
if(ObjectUtil.isNotEmpty(field)) {
|
||||||
|
data.put(field.getName(), filedVal);
|
||||||
|
}
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getFieldMethod(Field field) {
|
||||||
|
char[] chars = field.getName().toCharArray();
|
||||||
|
chars[0] -= 32;
|
||||||
|
return "get" + String.valueOf(chars);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.dto;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cpop.nftmeta.common.bigdatatrade.SignUtils;
|
||||||
|
import com.cpop.nftmeta.common.bigdatatrade.WenshuHelper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.SortedMap;
|
||||||
|
@Data
|
||||||
|
public class ReqDTO {
|
||||||
|
public ReqDTO(SortedMap<String, Object> reqData) {
|
||||||
|
setReqData(reqData);
|
||||||
|
}
|
||||||
|
public String getPlatformChainId(){
|
||||||
|
return WenshuHelper.getConfig().getPlatformCode();
|
||||||
|
}
|
||||||
|
private String sign;
|
||||||
|
private SortedMap<String, Object> reqData;
|
||||||
|
public void setReqData(SortedMap<String, Object> data) {
|
||||||
|
this.sign = SignUtils.sign(data, WenshuHelper.getConfig().getPrivateKey(), WenshuHelper.getConfig().getPublicKey());
|
||||||
|
this.reqData = data;
|
||||||
|
}
|
||||||
|
public String getReqData() {
|
||||||
|
return JSONObject.toJSONString(this.reqData);
|
||||||
|
}
|
||||||
|
public boolean verifySign() {
|
||||||
|
return SignUtils.verifySign(this.reqData, this.sign, WenshuHelper.getConfig().getPublicKey());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class WenshuCheckBoxDTO {
|
||||||
|
private String userHash;
|
||||||
|
private String phone;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class WenshuRegisterDTO {
|
||||||
|
private String phone;
|
||||||
|
private String chainUserId;
|
||||||
|
private String name;
|
||||||
|
private String number;
|
||||||
|
private String realname;
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class WenshuTransferCheckDTO {
|
||||||
|
private String classId;
|
||||||
|
private String nftId;
|
||||||
|
private String userHash;
|
||||||
|
private String phone;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class WenshuTransferNoticeDTO {
|
||||||
|
// 分类链地址
|
||||||
|
String classId;
|
||||||
|
// nft地址
|
||||||
|
String nftId;
|
||||||
|
// 转赠交易hash
|
||||||
|
String hash;
|
||||||
|
// 用户保管箱链地址
|
||||||
|
String recipient;
|
||||||
|
// nft编号
|
||||||
|
String nftNumber;
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RegisterVo {
|
||||||
|
private String notifyUrl;
|
||||||
|
private String userId;
|
||||||
|
private Boolean isUse;
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.vo;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.bigdatatrade.SignUtils;
|
||||||
|
import com.cpop.nftmeta.common.bigdatatrade.WenshuHelper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ResVo<T> {
|
||||||
|
private Integer code;
|
||||||
|
private String message;
|
||||||
|
private String sign;
|
||||||
|
private T data;
|
||||||
|
@SneakyThrows
|
||||||
|
public ResVo (Class<T> clazz) {
|
||||||
|
data = clazz.newInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean checkSign() {
|
||||||
|
return SignUtils.verifySign(WenshuHelper.transferToMap(this.data), this.sign, WenshuHelper.getConfig().getWenshuPublicKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void signData() {
|
||||||
|
this.sign = SignUtils.sign(WenshuHelper.transferToMap(this.data), WenshuHelper.getConfig().getPrivateKey(), WenshuHelper.getConfig().getPublicKey());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.vo;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.bigdatatrade.WenshuHelper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserQueryVo {
|
||||||
|
String address;
|
||||||
|
String chain_id = WenshuHelper.getConfig().getChainId();
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserVerifyVo {
|
||||||
|
Boolean exists;
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class WenshuCheckVo {
|
||||||
|
private Boolean isRegister;
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package com.cpop.nftmeta.common.bigdatatrade.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class WenshuResVo {
|
||||||
|
Boolean isSuccess;
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.cpop.nftmeta.common.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Configuration
|
||||||
|
@ConfigurationProperties("cpop")
|
||||||
|
@ConfigurationPropertiesScan("com.cpop.nftmeta.*")
|
||||||
|
public class CpopConfig {
|
||||||
|
private String host;
|
||||||
|
private List<String> ignoreUrls;
|
||||||
|
private JWTConfig jwt;
|
||||||
|
@Data
|
||||||
|
public static class JWTConfig {
|
||||||
|
private String securityKey;
|
||||||
|
private String subject;
|
||||||
|
private String issuer;
|
||||||
|
private Integer expireTime;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.cpop.nftmeta.common.config;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||||
|
import org.apache.ibatis.reflection.MetaObject;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mp 填充数据
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class FillAttributeMp implements MetaObjectHandler {
|
||||||
|
@Override
|
||||||
|
public void insertFill(MetaObject metaObject) {
|
||||||
|
if (metaObject.hasSetter("creationTime"))
|
||||||
|
this.setFieldValByName("creationTime", new Timestamp(System.currentTimeMillis()), metaObject);
|
||||||
|
|
||||||
|
if (metaObject.hasSetter("updateTime"))
|
||||||
|
this.setFieldValByName("updateTime", new Timestamp(System.currentTimeMillis()), metaObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateFill(MetaObject metaObject) {
|
||||||
|
if (metaObject.hasSetter("updateTime"))
|
||||||
|
this.setFieldValByName("updateTime", new Timestamp(System.currentTimeMillis()), metaObject);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.cpop.nftmeta.common.config;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableTransactionManagement
|
||||||
|
@MapperScan({"com.cpop.nftmeta.**.mapper","com.cpop.nftmeta.admin.oldsys"})
|
||||||
|
public class MybatisPlusConfig {
|
||||||
|
// @Bean
|
||||||
|
// public IdentifierGenerator idGenerator() {
|
||||||
|
// return new CustomIdGenerator();
|
||||||
|
// }
|
||||||
|
// @Bean
|
||||||
|
// public MybatisPlusPropertiesCustomizer plusPropertiesCustomizer() {
|
||||||
|
// return plusProperties -> plusProperties.getGlobalConfig().setIdentifierGenerator(idGenerator());
|
||||||
|
// }
|
||||||
|
@Bean
|
||||||
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||||
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||||
|
return interceptor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//class CustomIdGenerator implements IdentifierGenerator {
|
||||||
|
// @Override
|
||||||
|
// public Number nextId(Object entity) {
|
||||||
|
// // 先简单使用雪花发号器19位id
|
||||||
|
// return IdUtil.getSnowflakeNextId();
|
||||||
|
// }
|
||||||
|
//}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.cpop.nftmeta.common.config;
|
||||||
|
|
||||||
|
import org.springframework.cache.CacheManager;
|
||||||
|
import org.springframework.cache.annotation.EnableCaching;
|
||||||
|
import org.springframework.cache.interceptor.KeyGenerator;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.data.redis.cache.RedisCacheConfiguration;
|
||||||
|
import org.springframework.data.redis.cache.RedisCacheManager;
|
||||||
|
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
|
||||||
|
import org.springframework.data.redis.serializer.RedisSerializationContext;
|
||||||
|
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.Duration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableCaching
|
||||||
|
public class RedisConfig {
|
||||||
|
//配置LettuceConnectionFactory连接工厂
|
||||||
|
@Resource
|
||||||
|
private LettuceConnectionFactory lettuceConnectionFactory;
|
||||||
|
/**
|
||||||
|
* 自定Key生成
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public KeyGenerator keyGenerator() {
|
||||||
|
return (target, method, params) ->
|
||||||
|
"cpop_" + target.getClass().getSimpleName() + "_";
|
||||||
|
}
|
||||||
|
|
||||||
|
//lettuce客户端配置信息(如果不用连接池通过LettuceClientConfiguration来builder)
|
||||||
|
// @Bean
|
||||||
|
// public LettuceClientConfiguration lettuceClientConfiguration(){
|
||||||
|
// //构造LettucePoolingClientConfiguration对象
|
||||||
|
// return LettucePoolingClientConfiguration.builder().build();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//配置RedisTemplate
|
||||||
|
@Bean
|
||||||
|
public StringRedisTemplate redisTemplate(LettuceConnectionFactory lettuceConnectionFactory){
|
||||||
|
StringRedisTemplate redisTemplate = new StringRedisTemplate();
|
||||||
|
//注入Lettuce连接工厂
|
||||||
|
redisTemplate.setConnectionFactory(lettuceConnectionFactory);
|
||||||
|
return redisTemplate;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 缓存管理器
|
||||||
|
@Bean
|
||||||
|
public CacheManager cacheManager() {
|
||||||
|
|
||||||
|
RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig()
|
||||||
|
.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer()))//key序列化方式
|
||||||
|
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new JdkSerializationRedisSerializer()))//value序列化方式
|
||||||
|
.disableCachingNullValues()
|
||||||
|
.entryTtl(Duration.ofHours(12));//缓存过期时间
|
||||||
|
|
||||||
|
RedisCacheManager.RedisCacheManagerBuilder builder = RedisCacheManager.RedisCacheManagerBuilder
|
||||||
|
.fromConnectionFactory(lettuceConnectionFactory)
|
||||||
|
.cacheDefaults(config)
|
||||||
|
.transactionAware();
|
||||||
|
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.cpop.nftmeta.common.config;
|
||||||
|
|
||||||
|
import org.springframework.core.convert.converter.Converter;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class StringToDate implements Converter<String, Timestamp> {
|
||||||
|
@Override
|
||||||
|
public Timestamp convert(String source) {
|
||||||
|
return Timestamp.valueOf(source);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.cpop.nftmeta.common.config;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.core.Ordered;
|
||||||
|
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||||
|
import org.springframework.web.cors.CorsConfiguration;
|
||||||
|
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||||
|
import org.springframework.web.filter.CorsFilter;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class WebCORSConfig {
|
||||||
|
private CorsConfiguration buildConfig() {
|
||||||
|
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||||
|
// 设置访问源地址
|
||||||
|
corsConfiguration.addAllowedOrigin("*");
|
||||||
|
// 设置访问源请求头
|
||||||
|
corsConfiguration.addAllowedHeader("*");
|
||||||
|
// 设置访问源请求方法
|
||||||
|
corsConfiguration.addAllowedMethod("*");
|
||||||
|
// 设置是否支持用户凭证
|
||||||
|
corsConfiguration.setAllowCredentials(false);
|
||||||
|
return corsConfiguration;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public FilterRegistrationBean<CorsFilter> corsFilter() {
|
||||||
|
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||||
|
source.registerCorsConfiguration("/**", buildConfig());
|
||||||
|
//项目中有多个filter时此处设置改CorsFilter的优先执行顺序
|
||||||
|
FilterRegistrationBean<CorsFilter> bean = new FilterRegistrationBean<>(new CorsFilter(source));
|
||||||
|
bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
|
||||||
|
return bean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解决雪花19位,web端Number类型只能解析16位的问题。Long转字符串
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
@Primary
|
||||||
|
@ConditionalOnMissingBean(ObjectMapper.class)
|
||||||
|
public ObjectMapper jacksonObjectMapper(Jackson2ObjectMapperBuilder builder) {
|
||||||
|
ObjectMapper objectMapper = builder.createXmlMapper(false).build();
|
||||||
|
SimpleModule simpleModule = new SimpleModule();
|
||||||
|
simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
|
||||||
|
objectMapper.registerModule(simpleModule);
|
||||||
|
return objectMapper;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.cpop.nftmeta.common.context;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CUserInfo {
|
||||||
|
Integer userId;
|
||||||
|
String username;
|
||||||
|
String secondPassword;
|
||||||
|
String avatar;
|
||||||
|
String phone;
|
||||||
|
String email;
|
||||||
|
String openId;
|
||||||
|
String blockAddr;
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.cpop.nftmeta.common.context;
|
||||||
|
|
||||||
|
public class UserContext {
|
||||||
|
private static final ThreadLocal<CUserInfo> localUserInfo = new ThreadLocal<>();
|
||||||
|
|
||||||
|
public static void setUserInfo(CUserInfo cUserInfo) {
|
||||||
|
localUserInfo.set(cUserInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CUserInfo getUserInfo() {
|
||||||
|
return localUserInfo.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void release() {
|
||||||
|
localUserInfo.remove();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package com.cpop.nftmeta.common.core;
|
||||||
|
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import java.util.concurrent.ArrayBlockingQueue;
|
||||||
|
import java.util.concurrent.BlockingQueue;
|
||||||
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@ConfigurationProperties("cpop.thread-pool")
|
||||||
|
public class CpopThreadPool {
|
||||||
|
private static Integer poolSize;
|
||||||
|
private static Integer maxSize;
|
||||||
|
private static Integer keepAliveTime;
|
||||||
|
private static Integer queueSize;
|
||||||
|
public void setPoolSize(Integer size) {
|
||||||
|
CpopThreadPool.poolSize = size;
|
||||||
|
}
|
||||||
|
public void setMaxSize(Integer size) {
|
||||||
|
CpopThreadPool.maxSize = size;
|
||||||
|
}
|
||||||
|
public void setKeepAliveTime(Integer time) {
|
||||||
|
CpopThreadPool.keepAliveTime = time;
|
||||||
|
}
|
||||||
|
public void setQueueSize(Integer size) {
|
||||||
|
CpopThreadPool.queueSize = size;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* int corePoolSize, 线程池长期维持的线程数,即使线程处于Idle状态,也不会回收。
|
||||||
|
* int maximumPoolSize, 线程数的上限
|
||||||
|
* long keepAliveTime, TimeUnit unit, 超过corePoolSize的线程的idle时长, 超过这个时间,多余的线程会被回收。
|
||||||
|
* BlockingQueue<Runnable> workQueue, // 任务的排队队列
|
||||||
|
* ThreadFactory threadFactory 新线程的产生方式
|
||||||
|
* RejectedExecutionHandler handler // 拒绝策略
|
||||||
|
*/
|
||||||
|
private static ThreadPoolExecutor threadPoolExecutor;
|
||||||
|
@PostConstruct
|
||||||
|
private static void initThreadPool() {
|
||||||
|
BlockingQueue<Runnable> workQueue = new ArrayBlockingQueue<>(queueSize);
|
||||||
|
threadPoolExecutor = new ThreadPoolExecutor(poolSize, maxSize, keepAliveTime, TimeUnit.SECONDS, workQueue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ThreadPoolExecutor getPool() {
|
||||||
|
return threadPoolExecutor;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.cpop.nftmeta.common.core;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.cpop.nftmeta.common.exception.CpopException;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class LotteryUtils {
|
||||||
|
private final List<AwardItem> awardItems = new ArrayList<>();
|
||||||
|
|
||||||
|
public LotteryUtils(Collection<AwardItem> awardItems) {
|
||||||
|
this.awardItems.addAll(awardItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addAward(Integer itemId, Integer probability, Integer count) {
|
||||||
|
AwardItem awardItem = new AwardItem();
|
||||||
|
awardItem.setItemId(itemId);
|
||||||
|
awardItem.setProbability(probability.floatValue() / 100);
|
||||||
|
awardItem.setCount(count);
|
||||||
|
awardItems.add(awardItem);
|
||||||
|
}
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class AwardItem {
|
||||||
|
private Integer itemId;
|
||||||
|
private float probability;
|
||||||
|
private Integer count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AwardItem lottery () {
|
||||||
|
if(ObjectUtil.isEmpty(awardItems)) {
|
||||||
|
throw new CpopException("奖品不能为空 ");
|
||||||
|
}
|
||||||
|
float totalPro = 0f;
|
||||||
|
// 存储每个奖品新的概率区间
|
||||||
|
List<Float> proSection = new ArrayList<>();
|
||||||
|
proSection.add(0f);
|
||||||
|
for (AwardItem awardItem: awardItems) {
|
||||||
|
totalPro += awardItem.probability * 10 * awardItem.count;
|
||||||
|
proSection.add(totalPro);
|
||||||
|
}
|
||||||
|
// 获取总的概率区间中的随机数
|
||||||
|
Random random = new Random();
|
||||||
|
float randomPro = (float) random.nextInt((int) totalPro);
|
||||||
|
// 判断在哪个区间
|
||||||
|
for (int i = 0,size = proSection.size(); i < size; i++) {
|
||||||
|
if(randomPro >= proSection.get(i) && randomPro < proSection.get(i+1)) {
|
||||||
|
return awardItems.get(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.cpop.nftmeta.common.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AccountCustomDTO {
|
||||||
|
private Integer memberId;
|
||||||
|
// 用户名
|
||||||
|
private String username;
|
||||||
|
private String avatar;
|
||||||
|
// 密码
|
||||||
|
private String password;
|
||||||
|
// 昵称
|
||||||
|
private String nickname;
|
||||||
|
// 二级密码
|
||||||
|
// private String secondpassword;
|
||||||
|
// 地址
|
||||||
|
private String address;
|
||||||
|
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||||
|
private List<Integer> groundIds;
|
||||||
|
private Integer hidden;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.cpop.nftmeta.common.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class MidjourneyCheckDTO {
|
||||||
|
private Integer activityId;
|
||||||
|
private Integer memberId;
|
||||||
|
private String nftName;
|
||||||
|
private String imgUrl;
|
||||||
|
private String nickname;
|
||||||
|
private String username;
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.cpop.nftmeta.common.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class NFTSkuStockDTO {
|
||||||
|
@NotNull(message = "藏品id不能为空")
|
||||||
|
private Integer nftId;
|
||||||
|
private Integer shopNum;
|
||||||
|
private Integer compoundNum;
|
||||||
|
private Integer updateInterval;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("a_platform_info")
|
||||||
|
public class APlatformInfo {
|
||||||
|
private String name;
|
||||||
|
private String code;
|
||||||
|
private String description;
|
||||||
|
private String securityKey;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
private Integer deleted;
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("m_account_custom")
|
||||||
|
public class AccountCustom {
|
||||||
|
@TableId(type = IdType.INPUT)
|
||||||
|
private Integer memberId;
|
||||||
|
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||||
|
private List<Integer> groundIds;
|
||||||
|
private Integer hidden;
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材使用记录
|
||||||
|
* Created on 2022-12-07
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("h_material_record")
|
||||||
|
public class HMaterialRecord extends Model<HMaterialRecord> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
//
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 素材ID
|
||||||
|
private Integer materialId;
|
||||||
|
// 会员ID
|
||||||
|
private Integer memberId;
|
||||||
|
private Integer onceRecordId;
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.OnceRepositoryStatus;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 形象唯一库
|
||||||
|
* Created on 2022-12-07
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("h_once_repository")
|
||||||
|
@ToString
|
||||||
|
public class HOnceRepository extends Model<HOnceRepository> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
//
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 获取日期
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp getTime;
|
||||||
|
// 素材集合 id|id|id|id
|
||||||
|
private String idPath;
|
||||||
|
private Integer nftId;
|
||||||
|
// 会员id
|
||||||
|
private Integer memberId;
|
||||||
|
// 1 待生成 2 已使用
|
||||||
|
private OnceRepositoryStatus status = OnceRepositoryStatus.OUTOFUSE;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.HPartType;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像diy部位
|
||||||
|
* Created on 2022-12-06
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("h_part")
|
||||||
|
public class HPart extends Model<HPart> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 选中状态
|
||||||
|
private String activityIcon;
|
||||||
|
//
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
//
|
||||||
|
private Integer deleted;
|
||||||
|
// 图标
|
||||||
|
private String icon;
|
||||||
|
//
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 层级
|
||||||
|
private Integer zIndex;
|
||||||
|
// 部位名称
|
||||||
|
private String name;
|
||||||
|
// 1 固定随机部位 2 选配部位
|
||||||
|
private HPartType type;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像DIY部位素材
|
||||||
|
* Created on 2022-12-06
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("h_part_material")
|
||||||
|
public class HPartMaterial extends Model<HPartMaterial> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
//
|
||||||
|
private Integer deleted;
|
||||||
|
// 素材描述
|
||||||
|
private String description;
|
||||||
|
// 缩略图
|
||||||
|
private String icon;
|
||||||
|
//
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 素材名称
|
||||||
|
private String name;
|
||||||
|
// 部位id
|
||||||
|
private Integer partId;
|
||||||
|
// 源文件
|
||||||
|
private String sourceFile;
|
||||||
|
// 库存
|
||||||
|
private Integer stock;
|
||||||
|
|
||||||
|
// 用户拥有数量
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long count;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.RandomRecordStatus;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 随机机会记录
|
||||||
|
* Created on 2022-12-08
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("h_random_record")
|
||||||
|
public class HRandomRecord extends Model<HRandomRecord> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
//
|
||||||
|
private Integer deleted;
|
||||||
|
//
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 会员id
|
||||||
|
private Integer memberId;
|
||||||
|
// 藏品id
|
||||||
|
private Integer nftId;
|
||||||
|
// 0 未使用 1 已使用
|
||||||
|
private RandomRecordStatus status = RandomRecordStatus.OUTOFUSE;
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.cpop.nftmeta.common.enums.ActivityType;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2023/4/23 新增表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("z_member_mt_record")
|
||||||
|
public class MemberMTRecord {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
Integer id;
|
||||||
|
Integer memberId;
|
||||||
|
Integer count;
|
||||||
|
// 1 获取 2 支出
|
||||||
|
Integer type;
|
||||||
|
String remark;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
Integer deleted;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class MqMsgFailRecord {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
private String exchange;
|
||||||
|
private String msg;
|
||||||
|
private String cause;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
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 lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("z_sign_record")
|
||||||
|
public class SignRecord {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
// 签到时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
// 用户id
|
||||||
|
private Integer memberId;
|
||||||
|
// 备注
|
||||||
|
private String remark;
|
||||||
|
}
|
@ -0,0 +1,216 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单表
|
||||||
|
* +----------------------------------------------------------------------
|
||||||
|
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||||
|
* +----------------------------------------------------------------------
|
||||||
|
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
||||||
|
* +----------------------------------------------------------------------
|
||||||
|
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||||
|
* +----------------------------------------------------------------------
|
||||||
|
* | Author: CRMEB Team <admin@crmeb.com>
|
||||||
|
* +----------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("eb_store_order")
|
||||||
|
@ApiModel(value="StoreOrder对象", description="订单表")
|
||||||
|
public class StoreOrder implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单ID")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单号")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
private Integer uid;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户姓名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户电话")
|
||||||
|
private String userPhone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "详细地址")
|
||||||
|
private String userAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "运费金额")
|
||||||
|
private BigDecimal freightPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单商品总数")
|
||||||
|
private Integer totalNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单总价")
|
||||||
|
private BigDecimal totalPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "邮费")
|
||||||
|
private BigDecimal totalPostage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "实际支付金额")
|
||||||
|
private BigDecimal payPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付邮费")
|
||||||
|
private BigDecimal payPostage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "抵扣金额")
|
||||||
|
private BigDecimal deductionPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "优惠券id")
|
||||||
|
private Integer couponId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "优惠券金额")
|
||||||
|
private BigDecimal couponPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付状态")
|
||||||
|
private Boolean paid;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付时间")
|
||||||
|
private Date payTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付方式")
|
||||||
|
private String payType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单状态(0:待发货;1:待收货;2:已收货,待评价;3:已完成;)")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "0 未退款 1 申请中 2 已退款 3 退款中")
|
||||||
|
private Integer refundStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "退款图片")
|
||||||
|
private String refundReasonWapImg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "退款用户说明")
|
||||||
|
private String refundReasonWapExplain;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "前台退款原因")
|
||||||
|
private String refundReasonWap;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "不退款的理由")
|
||||||
|
private String refundReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "退款时间")
|
||||||
|
private Date refundReasonTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "退款金额")
|
||||||
|
private BigDecimal refundPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "快递名称/送货人姓名")
|
||||||
|
private String deliveryName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "发货类型")
|
||||||
|
private String deliveryType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "快递单号/手机号")
|
||||||
|
private String deliveryId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "消费赚取积分")
|
||||||
|
private Integer gainIntegral;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "使用积分")
|
||||||
|
private Integer useIntegral;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "给用户退了多少积分")
|
||||||
|
private Integer backIntegral;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String mark;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除")
|
||||||
|
private Boolean isDel;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "管理员备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商户ID")
|
||||||
|
private Integer merId;
|
||||||
|
|
||||||
|
private Integer isMerCheck;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "拼团商品id0一般商品")
|
||||||
|
private Integer combinationId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "拼团id 0没有拼团")
|
||||||
|
private Integer pinkId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成本价")
|
||||||
|
private BigDecimal cost;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "秒杀商品ID")
|
||||||
|
private Integer seckillId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "砍价id")
|
||||||
|
private Integer bargainId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户砍价活动id")
|
||||||
|
private Integer bargainUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "核销码")
|
||||||
|
private String verifyCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "门店id")
|
||||||
|
private Integer storeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "配送方式 1=快递 ,2=门店自提")
|
||||||
|
private Integer shippingType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "店员id")
|
||||||
|
private Integer clerkId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付渠道(0-微信公众号,1-微信小程序,2-H5,3-余额,4-微信AppIos,5-微信AppIos安卓,6-支付宝支付,7-支付宝app支付)")
|
||||||
|
private Integer isChannel;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "消息提醒")
|
||||||
|
private Boolean isRemind;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "后台是否删除")
|
||||||
|
private Boolean isSystemDel;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "快递公司简称")
|
||||||
|
private String deliveryCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单类型:0-普通订单,1-视频号订单")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商品总价")
|
||||||
|
private BigDecimal proTotalPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "改价前支付金额")
|
||||||
|
private BigDecimal beforePayPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否改价,0-否,1-是")
|
||||||
|
private Boolean isAlterPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号")
|
||||||
|
private String outTradeNo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "兑换所需NFT积分")
|
||||||
|
private Integer score;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "指定销毁的藏品ID")
|
||||||
|
private Integer memberNftId;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("z_user_activity")
|
||||||
|
public class UserActivity {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer activityId;
|
||||||
|
// 0 未完成 1 已完成
|
||||||
|
private Integer complete = 0;
|
||||||
|
private Integer memberId;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.cpop.nftmeta.common.enums.GoodsType;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("z_white_list_get_record")
|
||||||
|
public class WhiteListGetRecord {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
private Integer memberId;
|
||||||
|
private GoodsType type;
|
||||||
|
private Integer typeId;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优惠券发放记录
|
||||||
|
* Created on 2022-11-25
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("y_interest_card_record")
|
||||||
|
public class YInterestCardRecord extends Model<YInterestCardRecord> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 创建时间
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
// 权益ID发放的
|
||||||
|
private Integer interestId;
|
||||||
|
// 用户ID
|
||||||
|
private Integer memberId;
|
||||||
|
// 优惠方式,1:代金券,2:折扣券,3:兑换券
|
||||||
|
private Integer preferentialMode;
|
||||||
|
//
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer recordId;
|
||||||
|
// 核销状态:0-未核销,1-已核销
|
||||||
|
private Integer status;
|
||||||
|
// 有效结束时间,时间格式:yyyy-MM-DD HH-MM-SS
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp validEndTime;
|
||||||
|
// 有效开始时间,时间格式:yyyy-MM-DD HH-MM-SS
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp validStartTime;
|
||||||
|
//指定核销码(核销码不能以ZAN,YZAN为前缀),核销码长度:6-20个字符
|
||||||
|
private String verifyCode;
|
||||||
|
// 核销的订单号
|
||||||
|
private String verifyInOrder;
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 藏品权益表
|
||||||
|
* Created on 2022-11-24
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("y_nft_interest")
|
||||||
|
public class YNftInterest extends Model<YNftInterest> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//
|
||||||
|
private Integer deleted;
|
||||||
|
//
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
//
|
||||||
|
private Long ycardId;
|
||||||
|
//
|
||||||
|
private Integer nftId;
|
||||||
|
// 活动状态:0:正常,1:已删除,2:已失效
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
private Integer type;
|
||||||
|
private String description;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp validstartTime;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp validendTime;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有赞用户信息
|
||||||
|
* Created on 2022-11-25
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("y_user_info")
|
||||||
|
public class YUserInfo extends Model<YUserInfo> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
//
|
||||||
|
private String accountType;
|
||||||
|
//
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
private String phone;
|
||||||
|
//
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer infoId;
|
||||||
|
//
|
||||||
|
private Integer memberId;
|
||||||
|
//
|
||||||
|
private String weixinOpenid;
|
||||||
|
//
|
||||||
|
private String yzOpenId;
|
||||||
|
|
||||||
|
private String wxUnionId;
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.ActivityType;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动表
|
||||||
|
* Created on 2023-05-05
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_activity")
|
||||||
|
public class ZActivity extends Model<ZActivity> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
//
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 奖励积分
|
||||||
|
private Integer award;
|
||||||
|
// 活动详情
|
||||||
|
private String details;
|
||||||
|
private Integer status;
|
||||||
|
// 活动标题
|
||||||
|
private String title;
|
||||||
|
// 活动类型
|
||||||
|
private ActivityType type;
|
||||||
|
private String background;
|
||||||
|
// 类型ID
|
||||||
|
private Integer typeId;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp startTime;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp endTime;
|
||||||
|
// 创建时间
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2023/6/8 新增字段
|
||||||
|
*/
|
||||||
|
private Integer limitId;
|
||||||
|
private Integer isCategory;
|
||||||
|
private String url;
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分享活动审核表
|
||||||
|
* Created on 2023-05-17
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_activity_check")
|
||||||
|
public class ZActivityCheck extends Model<ZActivityCheck> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 活动ID
|
||||||
|
private Integer activityId;
|
||||||
|
// 活动标题
|
||||||
|
private String title;
|
||||||
|
// 藏品名称(ai绘画活动)
|
||||||
|
private String nftName;
|
||||||
|
// 活动类型
|
||||||
|
private Integer type;
|
||||||
|
// 系列ID
|
||||||
|
private Integer typeId;
|
||||||
|
// 分享截图
|
||||||
|
private String imgUrl;
|
||||||
|
// 用户ID
|
||||||
|
private Integer memberId;
|
||||||
|
//用户名(手机号)
|
||||||
|
private String username;
|
||||||
|
//昵称
|
||||||
|
private String nickname;
|
||||||
|
// 审核状态: 0 待审核;1 审核通过;2 审核不通过
|
||||||
|
private Integer checkStatus;
|
||||||
|
// 备注
|
||||||
|
private String remark;
|
||||||
|
// 申请时间
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
// 更新时间
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
|
||||||
|
private Integer deleted;
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AIGC工具箱-次数限制白名单
|
||||||
|
* Created on 2023-07-13
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_aigc_whitelist")
|
||||||
|
public class ZAigcWhitelist extends Model<ZAigcWhitelist> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 会员ID
|
||||||
|
private Integer memberId;
|
||||||
|
// 用户名
|
||||||
|
private String username;
|
||||||
|
// 昵称
|
||||||
|
private String nickname;
|
||||||
|
// 创建时间
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
// 逻辑删除
|
||||||
|
private Integer deleted;
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.AirDropSource;
|
||||||
|
import com.cpop.nftmeta.common.enums.GoodsType;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Created on 2022-10-11
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZAirdroplog extends Model<ZAirdroplog> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 藏品
|
||||||
|
private Integer typeId;
|
||||||
|
private GoodsType Type;
|
||||||
|
// 手机号
|
||||||
|
private String username;
|
||||||
|
// 状态 1 成功 0 失败
|
||||||
|
private Integer status = 1;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
//
|
||||||
|
private String airdropno;
|
||||||
|
//
|
||||||
|
private Integer count;
|
||||||
|
private AirDropSource source = AirDropSource.MANUAL;
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Created on 2022-10-11
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZArticle extends Model<ZArticle> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 专题名
|
||||||
|
private String title;
|
||||||
|
// 专题头图
|
||||||
|
private String mainphoto;
|
||||||
|
// 内容
|
||||||
|
private String content;
|
||||||
|
// 日期
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp tdate;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版权方
|
||||||
|
* Created on 2022-10-11
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZBrander extends Model<ZBrander> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 发行方
|
||||||
|
private String name;
|
||||||
|
// 账户地址
|
||||||
|
private String address;
|
||||||
|
// 状态
|
||||||
|
private Integer status;
|
||||||
|
//
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
//
|
||||||
|
private String logo;
|
||||||
|
//
|
||||||
|
private String memo;
|
||||||
|
//
|
||||||
|
private String maxid;
|
||||||
|
//
|
||||||
|
private String weburl;
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Created on 2022-10-11
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZCarousel extends Model<ZCarousel> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 轮播图
|
||||||
|
private String mainphoto;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
// 链接
|
||||||
|
private String url;
|
||||||
|
// 排序
|
||||||
|
private Integer sort;
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Created on 2022-10-11
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZCategory extends Model<ZCategory> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 系列名
|
||||||
|
private String name;
|
||||||
|
// 副标题
|
||||||
|
private String subname;
|
||||||
|
// 系列编号
|
||||||
|
private String code;
|
||||||
|
// 状态
|
||||||
|
private Integer status;
|
||||||
|
// 开始预售时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp prestart;
|
||||||
|
// 结束预售时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp preend;
|
||||||
|
//
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
// 系列说明
|
||||||
|
private String memo;
|
||||||
|
// 大图
|
||||||
|
private String mainphoto;
|
||||||
|
// 背景色
|
||||||
|
private String bgcolor;
|
||||||
|
//
|
||||||
|
private Integer limitnum;
|
||||||
|
// 发行
|
||||||
|
private Integer publisherId;
|
||||||
|
// 版权
|
||||||
|
private Integer branderId;
|
||||||
|
// 标签
|
||||||
|
private String tag;
|
||||||
|
// 金额
|
||||||
|
private BigDecimal amount;
|
||||||
|
// 排序
|
||||||
|
private Integer sort;
|
||||||
|
private Integer isVerification;
|
||||||
|
private Integer deleted;
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Created on 2022-10-14
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZCdkey extends Model<ZCdkey> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 兑换时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp keyDate;
|
||||||
|
// 兑换码
|
||||||
|
private String keycode;
|
||||||
|
// 会员
|
||||||
|
private Integer memberId;
|
||||||
|
// 藏品
|
||||||
|
private Integer nftId;
|
||||||
|
// 0 未兑换 1已经兑换
|
||||||
|
private Integer status;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.CommonStatus;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* 自定义藏品空投
|
||||||
|
* Created on 2023-01-09
|
||||||
|
* @author DL
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_cus_airdrop_nft")
|
||||||
|
public class ZCusAirdropNft extends Model<ZCusAirdropNft> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
// 藏品id 唯一
|
||||||
|
@TableId(type= IdType.INPUT)
|
||||||
|
private Integer nftId;
|
||||||
|
// 1|2,2|2 藏品id|数量....
|
||||||
|
private String awardIds;
|
||||||
|
private CommonStatus status = CommonStatus.ENABLE;
|
||||||
|
// 间隔时长(天)
|
||||||
|
private Integer airInterval;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义空投记录
|
||||||
|
* Created on 2023-01-09
|
||||||
|
* @author DL
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_cus_airdrop_nft_record")
|
||||||
|
public class ZCusAirdropNftRecord extends Model<ZCusAirdropNftRecord> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 会员藏品ID
|
||||||
|
@TableId(type = IdType.INPUT)
|
||||||
|
private Integer memberNftId;
|
||||||
|
// 上次空投时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp lastAirdropTime;
|
||||||
|
private Integer nftId;
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Midjourney优质绘画作品
|
||||||
|
* Created on 2023-07-06
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_excellent_painting")
|
||||||
|
public class ZExcellentPainting extends Model<ZExcellentPainting> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer nftId;
|
||||||
|
// 主标题
|
||||||
|
private String name;
|
||||||
|
// 主图
|
||||||
|
private String mainphoto;
|
||||||
|
// 类别Id(会员手机号)
|
||||||
|
private String phoneNumber;
|
||||||
|
// 作者
|
||||||
|
private String author;
|
||||||
|
//
|
||||||
|
private String blockaddr;
|
||||||
|
// 藏品文件
|
||||||
|
private String file;
|
||||||
|
// 藏品类型 1 图片 2视频 3音乐
|
||||||
|
private Integer type;
|
||||||
|
// 大图
|
||||||
|
private String bigphoto;
|
||||||
|
// 是否上链
|
||||||
|
private Integer chainflag;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
//
|
||||||
|
private Integer deleted;
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 藏品权益表
|
||||||
|
* Created on 2022-11-23
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_interest")
|
||||||
|
public class ZInterest extends Model<ZInterest> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTiem;
|
||||||
|
// 说明
|
||||||
|
private String expository;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
// 图标
|
||||||
|
private String icon;
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 0 禁用 1 启用
|
||||||
|
private Integer status;
|
||||||
|
// 1 兑换券
|
||||||
|
private Integer type;
|
||||||
|
//
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp startTime;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp endTime;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Created on 2022-10-13
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZLottery extends Model<ZLottery> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 编号
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 抽签活动
|
||||||
|
private Integer categoryId;
|
||||||
|
// 会员
|
||||||
|
private Integer memberId;
|
||||||
|
// 0 空投;1 每日签到;2 邀请
|
||||||
|
private Integer type;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
// 是否使用
|
||||||
|
private Integer useflag;
|
||||||
|
// 中签
|
||||||
|
private Integer winflag;
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.MemberChannel;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Created on 2022-10-11
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZMember extends Model<ZMember> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
// 用户名
|
||||||
|
private String username;
|
||||||
|
// 密码
|
||||||
|
private String password;
|
||||||
|
// 昵称
|
||||||
|
private String nickname;
|
||||||
|
// 二级密码
|
||||||
|
private String secondpassword;
|
||||||
|
// 地址
|
||||||
|
private String address;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
// 状态
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private Integer level;
|
||||||
|
// 密匙
|
||||||
|
private String privatekey;
|
||||||
|
// hex地址
|
||||||
|
private String hexaddress;
|
||||||
|
// ip
|
||||||
|
private String ip;
|
||||||
|
// 国家
|
||||||
|
private String country;
|
||||||
|
// 代理
|
||||||
|
private Integer agentid;
|
||||||
|
//
|
||||||
|
private String avatar;
|
||||||
|
// 实名状态
|
||||||
|
private Integer verify;
|
||||||
|
//
|
||||||
|
private String idcardfront;
|
||||||
|
//
|
||||||
|
private String idcardend;
|
||||||
|
// 身份证
|
||||||
|
private String idcard;
|
||||||
|
// 姓名
|
||||||
|
private String realname;
|
||||||
|
//
|
||||||
|
private String openid;
|
||||||
|
//
|
||||||
|
private String invitecode;
|
||||||
|
// 运营商
|
||||||
|
private Integer isp;
|
||||||
|
// 实名时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp realTime;
|
||||||
|
// 快递地址
|
||||||
|
private String liveaddress;
|
||||||
|
// 收货手机
|
||||||
|
private String livephone;
|
||||||
|
// 收货人
|
||||||
|
private String livename;
|
||||||
|
// 地区
|
||||||
|
private String livearea;
|
||||||
|
// 备注信息
|
||||||
|
private String livememo;
|
||||||
|
//
|
||||||
|
private Integer cverify;
|
||||||
|
//
|
||||||
|
private Integer age;
|
||||||
|
// 0未知 1男 2女
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
|
private Integer invitenum;
|
||||||
|
|
||||||
|
private Integer inviteverifynum;
|
||||||
|
private String shuheCode;
|
||||||
|
private String shuheAddress;
|
||||||
|
private MemberChannel channel = MemberChannel.SHUYUAN;
|
||||||
|
private String wenshuUserId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Boolean hasVerificationAuth;
|
||||||
|
/**
|
||||||
|
* 2023/4/18 新增字段
|
||||||
|
*/
|
||||||
|
private Integer score;
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.MemberBlindStatus;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZMemberBlind extends Model<ZMemberBlind> {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
private String code;
|
||||||
|
private Integer blindId;
|
||||||
|
private Integer memberId;
|
||||||
|
private MemberBlindStatus status = MemberBlindStatus.UNUSE;
|
||||||
|
private Integer memberNftId;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
private Integer deleted;
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* 用户拓展表
|
||||||
|
* Created on 2023-02-28
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_member_extend")
|
||||||
|
public class ZMemberExtend extends Model<ZMemberExtend> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@TableId(type = IdType.INPUT)
|
||||||
|
private Integer memberId;
|
||||||
|
// 邀请人数
|
||||||
|
private Integer inviteNum;
|
||||||
|
// 实名邀请人数
|
||||||
|
private Integer inviteverifyNum;
|
||||||
|
//
|
||||||
|
// 父级用户名
|
||||||
|
private String pmemberName;
|
||||||
|
// 有赞优惠券
|
||||||
|
private Integer youzanCount;
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员好友
|
||||||
|
* Created on 2022-11-02
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZMemberFriends extends Model<ZMemberFriends> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer zid;
|
||||||
|
//
|
||||||
|
private Integer memberId;
|
||||||
|
//
|
||||||
|
private Integer friendId;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp addTime;
|
||||||
|
//
|
||||||
|
private Integer deleted;
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.GoodsType;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZMemberGoods extends Model<ZMemberGoods> {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer memberGoodsId;
|
||||||
|
private Integer memberId;
|
||||||
|
private GoodsType type;
|
||||||
|
// 类型Id
|
||||||
|
private Integer typeId;
|
||||||
|
// 物件Id
|
||||||
|
private Integer targetId;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private ZNft nft;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private ZNftBlind blind;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* 会员邀请表
|
||||||
|
* Created on 2022-11-02
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZMemberInvite extends Model<ZMemberInvite> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//
|
||||||
|
private Integer parentId;
|
||||||
|
//
|
||||||
|
private Integer memberId;
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.MemberNftSource;
|
||||||
|
import com.cpop.nftmeta.common.enums.MemberNftStatus;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户拥有的藏品
|
||||||
|
* Created on 2022-10-11
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZMemberNft extends Model<ZMemberNft> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer memberNftId;
|
||||||
|
// 会员
|
||||||
|
private Integer memberId;
|
||||||
|
// NFT
|
||||||
|
private Integer nftId;
|
||||||
|
// NFT地址
|
||||||
|
private String blockaddr;
|
||||||
|
private String txHash;
|
||||||
|
private MemberNftStatus status = MemberNftStatus.UNISSUE;
|
||||||
|
//
|
||||||
|
private String code;
|
||||||
|
// 批号
|
||||||
|
// private String batchCode;
|
||||||
|
//
|
||||||
|
private String nftClassAddress;
|
||||||
|
//
|
||||||
|
private String operationId;
|
||||||
|
private String taskId;
|
||||||
|
// 1 订单 2 合成 3 开盲盒 4 空投 5 转赠 21 DIY
|
||||||
|
private MemberNftSource sourceType;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
private String file;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,117 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.cpop.nftmeta.common.enums.NftFunction;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nft
|
||||||
|
* Created on 2022-10-11
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZNft extends Model<ZNft> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer nftId;
|
||||||
|
// 主标题
|
||||||
|
private String name;
|
||||||
|
// 副标题
|
||||||
|
private String subname;
|
||||||
|
// 藏品编号
|
||||||
|
private String code;
|
||||||
|
// 主图
|
||||||
|
private String mainphoto;
|
||||||
|
// 3D模型
|
||||||
|
private String model;
|
||||||
|
// 类别
|
||||||
|
private Integer categoryId;
|
||||||
|
// 作者
|
||||||
|
private String author;
|
||||||
|
// 版权方
|
||||||
|
private Integer branderId;
|
||||||
|
// 发行方
|
||||||
|
private Integer publisherId;
|
||||||
|
// 详情
|
||||||
|
private String memo;
|
||||||
|
// 源地址
|
||||||
|
private String file;
|
||||||
|
// 藏品类型 1 图片 2 视频 3 音乐
|
||||||
|
private Integer type = 1;
|
||||||
|
// 售价
|
||||||
|
private BigDecimal amount;
|
||||||
|
// 虚拟参与人数
|
||||||
|
private Integer visualnum;
|
||||||
|
// 上架状态
|
||||||
|
private Integer status;
|
||||||
|
// 发行日期
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp publishTime;
|
||||||
|
// 预售开始时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp prestart;
|
||||||
|
// 预售结束时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp preend;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
// 链创建时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp avataTime;
|
||||||
|
// 标签
|
||||||
|
private String tag;
|
||||||
|
private String blockaddr;
|
||||||
|
// 排序
|
||||||
|
private Integer sort;
|
||||||
|
// 合成开关
|
||||||
|
private Integer mergeflag;
|
||||||
|
// 转赠开关
|
||||||
|
private Integer transferflag;
|
||||||
|
// 上链开关
|
||||||
|
private Integer chainflag;
|
||||||
|
// 寄售开关
|
||||||
|
private Integer saleflag;
|
||||||
|
// 发行数量
|
||||||
|
private Integer publishCount;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
//类型 1 普通藏品 2 diy
|
||||||
|
private NftFunction functionType;
|
||||||
|
// 锁定发行量
|
||||||
|
private Integer lockCirculation;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private ZPublisher publisher;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private ZBrander brander;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer targetId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer stock;//库存
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long quantity; //数量
|
||||||
|
/**
|
||||||
|
* 2023/4/18 新增字段
|
||||||
|
*/
|
||||||
|
private Integer scoreAmount;
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容分区
|
||||||
|
* Created on 2022-11-28
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_nft_area")
|
||||||
|
public class ZNftArea extends Model<ZNftArea> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 分区编号
|
||||||
|
private String areaCode;
|
||||||
|
// 分区描述
|
||||||
|
private String areaDescription;
|
||||||
|
// 分区名称
|
||||||
|
private String areaName;
|
||||||
|
// 创建时间
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
//
|
||||||
|
private Integer deleted;
|
||||||
|
//
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
//排序
|
||||||
|
private Integer sort;
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* 分区系列中间表
|
||||||
|
* Created on 2022-11-28
|
||||||
|
* @author dl
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_nft_area_category")
|
||||||
|
public class ZNftAreaCategory extends Model<ZNftAreaCategory> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//
|
||||||
|
private Integer areaId;
|
||||||
|
//
|
||||||
|
private Integer categoryId;
|
||||||
|
//
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 藏品盲盒
|
||||||
|
* Created on 2022-11-02
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZNftBlind extends Model<ZNftBlind> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer blindId;
|
||||||
|
// 系列
|
||||||
|
private Integer categoryId;
|
||||||
|
// 盲盒名称
|
||||||
|
private String name;
|
||||||
|
// 盲盒编号
|
||||||
|
private String code;
|
||||||
|
// 盲盒副标题
|
||||||
|
private String subname;
|
||||||
|
// 首页封面图
|
||||||
|
private String mainphoto;
|
||||||
|
// 详情封面图
|
||||||
|
private String subphoto;
|
||||||
|
// 作者
|
||||||
|
private String author;
|
||||||
|
// 标签
|
||||||
|
private String tag;
|
||||||
|
// 发行方
|
||||||
|
private Integer branderId;
|
||||||
|
// 版权方
|
||||||
|
private Integer publisherId;
|
||||||
|
// 描述
|
||||||
|
private String memo;
|
||||||
|
// 金额
|
||||||
|
private BigDecimal amount;
|
||||||
|
// 虚拟人数
|
||||||
|
private Integer visualnum;
|
||||||
|
// 上下架状态
|
||||||
|
private Integer status = 0;
|
||||||
|
// 发行时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp publishTime;
|
||||||
|
// 预售开始时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp prestart;
|
||||||
|
// 预售结束时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp preend;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
//
|
||||||
|
private Integer count = 0;
|
||||||
|
// 发行数量
|
||||||
|
private Integer publishCount;
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private ZPublisher publisher;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private ZBrander brander;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer targetId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2023/4/18 新增字段
|
||||||
|
*/
|
||||||
|
private Integer scoreAmount;
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盲盒详情
|
||||||
|
* Created on 2022-11-02
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZNftBlindDetails extends Model<ZNftBlindDetails> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer blindDetailsId;
|
||||||
|
//
|
||||||
|
private Integer blindId;
|
||||||
|
//
|
||||||
|
private Integer nftId;
|
||||||
|
// 总数
|
||||||
|
private Integer nftCount;
|
||||||
|
// 概率
|
||||||
|
private Integer probability;
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String name;
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 藏品合成方案
|
||||||
|
* Created on 2022-10-28
|
||||||
|
* @author BboySpider
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZNftCompound extends Model<ZNftCompound> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer compoundId;
|
||||||
|
// 方案名称
|
||||||
|
private String compoundName;
|
||||||
|
// 方案编号
|
||||||
|
private String compoundCode;
|
||||||
|
//
|
||||||
|
private Integer nftId;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp startTime;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp endTime;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user