Commit b5f199a4 authored by libin's avatar libin

钱包

parent 7c8f87d1
...@@ -4,6 +4,10 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -4,6 +4,10 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
/** /**
* @author libin * @author libin
...@@ -42,14 +46,16 @@ public class SellingWalletVo { ...@@ -42,14 +46,16 @@ public class SellingWalletVo {
@ApiModelProperty(value = "售价") @ApiModelProperty(value = "售价")
private BigDecimal price; private BigDecimal price;
@ApiModelProperty(value = "创建时间", hidden = true ) @ApiModelProperty(value = "创建时间", hidden = true)
private Long crtTime; private Long crtTime;
@ApiModelProperty(value = "更新时间", hidden = true ) @ApiModelProperty(value = "更新时间", hidden = true)
private Long updTime; private Long updTime;
@ApiModelProperty("是否入账:0-未入账;1-已入账")
private Integer waiting; private Integer waiting;
@ApiModelProperty("'类别:0-正;1-负(退款时)")
private Integer status; private Integer status;
/** /**
* 所获佣金 * 所获佣金
......
package com.github.wxiaoqi.security.admin.vo; package com.github.wxiaoqi.security.admin.vo;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.beans.BeanUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
/** /**
* @author libin * @author libin
......
...@@ -15,6 +15,7 @@ import tk.mybatis.mapper.entity.Example; ...@@ -15,6 +15,7 @@ import tk.mybatis.mapper.entity.Example;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
...@@ -40,6 +41,11 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> { ...@@ -40,6 +41,11 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
List<MyWalletCath> walletCaths = walletCathPage.getData(); List<MyWalletCath> walletCaths = walletCathPage.getData();
if (CollectionUtils.isEmpty(walletCaths)){ if (CollectionUtils.isEmpty(walletCaths)){
walletCathPageVo.setPageNum(pageNo);
walletCathPageVo.setPageSize(pageSize);
walletCathPageVo.setTotalCount(0);
walletCathPageVo.setTotalPage(0);
walletCathPageVo.setWalletCaths(Collections.EMPTY_LIST);
return walletCathPageVo; return walletCathPageVo;
} }
......
...@@ -33,14 +33,14 @@ public class MyWalletDetailBiz extends BaseBiz<MyWalletDetailMapper, MyWalletDet ...@@ -33,14 +33,14 @@ public class MyWalletDetailBiz extends BaseBiz<MyWalletDetailMapper, MyWalletDet
Example.Criteria criteria = example.createCriteria(); Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("userId",userId); criteria.andEqualTo("userId",userId);
PageDataVO<WalletDetailPageVo> walletDetailPageVoPageDataVO = PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByExample(example)); PageDataVO<MyWalletDetail> walletDetailPageVoPageDataVO = PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByExample(example));
List<WalletDetailPageVo> walletDetails = walletDetailPageVoPageDataVO.getData(); List<MyWalletDetail> walletDetails = walletDetailPageVoPageDataVO.getData();
if (CollectionUtils.isEmpty(walletDetails)){ if (CollectionUtils.isEmpty(walletDetails)){
return walletDetailPageVo; return walletDetailPageVo;
} }
List<WalletDetailPageVo> walletDetailPageVoList = new ArrayList<>(); List<WalletDetailPageVo> walletDetailPageVoList = new ArrayList<>();
WalletDetailPageVo walletDetail; WalletDetailPageVo walletDetail;
for (WalletDetailPageVo walletDetailPage : walletDetails) { for (MyWalletDetail walletDetailPage : walletDetails) {
walletDetail = new WalletDetailPageVo(); walletDetail = new WalletDetailPageVo();
BeanUtils.copyProperties(walletDetailPage,walletDetail); BeanUtils.copyProperties(walletDetailPage,walletDetail);
walletDetailPageVoList.add(walletDetail); walletDetailPageVoList.add(walletDetail);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment