xiaoyong931011
2020-06-23 e4b79445e0bf959878b25d6770151ec8a3b33c98
20200623
4 files modified
4 files added
115 ■■■■ changed files
src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java 1 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/AppVersionDao.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/AppVersionEntity.java 37 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionVo.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/MemberService.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java 31 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/AppVersionDao.xml 5 ●●●●● patch | view | raw | blame | history
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()
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;
@@ -58,6 +59,16 @@
    MemberService memberService; 
    
    /**
     *  获取当前版本号
     */
    @ApiOperation(value="获取当前版本号", notes="获取当前版本号")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = AppVersionVo.class)})
    @GetMapping(value = "/getAppVersionInfo")
    public Result  getAppVersionInfo() {
        return memberService.getAppVersionInfo();
    }
    /**
     *  获取我的信息
     * @return
     */
src/main/java/com/xcong/excoin/modules/member/dao/AppVersionDao.java
New file
@@ -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> {
}
src/main/java/com/xcong/excoin/modules/member/entity/AppVersionEntity.java
New file
@@ -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;
}
src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionVo.java
New file
@@ -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;
}
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();
}
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);
    }
}
src/main/resources/mapper/member/AppVersionDao.xml
New file
@@ -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>