Commit 057c13d9 authored by tangtuo's avatar tangtuo

后台管理系统开发

parent 99b46bc1
package com.fzm.admin;
import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
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 static void main(String[] args) {
......
......@@ -30,14 +30,14 @@ public class NftController {
@ApiOperation(value = "查询nft列表")
public ResponseModel<PageInfo<NftListVo>> list(@ApiParam(value = "页码", required = true) @RequestParam Integer pageNum,
@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 theme,
@ApiParam(value = "注册手机号") @RequestParam(required = false) String telephone,
@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 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);
}
......
......@@ -26,7 +26,8 @@ import java.util.List;
@RestController
@RequestMapping("/admin")
@Api(tags = "用户管理")
public class UserController {
public class
UserController {
@Resource
private UserService userService;
......
server:
port: 8002
port: 9002
spring:
main:
allow-bean-definition-overriding: true
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
password: Joying@123456
platform: mysql
......@@ -30,6 +30,7 @@ spring:
host: 172.16.101.135
port: 6379
password: 123456
database: 2
lettuce:
pool:
# 连接池最大连接数(使用负值表示没有限制) 默认 8
......@@ -44,11 +45,10 @@ spring:
# 整合SpringCache,redis作为缓存类型
type: redis
redis:
# 缓存失效时间
time-to-live: 86400000
swagger:
title: 乐映影视后台管理系统
description: 乐映影视后台管理系统RESTFUL API
title: 追新艺术品后台管理系统
description: 追新艺术品后台管理系统RESTFUL API
version: 1.0.0
base-package: com.fzm.admin.controller
base-path: /**
......@@ -63,6 +63,13 @@ swagger:
name: tangtuo
email: ttuo@33.com
aliyun:
oss:
app-key: LTAI5tHGn7cVJdEtihTFLSeB
app-secret: XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point: oss-cn-beijing.aliyuncs.com
bucket: test-zhuixin
chain:
para:
rpc-url: http://172.16.101.133:8801
......@@ -71,14 +78,5 @@ chain:
title: user.p.joying.
admin: 16naUoLwjNUgMhGVRmL3xTVpCso2DJp8JZ
admin-key: 8cd19e9bf39055f95e3e33cc1e08b9f9fc2e9be48a5b3a4d401e64041c97aec7
contract-name: user.evm.0xd996a3a866c577596df260844a045a068ec5accd8d71ccaa3d578c9617ec5490
contract-address: 1iDWTHZQxPES4hLveZRcwJH6AMaMfZfZZ
aliyun:
oss:
app-key: LTAI5tHGn7cVJdEtihTFLSeB
app-secret: XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point: oss-cn-hangzhou.aliyuncs.com
simple-bucket: test-nft
encrypt-bucket: test-nft-2
contract-name: user.evm.0x72ab91df57d70ddca74c219fee29a4e08632bb7b1109c1627fc11173961b180c
contract-address: 1ErrPnk5mocNL5k87Yx66ihqmprc8avjPJ
\ No newline at end of file
server:
port: 8002
port: 9002
spring:
main:
allow-bean-definition-overriding: true
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
password: Joying@123456
platform: mysql
......@@ -26,11 +26,11 @@ spring:
filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
redis:
host: 172.16.101.135
port: 6379
password: 123456
database: 2
lettuce:
pool:
# 连接池最大连接数(使用负值表示没有限制) 默认 8
......@@ -45,12 +45,10 @@ spring:
# 整合SpringCache,redis作为缓存类型
type: redis
redis:
# 缓存失效时间
time-to-live: 86400000
swagger:
title: 乐映影视乐映影视后台管理系统
description: 乐映影视后台管理系统RESTFUL API
title: 追新艺术品后台管理系统
description: 追新艺术品后台管理系统RESTFUL API
version: 1.0.0
base-package: com.fzm.admin.controller
base-path: /**
......@@ -65,6 +63,13 @@ swagger:
name: tangtuo
email: ttuo@33.com
aliyun:
oss:
app-key: LTAI5tHGn7cVJdEtihTFLSeB
app-secret: XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point: oss-cn-beijing.aliyuncs.com
bucket: test-zhuixin
chain:
para:
rpc-url: http://172.16.101.133:8801
......@@ -73,14 +78,5 @@ chain:
title: user.p.joying.
admin: 16naUoLwjNUgMhGVRmL3xTVpCso2DJp8JZ
admin-key: 8cd19e9bf39055f95e3e33cc1e08b9f9fc2e9be48a5b3a4d401e64041c97aec7
contract-name: user.evm.0xd996a3a866c577596df260844a045a068ec5accd8d71ccaa3d578c9617ec5490
contract-address: 1iDWTHZQxPES4hLveZRcwJH6AMaMfZfZZ
aliyun:
oss:
app-key: LTAI5tHGn7cVJdEtihTFLSeB
app-secret: XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point: oss-cn-hangzhou.aliyuncs.com
simple-bucket: test-nft
encrypt-bucket: test-nft-2
contract-name: user.evm.0x72ab91df57d70ddca74c219fee29a4e08632bb7b1109c1627fc11173961b180c
contract-address: 1ErrPnk5mocNL5k87Yx66ihqmprc8avjPJ
\ No newline at end of file
......@@ -47,8 +47,8 @@ spring:
# 缓存失效时间
time-to-live: 86400000
swagger:
title: 乐映影视乐映影视后台管理系统
description: 乐映影视后台管理系统RESTFUL API
title: 追新艺术品后台管理系统
description: 追新艺术品后台管理系统RESTFUL API
version: 1.0.0
base-package: com.fzm.admin.controller
base-path: /**
......
......@@ -2,7 +2,7 @@ spring:
profiles:
active: local
application:
name: ly-admin
name: art-admin
jackson:
time-zone: GMT+8
......
......@@ -18,11 +18,11 @@ public class NftListVo {
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("类别")
@ApiModelProperty("一级类目")
private String category;
@ApiModelProperty("主题,多个用逗号,隔开")
private String theme;
@ApiModelProperty("二级类目")
private String secondCategory;
@ApiModelProperty("发行人账号")
private String publisherAccount;
......@@ -30,6 +30,9 @@ public class NftListVo {
@ApiModelProperty("发行人昵称")
private String publisherNickname;
@ApiModelProperty("绑定溯源码")
private String traceCode;
@ApiModelProperty("nft发行时间")
private Date publishTime;
......
......@@ -29,6 +29,9 @@ public class UserListVo {
@ApiModelProperty("已发行nft数")
private Integer publishCount;
@ApiModelProperty("已绑定溯源码")
private Integer traceCodeCount = 0;
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("注册日期")
private Date registerDate;
......
......@@ -21,11 +21,8 @@ public class UserStatisticVo {
@ApiModelProperty("已发行nft用户数")
private Integer publishUserCount;
@ApiModelProperty("个人实名数")
private Integer personAuthCount;
@ApiModelProperty("企业实名数")
private Integer enterpriseAuthCount;
@ApiModelProperty("绑定溯源码数")
private Integer traceCodeCount;
}
......@@ -42,7 +42,7 @@ public interface NftMapper extends BaseMapper<Nft> {
* @param endDate
* @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);
......
......@@ -66,14 +66,13 @@ public interface NftService extends IService<Nft> {
* @param pageSize
* @param categoryId
* @param name
* @param theme
* @param telephone
* @param status
* @param start
* @param end
* @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
}
@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);
DateTime startDate = null;
DateTime endDate = null;
......@@ -306,7 +306,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
if (StringUtils.isNotBlank(end)) {
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);
}
......
......@@ -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();
statisticVo.setAuthUserCount((int) authUserCount);
// 个人实名用户数
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);
statisticVo.setTraceCodeCount(0);
return statisticVo;
}
......
......@@ -31,18 +31,19 @@
SELECT
n.id,
n.`name`,
n.theme,
n.`status`,
n.is_top,
n.cover,
n.publish_time,
u.nickname AS publisherNickname,
u.telephone AS publisherAccount,
c.category_name AS category
c.text AS category,
d.text AS secondCategory
FROM
tb_nft n
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 d ON n.second_category_id = d.id
<where>
<if test="name != null and name != ''">
and n.name like concat ('%',#{name},'%')
......@@ -50,8 +51,8 @@
<if test="categoryId != null">
and n.category_id = #{categoryId}
</if>
<if test="categoryId != null">
and n.category_id = #{categoryId}
<if test="secondCategoryId != null">
and n.second_category_id = #{secondCategoryId}
</if>
<if test="status != null">
and n.status = #{status}
......
......@@ -48,8 +48,8 @@ spring:
time-to-live: 86400000
swagger:
title: 乐映影视门户系统
description: 乐映影视门户系统RESTFUL API
title: 追新艺术品门户系统
description: 追新艺术品门户系统RESTFUL API
version: 1.0.0
base-package: com.fzm.portal.controller
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