xiaoyong931011
2020-06-03 d26eb4f2156a11335459f11cd72bc6924842f4d2
20200603 代码提交
4 files added
3 files modified
113 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/platform/controller/PlatformController.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformNoticeDao.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformNoticeEntity.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/PlatformBannerService.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/PlatformNoticeService.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformBannerServiceImpl.java 6 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformNoticeServiceImpl.java 30 ●●●●● patch | view | raw | blame | history
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 = "findPlatformBannerList", notes = "首页轮播图")
    @GetMapping(value = "/findPlatformBannerList")
    public Result findPlatformBannerList() {
        return platformBannerService.findAll();
    }
    @ApiOperation(value = "findPlatformNoticeList", notes = "首页公告查询")
    @GetMapping(value = "/findPlatformNoticeList")
    public Result findPlatformNoticeList() {
        return PlatformNoticeService.findPlatformNoticeList();
    }
}
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformNoticeDao.java
New file
@@ -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> {
}
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformNoticeEntity.java
New file
@@ -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;
}
src/main/java/com/xcong/excoin/modules/platform/service/PlatformBannerService.java
@@ -7,5 +7,5 @@
public interface PlatformBannerService extends IService<PlatformBannerEntity> {
    public Result findAll();
}
src/main/java/com/xcong/excoin/modules/platform/service/PlatformNoticeService.java
New file
@@ -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();
}
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);
    }
    
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformNoticeServiceImpl.java
New file
@@ -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);
    }
}