xiaoyong931011
2022-03-02 822d9cce770811457653ddbed7b20f1fb36018ac
20222223
2 files added
3 files modified
89 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/coin/controller/CoinController.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/CoinInListDto.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/CoinInListVo.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/service/CoinService.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/service/impl/CoinServiceImpl.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/controller/CoinController.java
@@ -114,6 +114,17 @@
    }
    
    /**
     *  记录
     * @return
     */
    @ApiOperation(value="记录", notes="记录")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = CoinInListVo.class)})
    @PostMapping(value="/coinInList")
    public Result coinInList(@RequestBody @Valid CoinInListDto coinInListDto) {
        return coinService.coinInList(coinInListDto);
    }
    /**
     *  获取币币资产交易记录
     * @return
     */
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/CoinInListDto.java
New file
@@ -0,0 +1,26 @@
package com.xcong.excoin.modules.coin.parameter.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 = "CoinInListDto", description = "记录参数接受类")
public class CoinInListDto {
    @NotNull
    @Min(1)
    @ApiModelProperty(value = "第几页", example = "1")
    private int pageNum;
    @NotNull
    @ApiModelProperty(value = "每页数量", example = "10")
    private int pageSize;
    @NotNull
    @ApiModelProperty(value = "1:充币,2:提币,3:划转,4:其他", example = "1")
    private int type;
}
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/CoinInListVo.java
New file
@@ -0,0 +1,43 @@
package com.xcong.excoin.modules.coin.parameter.vo;
import java.math.BigDecimal;
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 = "CoinInListVo", description = "记录返回")
public class CoinInListVo {
    /**
     * 币种
     */
    @ApiModelProperty(value = "币种")
    private String symbol;
    /**
     * 金额
     */
    @ApiModelProperty(value = "金额")
    private String amount;
    /**
     * 记录内容
     */
    @ApiModelProperty(value = "记录内容")
    private String content;
    /**
     * 状态【0:待审核 1:成功2:失败】
     */
    @ApiModelProperty(value = "状态【0:待审核 1:成功2:失败】")
    private int status;
    @ApiModelProperty(value = "时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    @ApiModelProperty(value = "是否内部转账 Y-是N-不是")
    private String isInside;
}
src/main/java/com/xcong/excoin/modules/coin/service/CoinService.java
@@ -6,6 +6,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.xcong.excoin.common.response.Result;
import com.xcong.excoin.modules.coin.parameter.dto.CoinInListDto;
import com.xcong.excoin.modules.coin.parameter.dto.RecordsPageDto;
import com.xcong.excoin.modules.coin.parameter.dto.ZhiyaRewardRecordsPageDto;
import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
@@ -58,4 +59,6 @@
    void grantZhiyaAmount();
    Result getZhiyaReward(ZhiyaRewardRecordsPageDto recordsPageDto);
    Result coinInList(CoinInListDto coinInListDto);
}
src/main/java/com/xcong/excoin/modules/coin/service/impl/CoinServiceImpl.java
@@ -11,6 +11,7 @@
import com.xcong.excoin.modules.coin.dao.ZhiYaRecordDao;
import com.xcong.excoin.modules.coin.dao.ZhiyaRewardDao;
import com.xcong.excoin.modules.coin.entity.*;
import com.xcong.excoin.modules.coin.parameter.dto.CoinInListDto;
import com.xcong.excoin.modules.coin.parameter.dto.ZhiyaRewardRecordsPageDto;
import com.xcong.excoin.modules.coin.parameter.vo.*;
import com.xcong.excoin.modules.platform.entity.PlatformCnyUsdtExchangeEntity;
@@ -910,6 +911,11 @@
        return Result.ok(lists);
    }
    @Override
    public Result coinInList(CoinInListDto coinInListDto) {
        return null;
    }
    public String generateSimpleSerialno(String userId) {
        StringBuilder sb = new StringBuilder();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");