Helius
2020-08-03 9ed5206dc501d2c6c4af25d80c438a20e038db88
Merge branch 'follow' of https://gitee.com/chonggaoxiao/new_excoin into follow
1 files added
3 files modified
64 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/documentary/controller/TraderController.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java 31 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/documentary/vo/TraderStatusVo.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/documentary/controller/TraderController.java
@@ -8,9 +8,13 @@
import com.xcong.excoin.common.response.Result;
import com.xcong.excoin.modules.documentary.service.DocumentaryService;
import com.xcong.excoin.modules.documentary.vo.MyFollowOrderVo;
import com.xcong.excoin.modules.documentary.vo.TraderStatusVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
@RestController
@@ -23,6 +27,16 @@
    DocumentaryService documentaryService;
    
    /**
     *  成为交易员---状态查询
     */
    @ApiOperation(value="成为交易员---状态查询", notes="成为交易员---状态查询")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = TraderStatusVo.class)})
    @GetMapping(value = "/beTraderStatus")
    public Result  beTraderStatus() {
        return documentaryService.beTraderStatus();
    }
    /**
     *  成为交易员---立即入驻
     */
    @ApiOperation(value="成为交易员---立即入驻", notes="成为交易员---立即入驻")
src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java
@@ -46,4 +46,6 @@
    public Result beTrader();
    public Result beTraderStatus();
}
src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
@@ -52,6 +52,7 @@
import com.xcong.excoin.modules.documentary.vo.MemberIsTradeVo;
import com.xcong.excoin.modules.documentary.vo.MyFollowOrderVo;
import com.xcong.excoin.modules.documentary.vo.MyFollowTraderInfoVo;
import com.xcong.excoin.modules.documentary.vo.TraderStatusVo;
import com.xcong.excoin.modules.member.dao.MemberDao;
import com.xcong.excoin.modules.member.dao.MemberLevelRateDao;
import com.xcong.excoin.modules.member.dao.MemberWalletContractDao;
@@ -559,6 +560,12 @@
        if(MemberEntity.CERTIFY_STATUS_Y != certifyStatus) {
            return Result.fail(MessageSourceUtils.getString("member_controller_0009"));
        }
        Map<String, Object> columnMap = new HashMap<>();
        columnMap.put("member_id", memberId);
        List<FollowTraderInfoEntity> selectByMap = followTraderInfoDao.selectByMap(columnMap);
        if(CollUtil.isNotEmpty(selectByMap)) {
            return Result.fail("submit_repeat");
        }
        //新增【交易员信息表】数据
        FollowTraderInfoEntity followTraderInfoEntity = new FollowTraderInfoEntity();
        followTraderInfoEntity.setMemberId(memberId);
@@ -578,6 +585,30 @@
        followTraderInfoDao.insert(followTraderInfoEntity);
        return Result.ok(MessageSourceUtils.getString("member_service_0024"));
    }
    @Override
    public Result beTraderStatus() {
        //获取用户ID
        Long memberId = LoginUserUtils.getAppLoginUser().getId();
        MemberEntity memberEntity = memberDao.selectById(memberId);
        TraderStatusVo traderStatusVo = new TraderStatusVo();
        Integer isTraer = memberEntity.getIsTrader();
        traderStatusVo.setIsTrader(isTraer);
        Map<String, Object> columnMap = new HashMap<>();
        columnMap.put("member_id", memberId);
        List<FollowTraderInfoEntity> selectByMap = followTraderInfoDao.selectByMap(columnMap);
        if(CollUtil.isNotEmpty(selectByMap)) {
            for(FollowTraderInfoEntity followTraderInfoEntity : selectByMap) {
                Integer verifyStatus = followTraderInfoEntity.getVerifyStatus();
                traderStatusVo.setVerifyStatus(verifyStatus);
            }
        }else{
            traderStatusVo.setVerifyStatus(4);
        }
        return Result.ok(traderStatusVo);
    }
    
    
    
src/main/java/com/xcong/excoin/modules/documentary/vo/TraderStatusVo.java
New file
@@ -0,0 +1,17 @@
package com.xcong.excoin.modules.documentary.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "TraderStatusVo", description = "返回类")
public class TraderStatusVo {
    @ApiModelProperty(value = "是否是交易者: 1是2否")
    private Integer isTrader;
    @ApiModelProperty(value = "审核状态: 1审核通过2审核未通过3:审核中4:未申请")
    private Integer verifyStatus;
}