Merge remote-tracking branch 'origin/wyn-课程表' into wyn
# Conflicts: # src/main/java/com/peanut/modules/common/service/CourseMedicineService.java
This commit is contained in:
@@ -7,10 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.peanut.common.utils.DateUtils;
|
import com.peanut.common.utils.*;
|
||||||
import com.peanut.common.utils.PageUtils;
|
|
||||||
import com.peanut.common.utils.R;
|
|
||||||
import com.peanut.common.utils.ShiroUtils;
|
|
||||||
import com.peanut.config.Constants;
|
import com.peanut.config.Constants;
|
||||||
import com.peanut.config.DelayQueueConfig;
|
import com.peanut.config.DelayQueueConfig;
|
||||||
import com.peanut.modules.book.service.*;
|
import com.peanut.modules.book.service.*;
|
||||||
@@ -41,6 +38,7 @@ import com.peanut.modules.pay.weChatPay.dto.WechatPaymentInfo;
|
|||||||
import com.peanut.modules.pay.weChatPay.service.WxpayService;
|
import com.peanut.modules.pay.weChatPay.service.WxpayService;
|
||||||
import com.peanut.modules.sys.entity.SysConfigEntity;
|
import com.peanut.modules.sys.entity.SysConfigEntity;
|
||||||
import com.peanut.modules.sys.service.SysConfigService;
|
import com.peanut.modules.sys.service.SysConfigService;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.http.HttpException;
|
import org.apache.http.HttpException;
|
||||||
import org.apache.poi.ss.usermodel.Row;
|
import org.apache.poi.ss.usermodel.Row;
|
||||||
@@ -152,7 +150,9 @@ public class BuyOrderController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(path = "/orderList", method = RequestMethod.POST)
|
@RequestMapping(path = "/orderList", method = RequestMethod.POST)
|
||||||
public R orderList(@RequestBody BuyOrderListRequestVo requestVo) {
|
public R orderList(@RequestBody BuyOrderListRequestVo requestVo) {
|
||||||
Page<BuyOrder> buyOrderPage = buyOrderService.orderList(requestVo);
|
HttpServletRequest request = HttpContextUtil.getHttpServletRequest();
|
||||||
|
Boolean isHT = request.getHeader("appType")==null?true:false;
|
||||||
|
Page<BuyOrder> buyOrderPage = buyOrderService.orderList(requestVo, isHT);
|
||||||
return R.ok().put("result", buyOrderPage);
|
return R.ok().put("result", buyOrderPage);
|
||||||
}
|
}
|
||||||
//导出名医精彩订单
|
//导出名医精彩订单
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ public interface BuyOrderService extends IService<BuyOrder> {
|
|||||||
*/
|
*/
|
||||||
R delivery(String expressCompanyCode, List<Integer> buyOrderDetailId);
|
R delivery(String expressCompanyCode, List<Integer> buyOrderDetailId);
|
||||||
|
|
||||||
|
Page<BuyOrder> orderList(BuyOrderListRequestVo requestVo, Boolean isHT);
|
||||||
|
|
||||||
Page<BuyOrder> getUserOrderList(UserOrderDto userOrderDto);
|
Page<BuyOrder> getUserOrderList(UserOrderDto userOrderDto);
|
||||||
|
|
||||||
List<BuyOrder> getUserOrderStatusNum(Integer userId);
|
List<BuyOrder> getUserOrderStatusNum(Integer userId);
|
||||||
|
|||||||
@@ -383,6 +383,15 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<BuyOrder> orderList(BuyOrderListRequestVo requestVo) {
|
public Page<BuyOrder> orderList(BuyOrderListRequestVo requestVo) {
|
||||||
|
Page<BuyOrder> buyOrderPage = this.getOrderList(requestVo,null);
|
||||||
|
return buyOrderPage;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Page<BuyOrder> orderList(BuyOrderListRequestVo requestVo, Boolean isHT) {
|
||||||
|
Page<BuyOrder> buyOrderPage = this.getOrderList(requestVo,isHT);
|
||||||
|
return buyOrderPage;
|
||||||
|
}
|
||||||
|
public Page<BuyOrder> getOrderList(BuyOrderListRequestVo requestVo,Boolean isHT){
|
||||||
MPJLambdaWrapper<BuyOrder> wrapper = new MPJLambdaWrapper<>();
|
MPJLambdaWrapper<BuyOrder> wrapper = new MPJLambdaWrapper<>();
|
||||||
wrapper.selectAll(BuyOrder.class);
|
wrapper.selectAll(BuyOrder.class);
|
||||||
wrapper.leftJoin(MyUserEntity.class, MyUserEntity::getId,BuyOrder::getUserId);
|
wrapper.leftJoin(MyUserEntity.class, MyUserEntity::getId,BuyOrder::getUserId);
|
||||||
@@ -443,6 +452,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
if(paymentDateTime > timestamp-7*24*60*60*1000){
|
if(paymentDateTime > timestamp-7*24*60*60*1000){
|
||||||
refundableStatus = true;
|
refundableStatus = true;
|
||||||
}
|
}
|
||||||
|
refundableStatus = isHT?true:refundableStatus;
|
||||||
b.setVipBuyConfigEntity(vipBuyConfigService.getById(b.getVipBuyConfigId()));
|
b.setVipBuyConfigEntity(vipBuyConfigService.getById(b.getVipBuyConfigId()));
|
||||||
}
|
}
|
||||||
//添加商品信息
|
//添加商品信息
|
||||||
@@ -460,9 +470,9 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
b1.setProduct(byId);
|
b1.setProduct(byId);
|
||||||
b1.setExpressOrder(expressOrderDao.selectById(b1.getExpressOrderId()));
|
b1.setExpressOrder(expressOrderDao.selectById(b1.getExpressOrderId()));
|
||||||
boolean refundableStatusProduct = false;
|
boolean refundableStatusProduct = false;
|
||||||
if(b1.getProduct()!=null && b1.getProduct().getGoodsType().equals("05") && (paymentDateTime > timestamp-7*24*60*60*1000)){
|
if(b1.getProduct()!=null && b1.getProduct().getGoodsType().equals("05") && (paymentDateTime > timestamp-7*24*60*60*1000 || isHT)){
|
||||||
refundableStatusProduct = true;
|
refundableStatusProduct = true;
|
||||||
}else if(b1.getProduct()!=null && !b1.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals("1")){
|
}else if(b1.getProduct()!=null && !b1.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals("1") && b1.getExpressOrderId()==0){
|
||||||
refundableStatusProduct = true;
|
refundableStatusProduct = true;
|
||||||
}
|
}
|
||||||
refundableStatusArr[i] = refundableStatusProduct;
|
refundableStatusArr[i] = refundableStatusProduct;
|
||||||
@@ -571,7 +581,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
boolean refundableStatusProduct = false;
|
boolean refundableStatusProduct = false;
|
||||||
if (bb.getProduct()!=null && bb.getProduct().getGoodsType().equals("05") && paymentDateTime > timestamp - 7 * 24 * 60 * 60 * 1000) {
|
if (bb.getProduct()!=null && bb.getProduct().getGoodsType().equals("05") && paymentDateTime > timestamp - 7 * 24 * 60 * 60 * 1000) {
|
||||||
refundableStatusProduct = true;
|
refundableStatusProduct = true;
|
||||||
} else if (bb.getProduct()!=null && !bb.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals(Constants.ORDER_STATUS_TO_BE_SHIPPED)){
|
} else if (bb.getProduct()!=null && !bb.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals(Constants.ORDER_STATUS_TO_BE_SHIPPED) && bb.getExpressOrderId()==0){
|
||||||
refundableStatusProduct = true;
|
refundableStatusProduct = true;
|
||||||
}
|
}
|
||||||
refundableStatusArr[i] = refundableStatusProduct;
|
refundableStatusArr[i] = refundableStatusProduct;
|
||||||
|
|||||||
@@ -405,6 +405,7 @@ public class UserVipController {
|
|||||||
String timeId = IdWorker.getTimeId().substring(0, 32);
|
String timeId = IdWorker.getTimeId().substring(0, 32);
|
||||||
buyOrder.setOrderSn(timeId);
|
buyOrder.setOrderSn(timeId);
|
||||||
buyOrder.setUserId(uid);
|
buyOrder.setUserId(uid);
|
||||||
|
buyOrder.setPaymentDate(new Date());
|
||||||
buyOrderService.save(buyOrder);
|
buyOrderService.save(buyOrder);
|
||||||
BigDecimal totalPrice = buyOrder.getRealMoney();
|
BigDecimal totalPrice = buyOrder.getRealMoney();
|
||||||
if (Constants.PAYMENT_METHOD_VIRTUAL.equals(buyOrder.getPaymentMethod())) {
|
if (Constants.PAYMENT_METHOD_VIRTUAL.equals(buyOrder.getPaymentMethod())) {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.peanut.modules.common.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.peanut.modules.common.entity.CourseMedicine;
|
import com.peanut.modules.common.entity.CourseMedicine;
|
||||||
import com.peanut.modules.common.entity.CourseToMedicine;
|
|
||||||
|
|
||||||
public interface CourseMedicineService extends IService<CourseMedicine> {
|
public interface CourseMedicineService extends IService<CourseMedicine> {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
boolean refundableStatusProduct = false;
|
boolean refundableStatusProduct = false;
|
||||||
if(bb.getProduct()!=null && bb.getProduct().getGoodsType().equals("05") && (paymentDateTime > timestamp-7*24*60*60*1000)){
|
if(bb.getProduct()!=null && bb.getProduct().getGoodsType().equals("05") && (paymentDateTime > timestamp-7*24*60*60*1000)){
|
||||||
refundableStatusProduct = true;
|
refundableStatusProduct = true;
|
||||||
}else if(bb.getProduct()!=null && !bb.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals("1")){
|
}else if(bb.getProduct()!=null && !bb.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals("1") && bb.getExpressOrderId()==0){
|
||||||
refundableStatusProduct = true;
|
refundableStatusProduct = true;
|
||||||
}
|
}
|
||||||
refundableStatusArr[i] = refundableStatusProduct;
|
refundableStatusArr[i] = refundableStatusProduct;
|
||||||
|
|||||||
Reference in New Issue
Block a user