提交修改
This commit is contained in:
parent
23a48721f4
commit
5ddbd84421
@ -43,6 +43,7 @@ public interface VvPromoterBuyerDao extends BaseMapper<VvPromoterBuyerEntity> {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@OrderBy(VvPromoterBuyerEntity.id_)
|
||||||
List<VvPromoterBuyerEntity> selectBuyerByCondition(IPage page,
|
List<VvPromoterBuyerEntity> selectBuyerByCondition(IPage page,
|
||||||
@IF String promoterId,
|
@IF String promoterId,
|
||||||
@IF Long promoterBuyerId,
|
@IF Long promoterBuyerId,
|
||||||
@ -57,4 +58,45 @@ public interface VvPromoterBuyerDao extends BaseMapper<VvPromoterBuyerEntity> {
|
|||||||
|
|
||||||
|
|
||||||
List<VvPromoterBuyerEntity> selectVvPromoterBuyerByPromoterId(Long promoterId);
|
List<VvPromoterBuyerEntity> selectVvPromoterBuyerByPromoterId(Long promoterId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@OrderBy(VvPromoterBuyerEntity.id_)
|
||||||
|
List<VvPromoterBuyerEntity> selectAppByCondition(IPage page,
|
||||||
|
Long wasBuyerId,
|
||||||
|
@IF @Column(VvPromoterBuyerEntity.create_timestamp) Long minCreateTimestamp,
|
||||||
|
@IF @Column(VvPromoterBuyerEntity.create_timestamp) Long maxCreateTimestamp,
|
||||||
|
@OrderBy @IF @Column(VvPromoterBuyerEntity.create_timestamp) String createTimestampSort
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,12 +1,12 @@
|
|||||||
package com.heyu.api.data.dao.vv;
|
package com.heyu.api.data.dao.vv;
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 推广者获得奖品名细 服务类
|
* 推广者获得奖品名细 服务类
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2025-11-21
|
* @since 2025-11-21
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -22,16 +22,16 @@ import java.util.List;
|
|||||||
public interface VvPromoterTradeOrderAwardDao extends BaseMapper<VvPromoterTradeOrderAwardEntity> {
|
public interface VvPromoterTradeOrderAwardDao extends BaseMapper<VvPromoterTradeOrderAwardEntity> {
|
||||||
|
|
||||||
|
|
||||||
VvPromoterTradeOrderAwardEntity selectVvPromoterTradeOrderAwardById(@Param("id")Long id);
|
VvPromoterTradeOrderAwardEntity selectVvPromoterTradeOrderAwardById(@Param("id") Long id);
|
||||||
|
|
||||||
|
|
||||||
Long insertVvPromoterTradeOrderAward(VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAward);
|
Long insertVvPromoterTradeOrderAward(VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAward);
|
||||||
|
|
||||||
|
|
||||||
Long insertOrUpdateVvPromoterTradeOrderAward(VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAward);
|
Long insertOrUpdateVvPromoterTradeOrderAward(VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAward);
|
||||||
|
|
||||||
|
|
||||||
int updateVvPromoterTradeOrderAwardById(VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAward);
|
int updateVvPromoterTradeOrderAwardById(VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAward);
|
||||||
|
|
||||||
|
|
||||||
int updateCoverVvPromoterTradeOrderAwardById(VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAward);
|
int updateCoverVvPromoterTradeOrderAwardById(VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAward);
|
||||||
@ -60,6 +60,18 @@ public interface VvPromoterTradeOrderAwardDao extends BaseMapper<VvPromoterTrade
|
|||||||
List<VvPromoterTradeOrderAwardEntity> selectVvPromoterTradeOrderAwardByPromoterId(Long promoterId);
|
List<VvPromoterTradeOrderAwardEntity> selectVvPromoterTradeOrderAwardByPromoterId(Long promoterId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<VvPromoterTradeOrderAwardEntity> selectVvPromoterTradeOrderAwardByPromoterId(@IN List<Long> promoterId);
|
List<VvPromoterTradeOrderAwardEntity> selectVvPromoterTradeOrderAwardByPromoterId(@IN List<Long> promoterId);
|
||||||
}
|
|
||||||
|
|
||||||
|
@OrderBy(VvPromoterTradeOrderAwardEntity.id_)
|
||||||
|
List<VvPromoterTradeOrderAwardEntity> selectAppByCondition(IPage page,
|
||||||
|
Long wasBuyerId,
|
||||||
|
@IF String status,
|
||||||
|
@IF @GE @Column(VvBuyerEntity.create_timestamp) Long minCreateTimestamp,
|
||||||
|
@IF @LE @Column(VvBuyerEntity.create_timestamp) Long maxCreateTimestamp,
|
||||||
|
@IF @Column(VvBuyerEntity.create_timestamp) String createTimestampSort
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
|||||||
/**
|
/**
|
||||||
*推广者
|
*推广者
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2025-11-21
|
* @since 2025-11-22
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -47,7 +47,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
//时间毫秒值
|
//时间毫秒值
|
||||||
private Long createTimestamp;
|
private Long createTimestamp;
|
||||||
//推广者id,唯一值
|
//推广者id,唯一值
|
||||||
private String promoterId;
|
private Long promoterId;
|
||||||
//推广者买家名称
|
//推广者买家名称
|
||||||
private String promoterBuyerName;
|
private String promoterBuyerName;
|
||||||
//推广者买家微信
|
//推广者买家微信
|
||||||
@ -143,14 +143,14 @@ private static final long serialVersionUID = 1L;
|
|||||||
* 推广者id,唯一值
|
* 推广者id,唯一值
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getPromoterId() {
|
public Long getPromoterId() {
|
||||||
return promoterId;
|
return promoterId;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 推广者id,唯一值
|
* 推广者id,唯一值
|
||||||
* @param promoterId
|
* @param promoterId
|
||||||
*/
|
*/
|
||||||
public void setPromoterId(String promoterId) {
|
public void setPromoterId(Long promoterId) {
|
||||||
this.promoterId = promoterId;
|
this.promoterId = promoterId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,8 +48,8 @@ public class MysqlMain_update {
|
|||||||
}
|
}
|
||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
list.add(new TablesBean("vv_promoter_trade_order_award"));
|
list.add(new TablesBean("vv_promoter_buyer"));
|
||||||
list.add(new TablesBean("vv_promoter_trade_order_line_award"));
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||||
|
|||||||
@ -0,0 +1,46 @@
|
|||||||
|
package com.heyu.api.alibaba.request.mm;
|
||||||
|
|
||||||
|
|
||||||
|
import com.heyu.api.data.service.impl.AppBaseRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AppPromoterTradeOrderRequest extends AppBaseRequest {
|
||||||
|
|
||||||
|
//推广者id,唯一值
|
||||||
|
private String promoterId;
|
||||||
|
|
||||||
|
//订单id
|
||||||
|
private Long tradeOrderId;
|
||||||
|
|
||||||
|
//create 创建, canceled 取消 , arrive,到账 ,
|
||||||
|
// create("create", "创建"),
|
||||||
|
//
|
||||||
|
// canceled("canceled", "取消"),
|
||||||
|
//
|
||||||
|
// arrive("arrive", "到账"),
|
||||||
|
//
|
||||||
|
// apply_draw("apply_draw", "买家申请提现"),
|
||||||
|
//
|
||||||
|
// seller_agree_draw("seller_agree_draw", "卖家同意提现"),
|
||||||
|
//
|
||||||
|
// seller_reject_draw("seller_reject_draw", "卖家拒绝提现"),
|
||||||
|
//
|
||||||
|
// draw_success("draw_success", "提现成功"),
|
||||||
|
//
|
||||||
|
// draw_failed("draw_failed", "提现失败"),
|
||||||
|
// create 创建, canceled 取消 , arrive,到账, apply_draw:买家申请提现,seller_agree_draw: 卖家同意提现,seller_reject_draw:卖家拒绝提现,draw_success:提现成功,draw_failed:提现失败
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//创建时间撮
|
||||||
|
private Long minCreateTimestamp;
|
||||||
|
// 创建时间最小值
|
||||||
|
private Long maxCreateTimestamp;
|
||||||
|
/***
|
||||||
|
* 按创建时间排序,,传 ASC 或 DESC
|
||||||
|
*/
|
||||||
|
private String createTimestampSort;
|
||||||
|
|
||||||
|
}
|
||||||
@ -12,7 +12,7 @@ public class AppActivityRequest extends AppBaseRequest {
|
|||||||
/***
|
/***
|
||||||
* 推广者id
|
* 推广者id
|
||||||
*/
|
*/
|
||||||
private String promoterId ;
|
private Long promoterId ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import com.heyu.api.data.service.impl.AppBaseRequest;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class AppPromoterRequest extends AppBaseRequest {
|
public class AppPromoterBuyerRequest extends AppBaseRequest {
|
||||||
|
|
||||||
|
|
||||||
//创建时间撮
|
//创建时间撮
|
||||||
@ -63,17 +63,18 @@ public class AdminPromoterBuyerController {
|
|||||||
|
|
||||||
List<VvPromoterBuyerEntity> vvPromoterBuyerEntities = pageUtils.getRows();
|
List<VvPromoterBuyerEntity> vvPromoterBuyerEntities = pageUtils.getRows();
|
||||||
|
|
||||||
List<String> promoterIdList = SanUtils.getFieldList(vvPromoterBuyerEntities, VvPromoterBuyerEntity::getPromoterId);
|
List<Long> promoterIdList = SanUtils.getFieldList(vvPromoterBuyerEntities, VvPromoterBuyerEntity::getPromoterId);
|
||||||
|
|
||||||
|
List<VvPromoterEntity> vvPromoterEntities = vvPromoterDao.selectVvPromoterByIdList(promoterIdList);
|
||||||
|
|
||||||
List<VvPromoterEntity> vvPromoterEntities = vvPromoterDao.selectVvPromoterByIdList(SanUtils.baseTypeConvert(promoterIdList, Long.class));
|
|
||||||
Map<Long, VvPromoterEntity> vvPromoterEntityMap = SanUtils.groupByFiled2Map(vvPromoterEntities, VvPromoterEntity::getId);
|
Map<Long, VvPromoterEntity> vvPromoterEntityMap = SanUtils.groupByFiled2Map(vvPromoterEntities, VvPromoterEntity::getId);
|
||||||
List<VvPromoterBuyerDTO > vvPromoterBuyerDTOList = new ArrayList<>();
|
List<VvPromoterBuyerDTO > vvPromoterBuyerDTOList = new ArrayList<>();
|
||||||
for (VvPromoterBuyerEntity vvPromoterBuyerEntity : vvPromoterBuyerEntities) {
|
for (VvPromoterBuyerEntity vvPromoterBuyerEntity : vvPromoterBuyerEntities) {
|
||||||
VvPromoterBuyerDTO vvPromoterBuyerDTO = new VvPromoterBuyerDTO();
|
VvPromoterBuyerDTO vvPromoterBuyerDTO = new VvPromoterBuyerDTO();
|
||||||
vvPromoterBuyerDTO.setVvPromoterEntity(vvPromoterEntityMap.get(vvPromoterBuyerEntity.getPromoterId()));
|
vvPromoterBuyerDTO.setVvPromoterEntity(vvPromoterEntityMap.get(vvPromoterBuyerEntity.getPromoterId()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pageUtils.setRows(vvPromoterBuyerDTOList);
|
||||||
return R.ok().setData(pageUtils);
|
return R.ok().setData(pageUtils);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -75,6 +76,7 @@ public class AdminPromoterTradeOrderController {
|
|||||||
Map<Long, List<VvPromoterTradeOrderLineAwardEntity>> promoterTradeOrderLineAwardMap =
|
Map<Long, List<VvPromoterTradeOrderLineAwardEntity>> promoterTradeOrderLineAwardMap =
|
||||||
SanUtils.groupByFiled2MapList(promoterTradeOrderLineAwardList, VvPromoterTradeOrderLineAwardEntity::getPromoterId);
|
SanUtils.groupByFiled2MapList(promoterTradeOrderLineAwardList, VvPromoterTradeOrderLineAwardEntity::getPromoterId);
|
||||||
|
|
||||||
|
List<PromoterTradeOrderAwardDTO> promoterTradeOrderAwardDTOList = new ArrayList<>();
|
||||||
for (VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAwardEntity : vvPromoterTradeOrderAwardEntities) {
|
for (VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAwardEntity : vvPromoterTradeOrderAwardEntities) {
|
||||||
PromoterTradeOrderAwardDTO promoterTradeOrderAwardDTO = new PromoterTradeOrderAwardDTO();
|
PromoterTradeOrderAwardDTO promoterTradeOrderAwardDTO = new PromoterTradeOrderAwardDTO();
|
||||||
BeanUtils.copyProperties(vvPromoterTradeOrderAwardEntity, promoterTradeOrderAwardDTO);
|
BeanUtils.copyProperties(vvPromoterTradeOrderAwardEntity, promoterTradeOrderAwardDTO);
|
||||||
@ -83,8 +85,10 @@ public class AdminPromoterTradeOrderController {
|
|||||||
|
|
||||||
promoterTradeOrderAwardDTO.setVvPromoterTradeOrderLineAwardEntityList(
|
promoterTradeOrderAwardDTO.setVvPromoterTradeOrderLineAwardEntityList(
|
||||||
promoterTradeOrderLineAwardMap.get(vvPromoterTradeOrderAwardEntity.getPromoterId()));
|
promoterTradeOrderLineAwardMap.get(vvPromoterTradeOrderAwardEntity.getPromoterId()));
|
||||||
|
promoterTradeOrderAwardDTOList.add(promoterTradeOrderAwardDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pageUtils.setRows(promoterTradeOrderAwardDTOList);
|
||||||
return R.ok().setData(pageUtils);
|
return R.ok().setData(pageUtils);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,8 @@ public class AppActivityController {
|
|||||||
@Describe("访问推广链接")
|
@Describe("访问推广链接")
|
||||||
@RequestMapping("/register")
|
@RequestMapping("/register")
|
||||||
public R register(@RequestBody AppActivityRequest request) {
|
public R register(@RequestBody AppActivityRequest request) {
|
||||||
VvPromoterEntity vvPromoterEntity = vvPromoterDao.selectVvPromoterById(Long.parseLong(request.getPromoterId()));
|
VvPromoterEntity vvPromoterEntity = vvPromoterDao.selectVvPromoterById(request.getPromoterId());
|
||||||
|
|
||||||
if (vvPromoterEntity == null) {
|
if (vvPromoterEntity == null) {
|
||||||
return R.error("推广信息不存在");
|
return R.error("推广信息不存在");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,13 +3,15 @@ package com.heyu.api.controller.vv;
|
|||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.heyu.api.alibaba.request.vv.AppPromoterRequest;
|
import com.heyu.api.alibaba.request.vv.AppPromoterBuyerRequest;
|
||||||
import com.heyu.api.common.annotation.AppLogin;
|
import com.heyu.api.common.annotation.AppLogin;
|
||||||
import com.heyu.api.common.annotation.Describe;
|
import com.heyu.api.common.annotation.Describe;
|
||||||
|
import com.heyu.api.data.dao.vv.VvPromoterBuyerDao;
|
||||||
import com.heyu.api.data.utils.R;
|
import com.heyu.api.data.utils.R;
|
||||||
import com.heyu.api.utils.ISelect;
|
import com.heyu.api.utils.ISelect;
|
||||||
import com.heyu.api.utils.PPageUtils;
|
import com.heyu.api.utils.PPageUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -18,13 +20,12 @@ import java.util.List;
|
|||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/app/promoter")
|
@RequestMapping("/app/promoter/buyer")
|
||||||
@AppLogin
|
@AppLogin
|
||||||
public class AppPromoterBuyerController {
|
public class AppPromoterBuyerController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
//@Autowired
|
private VvPromoterBuyerDao vvPromoterBuyerDao;
|
||||||
//private VvPromoterDao vvPromoterDao;
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 列表
|
* 列表
|
||||||
@ -32,18 +33,17 @@ public class AppPromoterBuyerController {
|
|||||||
*/
|
*/
|
||||||
@Describe("我推荐的好友")
|
@Describe("我推荐的好友")
|
||||||
@RequestMapping("/list")
|
@RequestMapping("/list")
|
||||||
public R list(@RequestBody AppPromoterRequest request) {
|
public R list(@RequestBody AppPromoterBuyerRequest request) {
|
||||||
PPageUtils pageUtils = PPageUtils.startPage(request.getPageNum(), request.getPageSize())
|
PPageUtils pageUtils = PPageUtils.startPage(request.getPageNum(), request.getPageSize())
|
||||||
.doSelect(new ISelect() {
|
.doSelect(new ISelect() {
|
||||||
@Override
|
@Override
|
||||||
public List doSelect(IPage page) {
|
public List doSelect(IPage page) {
|
||||||
// return vvPromoterDao.selectAppByCondition(page,
|
return vvPromoterBuyerDao.selectAppByCondition(page,
|
||||||
// request.getBuyerId(),
|
request.getBuyerId(),
|
||||||
// request.getMinCreateTimestamp(),
|
request.getMinCreateTimestamp(),
|
||||||
// request.getMaxCreateTimestamp(),
|
request.getMaxCreateTimestamp(),
|
||||||
// request.getCreateTimestampSort()
|
request.getCreateTimestampSort()
|
||||||
// );
|
);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return R.ok().setData(pageUtils);
|
return R.ok().setData(pageUtils);
|
||||||
|
|||||||
@ -2,17 +2,25 @@ package com.heyu.api.controller.vv;
|
|||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.heyu.api.alibaba.request.mm.VvPromoterTradeOrderLineRequest;
|
import com.heyu.api.alibaba.request.mm.AppPromoterTradeOrderRequest;
|
||||||
|
import com.heyu.api.alibaba.request.mm.order.PromoterTradeOrderAwardDTO;
|
||||||
import com.heyu.api.common.annotation.AppLogin;
|
import com.heyu.api.common.annotation.AppLogin;
|
||||||
import com.heyu.api.common.annotation.Describe;
|
import com.heyu.api.common.annotation.Describe;
|
||||||
|
import com.heyu.api.data.dao.vv.VvPromoterTradeOrderAwardDao;
|
||||||
|
import com.heyu.api.data.entity.vv.VvPromoterTradeOrderAwardEntity;
|
||||||
|
import com.heyu.api.data.kuaidi100.ActionDTO;
|
||||||
|
import com.heyu.api.data.service.impl.AbstractDrawAction;
|
||||||
import com.heyu.api.data.utils.R;
|
import com.heyu.api.data.utils.R;
|
||||||
import com.heyu.api.utils.ISelect;
|
import com.heyu.api.utils.ISelect;
|
||||||
import com.heyu.api.utils.PPageUtils;
|
import com.heyu.api.utils.PPageUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -21,7 +29,8 @@ import java.util.List;
|
|||||||
@AppLogin
|
@AppLogin
|
||||||
public class AppPromoterTradeOrderAwardController {
|
public class AppPromoterTradeOrderAwardController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private VvPromoterTradeOrderAwardDao vvPromoterTradeOrderAwardDao;
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@ -30,21 +39,37 @@ public class AppPromoterTradeOrderAwardController {
|
|||||||
*/
|
*/
|
||||||
@Describe("我的奖励列表")
|
@Describe("我的奖励列表")
|
||||||
@RequestMapping("/list")
|
@RequestMapping("/list")
|
||||||
public R list(@RequestBody VvPromoterTradeOrderLineRequest vvPromoterRequest) {
|
public R list(@RequestBody AppPromoterTradeOrderRequest request) {
|
||||||
PPageUtils pageUtils = PPageUtils.startPage(vvPromoterRequest.getPageNum(), vvPromoterRequest.getPageSize())
|
|
||||||
|
PPageUtils pageUtils = PPageUtils.startPage(request.getPageNum(), request.getPageSize())
|
||||||
.doSelect(new ISelect() {
|
.doSelect(new ISelect() {
|
||||||
@Override
|
@Override
|
||||||
public List doSelect(IPage page) {
|
public List doSelect(IPage page) {
|
||||||
// return vvPromoterAwardLineDao.selectByAppCondition(page,
|
return vvPromoterTradeOrderAwardDao.selectAppByCondition(page,
|
||||||
// vvPromoterRequest.getPromoterBuyerId(),
|
request.getBuyerId(),
|
||||||
// vvPromoterRequest.getMinCreateTimestamp(),
|
request.getStatus(),
|
||||||
// vvPromoterRequest.getMaxCreateTimestamp(),
|
request.getMinCreateTimestamp(),
|
||||||
// vvPromoterRequest.getCreateTimestampSort()
|
request.getMaxCreateTimestamp(),
|
||||||
// );
|
request.getCreateTimestampSort()
|
||||||
return null;
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
List<VvPromoterTradeOrderAwardEntity> vvPromoterTradeOrderAwardEntities = pageUtils.getRows();
|
||||||
|
|
||||||
|
List<PromoterTradeOrderAwardDTO> promoterTradeOrderAwardDTOList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (VvPromoterTradeOrderAwardEntity vvPromoterTradeOrderAwardEntity : vvPromoterTradeOrderAwardEntities) {
|
||||||
|
PromoterTradeOrderAwardDTO promoterTradeOrderAwardDTO = new PromoterTradeOrderAwardDTO();
|
||||||
|
BeanUtils.copyProperties(vvPromoterTradeOrderAwardEntity, promoterTradeOrderAwardDTO);
|
||||||
|
List<ActionDTO> actionDTOS = AbstractDrawAction.getDrawActionDTO(vvPromoterTradeOrderAwardEntity, true);
|
||||||
|
promoterTradeOrderAwardDTO.setActionDTOList(actionDTOS);
|
||||||
|
promoterTradeOrderAwardDTOList.add(promoterTradeOrderAwardDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
pageUtils.setRows(promoterTradeOrderAwardDTOList);
|
||||||
|
|
||||||
return R.ok().setData(pageUtils);
|
return R.ok().setData(pageUtils);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user