From bc489f2d0ac40d23260d961f7eb43634b8a69fea Mon Sep 17 00:00:00 2001 From: zainali5120 <512061637@qq.com> Date: Fri, 09 Oct 2020 17:44:04 +0800 Subject: [PATCH] 成交记录和帮助中心 --- src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterArticleDao.java | 8 src/main/java/com/xcong/excoin/modules/helpCenter/vo/NewNoticeInfoVo.java | 44 ++ src/main/java/com/xcong/excoin/modules/blackchain/service/EthUsdtContract.java | 1 src/main/java/com/xcong/excoin/modules/helpCenter/dto/ImportantNoticePageDto.java | 27 + src/main/java/com/xcong/excoin/modules/helpCenter/vo/NewNoticeTypeInfoVo.java | 19 + src/main/java/com/xcong/excoin/modules/helpCenter/vo/NoticeInfoVo.java | 43 ++ src/main/java/com/xcong/excoin/modules/coin/service/OrderCoinService.java | 1 src/main/java/com/xcong/excoin/modules/helpCenter/service/HelpCenterService.java | 33 + src/main/java/com/xcong/excoin/modules/helpCenter/dto/NoticePageDto.java | 31 + src/main/resources/mapper/helpCenter/HelpCenterNoticeDao.xml | 27 + src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java | 7 src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterTypeEntity.java | 35 ++ src/main/java/com/xcong/excoin/modules/helpCenter/dto/NewNoticeTypePageDto.java | 27 + src/main/java/com/xcong/excoin/modules/helpCenter/vo/ImportantNoticeVo.java | 44 ++ src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java | 326 +++++++++++++++++++ src/main/java/com/xcong/excoin/modules/helpCenter/dto/NewNoticePageDto.java | 27 + src/main/java/com/xcong/excoin/modules/coin/dao/OrderCoinDealDao.java | 3 src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml | 7 src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java | 2 src/main/java/com/xcong/excoin/modules/coin/controller/OrderCoinController.java | 17 src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterNoticeDao.java | 18 + src/main/java/com/xcong/excoin/modules/helpCenter/controller/HelpCenterController.java | 120 +++++++ src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterTypeDao.java | 15 src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterNoticeEntity.java | 51 +++ src/main/resources/mapper/helpCenter/HelpCenterTypeDao.xml | 14 src/main/java/com/xcong/excoin/modules/helpCenter/dto/NoticeInfoDto.java | 19 + src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterArticleEntity.java | 43 ++ 27 files changed, 1,002 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java b/src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java index dce5e35..004f851 100644 --- a/src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java +++ b/src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java @@ -53,6 +53,8 @@ .antMatchers("/api/member/getAppVersionInfo").permitAll() .antMatchers("/api/orderCoin/searchSymbolResultList").permitAll() .antMatchers("/api/orderCoin/findCollect").permitAll() + .antMatchers("/api/orderCoin/deal/list").permitAll() + .antMatchers("/api/helpCenter/**").permitAll() .antMatchers("/trade/**").permitAll() .anyRequest().authenticated() .and().apply(securityConfiguereAdapter()); diff --git a/src/main/java/com/xcong/excoin/modules/blackchain/service/EthUsdtContract.java b/src/main/java/com/xcong/excoin/modules/blackchain/service/EthUsdtContract.java index 1566e5c..891cc0b 100644 --- a/src/main/java/com/xcong/excoin/modules/blackchain/service/EthUsdtContract.java +++ b/src/main/java/com/xcong/excoin/modules/blackchain/service/EthUsdtContract.java @@ -301,7 +301,6 @@ public TransferEventResponse apply(Log log) { EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log); TransferEventResponse typedResponse = new TransferEventResponse(); - System.out.println(eventValues); if(eventValues!=null){ typedResponse.log = log; typedResponse.from = (String) eventValues.getIndexedValues().get(0).getValue(); diff --git a/src/main/java/com/xcong/excoin/modules/coin/controller/OrderCoinController.java b/src/main/java/com/xcong/excoin/modules/coin/controller/OrderCoinController.java index bea2599..2d42a21 100644 --- a/src/main/java/com/xcong/excoin/modules/coin/controller/OrderCoinController.java +++ b/src/main/java/com/xcong/excoin/modules/coin/controller/OrderCoinController.java @@ -9,11 +9,7 @@ import com.xcong.excoin.modules.coin.entity.OrderCoinsEntity; import com.xcong.excoin.modules.symbols.constants.SymbolsConstats; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.xcong.excoin.common.response.Result; import com.xcong.excoin.modules.coin.parameter.dto.CancelEntrustWalletCoinOrderDto; @@ -39,6 +35,7 @@ @Api(value = "币币交易接口", tags = "币币交易接口") @RestController @RequestMapping(value = "/api/orderCoin") +@CrossOrigin("*") public class OrderCoinController { @Resource @@ -178,4 +175,14 @@ return orderCoinService.searchSymbolResultList(); } + /** + * 获取币币交易历史订单信息 + * @return + */ + @ApiOperation(value = "获取币币交易历史订单信息", notes = "获取币币交易历史订单信息") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = OrderWalletCoinDealVo.class)}) + @GetMapping(value="/deal/list") + public Result findAllWalletCoinOrder() { + return orderCoinService.findAllWalletCoinOrder(); + } } diff --git a/src/main/java/com/xcong/excoin/modules/coin/dao/OrderCoinDealDao.java b/src/main/java/com/xcong/excoin/modules/coin/dao/OrderCoinDealDao.java index e38459d..20bb608 100644 --- a/src/main/java/com/xcong/excoin/modules/coin/dao/OrderCoinDealDao.java +++ b/src/main/java/com/xcong/excoin/modules/coin/dao/OrderCoinDealDao.java @@ -17,7 +17,8 @@ List<OrderCoinsDealEntity> selectAllWalletCoinOrder(@Param("memberId")Long memberId); List<OrderCoinsDealEntity> selectAllWalletCoinOrderBySymbol(@Param("memberId")Long memberId,@Param("symbol")String symbol); - + List<OrderCoinsDealEntity> selectAllCoinDealsOrderBySymbol(@Param("symbol")String symbol); + OrderCoinsDealEntity selectWalletCoinOrder(@Param("memberId")Long memberId,@Param("orderId")Long orderId); IPage<OrderCoinsDealEntity> findAllWalletCoinOrderInPage(Page<OrderCoinsDealEntity> page, diff --git a/src/main/java/com/xcong/excoin/modules/coin/service/OrderCoinService.java b/src/main/java/com/xcong/excoin/modules/coin/service/OrderCoinService.java index 51a199f..5be578b 100644 --- a/src/main/java/com/xcong/excoin/modules/coin/service/OrderCoinService.java +++ b/src/main/java/com/xcong/excoin/modules/coin/service/OrderCoinService.java @@ -36,6 +36,7 @@ public Result cancelEntrustWalletCoinOrder(String orderId); public Result findAllWalletCoinOrder(FindAllWalletCoinOrderDto findAllWalletCoinOrderDto); + public Result findAllWalletCoinOrder(); public Result findWalletCoinOrder(Long orderId); diff --git a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java index ce0de2c..2b836cf 100644 --- a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java @@ -8,6 +8,7 @@ import javax.annotation.Resource; import com.alibaba.fastjson.JSONObject; +import com.xcong.excoin.common.enumerates.CoinTypeEnum; import com.xcong.excoin.modules.blackchain.service.RocService; import com.xcong.excoin.modules.coin.mapper.OrderCoinsDealMapper; import com.xcong.excoin.modules.member.dao.MemberDao; @@ -713,6 +714,12 @@ } @Override + public Result findAllWalletCoinOrder() { + List<OrderCoinsDealEntity> orderCoinsDealEntities = orderCoinDealDao.selectAllCoinDealsOrderBySymbol(CoinTypeEnum.ROC.toString()); + return Result.ok(orderCoinsDealEntities); + } + + @Override public Result findWalletCoinOrder(Long orderId) { //获取用户ID Long memberId = LoginUserUtils.getAppLoginUser().getId(); diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/controller/HelpCenterController.java b/src/main/java/com/xcong/excoin/modules/helpCenter/controller/HelpCenterController.java new file mode 100644 index 0000000..aec4b19 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/controller/HelpCenterController.java @@ -0,0 +1,120 @@ +package com.xcong.excoin.modules.helpCenter.controller; + +import javax.annotation.Resource; +import javax.validation.Valid; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.xcong.excoin.common.response.Result; +import com.xcong.excoin.modules.helpCenter.dto.ImportantNoticePageDto; +import com.xcong.excoin.modules.helpCenter.dto.NewNoticePageDto; +import com.xcong.excoin.modules.helpCenter.dto.NewNoticeTypePageDto; +import com.xcong.excoin.modules.helpCenter.dto.NoticePageDto; +import com.xcong.excoin.modules.helpCenter.service.HelpCenterService; +import com.xcong.excoin.modules.helpCenter.vo.ImportantNoticeVo; +import com.xcong.excoin.modules.helpCenter.vo.NewNoticeInfoVo; +import com.xcong.excoin.modules.helpCenter.vo.NewNoticeTypeInfoVo; +import com.xcong.excoin.modules.helpCenter.vo.NoticeInfoVo; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import lombok.extern.slf4j.Slf4j; + +@RestController +@Slf4j +@RequestMapping(value = "/api/helpCenter") +@Api(value = "HelpCenterController", tags = "帮助中心") +public class HelpCenterController { + + @Resource + HelpCenterService helpCenterService; + + /** + * 公告类别列表 + */ + @ApiOperation(value="公告类别列表", notes="公告类别列表") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = NewNoticeTypeInfoVo.class)}) + @PostMapping(value = "/getNewNoticeTypeList") + public Result getNewNoticeTypeList(@RequestBody @Valid NewNoticeTypePageDto newNoticeTypePageDto) { + return helpCenterService.getNewNoticeTypeList(newNoticeTypePageDto); + } + + /** + * 公告列表 + */ + @ApiOperation(value="公告列表", notes="公告列表") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = NewNoticeInfoVo.class)}) + @PostMapping(value = "/getNoticeList") + public Result getNoticeList(@RequestBody @Valid NoticePageDto noticePageDto) { + return helpCenterService.getNoticeList(noticePageDto); + } + + /** + * 关于我们 + */ + @ApiOperation(value="关于我们", notes="关于我们") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = NoticeInfoVo.class)}) + @GetMapping(value = "/getAboutUs") + public Result getAboutUs() { + return helpCenterService.getAboutUs(); + } + + /** + * 用户协议 + */ + @ApiOperation(value="用户协议", notes="用户协议") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = NoticeInfoVo.class)}) + @GetMapping(value = "/getUserAgreement") + public Result getUserAgreement() { + return helpCenterService.getUserAgreement(); + } + + /** + * 首页轮播公告 + */ + @ApiOperation(value="首页轮播公告", notes="首页轮播公告") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = NewNoticeInfoVo.class)}) + @PostMapping(value = "/getFristNewNoticeList") + public Result getFristNewNoticeList(@RequestBody @Valid NewNoticePageDto newNoticePageDto) { + return helpCenterService.getFristNewNoticeList(newNoticePageDto); + } + + /** + * 最新公告 + */ + @ApiOperation(value="最新公告", notes="最新公告") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = NewNoticeInfoVo.class)}) + @PostMapping(value = "/getNewNoticeList") + public Result getNewNoticeList(@RequestBody @Valid NewNoticePageDto newNoticePageDto) { + return helpCenterService.getNewNoticeList(newNoticePageDto); + } + + /** + * 重要公告 + */ + @ApiOperation(value="重要公告", notes="重要公告") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = ImportantNoticeVo.class)}) + @PostMapping(value = "/getImportantNoticeList") + public Result getImportantNoticeList(@RequestBody @Valid ImportantNoticePageDto importantNoticePageDto) { + return helpCenterService.getImportantNoticeList(importantNoticePageDto); + } + + /** + * 公告详情 + */ + @ApiOperation(value="公告详情", notes="公告详情") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = NoticeInfoVo.class)}) + @GetMapping(value = "/getNoticeInfo") + public Result getNoticeInfo(@ApiParam(name = "Id", value = "ID", example = "1") @RequestParam(value = "Id", required = false) long Id) { + return helpCenterService.getNoticeInfo(Id); + } + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterArticleDao.java b/src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterArticleDao.java new file mode 100644 index 0000000..3be1228 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterArticleDao.java @@ -0,0 +1,8 @@ +package com.xcong.excoin.modules.helpCenter.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.xcong.excoin.modules.helpCenter.entity.HelpCenterArticleEntity; + +public interface HelpCenterArticleDao extends BaseMapper<HelpCenterArticleEntity> { + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterNoticeDao.java b/src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterNoticeDao.java new file mode 100644 index 0000000..951a2cb --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterNoticeDao.java @@ -0,0 +1,18 @@ +package com.xcong.excoin.modules.helpCenter.dao; + +import org.apache.ibatis.annotations.Param; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.xcong.excoin.modules.helpCenter.entity.HelpCenterNoticeEntity; + +public interface HelpCenterNoticeDao extends BaseMapper<HelpCenterNoticeEntity> { + + IPage<HelpCenterNoticeEntity> getNewNoticeList(Page<HelpCenterNoticeEntity> page, + @Param("record") HelpCenterNoticeEntity helpCenterNoticeEntity); + + IPage<HelpCenterNoticeEntity> getImportantNoticeList(Page<HelpCenterNoticeEntity> page, + @Param("record") HelpCenterNoticeEntity helpCenterNoticeEntity); + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterTypeDao.java b/src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterTypeDao.java new file mode 100644 index 0000000..1621c30 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/dao/HelpCenterTypeDao.java @@ -0,0 +1,15 @@ +package com.xcong.excoin.modules.helpCenter.dao; + +import org.apache.ibatis.annotations.Param; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.xcong.excoin.modules.helpCenter.entity.HelpCenterTypeEntity; + +public interface HelpCenterTypeDao extends BaseMapper<HelpCenterTypeEntity> { + + IPage<HelpCenterTypeEntity> getNoticeTypeList(Page<HelpCenterTypeEntity> page, + @Param("record") HelpCenterTypeEntity helpCenterTypeEntity); + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/dto/ImportantNoticePageDto.java b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/ImportantNoticePageDto.java new file mode 100644 index 0000000..4486b89 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/ImportantNoticePageDto.java @@ -0,0 +1,27 @@ +package com.xcong.excoin.modules.helpCenter.dto; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "ImportantNoticePageDto", description = "参数接受类") +public class ImportantNoticePageDto { + + @NotNull + @Min(1) + @ApiModelProperty(value = "第几页", example = "1") + private int pageNum; + + @NotNull + @ApiModelProperty(value = "每页数量", example = "10") + private int pageSize; + + @NotNull + @ApiModelProperty(value = "类型1:中文2:英文", example = "1") + private int type; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NewNoticePageDto.java b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NewNoticePageDto.java new file mode 100644 index 0000000..2a68785 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NewNoticePageDto.java @@ -0,0 +1,27 @@ +package com.xcong.excoin.modules.helpCenter.dto; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "NewNoticePageDto", description = "参数接受类") +public class NewNoticePageDto { + + @NotNull + @Min(1) + @ApiModelProperty(value = "第几页", example = "1") + private int pageNum; + + @NotNull + @ApiModelProperty(value = "每页数量", example = "10") + private int pageSize; + + @NotNull + @ApiModelProperty(value = "类型1:中文2:英文", example = "1") + private int type; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NewNoticeTypePageDto.java b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NewNoticeTypePageDto.java new file mode 100644 index 0000000..45eeffb --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NewNoticeTypePageDto.java @@ -0,0 +1,27 @@ +package com.xcong.excoin.modules.helpCenter.dto; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "NewNoticeTypePageDto", description = "参数接受类") +public class NewNoticeTypePageDto { + + @NotNull + @Min(1) + @ApiModelProperty(value = "第几页", example = "1") + private int pageNum; + + @NotNull + @ApiModelProperty(value = "每页数量", example = "10") + private int pageSize; + + @NotNull + @ApiModelProperty(value = "类型1:中文2:英文", example = "1") + private int type; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NoticeInfoDto.java b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NoticeInfoDto.java new file mode 100644 index 0000000..bdb87af --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NoticeInfoDto.java @@ -0,0 +1,19 @@ +package com.xcong.excoin.modules.helpCenter.dto; + +import javax.validation.constraints.NotNull; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +@Data +@ApiModel(value = "NoticeInfoDto", description = "参数接受类") +public class NoticeInfoDto { + + @NotNull + @ApiModelProperty(value = "文章id", example = "10") + private Long id; + + @NotNull + @ApiModelProperty(value = "类型1:中文2:英文", example = "1") + private int type; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NoticePageDto.java b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NoticePageDto.java new file mode 100644 index 0000000..940866e --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/dto/NoticePageDto.java @@ -0,0 +1,31 @@ +package com.xcong.excoin.modules.helpCenter.dto; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "NoticePageDto", description = "参数接受类") +public class NoticePageDto { + + @NotNull + @Min(1) + @ApiModelProperty(value = "第几页", example = "1") + private int pageNum; + + @NotNull + @ApiModelProperty(value = "每页数量", example = "10") + private int pageSize; + + @NotNull + @ApiModelProperty(value = "类型1:中文2:英文", example = "1") + private int type; + + @NotNull + @ApiModelProperty(value = "ID", example = "1") + private Long id; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterArticleEntity.java b/src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterArticleEntity.java new file mode 100644 index 0000000..43b32a2 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterArticleEntity.java @@ -0,0 +1,43 @@ +package com.xcong.excoin.modules.helpCenter.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("help_center_article") +public class HelpCenterArticleEntity { + + @TableId(value = "id",type = IdType.AUTO) + private Long id; + /** + * 创建者 + */ + private String createBy; + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + /** + * 语言类型(1:简体中文2:英文) + */ + private int typeLanguage; + /** + * 标题 + */ + private String title; + /** + * 内容 + */ + private String content; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterNoticeEntity.java b/src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterNoticeEntity.java new file mode 100644 index 0000000..533dd83 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterNoticeEntity.java @@ -0,0 +1,51 @@ +package com.xcong.excoin.modules.helpCenter.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("help_center_notice") +public class HelpCenterNoticeEntity { + + @TableId(value = "id",type = IdType.AUTO) + private Long id; + /** + * 创建者 + */ + private String createBy; + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + /** + * 所属类别(1:最新公告2:重要公告) + */ + private int articleNotice; + /** + * 文章id + */ + private Long articleId; + /** + *文章标题 + */ + private String articleTitle; + /** + * 文章id + */ + private Long articleIdUs; + /** + *文章标题 + */ + private String articleTitleUs; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterTypeEntity.java b/src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterTypeEntity.java new file mode 100644 index 0000000..95b74bb --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/entity/HelpCenterTypeEntity.java @@ -0,0 +1,35 @@ +package com.xcong.excoin.modules.helpCenter.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import lombok.Data; + +/** + * 帮助中心类别 + */ +@Data +@TableName("help_center_type") +public class HelpCenterTypeEntity { + + @TableId(value = "id",type = IdType.AUTO) + private Long id; + /** + * 所属类别(1:帮助中心类别2:...) + */ + private int status; + /** + * 类型标识 + */ + private int type; + /** + *类型内容 + */ + private String content; + /** + *类型内容 + */ + private String contentUs; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/service/HelpCenterService.java b/src/main/java/com/xcong/excoin/modules/helpCenter/service/HelpCenterService.java new file mode 100644 index 0000000..2bea0f7 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/service/HelpCenterService.java @@ -0,0 +1,33 @@ +package com.xcong.excoin.modules.helpCenter.service; + + +import javax.validation.Valid; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.xcong.excoin.common.response.Result; +import com.xcong.excoin.modules.helpCenter.dto.ImportantNoticePageDto; +import com.xcong.excoin.modules.helpCenter.dto.NewNoticePageDto; +import com.xcong.excoin.modules.helpCenter.dto.NewNoticeTypePageDto; +import com.xcong.excoin.modules.helpCenter.dto.NoticePageDto; +import com.xcong.excoin.modules.helpCenter.entity.HelpCenterNoticeEntity; + +public interface HelpCenterService extends IService<HelpCenterNoticeEntity> { + + Result getNewNoticeList(@Valid NewNoticePageDto newNoticePageDto); + + Result getImportantNoticeList(@Valid ImportantNoticePageDto importantNoticePageDto); + + Result getNoticeInfo(long id); + + Result getNewNoticeTypeList(@Valid NewNoticeTypePageDto newNoticeTypePageDto); + + Result getNoticeList(@Valid NoticePageDto noticePageDto); + + Result getAboutUs(); + + Result getUserAgreement(); + + Result getFristNewNoticeList(@Valid NewNoticePageDto newNoticePageDto); + + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java b/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java new file mode 100644 index 0000000..bf2b41b --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java @@ -0,0 +1,326 @@ +package com.xcong.excoin.modules.helpCenter.service.impl; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; +import javax.validation.Valid; + +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.xcong.excoin.common.response.Result; +import com.xcong.excoin.modules.helpCenter.dao.HelpCenterArticleDao; +import com.xcong.excoin.modules.helpCenter.dao.HelpCenterNoticeDao; +import com.xcong.excoin.modules.helpCenter.dao.HelpCenterTypeDao; +import com.xcong.excoin.modules.helpCenter.dto.ImportantNoticePageDto; +import com.xcong.excoin.modules.helpCenter.dto.NewNoticePageDto; +import com.xcong.excoin.modules.helpCenter.dto.NewNoticeTypePageDto; +import com.xcong.excoin.modules.helpCenter.dto.NoticePageDto; +import com.xcong.excoin.modules.helpCenter.entity.HelpCenterArticleEntity; +import com.xcong.excoin.modules.helpCenter.entity.HelpCenterNoticeEntity; +import com.xcong.excoin.modules.helpCenter.entity.HelpCenterTypeEntity; +import com.xcong.excoin.modules.helpCenter.service.HelpCenterService; +import com.xcong.excoin.modules.helpCenter.vo.ImportantNoticeVo; +import com.xcong.excoin.modules.helpCenter.vo.NewNoticeInfoVo; +import com.xcong.excoin.modules.helpCenter.vo.NewNoticeTypeInfoVo; +import com.xcong.excoin.modules.helpCenter.vo.NoticeInfoVo; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjectUtil; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class HelpCenterServiceImpl extends ServiceImpl<HelpCenterNoticeDao, HelpCenterNoticeEntity> implements HelpCenterService { + + @Resource + private HelpCenterArticleDao helpCenterArticleDao; + @Resource + private HelpCenterNoticeDao helpCenterNoticeDao; + @Resource + private HelpCenterTypeDao helpCenterTypeDao; + + @Override + public Result getNewNoticeList(@Valid NewNoticePageDto newNoticePageDto) { + + List<NewNoticeInfoVo> arrayList = new ArrayList<>(); + Page<HelpCenterNoticeEntity> page = new Page<>(newNoticePageDto.getPageNum(), newNoticePageDto.getPageSize()); + //获取【帮助中心公告】 + HelpCenterNoticeEntity helpCenterNoticeEntity = new HelpCenterNoticeEntity(); + IPage<HelpCenterNoticeEntity> HelpCenterNoticeEntitys = helpCenterNoticeDao.getNewNoticeList(page, helpCenterNoticeEntity); + List<HelpCenterNoticeEntity> records = HelpCenterNoticeEntitys.getRecords(); + if(CollUtil.isNotEmpty(records)) { + for(HelpCenterNoticeEntity helpCenterNotice : records) { + NewNoticeInfoVo newNoticeInfoVo = new NewNoticeInfoVo(); + Long id = helpCenterNotice.getId(); + newNoticeInfoVo.setId(id); + String createBy = helpCenterNotice.getCreateBy(); + newNoticeInfoVo.setCreateBy(createBy); + Date createTime = helpCenterNotice.getCreateTime(); + newNoticeInfoVo.setCreateTime(createTime); + int articleNotice = helpCenterNotice.getArticleNotice(); + newNoticeInfoVo.setArticleNotice(articleNotice); + + int type = newNoticePageDto.getType(); + if(type == 2) { + Long articleIdUs = helpCenterNotice.getArticleIdUs(); + newNoticeInfoVo.setArticleId(articleIdUs); + String articleTitleUs = helpCenterNotice.getArticleTitleUs(); + newNoticeInfoVo.setArticleTitle(articleTitleUs); + }else { + Long articleId = helpCenterNotice.getArticleId(); + newNoticeInfoVo.setArticleId(articleId); + String articleTitle = helpCenterNotice.getArticleTitle(); + newNoticeInfoVo.setArticleTitle(articleTitle); + } + arrayList.add(newNoticeInfoVo); + } + } + return Result.ok(arrayList); + } + + @Override + public Result getImportantNoticeList(@Valid ImportantNoticePageDto importantNoticePageDto) { + + List<ImportantNoticeVo> arrayList = new ArrayList<>(); + Page<HelpCenterNoticeEntity> page = new Page<>(importantNoticePageDto.getPageNum(), importantNoticePageDto.getPageSize()); + //获取【帮助中心公告】 + HelpCenterNoticeEntity helpCenterNoticeEntity = new HelpCenterNoticeEntity(); + IPage<HelpCenterNoticeEntity> HelpCenterNoticeEntitys = helpCenterNoticeDao.getImportantNoticeList(page, helpCenterNoticeEntity); + List<HelpCenterNoticeEntity> records = HelpCenterNoticeEntitys.getRecords(); + if(CollUtil.isNotEmpty(records)) { + for(HelpCenterNoticeEntity helpCenterNotice : records) { + ImportantNoticeVo noticeInfoVo = new ImportantNoticeVo(); + Long id = helpCenterNotice.getId(); + noticeInfoVo.setId(id); + String createBy = helpCenterNotice.getCreateBy(); + noticeInfoVo.setCreateBy(createBy); + Date createTime = helpCenterNotice.getCreateTime(); + noticeInfoVo.setCreateTime(createTime); + int articleNotice = helpCenterNotice.getArticleNotice(); + noticeInfoVo.setArticleNotice(articleNotice); + + int type = importantNoticePageDto.getType(); + if(type == 2) { + Long articleIdUs = helpCenterNotice.getArticleIdUs(); + noticeInfoVo.setArticleId(articleIdUs); + String articleTitleUs = helpCenterNotice.getArticleTitleUs(); + noticeInfoVo.setArticleTitle(articleTitleUs); + }else { + Long articleId = helpCenterNotice.getArticleId(); + noticeInfoVo.setArticleId(articleId); + String articleTitle = helpCenterNotice.getArticleTitle(); + noticeInfoVo.setArticleTitle(articleTitle); + } + arrayList.add(noticeInfoVo); + } + } + return Result.ok(arrayList); + } + + @Override + public Result getNoticeInfo(long id) { + + HelpCenterArticleEntity helpCenterArticleEntity = helpCenterArticleDao.selectById(id); + NoticeInfoVo noticeInfoVo = new NoticeInfoVo(); + if(ObjectUtil.isNotEmpty(helpCenterArticleEntity)) { + String content = helpCenterArticleEntity.getContent(); + noticeInfoVo.setContent(content); + String createBy = helpCenterArticleEntity.getCreateBy(); + noticeInfoVo.setCreateBy(createBy); + Date createTime = helpCenterArticleEntity.getCreateTime(); + noticeInfoVo.setCreateTime(createTime); + String title = helpCenterArticleEntity.getTitle(); + noticeInfoVo.setTitle(title); + int typeLanguage = helpCenterArticleEntity.getTypeLanguage(); + noticeInfoVo.setTypeLanguage(typeLanguage); + noticeInfoVo.setId(id); + } + return Result.ok(noticeInfoVo); + } + + @Override + public Result getNewNoticeTypeList(@Valid NewNoticeTypePageDto newNoticeTypePageDto) { + + List<NewNoticeTypeInfoVo> arrayList = new ArrayList<>(); + Page<HelpCenterTypeEntity> page = new Page<>(newNoticeTypePageDto.getPageNum(), newNoticeTypePageDto.getPageSize()); + //获取【类别】 + HelpCenterTypeEntity helpCenterTypeEntity = new HelpCenterTypeEntity(); + IPage<HelpCenterTypeEntity> helpCenterTypeEntitys = helpCenterTypeDao.getNoticeTypeList(page, helpCenterTypeEntity); + List<HelpCenterTypeEntity> records = helpCenterTypeEntitys.getRecords(); + if(CollUtil.isNotEmpty(records)) { + for(HelpCenterTypeEntity helpCenterType : records) { + NewNoticeTypeInfoVo noticeInfoVo = new NewNoticeTypeInfoVo(); + Long id = helpCenterType.getId(); + noticeInfoVo.setId(id); + int type = newNoticeTypePageDto.getType(); + if(type == 2) { + String contentUs = helpCenterType.getContentUs(); + noticeInfoVo.setContent(contentUs); + }else { + String content = helpCenterType.getContent(); + noticeInfoVo.setContent(content); + } + arrayList.add(noticeInfoVo); + } + } + return Result.ok(arrayList); + } + + @Override + public Result getNoticeList(@Valid NoticePageDto noticePageDto) { + + List<NewNoticeInfoVo> arrayList = new ArrayList<>(); + int noticeType = noticePageDto.getType(); + //获取【类别】数据 + Long id = noticePageDto.getId(); + HelpCenterTypeEntity helpCenterTypeEntity = helpCenterTypeDao.selectById(id); + if(ObjectUtil.isNotEmpty(helpCenterTypeEntity)) { + int type = helpCenterTypeEntity.getType(); + //获取对应的【帮助中心公告】 + Map<String, Object> columnMap = new HashMap<String, Object>(); + columnMap.put("article_notice", type); + List<HelpCenterNoticeEntity> helpCenterNoticeEntitys = helpCenterNoticeDao.selectByMap(columnMap); + if(CollUtil.isNotEmpty(helpCenterNoticeEntitys)) { + for(HelpCenterNoticeEntity helpCenterNoticeEntity : helpCenterNoticeEntitys) { + NewNoticeInfoVo newNoticeInfoVo = new NewNoticeInfoVo(); + Long noticeId = helpCenterNoticeEntity.getId(); + newNoticeInfoVo.setId(noticeId); + String createBy = helpCenterNoticeEntity.getCreateBy(); + newNoticeInfoVo.setCreateBy(createBy); + Date createTime = helpCenterNoticeEntity.getCreateTime(); + newNoticeInfoVo.setCreateTime(createTime); + if(noticeType == 2) { + Long articleIdUs = helpCenterNoticeEntity.getArticleIdUs(); + newNoticeInfoVo.setArticleId(articleIdUs); + String articleTitle = helpCenterNoticeEntity.getArticleTitleUs(); + newNoticeInfoVo.setArticleTitle(articleTitle); + }else { + Long articleId = helpCenterNoticeEntity.getArticleId(); + newNoticeInfoVo.setArticleId(articleId); + String articleTitle = helpCenterNoticeEntity.getArticleTitle(); + helpCenterNoticeEntity.getArticleTitle(); + newNoticeInfoVo.setArticleTitle(articleTitle); + } + arrayList.add(newNoticeInfoVo); + } + } + } + + return Result.ok(arrayList); + } + + @Override + public Result getAboutUs() { + NoticeInfoVo noticeInfoVo = new NoticeInfoVo(); + HelpCenterArticleEntity selectById = helpCenterArticleDao.selectById(27); + if(ObjectUtil.isNotEmpty(selectById)) { + String createBy = selectById.getCreateBy(); + noticeInfoVo.setCreateBy(createBy); + + String content = selectById.getContent(); + noticeInfoVo.setContent(content); + Date createTime = selectById.getCreateTime(); + noticeInfoVo.setCreateTime(createTime); + String title = selectById.getTitle(); + noticeInfoVo.setTitle(title); + int typeLanguage = selectById.getTypeLanguage(); + noticeInfoVo.setTypeLanguage(typeLanguage); + Long id = selectById.getId(); + noticeInfoVo.setId(id); + } + return Result.ok(noticeInfoVo); + } + + @Override + public Result getUserAgreement() { + NoticeInfoVo noticeInfoVo = new NoticeInfoVo(); + HelpCenterArticleEntity selectById = helpCenterArticleDao.selectById(29); + if(ObjectUtil.isNotEmpty(selectById)) { + String createBy = selectById.getCreateBy(); + noticeInfoVo.setCreateBy(createBy); + + String content = selectById.getContent(); + noticeInfoVo.setContent(content); + Date createTime = selectById.getCreateTime(); + noticeInfoVo.setCreateTime(createTime); + String title = selectById.getTitle(); + noticeInfoVo.setTitle(title); + int typeLanguage = selectById.getTypeLanguage(); + noticeInfoVo.setTypeLanguage(typeLanguage); + Long id = selectById.getId(); + noticeInfoVo.setId(id); + } + return Result.ok(noticeInfoVo); + } + + @Override + public Result getFristNewNoticeList(@Valid NewNoticePageDto newNoticePageDto) { + List<NewNoticeInfoVo> arrayList = new ArrayList<>(); + Page<HelpCenterNoticeEntity> page = new Page<>(1, 5); + //获取【帮助中心公告】 + HelpCenterNoticeEntity helpCenterNoticeEntity = new HelpCenterNoticeEntity(); + IPage<HelpCenterNoticeEntity> HelpCenterNoticeEntitys = helpCenterNoticeDao.getNewNoticeList(page, helpCenterNoticeEntity); + List<HelpCenterNoticeEntity> records = HelpCenterNoticeEntitys.getRecords(); + if(CollUtil.isNotEmpty(records)) { + for(HelpCenterNoticeEntity helpCenterNotice : records) { + NewNoticeInfoVo newNoticeInfoVo = new NewNoticeInfoVo(); + Long id = helpCenterNotice.getId(); + newNoticeInfoVo.setId(id); + String createBy = helpCenterNotice.getCreateBy(); + newNoticeInfoVo.setCreateBy(createBy); + Date createTime = helpCenterNotice.getCreateTime(); + newNoticeInfoVo.setCreateTime(createTime); + int articleNotice = helpCenterNotice.getArticleNotice(); + newNoticeInfoVo.setArticleNotice(articleNotice); + + int type = newNoticePageDto.getType(); + if(type == 2) { + Long articleIdUs = helpCenterNotice.getArticleIdUs(); + newNoticeInfoVo.setArticleId(articleIdUs); + String articleTitleUs = helpCenterNotice.getArticleTitleUs(); + newNoticeInfoVo.setArticleTitle(articleTitleUs); + }else { + Long articleId = helpCenterNotice.getArticleId(); + newNoticeInfoVo.setArticleId(articleId); + String articleTitle = helpCenterNotice.getArticleTitle(); + newNoticeInfoVo.setArticleTitle(articleTitle); + } + arrayList.add(newNoticeInfoVo); + } + } + return Result.ok(arrayList); + } + + + + + + + + + + + + + + + + + + + + + + + + + + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/vo/ImportantNoticeVo.java b/src/main/java/com/xcong/excoin/modules/helpCenter/vo/ImportantNoticeVo.java new file mode 100644 index 0000000..69c5f87 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/vo/ImportantNoticeVo.java @@ -0,0 +1,44 @@ +package com.xcong.excoin.modules.helpCenter.vo; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "ImportantNoticeVo", description = "参数返回类") +public class ImportantNoticeVo { + + @ApiModelProperty("ID") + private Long id; + /** + * 创建者 + */ + @ApiModelProperty("创建者") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + /** + * 所属类别(1:最新公告2:重要公告) + */ + @ApiModelProperty("所属类别(1:最新公告2:重要公告)") + private int articleNotice; + /** + * 文章id + */ + @ApiModelProperty("文章id") + private Long articleId; + /** + *文章标题 + */ + @ApiModelProperty("文章标题") + private String articleTitle; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/vo/NewNoticeInfoVo.java b/src/main/java/com/xcong/excoin/modules/helpCenter/vo/NewNoticeInfoVo.java new file mode 100644 index 0000000..df184cc --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/vo/NewNoticeInfoVo.java @@ -0,0 +1,44 @@ +package com.xcong.excoin.modules.helpCenter.vo; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "NewNoticeInfoVo", description = "参数返回类") +public class NewNoticeInfoVo { + + @ApiModelProperty("ID") + private Long id; + /** + * 创建者 + */ + @ApiModelProperty("创建者") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + /** + * 所属类别(1:最新公告2:重要公告) + */ + @ApiModelProperty("所属类别(1:最新公告2:重要公告)") + private int articleNotice; + /** + * 文章id + */ + @ApiModelProperty("文章id") + private Long articleId; + /** + *文章标题 + */ + @ApiModelProperty("文章标题") + private String articleTitle; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/vo/NewNoticeTypeInfoVo.java b/src/main/java/com/xcong/excoin/modules/helpCenter/vo/NewNoticeTypeInfoVo.java new file mode 100644 index 0000000..1c6afe3 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/vo/NewNoticeTypeInfoVo.java @@ -0,0 +1,19 @@ +package com.xcong.excoin.modules.helpCenter.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "NewNoticeTypeInfoVo", description = "参数返回类") +public class NewNoticeTypeInfoVo { + + @ApiModelProperty("ID") + private Long id; + /** + *类型内容 + */ + @ApiModelProperty("类型内容") + private String content; + +} diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/vo/NoticeInfoVo.java b/src/main/java/com/xcong/excoin/modules/helpCenter/vo/NoticeInfoVo.java new file mode 100644 index 0000000..1a72122 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/vo/NoticeInfoVo.java @@ -0,0 +1,43 @@ +package com.xcong.excoin.modules.helpCenter.vo; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +@Data +@ApiModel(value = "NoticeInfoVo", description = "参数返回类") +public class NoticeInfoVo { + + @ApiModelProperty("ID") + private Long id; + /** + * 创建者 + */ + @ApiModelProperty("创建者") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + /** + * 语言类型(1:简体中文2:英文) + */ + @ApiModelProperty("语言类型(1:简体中文2:英文)") + private int typeLanguage; + /** + * 标题 + */ + @ApiModelProperty("标题") + private String title; + /** + * 内容 + */ + @ApiModelProperty("内容") + private String content; + +} diff --git a/src/main/resources/mapper/helpCenter/HelpCenterNoticeDao.xml b/src/main/resources/mapper/helpCenter/HelpCenterNoticeDao.xml new file mode 100644 index 0000000..86cf1d0 --- /dev/null +++ b/src/main/resources/mapper/helpCenter/HelpCenterNoticeDao.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.xcong.excoin.modules.helpCenter.dao.HelpCenterNoticeDao"> + + <select id="getNewNoticeList" resultType="com.xcong.excoin.modules.helpCenter.entity.HelpCenterNoticeEntity"> + SELECT + * + FROM + help_center_notice + WHERE + article_notice = 1 + ORDER BY + create_time DESC + </select> + + <select id="getImportantNoticeList" resultType="com.xcong.excoin.modules.helpCenter.entity.HelpCenterNoticeEntity"> + SELECT + * + FROM + help_center_notice + WHERE + article_notice = 2 + ORDER BY + create_time DESC + </select> + +</mapper> \ No newline at end of file diff --git a/src/main/resources/mapper/helpCenter/HelpCenterTypeDao.xml b/src/main/resources/mapper/helpCenter/HelpCenterTypeDao.xml new file mode 100644 index 0000000..9c2013e --- /dev/null +++ b/src/main/resources/mapper/helpCenter/HelpCenterTypeDao.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.xcong.excoin.modules.helpCenter.dao.HelpCenterTypeDao"> + + <select id="getNoticeTypeList" resultType="com.xcong.excoin.modules.helpCenter.entity.HelpCenterTypeEntity"> + SELECT + * + FROM + help_center_type + WHERE + status = 1 + </select> + +</mapper> \ No newline at end of file diff --git a/src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml b/src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml index 5277c94..904723a 100644 --- a/src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml +++ b/src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml @@ -44,6 +44,13 @@ order by create_time desc </select> + <select id="selectAllCoinDealsOrderBySymbol" + resultType="com.xcong.excoin.modules.coin.entity.OrderCoinsDealEntity"> + select * from coins_order_deal + where symbol = #{symbol} + order by create_time desc limit 100 + </select> + <select id="selectWalletCoinOrder" resultType="com.xcong.excoin.modules.coin.entity.OrderCoinsDealEntity"> select * from coins_order_deal where order_id= #{orderId} and member_id = #{memberId} </select> -- Gitblit v1.9.1