Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
roo-cloud
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
万敏
roo-cloud
Commits
d4e4289a
Commit
d4e4289a
authored
Aug 03, 2021
by
chenwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增代币申请和Dapp申请接口
parent
e741d97e
Changes
19
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
3540 additions
and
0 deletions
+3540
-0
roo-admin/roo-admin-client/src/main/java/com/roo/dto/DappsAuditDTO.java
...admin-client/src/main/java/com/roo/dto/DappsAuditDTO.java
+50
-0
roo-admin/roo-admin-client/src/main/java/com/roo/dto/TokenAuditDTO.java
...admin-client/src/main/java/com/roo/dto/TokenAuditDTO.java
+59
-0
roo-admin/roo-admin-client/src/main/java/com/roo/enums/AuditStatusEnum.java
...n-client/src/main/java/com/roo/enums/AuditStatusEnum.java
+17
-0
roo-admin/roo-admin-server/pom.xml
roo-admin/roo-admin-server/pom.xml
+30
-0
roo-admin/roo-admin-server/src/main/java/com/roo/controller/DappsAuditController.java
...rc/main/java/com/roo/controller/DappsAuditController.java
+23
-0
roo-admin/roo-admin-server/src/main/java/com/roo/controller/TokenAuditController.java
...rc/main/java/com/roo/controller/TokenAuditController.java
+23
-0
roo-admin/roo-admin-server/src/main/java/com/roo/dao/DappsAuditMapper.java
...in-server/src/main/java/com/roo/dao/DappsAuditMapper.java
+32
-0
roo-admin/roo-admin-server/src/main/java/com/roo/dao/TokenAuditMapper.java
...in-server/src/main/java/com/roo/dao/TokenAuditMapper.java
+32
-0
roo-admin/roo-admin-server/src/main/java/com/roo/entity/DappsAudit.java
...admin-server/src/main/java/com/roo/entity/DappsAudit.java
+39
-0
roo-admin/roo-admin-server/src/main/java/com/roo/entity/DappsAuditExample.java
...erver/src/main/java/com/roo/entity/DappsAuditExample.java
+1071
-0
roo-admin/roo-admin-server/src/main/java/com/roo/entity/TokenAudit.java
...admin-server/src/main/java/com/roo/entity/TokenAudit.java
+45
-0
roo-admin/roo-admin-server/src/main/java/com/roo/entity/TokenAuditExample.java
...erver/src/main/java/com/roo/entity/TokenAuditExample.java
+1261
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/DappsAuditService.java
...rver/src/main/java/com/roo/service/DappsAuditService.java
+7
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/TokenAuditService.java
...rver/src/main/java/com/roo/service/TokenAuditService.java
+7
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/DappsAuditServiceImpl.java
...main/java/com/roo/service/impl/DappsAuditServiceImpl.java
+35
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/TokenAuditServiceImpl.java
...main/java/com/roo/service/impl/TokenAuditServiceImpl.java
+37
-0
roo-admin/roo-admin-server/src/main/resources/generator/generatorConfig.xml
...n-server/src/main/resources/generator/generatorConfig.xml
+47
-0
roo-admin/roo-admin-server/src/main/resources/mapper/DappsAuditMapper.xml
...min-server/src/main/resources/mapper/DappsAuditMapper.xml
+339
-0
roo-admin/roo-admin-server/src/main/resources/mapper/TokenAuditMapper.xml
...min-server/src/main/resources/mapper/TokenAuditMapper.xml
+386
-0
No files found.
roo-admin/roo-admin-client/src/main/java/com/roo/dto/DappsAuditDTO.java
0 → 100644
View file @
d4e4289a
package
com.roo.dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@ApiModel
(
"dapps审核对象"
)
public
class
DappsAuditDTO
{
private
Long
id
;
@ApiModelProperty
(
"Dapp网络"
)
private
String
chainCode
;
@ApiModelProperty
(
"Dapp名称"
)
private
String
name
;
@ApiModelProperty
(
"Dapp链接"
)
private
String
link
;
@ApiModelProperty
(
"Dapp简介"
)
private
String
description
;
@ApiModelProperty
(
"DappLogo链接"
)
private
String
logo
;
@ApiModelProperty
(
"电话"
)
private
String
tel
;
@ApiModelProperty
(
"微信"
)
private
String
wechat
;
@ApiModelProperty
(
"使用教程链接"
)
private
String
instructions
;
@ApiModelProperty
(
"审核不通过原因"
)
private
String
reason
;
@ApiModelProperty
(
"审核状态 1:待审核|2:审核通过|3:已处理|4:审核失败"
)
private
Byte
status
;
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
}
roo-admin/roo-admin-client/src/main/java/com/roo/dto/TokenAuditDTO.java
0 → 100644
View file @
d4e4289a
package
com.roo.dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@ApiModel
(
"代币申请对象"
)
@Data
public
class
TokenAuditDTO
{
private
Long
id
;
@ApiModelProperty
(
"项目网络"
)
private
String
chainCode
;
@ApiModelProperty
(
"代币名称(英文)"
)
private
String
nameEn
;
@ApiModelProperty
(
"代币符号"
)
private
String
symbol
;
@ApiModelProperty
(
"代币名称"
)
private
String
name
;
@ApiModelProperty
(
"合约地址"
)
private
String
contractId
;
@ApiModelProperty
(
"精度"
)
private
Integer
decimal
;
@ApiModelProperty
(
"数量"
)
private
Long
totalSupply
;
@ApiModelProperty
(
"项目简介"
)
private
String
description
;
@ApiModelProperty
(
"邮箱地址"
)
private
String
email
;
@ApiModelProperty
(
"官网"
)
private
String
officailWeb
;
@ApiModelProperty
(
"logo链接"
)
private
String
logo
;
@ApiModelProperty
(
"审核不通过原因"
)
private
String
reason
;
@ApiModelProperty
(
"审核状态 1:待审核|2:审核通过|3:已处理|4:审核失败"
)
private
Byte
status
;
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
}
roo-admin/roo-admin-client/src/main/java/com/roo/enums/AuditStatusEnum.java
0 → 100644
View file @
d4e4289a
package
com.roo.enums
;
public
enum
AuditStatusEnum
{
PENDING_REVIEW
((
byte
)
1
),
EXAMINATION_PASSED
((
byte
)
2
),
PROCESSED
((
byte
)
3
),
AUDIT_FAILURE
((
byte
)
4
);
private
byte
code
;
AuditStatusEnum
(
byte
code
)
{
this
.
code
=
code
;
}
public
byte
getCode
()
{
return
code
;
}
}
roo-admin/roo-admin-server/pom.xml
View file @
d4e4289a
...
...
@@ -78,6 +78,36 @@
<skipTests>
true
</skipTests>
</configuration>
</plugin>
<!--mybatis自动生成代码插件-->
<plugin>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<version>
1.3.2
</version>
<executions>
<execution>
<id>
Generate MyBatis Artifacts
</id>
<phase>
deploy
</phase>
</execution>
</executions>
<configuration>
<!-- generator 工具配置文件的位置 -->
<configurationFile>
src\main\resources\generator\generatorConfig.xml
</configurationFile>
<verbose>
true
</verbose>
<overwrite>
true
</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.8
</version>
</dependency>
<dependency>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-core
</artifactId>
<version>
1.3.2
</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/controller/DappsAuditController.java
0 → 100644
View file @
d4e4289a
package
com.roo.controller
;
import
com.roo.commons.tools.utils.Result
;
import
com.roo.dto.DappsAuditDTO
;
import
com.roo.service.DappsAuditService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/dappsAudit"
)
public
class
DappsAuditController
{
@Autowired
private
DappsAuditService
dappsAuditService
;
@RequestMapping
(
"/settleIn"
)
public
Result
settleIn
(
@RequestBody
DappsAuditDTO
dto
)
{
dappsAuditService
.
save
(
dto
);
return
new
Result
();
}
}
roo-admin/roo-admin-server/src/main/java/com/roo/controller/TokenAuditController.java
0 → 100644
View file @
d4e4289a
package
com.roo.controller
;
import
com.roo.commons.tools.utils.Result
;
import
com.roo.dto.TokenAuditDTO
;
import
com.roo.service.TokenAuditService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/tokenAudit"
)
public
class
TokenAuditController
{
@Autowired
private
TokenAuditService
tokenAuditService
;
@RequestMapping
(
"/settleIn"
)
public
Result
settleIn
(
@RequestBody
TokenAuditDTO
dto
)
{
tokenAuditService
.
save
(
dto
);
return
new
Result
();
}
}
roo-admin/roo-admin-server/src/main/java/com/roo/dao/DappsAuditMapper.java
0 → 100644
View file @
d4e4289a
package
com.roo.dao
;
import
com.roo.entity.DappsAudit
;
import
com.roo.entity.DappsAuditExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
DappsAuditMapper
{
int
countByExample
(
DappsAuditExample
example
);
int
deleteByExample
(
DappsAuditExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
DappsAudit
record
);
int
insertSelective
(
DappsAudit
record
);
List
<
DappsAudit
>
selectByExample
(
DappsAuditExample
example
);
DappsAudit
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
DappsAudit
record
,
@Param
(
"example"
)
DappsAuditExample
example
);
int
updateByExample
(
@Param
(
"record"
)
DappsAudit
record
,
@Param
(
"example"
)
DappsAuditExample
example
);
int
updateByPrimaryKeySelective
(
DappsAudit
record
);
int
updateByPrimaryKey
(
DappsAudit
record
);
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/dao/TokenAuditMapper.java
0 → 100644
View file @
d4e4289a
package
com.roo.dao
;
import
com.roo.entity.TokenAudit
;
import
com.roo.entity.TokenAuditExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
TokenAuditMapper
{
int
countByExample
(
TokenAuditExample
example
);
int
deleteByExample
(
TokenAuditExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
TokenAudit
record
);
int
insertSelective
(
TokenAudit
record
);
List
<
TokenAudit
>
selectByExample
(
TokenAuditExample
example
);
TokenAudit
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
TokenAudit
record
,
@Param
(
"example"
)
TokenAuditExample
example
);
int
updateByExample
(
@Param
(
"record"
)
TokenAudit
record
,
@Param
(
"example"
)
TokenAuditExample
example
);
int
updateByPrimaryKeySelective
(
TokenAudit
record
);
int
updateByPrimaryKey
(
TokenAudit
record
);
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/entity/DappsAudit.java
0 → 100644
View file @
d4e4289a
package
com.roo.entity
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@Builder
public
class
DappsAudit
implements
Serializable
{
private
Long
id
;
private
String
chainCode
;
private
String
name
;
private
String
link
;
private
String
description
;
private
String
logo
;
private
String
tel
;
private
String
wechat
;
private
String
instructions
;
private
String
reason
;
private
Byte
status
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/entity/DappsAuditExample.java
0 → 100644
View file @
d4e4289a
This diff is collapsed.
Click to expand it.
roo-admin/roo-admin-server/src/main/java/com/roo/entity/TokenAudit.java
0 → 100644
View file @
d4e4289a
package
com.roo.entity
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@Builder
public
class
TokenAudit
implements
Serializable
{
private
Long
id
;
private
String
chainCode
;
private
String
nameEn
;
private
String
symbol
;
private
String
name
;
private
String
contractId
;
private
Integer
decimal
;
private
Long
totalSupply
;
private
String
description
;
private
String
email
;
private
String
officailWeb
;
private
String
logo
;
private
String
reason
;
private
Byte
status
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/entity/TokenAuditExample.java
0 → 100644
View file @
d4e4289a
This diff is collapsed.
Click to expand it.
roo-admin/roo-admin-server/src/main/java/com/roo/service/DappsAuditService.java
0 → 100644
View file @
d4e4289a
package
com.roo.service
;
import
com.roo.dto.DappsAuditDTO
;
public
interface
DappsAuditService
{
void
save
(
DappsAuditDTO
dto
);
}
roo-admin/roo-admin-server/src/main/java/com/roo/service/TokenAuditService.java
0 → 100644
View file @
d4e4289a
package
com.roo.service
;
import
com.roo.dto.TokenAuditDTO
;
public
interface
TokenAuditService
{
void
save
(
TokenAuditDTO
dto
);
}
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/DappsAuditServiceImpl.java
0 → 100644
View file @
d4e4289a
package
com.roo.service.impl
;
import
com.roo.dao.DappsAuditMapper
;
import
com.roo.dto.DappsAuditDTO
;
import
com.roo.entity.DappsAudit
;
import
com.roo.enums.AuditStatusEnum
;
import
com.roo.service.DappsAuditService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
@Service
public
class
DappsAuditServiceImpl
implements
DappsAuditService
{
@Autowired
private
DappsAuditMapper
dappsAuditMapper
;
@Override
public
void
save
(
DappsAuditDTO
dto
)
{
dappsAuditMapper
.
insert
(
DappsAudit
.
builder
()
.
chainCode
(
dto
.
getChainCode
())
.
createTime
(
new
Date
())
.
description
(
dto
.
getDescription
())
.
instructions
(
dto
.
getInstructions
())
.
link
(
dto
.
getLink
())
.
logo
(
dto
.
getLogo
())
.
name
(
dto
.
getName
())
.
reason
(
dto
.
getReason
())
.
tel
(
dto
.
getTel
())
.
wechat
(
dto
.
getWechat
())
.
status
(
AuditStatusEnum
.
PENDING_REVIEW
.
getCode
())
.
build
());
}
}
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/TokenAuditServiceImpl.java
0 → 100644
View file @
d4e4289a
package
com.roo.service.impl
;
import
com.roo.dao.TokenAuditMapper
;
import
com.roo.dto.TokenAuditDTO
;
import
com.roo.entity.TokenAudit
;
import
com.roo.enums.AuditStatusEnum
;
import
com.roo.service.TokenAuditService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
@Service
public
class
TokenAuditServiceImpl
implements
TokenAuditService
{
@Autowired
private
TokenAuditMapper
tokenAuditMapper
;
@Override
public
void
save
(
TokenAuditDTO
dto
)
{
tokenAuditMapper
.
insert
(
TokenAudit
.
builder
()
.
chainCode
(
dto
.
getChainCode
())
.
contractId
(
dto
.
getContractId
())
.
createTime
(
new
Date
())
.
decimal
(
dto
.
getDecimal
())
.
description
(
dto
.
getDescription
())
.
email
(
dto
.
getEmail
())
.
logo
(
dto
.
getLogo
())
.
name
(
dto
.
getName
())
.
nameEn
(
dto
.
getNameEn
())
.
officailWeb
(
dto
.
getOfficailWeb
())
.
symbol
(
dto
.
getSymbol
())
.
totalSupply
(
dto
.
getTotalSupply
())
.
status
(
AuditStatusEnum
.
PENDING_REVIEW
.
getCode
())
.
build
());
}
}
roo-admin/roo-admin-server/src/main/resources/generator/generatorConfig.xml
0 → 100644
View file @
d4e4289a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 导入配置文件 -->
<properties
resource=
"bootstrap.yml"
/>
<!-- defaultModelType="flat" 设置复合主键时不单独为主键创建实体 -->
<context
id=
"MySql"
defaultModelType=
"flat"
>
<!-- 生成的POJO实现java.io.Serializable接口 -->
<plugin
type=
"org.mybatis.generator.plugins.SerializablePlugin"
/>
<!-- 覆盖生成的xml,而不是追加 -->
<commentGenerator>
<property
name=
"suppressDate"
value=
"true"
/>
<property
name=
"suppressAllComments"
value=
"true"
/>
</commentGenerator>
<!-- 数据库连接,直接通过${}读取application.properties里的配置 -->
<jdbcConnection
driverClass=
"com.mysql.jdbc.Driver"
connectionURL=
"jdbc:mysql://192.168.4.9:3306/roo_wallet?useUnicode=true&characterEncoding=utf8"
userId=
"root"
password=
"MyNewPass@123"
>
<property
name=
"nullCatalogMeansCurrent"
value=
"true"
/>
</jdbcConnection>
<!-- 生成POJO对象 -->
<javaModelGenerator
targetPackage=
"com.roo.entity"
targetProject=
"src/main/java"
>
</javaModelGenerator>
<!-- 生成mapper xml文件 -->
<sqlMapGenerator
targetPackage=
"mapper"
targetProject=
"src/main/resources"
>
<property
name=
"enableSubPackages"
value=
"false"
/>
</sqlMapGenerator>
<!-- 生成mapper xml对应dao接口-->
<javaClientGenerator
targetPackage=
"com.roo.dao"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
>
</javaClientGenerator>
<!--生成对应表及类名-->
<table
tableName=
"t_token_audit"
domainObjectName=
"TokenAudit"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
</table>
</context>
</generatorConfiguration>
\ No newline at end of file
roo-admin/roo-admin-server/src/main/resources/mapper/DappsAuditMapper.xml
0 → 100644
View file @
d4e4289a
This diff is collapsed.
Click to expand it.
roo-admin/roo-admin-server/src/main/resources/mapper/TokenAuditMapper.xml
0 → 100644
View file @
d4e4289a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment