From 66deba2d9f8b8c377348f1455f8459d8e2159fa3 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 03 Jun 2020 15:19:44 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/chonggaoxiao/new_excoin
---
src/main/java/com/xcong/excoin/modules/platform/service/PlatformNoticeService.java | 11 +++++
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformBannerServiceImpl.java | 6 +-
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformNoticeDao.java | 8 ++++
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformNoticeEntity.java | 35 +++++++++++++++++
src/main/java/com/xcong/excoin/modules/platform/service/PlatformBannerService.java | 2
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformNoticeServiceImpl.java | 30 +++++++++++++++
src/main/java/com/xcong/excoin/modules/platform/controller/PlatformController.java | 21 ++++++++++
7 files changed, 109 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/platform/controller/PlatformController.java b/src/main/java/com/xcong/excoin/modules/platform/controller/PlatformController.java
index 767c49f..ccd9d98 100644
--- a/src/main/java/com/xcong/excoin/modules/platform/controller/PlatformController.java
+++ b/src/main/java/com/xcong/excoin/modules/platform/controller/PlatformController.java
@@ -8,6 +8,8 @@
import org.springframework.web.bind.annotation.RestController;
import com.xcong.excoin.common.response.Result;
+import com.xcong.excoin.modules.platform.service.PlatformBannerService;
+import com.xcong.excoin.modules.platform.service.PlatformNoticeService;
import com.xcong.excoin.modules.platform.service.PlatformCnyUsdtExchangeService;
import com.xcong.excoin.modules.platform.service.PlatformPaymentMethodService;
@@ -27,6 +29,13 @@
@Resource
PlatformPaymentMethodService platformPaymentMethodService;
+ @Resource
+ PlatformBannerService platformBannerService;
+
+ @Resource
+ PlatformNoticeService PlatformNoticeService;
+
+
@ApiOperation(value = "findUsdtCnyExchange", notes = "Cny|Usdt兑换")
@GetMapping(value = "/findUsdtCnyExchange")
public Result findUsdtCnyExchange(@ApiParam(name = "type", value = "类型", type="string", required=true) @RequestParam("type") String type) {
@@ -40,4 +49,16 @@
return platformPaymentMethodService.findAll();
}
+ @ApiOperation(value = "首页轮播图", notes = "首页轮播图")
+ @GetMapping(value = "/findPlatformBannerList")
+ public Result findPlatformBannerList() {
+ return platformBannerService.findAll();
+ }
+
+ @ApiOperation(value = "首页公告查询", notes = "首页公告查询")
+ @GetMapping(value = "/findPlatformNoticeList")
+ public Result findPlatformNoticeList() {
+ return PlatformNoticeService.findPlatformNoticeList();
+ }
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/platform/dao/PlatformNoticeDao.java b/src/main/java/com/xcong/excoin/modules/platform/dao/PlatformNoticeDao.java
new file mode 100644
index 0000000..5625867
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/platform/dao/PlatformNoticeDao.java
@@ -0,0 +1,8 @@
+package com.xcong.excoin.modules.platform.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xcong.excoin.modules.platform.entity.PlatformNoticeEntity;
+
+public interface PlatformNoticeDao extends BaseMapper<PlatformNoticeEntity> {
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/platform/entity/PlatformNoticeEntity.java b/src/main/java/com/xcong/excoin/modules/platform/entity/PlatformNoticeEntity.java
new file mode 100644
index 0000000..af6308d
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/platform/entity/PlatformNoticeEntity.java
@@ -0,0 +1,35 @@
+package com.xcong.excoin.modules.platform.entity;
+
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+
+@Data
+@TableName("platform_notice")
+public class PlatformNoticeEntity{
+
+ @TableId(value = "id",type = IdType.AUTO)
+ private Long id;
+ /**
+ * 标题
+ */
+ private String title;
+
+ /**
+ * 类别
+ */
+ private Integer categoryid;
+
+ private String categoryname;
+ private String source;
+ private String content;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date createTime;
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/platform/service/PlatformBannerService.java b/src/main/java/com/xcong/excoin/modules/platform/service/PlatformBannerService.java
index 370e0f7..51d6428 100644
--- a/src/main/java/com/xcong/excoin/modules/platform/service/PlatformBannerService.java
+++ b/src/main/java/com/xcong/excoin/modules/platform/service/PlatformBannerService.java
@@ -7,5 +7,5 @@
public interface PlatformBannerService extends IService<PlatformBannerEntity> {
public Result findAll();
-
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/platform/service/PlatformNoticeService.java b/src/main/java/com/xcong/excoin/modules/platform/service/PlatformNoticeService.java
new file mode 100644
index 0000000..ad6f68b
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/platform/service/PlatformNoticeService.java
@@ -0,0 +1,11 @@
+package com.xcong.excoin.modules.platform.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.xcong.excoin.common.response.Result;
+import com.xcong.excoin.modules.platform.entity.PlatformNoticeEntity;
+
+public interface PlatformNoticeService extends IService<PlatformNoticeEntity> {
+
+ Result findPlatformNoticeList();
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformBannerServiceImpl.java b/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformBannerServiceImpl.java
index 73b67b4..a6e0c72 100644
--- a/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformBannerServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformBannerServiceImpl.java
@@ -18,12 +18,12 @@
@Service
public class PlatformBannerServiceImpl extends ServiceImpl<PlatformBannerDao, PlatformBannerEntity> implements PlatformBannerService{
@Resource
- PlatformPaymentMethodDao platformPaymentMethodDao;
+ PlatformBannerDao platformBannerDao;
@Override
public Result findAll() {
- QueryWrapper<PlatformPaymentMethodEntity> queryWrapper = new QueryWrapper<>();
- List<PlatformPaymentMethodEntity> paymentMethodList = platformPaymentMethodDao.selectList(queryWrapper);
+ QueryWrapper<PlatformBannerEntity> queryWrapper = new QueryWrapper<>();
+ List<PlatformBannerEntity> paymentMethodList = platformBannerDao.selectList(queryWrapper);
return Result.ok(paymentMethodList);
}
diff --git a/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformNoticeServiceImpl.java b/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformNoticeServiceImpl.java
new file mode 100644
index 0000000..f29495b
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformNoticeServiceImpl.java
@@ -0,0 +1,30 @@
+package com.xcong.excoin.modules.platform.service.impl;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xcong.excoin.common.response.Result;
+import com.xcong.excoin.modules.platform.dao.PlatformNoticeDao;
+import com.xcong.excoin.modules.platform.entity.PlatformNoticeEntity;
+import com.xcong.excoin.modules.platform.entity.PlatformPaymentMethodEntity;
+import com.xcong.excoin.modules.platform.service.PlatformNoticeService;
+
+@Service
+public class PlatformNoticeServiceImpl extends ServiceImpl<PlatformNoticeDao, PlatformNoticeEntity> implements PlatformNoticeService {
+
+ @Resource
+ PlatformNoticeDao platformNoticeDao;
+
+ @Override
+ public Result findPlatformNoticeList() {
+ QueryWrapper<PlatformNoticeEntity> queryWrapper = new QueryWrapper<>();
+ List<PlatformNoticeEntity> paymentMethodList = platformNoticeDao.selectList(queryWrapper);
+ return Result.ok(paymentMethodList);
+ }
+
+}
--
Gitblit v1.9.1