xiaoyong931011
2020-07-31 bc83d475764693f00e77dd8a2b67b026a9963f47
20200731  代碼提交
5 files modified
36 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/documentary/controller/DocumentaryController.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/documentary/dao/FollowTraderProfitInfoDao.java 2 ●●●●● 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 16 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml 4 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/documentary/controller/DocumentaryController.java
@@ -7,6 +7,7 @@
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;
@@ -31,6 +32,7 @@
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;
@@ -65,6 +67,16 @@
    }
    
    /**
     *  交易员详情---头部
     */
    @ApiOperation(value="交易员详情---头部", notes="交易员详情---头部")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = FollowTraderProfitInfoVo.class)})
    @GetMapping(value = "/getFollowTraderProfit")
    public Result  getFollowTraderProfit(@ApiParam(name = "traderId", value = "交易员ID", example = "1") @RequestParam(value = "traderId", required = false) long traderId) {
        return documentaryService.getFollowTraderProfit(traderId);
    }
    /**
     *  历史带单
     * @return
     */
src/main/java/com/xcong/excoin/modules/documentary/dao/FollowTraderProfitInfoDao.java
@@ -17,4 +17,6 @@
    IPage<HistoryOrderRecordsVo> selectHistoryOrderRecords(Page<HistoryOrderRecordsVo> page, 
            @Param("memberId")Long memberId);
    FollowTraderProfitInfoVo selectOneByMemberId(@Param("memberId")long memberId);
}
src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java
@@ -42,4 +42,6 @@
    public Result updateDocumentaryOrderSetInfo(@Valid UpdateDocumentaryOrderSetDto updateDocumentaryOrderSetDto);
    public Result getFollowTraderProfit(long traderId);
}
src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
@@ -514,6 +514,22 @@
        
        return Result.ok(MessageSourceUtils.getString("member_service_0024"));
    }
    @Override
    public Result getFollowTraderProfit(long traderId) {
        FollowTraderInfoEntity followTraderInfoEntity = followTraderInfoDao.selectById(traderId);
        Long memberId = followTraderInfoEntity.getMemberId();
        FollowTraderProfitInfoVo followTraderProfitInfoVo = followTraderProfitInfoDao.selectOneByMemberId(memberId);
        String avatar = followTraderInfoEntity.getAvatar();
        String nickname = followTraderInfoEntity.getNickname();
        String declaration = followTraderInfoEntity.getDeclaration();
        Integer isAll = followTraderInfoEntity.getIsAll();
        followTraderProfitInfoVo.setAvatar(avatar);
        followTraderProfitInfoVo.setNickname(nickname);
        followTraderProfitInfoVo.setDeclaration(declaration);
        followTraderProfitInfoVo.setIsAll(isAll);
        return Result.ok(followTraderProfitInfoVo);
    }
    
    
    
src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
@@ -7,6 +7,10 @@
        order by id desc
    </select>
    
    <select id="selectOneByMemberId" resultType="com.xcong.excoin.modules.documentary.vo.FollowTraderProfitInfoVo">
        select * from follow_trader_profit_info where member_id = #{memberId}
    </select>
    <select id="selectHistoryOrderRecords" resultType="com.xcong.excoin.modules.documentary.vo.HistoryOrderRecordsVo">
        SELECT
            symbol,