From e4b79445e0bf959878b25d6770151ec8a3b33c98 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 23 Jun 2020 11:22:36 +0800
Subject: [PATCH] 20200623
---
src/main/java/com/xcong/excoin/modules/member/dao/AppVersionDao.java | 8 ++++
src/main/java/com/xcong/excoin/modules/member/entity/AppVersionEntity.java | 37 ++++++++++++++++++
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 31 +++++++++------
src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionVo.java | 20 ++++++++++
src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java | 13 ++++++
src/main/resources/mapper/member/AppVersionDao.xml | 5 ++
src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java | 1
src/main/java/com/xcong/excoin/modules/member/service/MemberService.java | 2 +
8 files changed, 103 insertions(+), 14 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 9ef3d71..a804c57 100644
--- a/src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java
+++ b/src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java
@@ -49,6 +49,7 @@
.antMatchers("/api/member/getMemberAccountInfo").permitAll()
.antMatchers("/api/member/memberForgetPwd").permitAll()
.antMatchers("/api/member/memberCoinInfoList").permitAll()
+ .antMatchers("/api/member/getAppVersionInfo").permitAll()
.antMatchers("/api/orderCoin/searchSymbolResultList").permitAll()
.antMatchers("/api/orderCoin/findCollect").permitAll()
.anyRequest().authenticated()
diff --git a/src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java b/src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java
index 842132f..ab0906c 100644
--- a/src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java
+++ b/src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java
@@ -22,6 +22,7 @@
import com.xcong.excoin.modules.member.parameter.dto.MemberUpdatePwdDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberUpdateTradePwdDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberUpdateTradersPwdTimeDto;
+import com.xcong.excoin.modules.member.parameter.vo.AppVersionVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberAuthenticationInfoVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberAvivableCoinInfoVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressCountListVo;
@@ -55,7 +56,17 @@
public class MemberController {
@Resource
- MemberService memberService;
+ MemberService memberService;
+
+ /**
+ * 获取当前版本号
+ */
+ @ApiOperation(value="获取当前版本号", notes="获取当前版本号")
+ @ApiResponses({@ApiResponse( code = 200, message = "success", response = AppVersionVo.class)})
+ @GetMapping(value = "/getAppVersionInfo")
+ public Result getAppVersionInfo() {
+ return memberService.getAppVersionInfo();
+ }
/**
* 获取我的信息
diff --git a/src/main/java/com/xcong/excoin/modules/member/dao/AppVersionDao.java b/src/main/java/com/xcong/excoin/modules/member/dao/AppVersionDao.java
new file mode 100644
index 0000000..d487e27
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/dao/AppVersionDao.java
@@ -0,0 +1,8 @@
+package com.xcong.excoin.modules.member.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xcong.excoin.modules.member.entity.AppVersionEntity;
+
+public interface AppVersionDao extends BaseMapper<AppVersionEntity> {
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/entity/AppVersionEntity.java b/src/main/java/com/xcong/excoin/modules/member/entity/AppVersionEntity.java
new file mode 100644
index 0000000..9cb4d3d
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/entity/AppVersionEntity.java
@@ -0,0 +1,37 @@
+package com.xcong.excoin.modules.member.entity;
+
+import java.io.Serializable;
+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("app_version")
+public class AppVersionEntity implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id",type = IdType.AUTO)
+ private Long id;
+
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date createtime;
+
+ private String version;
+ private String content;
+ private String address;
+ private Integer type;
+
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionVo.java b/src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionVo.java
new file mode 100644
index 0000000..e3da351
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionVo.java
@@ -0,0 +1,20 @@
+package com.xcong.excoin.modules.member.parameter.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "AppVersionVo", description = "版本号信息")
+public class AppVersionVo {
+
+ @ApiModelProperty(value = "版本号")
+ private String version;
+
+ @ApiModelProperty(value = "下载地址")
+ private String address;
+
+ @ApiModelProperty(value = "类型:1安卓,2苹果")
+ private Integer type;
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/service/MemberService.java b/src/main/java/com/xcong/excoin/modules/member/service/MemberService.java
index 8f0ecee..916b773 100644
--- a/src/main/java/com/xcong/excoin/modules/member/service/MemberService.java
+++ b/src/main/java/com/xcong/excoin/modules/member/service/MemberService.java
@@ -86,5 +86,7 @@
public Result getMemberAccountInfo(String account,int type);
+ public Result getAppVersionInfo();
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
index f4010ab..dfa904f 100644
--- a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -30,19 +30,6 @@
import com.xcong.excoin.modules.member.parameter.dto.MemberUpdateTradePwdDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberUpdateTradersPwdTimeDto;
import com.xcong.excoin.modules.member.parameter.vo.*;
-import com.xcong.excoin.modules.member.parameter.vo.MemberAuthenticationInfoVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberAvivableCoinInfoVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressCountListVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressCountVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressListVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberCoinInfoListVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberCoinInfoVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberInfoVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberPaymethodDetailListVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberPaymethodDetailVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberPersonCenterInfoVo;
-import com.xcong.excoin.modules.member.parameter.vo.MemberSendCodeWayVo;
import com.xcong.excoin.modules.member.service.MemberService;
import com.xcong.excoin.modules.platform.dao.PlatformFeeSettingDao;
import com.xcong.excoin.modules.platform.dao.PlatformSymbolsCoinDao;
@@ -115,6 +102,9 @@
@Resource
MemberCoinWithdrawDao memberCoinWithdrawDao;
+
+ @Resource
+ AppVersionDao appVersionDao;
@Resource
private MemberWalletContractSimulateDao memberWalletContractSimulateDao;
@@ -895,6 +885,21 @@
return Result.ok("");
}
+ @Override
+ public Result getAppVersionInfo() {
+ Map<String, Object> columnMap = new HashMap<>();
+ List<AppVersionEntity> selectByMap = appVersionDao.selectByMap(columnMap);
+ AppVersionVo appVersionVo = new AppVersionVo();
+ if(CollUtil.isNotEmpty(selectByMap)) {
+ for(AppVersionEntity appVersionEntity : selectByMap) {
+ appVersionVo.setAddress(appVersionEntity.getAddress());
+ appVersionVo.setType(appVersionEntity.getType());
+ appVersionVo.setVersion(appVersionEntity.getVersion());
+ }
+ }
+ return Result.ok(appVersionVo);
+ }
+
}
diff --git a/src/main/resources/mapper/member/AppVersionDao.xml b/src/main/resources/mapper/member/AppVersionDao.xml
new file mode 100644
index 0000000..23a92c5
--- /dev/null
+++ b/src/main/resources/mapper/member/AppVersionDao.xml
@@ -0,0 +1,5 @@
+<?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.member.dao.AppVersionDao">
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.1