Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java
This commit is contained in:
@@ -26,6 +26,10 @@ public class Constants {
|
|||||||
* 订单状态 - 交易失败
|
* 订单状态 - 交易失败
|
||||||
*/
|
*/
|
||||||
public static final String ORDER_STATUS_FAIL = "4";
|
public static final String ORDER_STATUS_FAIL = "4";
|
||||||
|
/**
|
||||||
|
* 订单状态 - 全部
|
||||||
|
*/
|
||||||
|
public static final String ORDER_STATUS_ALL = "9";
|
||||||
/**
|
/**
|
||||||
* 订单状态 - 订单超时
|
* 订单状态 - 订单超时
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import cn.hutool.core.bean.BeanUtil;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.TypeReference;
|
import com.alibaba.fastjson.TypeReference;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.peanut.common.utils.PageUtils;
|
||||||
import com.peanut.common.utils.R;
|
import com.peanut.common.utils.R;
|
||||||
import com.peanut.modules.book.entity.BookClockEntryEntity;
|
import com.peanut.modules.book.entity.BookClockEntryEntity;
|
||||||
import com.peanut.modules.book.entity.BookClockEntryChatEntity;
|
import com.peanut.modules.book.entity.BookClockEntryChat;
|
||||||
import com.peanut.modules.book.entity.MyUserEntity;
|
import com.peanut.modules.book.entity.MyUserEntity;
|
||||||
import com.peanut.modules.book.service.BookClockEntryChatService;
|
import com.peanut.modules.book.service.BookClockEntryChatService;
|
||||||
import com.peanut.modules.book.service.BookClockEntryService;
|
import com.peanut.modules.book.service.BookClockEntryService;
|
||||||
@@ -65,8 +66,10 @@ public class BookClockForumController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(path = "/getChatList", method = RequestMethod.GET)
|
@RequestMapping(path = "/getChatList", method = RequestMethod.GET)
|
||||||
public R getChatList(@RequestParam("entryId") Integer entryId,
|
public R getChatList(@RequestParam("entryId") Integer entryId,
|
||||||
@RequestParam(value = "userId", required = false) Integer userId) {
|
@RequestParam(value = "userId", required = false) Integer userId,
|
||||||
QueryWrapper<BookClockEntryChatEntity> queryWrapper = new QueryWrapper<>();
|
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
||||||
|
@RequestParam(value = "currentPage", defaultValue = "1") Integer currentPage) {
|
||||||
|
QueryWrapper<BookClockEntryChat> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("entry_id", entryId);
|
queryWrapper.eq("entry_id", entryId);
|
||||||
queryWrapper.eq("fid", 0);
|
queryWrapper.eq("fid", 0);
|
||||||
if (userId != null) {
|
if (userId != null) {
|
||||||
@@ -74,8 +77,8 @@ public class BookClockForumController {
|
|||||||
}
|
}
|
||||||
queryWrapper.orderByAsc("fid", "create_time");
|
queryWrapper.orderByAsc("fid", "create_time");
|
||||||
List<ClockInCommentVo> resultList = new ArrayList<>();
|
List<ClockInCommentVo> resultList = new ArrayList<>();
|
||||||
List<BookClockEntryChatEntity> chatEntityList = bookClockEntryChatService.list(queryWrapper);
|
List<BookClockEntryChat> chatEntityList = bookClockEntryChatService.list(queryWrapper);
|
||||||
for (BookClockEntryChatEntity entity : chatEntityList) {
|
for (BookClockEntryChat entity : chatEntityList) {
|
||||||
List<String> imageList = JSON.parseObject(entity.getImages(), new TypeReference<List<String>>() {
|
List<String> imageList = JSON.parseObject(entity.getImages(), new TypeReference<List<String>>() {
|
||||||
});
|
});
|
||||||
entity.setImageList(imageList);
|
entity.setImageList(imageList);
|
||||||
@@ -84,27 +87,41 @@ public class BookClockForumController {
|
|||||||
MyUserEntity user = userService.getById(entity.getUserId());
|
MyUserEntity user = userService.getById(entity.getUserId());
|
||||||
vo.setNickName(user.getNickname());
|
vo.setNickName(user.getNickname());
|
||||||
vo.setAvatar(user.getAvatar());
|
vo.setAvatar(user.getAvatar());
|
||||||
QueryWrapper<BookClockEntryChatEntity> subQueryWrapper = new QueryWrapper<>();
|
|
||||||
subQueryWrapper.eq("fid", entity.getId());
|
|
||||||
List<BookClockEntryChatEntity> subClockInChatList = bookClockEntryChatService.list(subQueryWrapper);
|
|
||||||
List<ClockInCommentVo> subCommentList = new ArrayList<>();
|
|
||||||
for (BookClockEntryChatEntity subChat : subClockInChatList) {
|
|
||||||
ClockInCommentVo subVo = new ClockInCommentVo();
|
|
||||||
BeanUtil.copyProperties(subChat, subVo);
|
|
||||||
MyUserEntity subChatUser = userService.getById(subChat.getUserId());
|
|
||||||
MyUserEntity pUser = userService.getById(subChat.getPuserId());
|
|
||||||
subVo.setPuserNickName(pUser.getNickname());
|
|
||||||
subVo.setPuserAvatar(pUser.getAvatar());
|
|
||||||
subVo.setAvatar(subChatUser.getAvatar());
|
|
||||||
subVo.setNickName(subChatUser.getNickname());
|
|
||||||
subCommentList.add(subVo);
|
|
||||||
}
|
|
||||||
vo.setSubCommentList(subCommentList);
|
|
||||||
resultList.add(vo);
|
resultList.add(vo);
|
||||||
}
|
}
|
||||||
Map<String, Object> result = new HashMap<>();
|
PageUtils page = new PageUtils(resultList, resultList.size(), pageSize, currentPage);
|
||||||
result.put("chatList", resultList);
|
return R.ok().put("result", page);
|
||||||
return R.ok(result);
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取子评论
|
||||||
|
*
|
||||||
|
* @param fid 父评论 ID
|
||||||
|
* @param pageSize 页大小
|
||||||
|
* @param currentPage 当前页
|
||||||
|
* @return R
|
||||||
|
*/
|
||||||
|
@RequestMapping(path = "/getSubChatList", method = RequestMethod.GET)
|
||||||
|
public R getSubChatList(@RequestParam("fid") Integer fid,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
||||||
|
@RequestParam(value = "currentPage", defaultValue = "1") Integer currentPage) {
|
||||||
|
QueryWrapper<BookClockEntryChat> subQueryWrapper = new QueryWrapper<>();
|
||||||
|
subQueryWrapper.eq("fid", fid);
|
||||||
|
List<BookClockEntryChat> subClockInChatList = bookClockEntryChatService.list(subQueryWrapper);
|
||||||
|
List<ClockInCommentVo> subCommentList = new ArrayList<>();
|
||||||
|
for (BookClockEntryChat subChat : subClockInChatList) {
|
||||||
|
ClockInCommentVo subVo = new ClockInCommentVo();
|
||||||
|
BeanUtil.copyProperties(subChat, subVo);
|
||||||
|
MyUserEntity subChatUser = userService.getById(subChat.getUserId());
|
||||||
|
MyUserEntity pUser = userService.getById(subChat.getPuserId());
|
||||||
|
subVo.setPuserNickName(pUser.getNickname());
|
||||||
|
subVo.setPuserAvatar(pUser.getAvatar());
|
||||||
|
subVo.setAvatar(subChatUser.getAvatar());
|
||||||
|
subVo.setNickName(subChatUser.getNickname());
|
||||||
|
subCommentList.add(subVo);
|
||||||
|
}
|
||||||
|
PageUtils subChatPage = new PageUtils(subCommentList, subCommentList.size(), pageSize, currentPage);
|
||||||
|
return R.ok().put("result", subChatPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -114,7 +131,7 @@ public class BookClockForumController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(path = "/addChat", method = RequestMethod.POST)
|
@RequestMapping(path = "/addChat", method = RequestMethod.POST)
|
||||||
public R addChat(@RequestBody BookClockEntryChatEntity chat) {
|
public R addChat(@RequestBody BookClockEntryChat chat) {
|
||||||
List<String> imageList = chat.getImageList();
|
List<String> imageList = chat.getImageList();
|
||||||
if (imageList != null) {
|
if (imageList != null) {
|
||||||
String images = JSON.toJSON(imageList).toString();
|
String images = JSON.toJSON(imageList).toString();
|
||||||
|
|||||||
@@ -107,6 +107,12 @@ public class BuyOrderController {
|
|||||||
return R.ok().put("result", page);
|
return R.ok().put("result", page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单详情
|
||||||
|
*
|
||||||
|
* @param orderSn 订单号
|
||||||
|
* @return R
|
||||||
|
*/
|
||||||
@RequestMapping(path = "/orderDetail", method = RequestMethod.GET)
|
@RequestMapping(path = "/orderDetail", method = RequestMethod.GET)
|
||||||
public R orderDetail(@RequestParam("orderSn") String orderSn) {
|
public R orderDetail(@RequestParam("orderSn") String orderSn) {
|
||||||
BuyOrderResponseVo buyOrderResponseVo = buyOrderService.orderDetail(orderSn);
|
BuyOrderResponseVo buyOrderResponseVo = buyOrderService.orderDetail(orderSn);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import java.util.*;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/book/userClockIn")
|
@RequestMapping("/book/userClockIn")
|
||||||
public class UserBookClockController {
|
public class UserBookClockInController {
|
||||||
@Autowired
|
@Autowired
|
||||||
UserBookClockService userBookClockService;
|
UserBookClockService userBookClockService;
|
||||||
|
|
||||||
@@ -108,4 +108,30 @@ public class UserBookClockController {
|
|||||||
userBookClockService.updateById(userBookClock);
|
userBookClockService.updateById(userBookClock);
|
||||||
return R.ok("打卡成功");
|
return R.ok("打卡成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户补卡接口
|
||||||
|
*
|
||||||
|
* @param bookId book ID
|
||||||
|
* @param userId user ID
|
||||||
|
* @param day 补卡 day
|
||||||
|
* @return R
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/correctClockIn", method = RequestMethod.GET)
|
||||||
|
public R correctClockIn(@RequestParam("bookId") Integer bookId,
|
||||||
|
@RequestParam("userId") Integer userId,
|
||||||
|
@RequestParam("day") Integer day) {
|
||||||
|
QueryWrapper<UserBookClockEntity> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("book_id", bookId);
|
||||||
|
queryWrapper.eq("user_id", userId);
|
||||||
|
UserBookClockEntity userBookClock = userBookClockService.getOne(queryWrapper);
|
||||||
|
String clocksStr = userBookClock.getClocks();
|
||||||
|
List<Integer> clockInDaysList = JSON.parseObject(clocksStr, new TypeReference<List<Integer>>() {
|
||||||
|
});
|
||||||
|
clockInDaysList.add(day);
|
||||||
|
String clockInDaysListStr = JSON.toJSON(clockInDaysList).toString();
|
||||||
|
userBookClock.setClocks(clockInDaysListStr);
|
||||||
|
userBookClockService.updateById(userBookClock);
|
||||||
|
return R.ok("补卡成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.peanut.modules.book.dao;
|
package com.peanut.modules.book.dao;
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import com.peanut.modules.book.entity.BookClockEntryChatEntity;
|
import com.peanut.modules.book.entity.BookClockEntryChat;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface BookClockEntryChatDao extends MPJBaseMapper<BookClockEntryChatEntity> {
|
public interface BookClockEntryChatDao extends MPJBaseMapper<BookClockEntryChat> {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName("book_clock_entry_chat")
|
@TableName("book_clock_entry_chat")
|
||||||
public class BookClockEntryChatEntity implements Serializable {
|
public class BookClockEntryChat implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@TableId
|
@TableId
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.peanut.modules.book.service;
|
package com.peanut.modules.book.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.peanut.modules.book.entity.BookClockEntryChatEntity;
|
import com.peanut.modules.book.entity.BookClockEntryChat;
|
||||||
|
|
||||||
public interface BookClockEntryChatService extends IService<BookClockEntryChatEntity> {
|
public interface BookClockEntryChatService extends IService<BookClockEntryChat> {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.peanut.modules.book.service;
|
package com.peanut.modules.book.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.peanut.common.utils.PageUtils;
|
import com.peanut.common.utils.PageUtils;
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package com.peanut.modules.book.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.peanut.modules.book.dao.BookClockEntryChatDao;
|
import com.peanut.modules.book.dao.BookClockEntryChatDao;
|
||||||
import com.peanut.modules.book.entity.BookClockEntryChatEntity;
|
import com.peanut.modules.book.entity.BookClockEntryChat;
|
||||||
import com.peanut.modules.book.service.BookClockEntryChatService;
|
import com.peanut.modules.book.service.BookClockEntryChatService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service("bookClockEntryChatService")
|
@Service("bookClockEntryChatService")
|
||||||
public class BookClockEntryChatImpl extends ServiceImpl<BookClockEntryChatDao, BookClockEntryChatEntity> implements BookClockEntryChatService {
|
public class BookClockEntryChatImpl extends ServiceImpl<BookClockEntryChatDao, BookClockEntryChat> implements BookClockEntryChatService {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
String userId = (String) params.get("userId");
|
String userId = (String) params.get("userId");
|
||||||
QueryWrapper<BuyOrder> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<BuyOrder> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("user_id", userId);
|
queryWrapper.eq("user_id", userId);
|
||||||
queryWrapper.eq(orderStatus.equals(Constants.ORDER_STATUS_FAIL), "order_status", orderStatus);
|
queryWrapper.eq(!orderStatus.equals(Constants.ORDER_STATUS_ALL), "order_status", orderStatus);
|
||||||
queryWrapper.orderByDesc("create_time");
|
queryWrapper.orderByDesc("create_time");
|
||||||
Query<BuyOrder> query = new Query<>();
|
Query<BuyOrder> query = new Query<>();
|
||||||
IPage<BuyOrder> page = query.getPage(params);
|
IPage<BuyOrder> page = query.getPage(params);
|
||||||
@@ -313,48 +313,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
buyOrderQueryWrapper.lt(requestVo.getEndTime() != null, "create_time", requestVo.getStartTime());
|
buyOrderQueryWrapper.lt(requestVo.getEndTime() != null, "create_time", requestVo.getStartTime());
|
||||||
List<BuyOrder> buyOrderList = list(buyOrderQueryWrapper);
|
List<BuyOrder> buyOrderList = list(buyOrderQueryWrapper);
|
||||||
for (BuyOrder buyOrder : buyOrderList) {
|
for (BuyOrder buyOrder : buyOrderList) {
|
||||||
BuyOrderResponseVo responseVo = new BuyOrderResponseVo();
|
BuyOrderResponseVo responseVo = setBuyOrderInfo(buyOrder);
|
||||||
Integer userId = buyOrder.getUserId();
|
|
||||||
QueryWrapper<MyUserEntity> userEntityQueryWrapper = new QueryWrapper<>();
|
|
||||||
userEntityQueryWrapper.eq("id",userId);
|
|
||||||
MyUserEntity user = myUserService.getOne(userEntityQueryWrapper);
|
|
||||||
UserResponseVo userResponseVo = new UserResponseVo();
|
|
||||||
userResponseVo.setUserPhone(user.getTel());
|
|
||||||
userResponseVo.setUserName(user.getName());
|
|
||||||
responseVo.setUserInfo(userResponseVo);
|
|
||||||
responseVo.setOrderPrice(buyOrder.getOrderMoney());
|
|
||||||
BeanUtil.copyProperties(buyOrder, responseVo);
|
|
||||||
ConsigneeVo consigneeVo = new ConsigneeVo();
|
|
||||||
consigneeVo.setConsigneeName(buyOrder.getShippingUser());
|
|
||||||
consigneeVo.setConsigneeMobile(buyOrder.getUserPhone());
|
|
||||||
consigneeVo.setProvince(buyOrder.getProvince());
|
|
||||||
consigneeVo.setCity(buyOrder.getCity());
|
|
||||||
consigneeVo.setCounty(buyOrder.getDistrict());
|
|
||||||
consigneeVo.setAddress(buyOrder.getAddress());
|
|
||||||
responseVo.setConsignee(consigneeVo);
|
|
||||||
QueryWrapper<BuyOrderProduct> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq("order_id", buyOrder.getOrderId());
|
|
||||||
List<BuyOrderProduct> buyOrderProductList = buyOrderProductService.list(queryWrapper);
|
|
||||||
List<GoodsResponseVo> goodsResponseVoList = new ArrayList<>();
|
|
||||||
for (BuyOrderProduct buyOrderProduct : buyOrderProductList) {
|
|
||||||
GoodsResponseVo goodsResponseVo = new GoodsResponseVo();
|
|
||||||
QueryWrapper<ShopProduct> shopProductQueryWrapper = new QueryWrapper<>();
|
|
||||||
shopProductQueryWrapper.eq("product_id", buyOrderProduct.getProductId());
|
|
||||||
ShopProduct shopProduct = shopProductService.getOne(shopProductQueryWrapper);
|
|
||||||
goodsResponseVo.setProductName(shopProduct.getProductName());
|
|
||||||
goodsResponseVo.setProductImage(shopProduct.getProductImages());
|
|
||||||
goodsResponseVo.setProductPrice(shopProduct.getPrice());
|
|
||||||
QueryWrapper<ExpressOrder> expressOrderQueryWrapper = new QueryWrapper<>();
|
|
||||||
expressOrderQueryWrapper.eq("id", buyOrderProduct.getExpressOrderId());
|
|
||||||
ExpressOrder expressOrder = expressOrderService.getOne(expressOrderQueryWrapper);
|
|
||||||
ExpressResponseVo expressResponseVo = new ExpressResponseVo();
|
|
||||||
expressResponseVo.setExpressCompany(expressOrder.getExpressCompanyCode());
|
|
||||||
expressResponseVo.setExpressOrderSn(expressOrder.getExpressOrderSn());
|
|
||||||
expressResponseVo.setPrintTemplate(expressOrder.getPrintTemplate());
|
|
||||||
goodsResponseVo.setExpressInfo(expressResponseVo);
|
|
||||||
goodsResponseVoList.add(goodsResponseVo);
|
|
||||||
}
|
|
||||||
responseVo.setGoodsList(goodsResponseVoList);
|
|
||||||
result.add(responseVo);
|
result.add(responseVo);
|
||||||
}
|
}
|
||||||
return new PageUtils(result, buyOrderList.size(), requestVo.getPageSize(), requestVo.getPageIndex());
|
return new PageUtils(result, buyOrderList.size(), requestVo.getPageSize(), requestVo.getPageIndex());
|
||||||
@@ -389,7 +348,6 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
// 计算快递费用
|
// 计算快递费用
|
||||||
BigDecimal expressFee = expressFeeService.calculateExpressFee(expressCompanyCode, totalWeight, county.getRegionCode());
|
BigDecimal expressFee = expressFeeService.calculateExpressFee(expressCompanyCode, totalWeight, county.getRegionCode());
|
||||||
ExpressOrder expressOrder = new ExpressOrder();
|
ExpressOrder expressOrder = new ExpressOrder();
|
||||||
// expressOrder.setOrderId(buyOrderDetailList.get(0).getOrderId());
|
|
||||||
expressOrder.setExpressFee(expressFee);
|
expressOrder.setExpressFee(expressFee);
|
||||||
expressOrder.setCreateTime(new Date());
|
expressOrder.setCreateTime(new Date());
|
||||||
expressOrder.setTotalWeight(totalWeight);
|
expressOrder.setTotalWeight(totalWeight);
|
||||||
@@ -418,7 +376,20 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
QueryWrapper<BuyOrder> buyOrderQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<BuyOrder> buyOrderQueryWrapper = new QueryWrapper<>();
|
||||||
buyOrderQueryWrapper.eq("order_sn", orderSn);
|
buyOrderQueryWrapper.eq("order_sn", orderSn);
|
||||||
BuyOrder buyOrder = getOne(buyOrderQueryWrapper);
|
BuyOrder buyOrder = getOne(buyOrderQueryWrapper);
|
||||||
|
return setBuyOrderInfo(buyOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
private BuyOrderResponseVo setBuyOrderInfo(BuyOrder buyOrder) {
|
||||||
BuyOrderResponseVo responseVo = new BuyOrderResponseVo();
|
BuyOrderResponseVo responseVo = new BuyOrderResponseVo();
|
||||||
|
Integer userId = buyOrder.getUserId();
|
||||||
|
QueryWrapper<MyUserEntity> userEntityQueryWrapper = new QueryWrapper<>();
|
||||||
|
userEntityQueryWrapper.eq("id", userId);
|
||||||
|
MyUserEntity user = myUserService.getOne(userEntityQueryWrapper);
|
||||||
|
UserResponseVo userResponseVo = new UserResponseVo();
|
||||||
|
userResponseVo.setUserPhone(user.getTel());
|
||||||
|
userResponseVo.setUserName(user.getName());
|
||||||
|
responseVo.setUserInfo(userResponseVo);
|
||||||
|
responseVo.setOrderPrice(buyOrder.getOrderMoney());
|
||||||
BeanUtil.copyProperties(buyOrder, responseVo);
|
BeanUtil.copyProperties(buyOrder, responseVo);
|
||||||
ConsigneeVo consigneeVo = new ConsigneeVo();
|
ConsigneeVo consigneeVo = new ConsigneeVo();
|
||||||
consigneeVo.setConsigneeName(buyOrder.getShippingUser());
|
consigneeVo.setConsigneeName(buyOrder.getShippingUser());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.peanut.modules.book.vo;
|
package com.peanut.modules.book.vo;
|
||||||
|
|
||||||
|
import com.peanut.common.utils.PageUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -42,6 +43,6 @@ public class ClockInCommentVo {
|
|||||||
|
|
||||||
private String puserAvatar;
|
private String puserAvatar;
|
||||||
|
|
||||||
private List<ClockInCommentVo> subCommentList;
|
private List<PageUtils> subCommentList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ public class GoodsResponseVo {
|
|||||||
* 商品价格
|
* 商品价格
|
||||||
*/
|
*/
|
||||||
private BigDecimal productPrice;
|
private BigDecimal productPrice;
|
||||||
|
/**
|
||||||
|
* 商品数量
|
||||||
|
*/
|
||||||
|
private Integer quantity;
|
||||||
/**
|
/**
|
||||||
* 快递
|
* 快递
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user