Commit 057c13d9 authored by tangtuo's avatar tangtuo

后台管理系统开发

parent 99b46bc1
package com.fzm.admin; package com.fzm.admin;
import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
@SpringBootApplication @EnableSwagger2Doc
@EnableCaching
@SpringBootApplication(scanBasePackages = {"com.fzm.admin", "com.fzm.common"})
@MapperScan(value = "com.fzm.common.mapper")
public class ArtAdminApplication { public class ArtAdminApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -30,14 +30,14 @@ public class NftController { ...@@ -30,14 +30,14 @@ public class NftController {
@ApiOperation(value = "查询nft列表") @ApiOperation(value = "查询nft列表")
public ResponseModel<PageInfo<NftListVo>> list(@ApiParam(value = "页码", required = true) @RequestParam Integer pageNum, public ResponseModel<PageInfo<NftListVo>> list(@ApiParam(value = "页码", required = true) @RequestParam Integer pageNum,
@ApiParam(value = "每页记录数", required = true) @RequestParam Integer pageSize, @ApiParam(value = "每页记录数", required = true) @RequestParam Integer pageSize,
@ApiParam(value = "类目id") @RequestParam(required = false) Integer categoryId, @ApiParam(value = "一级类目id") @RequestParam(required = false) Integer categoryId,
@ApiParam(value = "二级类目id") @RequestParam(required = false) Integer secondCategoryId,
@ApiParam(value = "作品名称") @RequestParam(required = false) String name, @ApiParam(value = "作品名称") @RequestParam(required = false) String name,
@ApiParam(value = "作品标签") @RequestParam(required = false) String theme,
@ApiParam(value = "注册手机号") @RequestParam(required = false) String telephone, @ApiParam(value = "注册手机号") @RequestParam(required = false) String telephone,
@ApiParam(value = "上架状态 0-未上架 1-已上架") @RequestParam(required = false) Integer status, @ApiParam(value = "上架状态 0-未上架 1-已上架") @RequestParam(required = false) Integer status,
@ApiParam(value = "创建开始日期,yyyy-MM-dd格式") @RequestParam(required = false) String start, @ApiParam(value = "创建开始日期,yyyy-MM-dd格式") @RequestParam(required = false) String start,
@ApiParam(value = "创建截止日期,yyyy-MM-dd格式") @RequestParam(required = false) String end) { @ApiParam(value = "创建截止日期,yyyy-MM-dd格式") @RequestParam(required = false) String end) {
PageInfo<NftListVo> page = nftService.page(pageNum, pageSize, categoryId, name, theme, telephone, status, start, end); PageInfo<NftListVo> page = nftService.page(pageNum, pageSize, categoryId,secondCategoryId, name, telephone, status, start, end);
return ResponseModel.success(page); return ResponseModel.success(page);
} }
......
...@@ -26,7 +26,8 @@ import java.util.List; ...@@ -26,7 +26,8 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/admin") @RequestMapping("/admin")
@Api(tags = "用户管理") @Api(tags = "用户管理")
public class UserController { public class
UserController {
@Resource @Resource
private UserService userService; private UserService userService;
......
server: server:
port: 8002 port: 9002
spring: spring:
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
datasource: datasource:
url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://172.16.101.135:3306/zhuixin-art?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root username: root
password: Joying@123456 password: Joying@123456
platform: mysql platform: mysql
...@@ -30,6 +30,7 @@ spring: ...@@ -30,6 +30,7 @@ spring:
host: 172.16.101.135 host: 172.16.101.135
port: 6379 port: 6379
password: 123456 password: 123456
database: 2
lettuce: lettuce:
pool: pool:
# 连接池最大连接数(使用负值表示没有限制) 默认 8 # 连接池最大连接数(使用负值表示没有限制) 默认 8
...@@ -44,11 +45,10 @@ spring: ...@@ -44,11 +45,10 @@ spring:
# 整合SpringCache,redis作为缓存类型 # 整合SpringCache,redis作为缓存类型
type: redis type: redis
redis: redis:
# 缓存失效时间
time-to-live: 86400000 time-to-live: 86400000
swagger: swagger:
title: 乐映影视后台管理系统 title: 追新艺术品后台管理系统
description: 乐映影视后台管理系统RESTFUL API description: 追新艺术品后台管理系统RESTFUL API
version: 1.0.0 version: 1.0.0
base-package: com.fzm.admin.controller base-package: com.fzm.admin.controller
base-path: /** base-path: /**
...@@ -63,6 +63,13 @@ swagger: ...@@ -63,6 +63,13 @@ swagger:
name: tangtuo name: tangtuo
email: ttuo@33.com email: ttuo@33.com
aliyun:
oss:
app-key: LTAI5tHGn7cVJdEtihTFLSeB
app-secret: XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point: oss-cn-beijing.aliyuncs.com
bucket: test-zhuixin
chain: chain:
para: para:
rpc-url: http://172.16.101.133:8801 rpc-url: http://172.16.101.133:8801
...@@ -71,14 +78,5 @@ chain: ...@@ -71,14 +78,5 @@ chain:
title: user.p.joying. title: user.p.joying.
admin: 16naUoLwjNUgMhGVRmL3xTVpCso2DJp8JZ admin: 16naUoLwjNUgMhGVRmL3xTVpCso2DJp8JZ
admin-key: 8cd19e9bf39055f95e3e33cc1e08b9f9fc2e9be48a5b3a4d401e64041c97aec7 admin-key: 8cd19e9bf39055f95e3e33cc1e08b9f9fc2e9be48a5b3a4d401e64041c97aec7
contract-name: user.evm.0xd996a3a866c577596df260844a045a068ec5accd8d71ccaa3d578c9617ec5490 contract-name: user.evm.0x72ab91df57d70ddca74c219fee29a4e08632bb7b1109c1627fc11173961b180c
contract-address: 1iDWTHZQxPES4hLveZRcwJH6AMaMfZfZZ contract-address: 1ErrPnk5mocNL5k87Yx66ihqmprc8avjPJ
\ No newline at end of file
aliyun:
oss:
app-key: LTAI5tHGn7cVJdEtihTFLSeB
app-secret: XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point: oss-cn-hangzhou.aliyuncs.com
simple-bucket: test-nft
encrypt-bucket: test-nft-2
server: server:
port: 8002 port: 9002
spring: spring:
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
datasource: datasource:
url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://172.16.101.135:3306/zhuixin-art?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root username: root
password: Joying@123456 password: Joying@123456
platform: mysql platform: mysql
...@@ -26,11 +26,11 @@ spring: ...@@ -26,11 +26,11 @@ spring:
filters: stat ,wall filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true useGlobalDataSourceStat: true
redis: redis:
host: 172.16.101.135 host: 172.16.101.135
port: 6379 port: 6379
password: 123456 password: 123456
database: 2
lettuce: lettuce:
pool: pool:
# 连接池最大连接数(使用负值表示没有限制) 默认 8 # 连接池最大连接数(使用负值表示没有限制) 默认 8
...@@ -45,12 +45,10 @@ spring: ...@@ -45,12 +45,10 @@ spring:
# 整合SpringCache,redis作为缓存类型 # 整合SpringCache,redis作为缓存类型
type: redis type: redis
redis: redis:
# 缓存失效时间
time-to-live: 86400000 time-to-live: 86400000
swagger: swagger:
title: 乐映影视乐映影视后台管理系统 title: 追新艺术品后台管理系统
description: 乐映影视后台管理系统RESTFUL API description: 追新艺术品后台管理系统RESTFUL API
version: 1.0.0 version: 1.0.0
base-package: com.fzm.admin.controller base-package: com.fzm.admin.controller
base-path: /** base-path: /**
...@@ -65,6 +63,13 @@ swagger: ...@@ -65,6 +63,13 @@ swagger:
name: tangtuo name: tangtuo
email: ttuo@33.com email: ttuo@33.com
aliyun:
oss:
app-key: LTAI5tHGn7cVJdEtihTFLSeB
app-secret: XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point: oss-cn-beijing.aliyuncs.com
bucket: test-zhuixin
chain: chain:
para: para:
rpc-url: http://172.16.101.133:8801 rpc-url: http://172.16.101.133:8801
...@@ -73,14 +78,5 @@ chain: ...@@ -73,14 +78,5 @@ chain:
title: user.p.joying. title: user.p.joying.
admin: 16naUoLwjNUgMhGVRmL3xTVpCso2DJp8JZ admin: 16naUoLwjNUgMhGVRmL3xTVpCso2DJp8JZ
admin-key: 8cd19e9bf39055f95e3e33cc1e08b9f9fc2e9be48a5b3a4d401e64041c97aec7 admin-key: 8cd19e9bf39055f95e3e33cc1e08b9f9fc2e9be48a5b3a4d401e64041c97aec7
contract-name: user.evm.0xd996a3a866c577596df260844a045a068ec5accd8d71ccaa3d578c9617ec5490 contract-name: user.evm.0x72ab91df57d70ddca74c219fee29a4e08632bb7b1109c1627fc11173961b180c
contract-address: 1iDWTHZQxPES4hLveZRcwJH6AMaMfZfZZ contract-address: 1ErrPnk5mocNL5k87Yx66ihqmprc8avjPJ
\ No newline at end of file
aliyun:
oss:
app-key: LTAI5tHGn7cVJdEtihTFLSeB
app-secret: XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point: oss-cn-hangzhou.aliyuncs.com
simple-bucket: test-nft
encrypt-bucket: test-nft-2
...@@ -47,8 +47,8 @@ spring: ...@@ -47,8 +47,8 @@ spring:
# 缓存失效时间 # 缓存失效时间
time-to-live: 86400000 time-to-live: 86400000
swagger: swagger:
title: 乐映影视乐映影视后台管理系统 title: 追新艺术品后台管理系统
description: 乐映影视后台管理系统RESTFUL API description: 追新艺术品后台管理系统RESTFUL API
version: 1.0.0 version: 1.0.0
base-package: com.fzm.admin.controller base-package: com.fzm.admin.controller
base-path: /** base-path: /**
......
...@@ -2,7 +2,7 @@ spring: ...@@ -2,7 +2,7 @@ spring:
profiles: profiles:
active: local active: local
application: application:
name: ly-admin name: art-admin
jackson: jackson:
time-zone: GMT+8 time-zone: GMT+8
......
...@@ -18,11 +18,11 @@ public class NftListVo { ...@@ -18,11 +18,11 @@ public class NftListVo {
@ApiModelProperty("名称") @ApiModelProperty("名称")
private String name; private String name;
@ApiModelProperty("类别") @ApiModelProperty("一级类目")
private String category; private String category;
@ApiModelProperty("主题,多个用逗号,隔开") @ApiModelProperty("二级类目")
private String theme; private String secondCategory;
@ApiModelProperty("发行人账号") @ApiModelProperty("发行人账号")
private String publisherAccount; private String publisherAccount;
...@@ -30,6 +30,9 @@ public class NftListVo { ...@@ -30,6 +30,9 @@ public class NftListVo {
@ApiModelProperty("发行人昵称") @ApiModelProperty("发行人昵称")
private String publisherNickname; private String publisherNickname;
@ApiModelProperty("绑定溯源码")
private String traceCode;
@ApiModelProperty("nft发行时间") @ApiModelProperty("nft发行时间")
private Date publishTime; private Date publishTime;
......
...@@ -29,6 +29,9 @@ public class UserListVo { ...@@ -29,6 +29,9 @@ public class UserListVo {
@ApiModelProperty("已发行nft数") @ApiModelProperty("已发行nft数")
private Integer publishCount; private Integer publishCount;
@ApiModelProperty("已绑定溯源码")
private Integer traceCodeCount = 0;
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("注册日期") @ApiModelProperty("注册日期")
private Date registerDate; private Date registerDate;
......
...@@ -21,11 +21,8 @@ public class UserStatisticVo { ...@@ -21,11 +21,8 @@ public class UserStatisticVo {
@ApiModelProperty("已发行nft用户数") @ApiModelProperty("已发行nft用户数")
private Integer publishUserCount; private Integer publishUserCount;
@ApiModelProperty("个人实名数") @ApiModelProperty("绑定溯源码数")
private Integer personAuthCount; private Integer traceCodeCount;
@ApiModelProperty("企业实名数")
private Integer enterpriseAuthCount;
} }
...@@ -42,7 +42,7 @@ public interface NftMapper extends BaseMapper<Nft> { ...@@ -42,7 +42,7 @@ public interface NftMapper extends BaseMapper<Nft> {
* @param endDate * @param endDate
* @return * @return
*/ */
List<NftListVo> page(@Param("categoryId") Integer categoryId, @Param("name") String name, @Param("telephone") String telephone, @Param("theme") String theme, @Param("status") Integer status, @Param("startDate") DateTime startDate, @Param("endDate") DateTime endDate); List<NftListVo> page(@Param("categoryId") Integer categoryId, @Param("secondCategoryId") Integer secondCategoryId, @Param("name") String name, @Param("telephone") String telephone, @Param("status") Integer status, @Param("startDate") DateTime startDate, @Param("endDate") DateTime endDate);
List<CollectionNftVo> listCurrent(@Param("categoryId") Integer categoryId, @Param("userId") Integer userId); List<CollectionNftVo> listCurrent(@Param("categoryId") Integer categoryId, @Param("userId") Integer userId);
......
...@@ -66,14 +66,13 @@ public interface NftService extends IService<Nft> { ...@@ -66,14 +66,13 @@ public interface NftService extends IService<Nft> {
* @param pageSize * @param pageSize
* @param categoryId * @param categoryId
* @param name * @param name
* @param theme
* @param telephone * @param telephone
* @param status * @param status
* @param start * @param start
* @param end * @param end
* @return * @return
*/ */
PageInfo<NftListVo> page(Integer pageNum, Integer pageSize, Integer categoryId, String name, String theme, String telephone, Integer status, String start, String end); PageInfo<NftListVo> page(Integer pageNum, Integer pageSize, Integer categoryId, Integer secondCategoryId, String name, String telephone, Integer status, String start, String end);
/** /**
* 置顶 * 置顶
......
...@@ -296,7 +296,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe ...@@ -296,7 +296,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
} }
@Override @Override
public PageInfo<NftListVo> page(Integer pageNum, Integer pageSize, Integer categoryId, String name, String theme, String telephone, Integer status, String start, String end) { public PageInfo<NftListVo> page(Integer pageNum, Integer pageSize, Integer categoryId, Integer secondCategoryId, String name, String telephone, Integer status, String start, String end) {
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
DateTime startDate = null; DateTime startDate = null;
DateTime endDate = null; DateTime endDate = null;
...@@ -306,7 +306,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe ...@@ -306,7 +306,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
if (StringUtils.isNotBlank(end)) { if (StringUtils.isNotBlank(end)) {
endDate = DateUtil.parse(end + " 23:59:59", "yyyy-MM-dd HH:mm:ss"); endDate = DateUtil.parse(end + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
} }
List<NftListVo> list = nftMapper.page(categoryId, name, telephone, theme, status, startDate, endDate); List<NftListVo> list = nftMapper.page(categoryId,secondCategoryId, name, telephone, status, startDate, endDate);
return new PageInfo<>(list); return new PageInfo<>(list);
} }
......
...@@ -195,16 +195,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us ...@@ -195,16 +195,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
// 已实名用户数 // 已实名用户数
long authUserCount = list.stream().filter(user -> AuthStatusEnum.SUCCESS.getStatus().equals(user.getAuthStatus())).count(); long authUserCount = list.stream().filter(user -> AuthStatusEnum.SUCCESS.getStatus().equals(user.getAuthStatus())).count();
statisticVo.setAuthUserCount((int) authUserCount); statisticVo.setAuthUserCount((int) authUserCount);
// 个人实名用户数 statisticVo.setTraceCodeCount(0);
long personAuthCount = list.stream().
filter(user -> AuthTypeEnum.PERSON.getType().equals(user.getAuthType()) && AuthStatusEnum.SUCCESS.getStatus().equals(user.getAuthStatus())).
count();
statisticVo.setPersonAuthCount((int) personAuthCount);
// 企业实名用户数
long enterpriseAuthCount = list.stream().
filter(user -> AuthTypeEnum.ENTERPRISE.getType().equals(user.getAuthType()) && AuthStatusEnum.SUCCESS.getStatus().equals(user.getAuthStatus())).
count();
statisticVo.setEnterpriseAuthCount((int) enterpriseAuthCount);
return statisticVo; return statisticVo;
} }
......
...@@ -31,18 +31,19 @@ ...@@ -31,18 +31,19 @@
SELECT SELECT
n.id, n.id,
n.`name`, n.`name`,
n.theme,
n.`status`, n.`status`,
n.is_top, n.is_top,
n.cover, n.cover,
n.publish_time, n.publish_time,
u.nickname AS publisherNickname, u.nickname AS publisherNickname,
u.telephone AS publisherAccount, u.telephone AS publisherAccount,
c.category_name AS category c.text AS category,
d.text AS secondCategory
FROM FROM
tb_nft n tb_nft n
LEFT JOIN tb_user u ON n.publish_address = u.wallet LEFT JOIN tb_user u ON n.publish_address = u.wallet
LEFT JOIN tb_category c ON n.category_id = c.id LEFT JOIN tb_category c ON n.category_id = c.id
LEFT JOIN tb_category d ON n.second_category_id = d.id
<where> <where>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and n.name like concat ('%',#{name},'%') and n.name like concat ('%',#{name},'%')
...@@ -50,8 +51,8 @@ ...@@ -50,8 +51,8 @@
<if test="categoryId != null"> <if test="categoryId != null">
and n.category_id = #{categoryId} and n.category_id = #{categoryId}
</if> </if>
<if test="categoryId != null"> <if test="secondCategoryId != null">
and n.category_id = #{categoryId} and n.second_category_id = #{secondCategoryId}
</if> </if>
<if test="status != null"> <if test="status != null">
and n.status = #{status} and n.status = #{status}
......
...@@ -48,8 +48,8 @@ spring: ...@@ -48,8 +48,8 @@ spring:
time-to-live: 86400000 time-to-live: 86400000
swagger: swagger:
title: 乐映影视门户系统 title: 追新艺术品门户系统
description: 乐映影视门户系统RESTFUL API description: 追新艺术品门户系统RESTFUL API
version: 1.0.0 version: 1.0.0
base-package: com.fzm.portal.controller base-package: com.fzm.portal.controller
base-path: /** base-path: /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment