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
80e927b9
Commit
80e927b9
authored
Aug 03, 2021
by
chenwj
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
d4e4289a
db97484d
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1030 additions
and
4 deletions
+1030
-4
roo-admin/roo-admin-client/src/main/java/com/roo/dto/DappsDTO.java
.../roo-admin-client/src/main/java/com/roo/dto/DappsDTO.java
+1
-2
roo-admin/roo-admin-client/src/main/java/com/roo/dto/FinancialDTO.java
...-admin-client/src/main/java/com/roo/dto/FinancialDTO.java
+52
-0
roo-admin/roo-admin-client/src/main/java/com/roo/dto/TokenResourceDTO.java
...in-client/src/main/java/com/roo/dto/TokenResourceDTO.java
+46
-0
roo-admin/roo-admin-server/src/main/java/com/roo/controller/BannerController.java
...er/src/main/java/com/roo/controller/BannerController.java
+116
-0
roo-admin/roo-admin-server/src/main/java/com/roo/controller/FinancialController.java
...src/main/java/com/roo/controller/FinancialController.java
+116
-0
roo-admin/roo-admin-server/src/main/java/com/roo/controller/TokenResourceController.java
...main/java/com/roo/controller/TokenResourceController.java
+116
-0
roo-admin/roo-admin-server/src/main/java/com/roo/dao/BannerDao.java
...roo-admin-server/src/main/java/com/roo/dao/BannerDao.java
+16
-0
roo-admin/roo-admin-server/src/main/java/com/roo/dao/FinancialDao.java
...-admin-server/src/main/java/com/roo/dao/FinancialDao.java
+16
-0
roo-admin/roo-admin-server/src/main/java/com/roo/dao/TokenResourceDao.java
...in-server/src/main/java/com/roo/dao/TokenResourceDao.java
+16
-0
roo-admin/roo-admin-server/src/main/java/com/roo/entity/BannerEntity.java
...min-server/src/main/java/com/roo/entity/BannerEntity.java
+55
-0
roo-admin/roo-admin-server/src/main/java/com/roo/entity/FinancialEntity.java
...-server/src/main/java/com/roo/entity/FinancialEntity.java
+78
-0
roo-admin/roo-admin-server/src/main/java/com/roo/entity/TokenResourceEntity.java
...ver/src/main/java/com/roo/entity/TokenResourceEntity.java
+63
-0
roo-admin/roo-admin-server/src/main/java/com/roo/excel/BannerExcel.java
...admin-server/src/main/java/com/roo/excel/BannerExcel.java
+37
-0
roo-admin/roo-admin-server/src/main/java/com/roo/excel/FinancialExcel.java
...in-server/src/main/java/com/roo/excel/FinancialExcel.java
+47
-0
roo-admin/roo-admin-server/src/main/java/com/roo/excel/TokenResourceExcel.java
...erver/src/main/java/com/roo/excel/TokenResourceExcel.java
+41
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/BannerService.java
...n-server/src/main/java/com/roo/service/BannerService.java
+15
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/FinancialService.java
...erver/src/main/java/com/roo/service/FinancialService.java
+15
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/TokenResourceService.java
...r/src/main/java/com/roo/service/TokenResourceService.java
+15
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/BannerServiceImpl.java
...src/main/java/com/roo/service/impl/BannerServiceImpl.java
+32
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/FinancialServiceImpl.java
.../main/java/com/roo/service/impl/FinancialServiceImpl.java
+31
-0
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/TokenResourceServiceImpl.java
...n/java/com/roo/service/impl/TokenResourceServiceImpl.java
+32
-0
roo-admin/roo-admin-server/src/main/resources/mapper/BannerDao.xml
.../roo-admin-server/src/main/resources/mapper/BannerDao.xml
+17
-0
roo-admin/roo-admin-server/src/main/resources/mapper/TFinancialDao.xml
...-admin-server/src/main/resources/mapper/TFinancialDao.xml
+22
-0
roo-admin/roo-admin-server/src/main/resources/mapper/TokenResourceDao.xml
...min-server/src/main/resources/mapper/TokenResourceDao.xml
+19
-0
roo-admin/roo-admin-server/src/test/java/com/roo/service/Test.java
.../roo-admin-server/src/test/java/com/roo/service/Test.java
+14
-0
roo-module/roo-oss/roo-oss-server/src/main/resources/bootstrap.yml
...e/roo-oss/roo-oss-server/src/main/resources/bootstrap.yml
+2
-2
No files found.
roo-admin/roo-admin-client/src/main/java/com/roo/dto/DappsDTO.java
View file @
80e927b9
...
...
@@ -48,7 +48,6 @@ public class DappsDTO implements Serializable {
private
Integer
sort
;
@JsonFormat
(
pattern
=
DateUtils
.
DATE_TIME_PATTERN
)
@ApiModelProperty
(
value
=
"收录时间"
)
private
Date
createTime
;
}
\ No newline at end of file
}
roo-admin/roo-admin-client/src/main/java/com/roo/dto/FinancialDTO.java
0 → 100644
View file @
80e927b9
package
com.roo.dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.roo.commons.tools.utils.DateUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 理财推荐
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-22
*/
@Data
@ApiModel
(
value
=
"理财推荐"
)
public
class
FinancialDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"产品名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"logo"
)
private
String
logo
;
@ApiModelProperty
(
value
=
"链接"
)
private
String
link
;
@ApiModelProperty
(
value
=
"项目方"
)
private
String
ascription
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
@ApiModelProperty
(
value
=
"收益率"
)
private
Float
rateOfReturn
;
@ApiModelProperty
(
value
=
"链类型"
)
private
String
chainCode
;
@ApiModelProperty
(
value
=
"标签"
)
private
String
tag
;
@JsonFormat
(
pattern
=
DateUtils
.
DATE_TIME_PATTERN
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@JsonFormat
(
pattern
=
DateUtils
.
DATE_TIME_PATTERN
)
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"创建人"
)
private
String
creator
;
@ApiModelProperty
(
value
=
"更新人"
)
private
String
updator
;
}
roo-admin/roo-admin-client/src/main/java/com/roo/dto/TokenResourceDTO.java
0 → 100644
View file @
80e927b9
package
com.roo.dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.roo.commons.tools.utils.DateUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 代币详情
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-24
*/
@Data
@ApiModel
(
value
=
"代币详情"
)
public
class
TokenResourceDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"block_chain_code"
)
private
String
chainCode
;
@ApiModelProperty
(
value
=
"符号"
)
private
String
symbol
;
@ApiModelProperty
(
value
=
"合约地址"
)
private
String
contractId
;
@ApiModelProperty
(
value
=
"资源:JSON"
)
private
Object
resource
;
@ApiModelProperty
(
value
=
"详情"
)
private
String
detail
;
@ApiModelProperty
(
value
=
"发行量"
)
private
Long
totalSupply
;
@ApiModelProperty
(
value
=
"是否限制供应"
)
private
Boolean
isUpper
;
@JsonFormat
(
pattern
=
DateUtils
.
DATE_TIME_PATTERN
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
@JsonFormat
(
pattern
=
DateUtils
.
DATE_TIME_PATTERN
)
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateDate
;
}
roo-admin/roo-admin-server/src/main/java/com/roo/controller/BannerController.java
0 → 100644
View file @
80e927b9
package
com.roo.controller
;
import
com.roo.commons.log.annotation.LogOperation
;
import
com.roo.commons.tools.constant.Constant
;
import
com.roo.commons.tools.page.PageData
;
import
com.roo.commons.tools.utils.Result
;
import
com.roo.commons.tools.utils.ExcelUtils
;
import
com.roo.commons.tools.validator.AssertUtils
;
import
com.roo.commons.tools.validator.ValidatorUtils
;
import
com.roo.commons.tools.validator.group.AddGroup
;
import
com.roo.commons.tools.validator.group.DefaultGroup
;
import
com.roo.commons.tools.validator.group.UpdateGroup
;
import
com.roo.dto.BannerDTO
;
import
com.roo.excel.BannerExcel
;
import
com.roo.service.BannerService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* banner图
*
* @author momin 460363410@qq.com
* @since 1.0 2021-08-02
*/
@RestController
@RequestMapping
(
"banner"
)
@Api
(
tags
=
"banner图"
)
public
class
BannerController
{
@Autowired
private
BannerService
bannerService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PreAuthorize
(
"hasAuthority('banner:banner:page')"
)
public
Result
<
PageData
<
BannerDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
BannerDTO
>
page
=
bannerService
.
page
(
params
);
return
new
Result
<
PageData
<
BannerDTO
>>().
ok
(
page
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@PreAuthorize
(
"hasAuthority('banner:banner:info')"
)
public
Result
<
BannerDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
BannerDTO
data
=
bannerService
.
get
(
id
);
return
new
Result
<
BannerDTO
>().
ok
(
data
);
}
@PostMapping
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@PreAuthorize
(
"hasAuthority('banner:banner:save')"
)
public
Result
save
(
@RequestBody
BannerDTO
dto
){
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
bannerService
.
save
(
dto
);
return
new
Result
();
}
@PutMapping
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@PreAuthorize
(
"hasAuthority('banner:banner:update')"
)
public
Result
update
(
@RequestBody
BannerDTO
dto
){
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
bannerService
.
update
(
dto
);
return
new
Result
();
}
@DeleteMapping
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@PreAuthorize
(
"hasAuthority('banner:banner:delete')"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
//效验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
bannerService
.
delete
(
ids
);
return
new
Result
();
}
@GetMapping
(
"export"
)
@ApiOperation
(
"导出"
)
@LogOperation
(
"导出"
)
@PreAuthorize
(
"hasAuthority('banner:banner:export')"
)
public
void
export
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletResponse
response
)
throws
Exception
{
List
<
BannerDTO
>
list
=
bannerService
.
list
(
params
);
ExcelUtils
.
exportExcelToTarget
(
response
,
null
,
"banner图"
,
list
,
BannerExcel
.
class
);
}
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/controller/FinancialController.java
0 → 100644
View file @
80e927b9
package
com.roo.controller
;
import
com.roo.commons.log.annotation.LogOperation
;
import
com.roo.commons.tools.constant.Constant
;
import
com.roo.commons.tools.page.PageData
;
import
com.roo.commons.tools.utils.Result
;
import
com.roo.commons.tools.utils.ExcelUtils
;
import
com.roo.commons.tools.validator.AssertUtils
;
import
com.roo.commons.tools.validator.ValidatorUtils
;
import
com.roo.commons.tools.validator.group.AddGroup
;
import
com.roo.commons.tools.validator.group.DefaultGroup
;
import
com.roo.commons.tools.validator.group.UpdateGroup
;
import
com.roo.dto.FinancialDTO
;
import
com.roo.excel.FinancialExcel
;
import
com.roo.service.FinancialService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* 理财推荐
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-22
*/
@RestController
@RequestMapping
(
"financial"
)
@Api
(
tags
=
"理财推荐"
)
public
class
FinancialController
{
@Autowired
private
FinancialService
financialService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PreAuthorize
(
"hasAuthority('financial:financial:page')"
)
public
Result
<
PageData
<
FinancialDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
FinancialDTO
>
page
=
financialService
.
page
(
params
);
return
new
Result
<
PageData
<
FinancialDTO
>>().
ok
(
page
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@PreAuthorize
(
"hasAuthority('financial:financial:info')"
)
public
Result
<
FinancialDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
FinancialDTO
data
=
financialService
.
get
(
id
);
return
new
Result
<
FinancialDTO
>().
ok
(
data
);
}
@PostMapping
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@PreAuthorize
(
"hasAuthority('financial:financial:save')"
)
public
Result
save
(
@RequestBody
FinancialDTO
dto
){
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
financialService
.
save
(
dto
);
return
new
Result
();
}
@PutMapping
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@PreAuthorize
(
"hasAuthority('financial:financial:update')"
)
public
Result
update
(
@RequestBody
FinancialDTO
dto
){
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
financialService
.
update
(
dto
);
return
new
Result
();
}
@DeleteMapping
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@PreAuthorize
(
"hasAuthority('financial:financial:delete')"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
//效验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
financialService
.
delete
(
ids
);
return
new
Result
();
}
@GetMapping
(
"export"
)
@ApiOperation
(
"导出"
)
@LogOperation
(
"导出"
)
@PreAuthorize
(
"hasAuthority('financial:financial:export')"
)
public
void
export
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletResponse
response
)
throws
Exception
{
List
<
FinancialDTO
>
list
=
financialService
.
list
(
params
);
ExcelUtils
.
exportExcelToTarget
(
response
,
null
,
"理财推荐"
,
list
,
FinancialExcel
.
class
);
}
}
roo-admin/roo-admin-server/src/main/java/com/roo/controller/TokenResourceController.java
0 → 100644
View file @
80e927b9
package
com.roo.controller
;
import
com.roo.commons.log.annotation.LogOperation
;
import
com.roo.commons.tools.constant.Constant
;
import
com.roo.commons.tools.page.PageData
;
import
com.roo.commons.tools.utils.Result
;
import
com.roo.commons.tools.utils.ExcelUtils
;
import
com.roo.commons.tools.validator.AssertUtils
;
import
com.roo.commons.tools.validator.ValidatorUtils
;
import
com.roo.commons.tools.validator.group.AddGroup
;
import
com.roo.commons.tools.validator.group.DefaultGroup
;
import
com.roo.commons.tools.validator.group.UpdateGroup
;
import
com.roo.dto.TokenResourceDTO
;
import
com.roo.excel.TokenResourceExcel
;
import
com.roo.service.TokenResourceService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* 代币详情
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-24
*/
@RestController
@RequestMapping
(
"tokenresource"
)
@Api
(
tags
=
"代币详情"
)
public
class
TokenResourceController
{
@Autowired
private
TokenResourceService
tokenResourceService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PreAuthorize
(
"hasAuthority('tokenresource:tokenresource:page')"
)
public
Result
<
PageData
<
TokenResourceDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
TokenResourceDTO
>
page
=
tokenResourceService
.
page
(
params
);
return
new
Result
<
PageData
<
TokenResourceDTO
>>().
ok
(
page
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@PreAuthorize
(
"hasAuthority('tokenresource:tokenresource:info')"
)
public
Result
<
TokenResourceDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
TokenResourceDTO
data
=
tokenResourceService
.
get
(
id
);
return
new
Result
<
TokenResourceDTO
>().
ok
(
data
);
}
@PostMapping
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@PreAuthorize
(
"hasAuthority('tokenresource:tokenresource:save')"
)
public
Result
save
(
@RequestBody
TokenResourceDTO
dto
){
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
tokenResourceService
.
save
(
dto
);
return
new
Result
();
}
@PutMapping
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@PreAuthorize
(
"hasAuthority('tokenresource:tokenresource:update')"
)
public
Result
update
(
@RequestBody
TokenResourceDTO
dto
){
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
tokenResourceService
.
update
(
dto
);
return
new
Result
();
}
@DeleteMapping
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@PreAuthorize
(
"hasAuthority('tokenresource:tokenresource:delete')"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
//效验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
tokenResourceService
.
delete
(
ids
);
return
new
Result
();
}
@GetMapping
(
"export"
)
@ApiOperation
(
"导出"
)
@LogOperation
(
"导出"
)
@PreAuthorize
(
"hasAuthority('tokenresource:tokenresource:export')"
)
public
void
export
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletResponse
response
)
throws
Exception
{
List
<
TokenResourceDTO
>
list
=
tokenResourceService
.
list
(
params
);
ExcelUtils
.
exportExcelToTarget
(
response
,
null
,
"代币详情"
,
list
,
TokenResourceExcel
.
class
);
}
}
roo-admin/roo-admin-server/src/main/java/com/roo/dao/BannerDao.java
0 → 100644
View file @
80e927b9
package
com.roo.dao
;
import
com.roo.commons.mybatis.dao.BaseDao
;
import
com.roo.entity.BannerEntity
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* banner图
*
* @author momin 460363410@qq.com
* @since 1.0 2021-08-02
*/
@Mapper
public
interface
BannerDao
extends
BaseDao
<
BannerEntity
>
{
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/dao/FinancialDao.java
0 → 100644
View file @
80e927b9
package
com.roo.dao
;
import
com.roo.commons.mybatis.dao.BaseDao
;
import
com.roo.entity.FinancialEntity
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 理财推荐
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-22
*/
@Mapper
public
interface
FinancialDao
extends
BaseDao
<
FinancialEntity
>
{
}
roo-admin/roo-admin-server/src/main/java/com/roo/dao/TokenResourceDao.java
0 → 100644
View file @
80e927b9
package
com.roo.dao
;
import
com.roo.commons.mybatis.dao.BaseDao
;
import
com.roo.entity.TokenResourceEntity
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 代币详情
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-24
*/
@Mapper
public
interface
TokenResourceDao
extends
BaseDao
<
TokenResourceEntity
>
{
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/entity/BannerEntity.java
0 → 100644
View file @
80e927b9
package
com.roo.entity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.util.Date
;
/**
* banner图
*
* @author momin 460363410@qq.com
* @since 1.0 2021-08-02
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"roo_wallet.t_banner"
)
public
class
BannerEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
private
Long
id
;
/**
* 图片地址
*/
private
String
image
;
/**
* 超链接地址
*/
private
String
href
;
/**
* 类型:1=dapp
*/
private
Integer
type
;
/**
* 排序,正序
*/
private
Integer
sort
;
/**
* 是否启用
*/
private
Boolean
isEnabled
;
/**
* 创建时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
createDate
;
/**
* 更新时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
private
Date
updateDate
;
}
roo-admin/roo-admin-server/src/main/java/com/roo/entity/FinancialEntity.java
0 → 100644
View file @
80e927b9
package
com.roo.entity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.util.Date
;
/**
* 理财推荐
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-22
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"roo_wallet.t_financial"
)
public
class
FinancialEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
private
Long
id
;
/**
* 产品名称
*/
private
String
name
;
/**
* logo
*/
private
String
logo
;
/**
* 链接
*/
private
String
link
;
/**
* 项目方
*/
private
String
ascription
;
/**
* 排序
*/
private
Integer
sort
;
/**
* 收益率
*/
private
Float
rateOfReturn
;
/**
* 链类型
*/
private
String
chainCode
;
/**
* 标签
*/
private
String
tag
;
/**
* 创建时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
createTime
;
/**
* 更新时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
private
Date
updateTime
;
/**
* 创建人
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
String
creator
;
/**
* 更新人
*/
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
private
String
updator
;
}
roo-admin/roo-admin-server/src/main/java/com/roo/entity/TokenResourceEntity.java
0 → 100644
View file @
80e927b9
package
com.roo.entity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.util.Date
;
/**
* 代币详情
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-24
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"roo_wallet.t_token_resource"
)
public
class
TokenResourceEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
private
Long
id
;
/**
* block_chain_code
*/
private
String
chainCode
;
/**
* 符号
*/
private
String
symbol
;
/**
* 合约地址
*/
private
String
contractId
;
/**
* 资源:JSON
*/
private
Object
resource
;
/**
* 详情
*/
private
String
detail
;
/**
* 发行量
*/
private
Long
totalSupply
;
/**
* 是否限制供应
*/
private
Boolean
isUpper
;
/**
* 创建时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
createDate
;
/**
* 更新时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
private
Date
updateDate
;
}
roo-admin/roo-admin-server/src/main/java/com/roo/excel/BannerExcel.java
0 → 100644
View file @
80e927b9
package
com.roo.excel
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.alibaba.excel.annotation.write.style.ContentRowHeight
;
import
com.alibaba.excel.annotation.write.style.HeadRowHeight
;
import
lombok.Data
;
import
java.util.Date
;
/**
* banner图
*
* @author momin 460363410@qq.com
* @since 1.0 2021-08-02
*/
@Data
@ContentRowHeight
(
20
)
@HeadRowHeight
(
20
)
@ColumnWidth
(
25
)
public
class
BannerExcel
{
@ExcelProperty
(
value
=
"主键"
,
index
=
0
)
private
Long
id
;
@ExcelProperty
(
value
=
"图片地址"
,
index
=
1
)
private
String
image
;
@ExcelProperty
(
value
=
"超链接地址"
,
index
=
2
)
private
String
href
;
@ExcelProperty
(
value
=
"类型:1=dapp"
,
index
=
3
)
private
Integer
type
;
@ExcelProperty
(
value
=
"排序,正序"
,
index
=
4
)
private
Integer
sort
;
@ExcelProperty
(
value
=
"是否启用"
,
index
=
5
)
private
Boolean
isEnabled
;
@ExcelProperty
(
value
=
"创建时间"
,
index
=
6
)
private
Date
createDate
;
@ExcelProperty
(
value
=
"更新时间"
,
index
=
7
)
private
Date
updateDate
;
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/excel/FinancialExcel.java
0 → 100644
View file @
80e927b9
package
com.roo.excel
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.alibaba.excel.annotation.write.style.ContentRowHeight
;
import
com.alibaba.excel.annotation.write.style.HeadRowHeight
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 理财推荐
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-22
*/
@Data
@ContentRowHeight
(
20
)
@HeadRowHeight
(
20
)
@ColumnWidth
(
25
)
public
class
FinancialExcel
{
@ExcelProperty
(
value
=
"主键"
,
index
=
0
)
private
Long
id
;
@ExcelProperty
(
value
=
"产品名称"
,
index
=
1
)
private
String
name
;
@ExcelProperty
(
value
=
"logo"
,
index
=
2
)
private
String
logo
;
@ExcelProperty
(
value
=
"链接"
,
index
=
3
)
private
String
link
;
@ExcelProperty
(
value
=
"项目方"
,
index
=
4
)
private
String
ascription
;
@ExcelProperty
(
value
=
"排序"
,
index
=
5
)
private
Integer
sort
;
@ExcelProperty
(
value
=
"收益率"
,
index
=
6
)
private
Float
rateOfReturn
;
@ExcelProperty
(
value
=
"链类型"
,
index
=
7
)
private
String
chainCode
;
@ExcelProperty
(
value
=
"标签"
,
index
=
8
)
private
String
tag
;
@ExcelProperty
(
value
=
"创建时间"
,
index
=
9
)
private
Date
createTime
;
@ExcelProperty
(
value
=
"更新时间"
,
index
=
10
)
private
Date
updateTime
;
@ExcelProperty
(
value
=
"创建人"
,
index
=
11
)
private
String
creator
;
@ExcelProperty
(
value
=
"更新人"
,
index
=
12
)
private
String
updator
;
}
roo-admin/roo-admin-server/src/main/java/com/roo/excel/TokenResourceExcel.java
0 → 100644
View file @
80e927b9
package
com.roo.excel
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.alibaba.excel.annotation.write.style.ContentRowHeight
;
import
com.alibaba.excel.annotation.write.style.HeadRowHeight
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 代币详情
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-24
*/
@Data
@ContentRowHeight
(
20
)
@HeadRowHeight
(
20
)
@ColumnWidth
(
25
)
public
class
TokenResourceExcel
{
@ExcelProperty
(
value
=
"主键"
,
index
=
0
)
private
Long
id
;
@ExcelProperty
(
value
=
"block_chain_code"
,
index
=
1
)
private
String
chainCode
;
@ExcelProperty
(
value
=
"符号"
,
index
=
2
)
private
String
symbol
;
@ExcelProperty
(
value
=
"合约地址"
,
index
=
3
)
private
String
contractId
;
@ExcelProperty
(
value
=
"资源:JSON"
,
index
=
4
)
private
Object
resource
;
@ExcelProperty
(
value
=
"详情"
,
index
=
5
)
private
String
detail
;
@ExcelProperty
(
value
=
"发行量"
,
index
=
6
)
private
Long
totalSupply
;
@ExcelProperty
(
value
=
"是否限制供应"
,
index
=
7
)
private
Boolean
isUpper
;
@ExcelProperty
(
value
=
"创建时间"
,
index
=
8
)
private
Date
createDate
;
@ExcelProperty
(
value
=
"更新时间"
,
index
=
9
)
private
Date
updateDate
;
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/service/BannerService.java
0 → 100644
View file @
80e927b9
package
com.roo.service
;
import
com.roo.commons.mybatis.service.CrudService
;
import
com.roo.dto.BannerDTO
;
import
com.roo.entity.BannerEntity
;
/**
* banner图
*
* @author momin 460363410@qq.com
* @since 1.0 2021-08-02
*/
public
interface
BannerService
extends
CrudService
<
BannerEntity
,
BannerDTO
>
{
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/service/FinancialService.java
0 → 100644
View file @
80e927b9
package
com.roo.service
;
import
com.roo.commons.mybatis.service.CrudService
;
import
com.roo.dto.FinancialDTO
;
import
com.roo.entity.FinancialEntity
;
/**
* 理财推荐
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-22
*/
public
interface
FinancialService
extends
CrudService
<
FinancialEntity
,
FinancialDTO
>
{
}
roo-admin/roo-admin-server/src/main/java/com/roo/service/TokenResourceService.java
0 → 100644
View file @
80e927b9
package
com.roo.service
;
import
com.roo.commons.mybatis.service.CrudService
;
import
com.roo.dto.TokenResourceDTO
;
import
com.roo.entity.TokenResourceEntity
;
/**
* 代币详情
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-24
*/
public
interface
TokenResourceService
extends
CrudService
<
TokenResourceEntity
,
TokenResourceDTO
>
{
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/BannerServiceImpl.java
0 → 100644
View file @
80e927b9
package
com.roo.service.impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.roo.commons.mybatis.service.impl.CrudServiceImpl
;
import
com.roo.dao.BannerDao
;
import
com.roo.dto.BannerDTO
;
import
com.roo.entity.BannerEntity
;
import
com.roo.service.BannerService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
/**
* banner图
*
* @author momin 460363410@qq.com
* @since 1.0 2021-08-02
*/
@Service
public
class
BannerServiceImpl
extends
CrudServiceImpl
<
BannerDao
,
BannerEntity
,
BannerDTO
>
implements
BannerService
{
@Override
public
QueryWrapper
<
BannerEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
QueryWrapper
<
BannerEntity
>
wrapper
=
new
QueryWrapper
<>();
return
wrapper
;
}
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/FinancialServiceImpl.java
0 → 100644
View file @
80e927b9
package
com.roo.service.impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.roo.commons.mybatis.service.impl.CrudServiceImpl
;
import
com.roo.dao.FinancialDao
;
import
com.roo.dto.FinancialDTO
;
import
com.roo.entity.FinancialEntity
;
import
com.roo.service.FinancialService
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
/**
* 理财推荐
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-22
*/
@Service
public
class
FinancialServiceImpl
extends
CrudServiceImpl
<
FinancialDao
,
FinancialEntity
,
FinancialDTO
>
implements
FinancialService
{
@Override
public
QueryWrapper
<
FinancialEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
QueryWrapper
<
FinancialEntity
>
wrapper
=
new
QueryWrapper
<>();
return
wrapper
;
}
}
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/TokenResourceServiceImpl.java
0 → 100644
View file @
80e927b9
package
com.roo.service.impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.roo.commons.mybatis.service.impl.CrudServiceImpl
;
import
com.roo.dao.TokenResourceDao
;
import
com.roo.dto.TokenResourceDTO
;
import
com.roo.entity.TokenResourceEntity
;
import
com.roo.service.TokenResourceService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
/**
* 代币详情
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-24
*/
@Service
public
class
TokenResourceServiceImpl
extends
CrudServiceImpl
<
TokenResourceDao
,
TokenResourceEntity
,
TokenResourceDTO
>
implements
TokenResourceService
{
@Override
public
QueryWrapper
<
TokenResourceEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
QueryWrapper
<
TokenResourceEntity
>
wrapper
=
new
QueryWrapper
<>();
return
wrapper
;
}
}
\ No newline at end of file
roo-admin/roo-admin-server/src/main/resources/mapper/BannerDao.xml
0 → 100644
View file @
80e927b9
<?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.roo.dao.BannerDao"
>
<resultMap
type=
"com.roo.entity.BannerEntity"
id=
"bannerMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"image"
column=
"image"
/>
<result
property=
"href"
column=
"href"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"isEnabled"
column=
"is_enabled"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"updateDate"
column=
"update_date"
/>
</resultMap>
</mapper>
\ No newline at end of file
roo-admin/roo-admin-server/src/main/resources/mapper/TFinancialDao.xml
0 → 100644
View file @
80e927b9
<?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.roo.dao.FinancialDao"
>
<resultMap
type=
"com.roo.entity.FinancialEntity"
id=
"tFinancialMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"logo"
column=
"logo"
/>
<result
property=
"link"
column=
"link"
/>
<result
property=
"ascription"
column=
"ascription"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"rateOfReturn"
column=
"rate_of_return"
/>
<result
property=
"chainCode"
column=
"chain_code"
/>
<result
property=
"tag"
column=
"tag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"creator"
column=
"creator"
/>
<result
property=
"updator"
column=
"updator"
/>
</resultMap>
</mapper>
roo-admin/roo-admin-server/src/main/resources/mapper/TokenResourceDao.xml
0 → 100644
View file @
80e927b9
<?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.roo.dao.TokenResourceDao"
>
<resultMap
type=
"com.roo.entity.TokenResourceEntity"
id=
"tokenResourceMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"chainCode"
column=
"chain_code"
/>
<result
property=
"symbol"
column=
"symbol"
/>
<result
property=
"contractId"
column=
"contract_id"
/>
<result
property=
"resource"
column=
"resource"
/>
<result
property=
"detail"
column=
"detail"
/>
<result
property=
"totalSupply"
column=
"total_supply"
/>
<result
property=
"isUpper"
column=
"is_upper"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"updateDate"
column=
"update_date"
/>
</resultMap>
</mapper>
\ No newline at end of file
roo-admin/roo-admin-server/src/test/java/com/roo/service/Test.java
0 → 100644
View file @
80e927b9
package
com.roo.service
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
public
class
Test
{
public
static
void
main
(
String
[]
args
)
{
PasswordEncoder
passwordEncoder
=
new
BCryptPasswordEncoder
();
// String encode = passwordEncoder.encode("roo.top");
boolean
matches
=
passwordEncoder
.
matches
(
"renrenio"
,
"$2a$10$aiWOK7GmRzyLyRihSF0cMedcbsEo0t11/y8f.tnBkF2hCeSd0Bq.i"
);
System
.
out
.
println
(
matches
);
// System.out.println(encode);
}
}
roo-module/roo-oss/roo-oss-server/src/main/resources/bootstrap.yml
View file @
80e927b9
...
...
@@ -29,7 +29,7 @@ spring:
config
:
server-addr
:
${spring.cloud.nacos.discovery.server-addr}
namespace
:
${spring.cloud.nacos.discovery.namespace}
group
:
RENREN_CLOUD
_GROUP
group
:
DEFAULT
_GROUP
file-extension
:
yaml
#指定共享配置,且支持动态刷新
extension-configs
:
...
...
@@ -44,4 +44,4 @@ fdfs:
so-timeout
:
600000
connect-timeout
:
6000
tracker-list
:
#TrackerList参数,支持多个
-
192.168.10.10:22122
\ No newline at end of file
-
192.168.10.10:22122
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