管理后台订单 VIP和课程不限制七天,后台都可以退款,app限制七天
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,7 +470,7 @@ 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")){
|
||||||
refundableStatusProduct = true;
|
refundableStatusProduct = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user