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
851b52d5
Commit
851b52d5
authored
Jul 22, 2021
by
wanmin@bu2.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
理财推荐
parent
e741d97e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
378 additions
and
2 deletions
+378
-2
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-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/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/entity/FinancialEntity.java
...-server/src/main/java/com/roo/entity/FinancialEntity.java
+78
-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/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/impl/FinancialServiceImpl.java
.../main/java/com/roo/service/impl/FinancialServiceImpl.java
+31
-0
roo-admin/roo-admin-server/src/main/resources/mapper/TFinancialDao.xml
...-admin-server/src/main/resources/mapper/TFinancialDao.xml
+22
-0
No files found.
roo-admin/roo-admin-client/src/main/java/com/roo/dto/DappsDTO.java
View file @
851b52d5
...
...
@@ -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 @
851b52d5
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-server/src/main/java/com/roo/controller/FinancialController.java
0 → 100644
View file @
851b52d5
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/dao/FinancialDao.java
0 → 100644
View file @
851b52d5
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/entity/FinancialEntity.java
0 → 100644
View file @
851b52d5
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/excel/FinancialExcel.java
0 → 100644
View file @
851b52d5
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/service/FinancialService.java
0 → 100644
View file @
851b52d5
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/impl/FinancialServiceImpl.java
0 → 100644
View file @
851b52d5
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/resources/mapper/TFinancialDao.xml
0 → 100644
View file @
851b52d5
<?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>
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