Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fzm-joying
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lei
fzm-joying
Commits
a7b4dc77
Commit
a7b4dc77
authored
Jan 17, 2022
by
tangtuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
委托上架接口编写
parent
3823264a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
1 deletion
+95
-1
EntrustShelfController.java
...java/com/fzm/admin/controller/EntrustShelfController.java
+44
-0
CollectionNftVo.java
...c/main/java/com/fzm/common/entity/vo/CollectionNftVo.java
+10
-0
EntrustShelfMapper.java
...c/main/java/com/fzm/common/mapper/EntrustShelfMapper.java
+0
-1
EntrustShelfService.java
...main/java/com/fzm/common/service/EntrustShelfService.java
+14
-0
EntrustShelfServiceImpl.java
.../com/fzm/common/service/impl/EntrustShelfServiceImpl.java
+27
-0
No files found.
joying-admin/src/main/java/com/fzm/admin/controller/EntrustShelfController.java
0 → 100644
View file @
a7b4dc77
package
com
.
fzm
.
admin
.
controller
;
import
com.fzm.common.annotation.Authentication
;
import
com.fzm.common.entity.EntrustShelf
;
import
com.fzm.common.model.ResponseModel
;
import
com.fzm.common.service.EntrustShelfService
;
import
com.fzm.common.valid.InsertGroup
;
import
com.fzm.common.valid.UpdateGroup
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
/**
* @author tangtuo
* @date 2022/1/11 17:19
*/
@Authentication
@RestController
@RequestMapping
(
"/entrust/shelf"
)
@Api
(
tags
=
"委托上架"
)
public
class
EntrustShelfController
{
@Resource
private
EntrustShelfService
entrustShelfService
;
@GetMapping
(
"/page"
)
@ApiOperation
(
value
=
"分页查询"
)
public
ResponseModel
<
PageInfo
<
EntrustShelf
>>
page
(
@ApiParam
(
value
=
"页码"
,
required
=
true
)
@RequestParam
Integer
pageNum
,
@ApiParam
(
value
=
"每页记录数"
,
required
=
true
)
@RequestParam
Integer
pageSize
,
@ApiParam
(
value
=
"手机号"
)
@RequestParam
(
required
=
false
)
String
telephone
,
@ApiParam
(
value
=
"用户姓名"
)
@RequestParam
(
required
=
false
)
String
name
,
@ApiParam
(
value
=
"审核开始日期 yyyy-MM-dd"
)
@RequestParam
(
required
=
false
)
String
from
,
@ApiParam
(
value
=
"审核截止日期 yyyy-MM-dd"
)
@RequestParam
(
required
=
false
)
String
to
)
{
PageInfo
<
EntrustShelf
>
pageInfo
=
entrustShelfService
.
getPages
(
pageNum
,
pageSize
,
telephone
,
name
,
from
,
to
);
return
ResponseModel
.
success
(
pageInfo
);
}
}
joying-common/src/main/java/com/fzm/common/entity/vo/CollectionNftVo.java
View file @
a7b4dc77
...
@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
/**
* @author tangtuo
* @author tangtuo
* @date 2021/7/1 17:54
* @date 2021/7/1 17:54
...
@@ -38,6 +40,12 @@ public class CollectionNftVo {
...
@@ -38,6 +40,12 @@ public class CollectionNftVo {
@ApiModelProperty
(
"是否是纪念版nft 0-否 1-是"
)
@ApiModelProperty
(
"是否是纪念版nft 0-否 1-是"
)
private
Integer
isCommemorate
;
private
Integer
isCommemorate
;
@ApiModelProperty
(
"nft发行时间"
)
private
Date
publishTime
;
@ApiModelProperty
(
"是否已委托上架 0-否 1-是"
)
private
Integer
isEntrust
;
public
CollectionNftVo
(
Nft
nft
,
Category
category
)
{
public
CollectionNftVo
(
Nft
nft
,
Category
category
)
{
this
.
id
=
nft
.
getId
();
this
.
id
=
nft
.
getId
();
this
.
nftId
=
nft
.
getNftId
();
this
.
nftId
=
nft
.
getNftId
();
...
@@ -46,5 +54,7 @@ public class CollectionNftVo {
...
@@ -46,5 +54,7 @@ public class CollectionNftVo {
this
.
cover
=
nft
.
getCover
();
this
.
cover
=
nft
.
getCover
();
this
.
isCommemorate
=
nft
.
getIsCommemorate
();
this
.
isCommemorate
=
nft
.
getIsCommemorate
();
this
.
fileUrl
=
nft
.
getFileUrl
();
this
.
fileUrl
=
nft
.
getFileUrl
();
this
.
publishTime
=
nft
.
getPublishTime
();
this
.
isEntrust
=
nft
.
getIsEntrust
();
}
}
}
}
joying-common/src/main/java/com/fzm/common/mapper/EntrustShelfMapper.java
View file @
a7b4dc77
package
com
.
fzm
.
common
.
mapper
;
package
com
.
fzm
.
common
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.fzm.common.entity.AuthPerson
;
import
com.fzm.common.entity.EntrustShelf
;
import
com.fzm.common.entity.EntrustShelf
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
joying-common/src/main/java/com/fzm/common/service/EntrustShelfService.java
View file @
a7b4dc77
...
@@ -3,6 +3,7 @@ package com.fzm.common.service;
...
@@ -3,6 +3,7 @@ package com.fzm.common.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.fzm.common.entity.AuthPerson
;
import
com.fzm.common.entity.AuthPerson
;
import
com.fzm.common.entity.EntrustShelf
;
import
com.fzm.common.entity.EntrustShelf
;
import
com.github.pagehelper.PageInfo
;
/**
/**
* @author tangtuo
* @author tangtuo
...
@@ -25,4 +26,17 @@ public interface EntrustShelfService extends IService<EntrustShelf> {
...
@@ -25,4 +26,17 @@ public interface EntrustShelfService extends IService<EntrustShelf> {
* @return
* @return
*/
*/
Boolean
cancel
(
Integer
id
);
Boolean
cancel
(
Integer
id
);
/**
* 分页查询
*
* @param pageNum
* @param pageSize
* @param telephone
* @param name
* @param from
* @param to
* @return
*/
PageInfo
<
EntrustShelf
>
getPages
(
Integer
pageNum
,
Integer
pageSize
,
String
telephone
,
String
name
,
String
from
,
String
to
);
}
}
joying-common/src/main/java/com/fzm/common/service/impl/EntrustShelfServiceImpl.java
View file @
a7b4dc77
package
com
.
fzm
.
common
.
service
.
impl
;
package
com
.
fzm
.
common
.
service
.
impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.fzm.common.constant.SystemConstant
;
import
com.fzm.common.constant.SystemConstant
;
import
com.fzm.common.entity.EntrustShelf
;
import
com.fzm.common.entity.EntrustShelf
;
...
@@ -9,6 +11,9 @@ import com.fzm.common.mapper.EntrustShelfMapper;
...
@@ -9,6 +11,9 @@ import com.fzm.common.mapper.EntrustShelfMapper;
import
com.fzm.common.service.EntrustShelfService
;
import
com.fzm.common.service.EntrustShelfService
;
import
com.fzm.common.service.NftService
;
import
com.fzm.common.service.NftService
;
import
com.fzm.common.utils.JwtUtil
;
import
com.fzm.common.utils.JwtUtil
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -30,6 +35,7 @@ public class EntrustShelfServiceImpl extends ServiceImpl<EntrustShelfMapper, Ent
...
@@ -30,6 +35,7 @@ public class EntrustShelfServiceImpl extends ServiceImpl<EntrustShelfMapper, Ent
@Resource
@Resource
private
NftService
nftService
;
private
NftService
nftService
;
@Override
@Override
public
Boolean
submit
(
EntrustShelf
entrustShelf
)
{
public
Boolean
submit
(
EntrustShelf
entrustShelf
)
{
// 修改当前nft的是否已申请的状态为是
// 修改当前nft的是否已申请的状态为是
...
@@ -59,4 +65,25 @@ public class EntrustShelfServiceImpl extends ServiceImpl<EntrustShelfMapper, Ent
...
@@ -59,4 +65,25 @@ public class EntrustShelfServiceImpl extends ServiceImpl<EntrustShelfMapper, Ent
entrustShelf
.
setStatus
(
SystemConstant
.
BOOLEAN_DATA_TRUE
);
entrustShelf
.
setStatus
(
SystemConstant
.
BOOLEAN_DATA_TRUE
);
return
this
.
updateById
(
entrustShelf
);
return
this
.
updateById
(
entrustShelf
);
}
}
@Override
public
PageInfo
<
EntrustShelf
>
getPages
(
Integer
pageNum
,
Integer
pageSize
,
String
telephone
,
String
name
,
String
from
,
String
to
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
QueryWrapper
<
EntrustShelf
>
queryWrapper
=
new
QueryWrapper
<>();
if
(
StringUtils
.
isNotBlank
(
name
))
{
queryWrapper
.
eq
(
"name"
,
name
);
}
if
(
StringUtils
.
isNotBlank
(
telephone
))
{
queryWrapper
.
eq
(
"telephone"
,
telephone
);
}
if
(
StringUtils
.
isNotBlank
(
from
))
{
queryWrapper
.
ge
(
"create_date"
,
DateUtil
.
parse
(
from
+
" 00:00:00"
,
"yyyy-MM-dd HH:mm:ss"
));
}
if
(
StringUtils
.
isNotBlank
(
to
))
{
queryWrapper
.
le
(
"create_date"
,
DateUtil
.
parse
(
to
+
" 23:59:59"
,
"yyyy-MM-dd HH:mm:ss"
));
}
return
new
PageInfo
<>(
this
.
list
(
queryWrapper
));
}
}
}
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