Merge remote-tracking branch 'origin/feature/mall_product' into feature/mall_product_new
|
@ -33,7 +33,7 @@ public class OrderPayRequest {
|
||||||
@NotNull(message = "订单编号不能为空")
|
@NotNull(message = "订单编号不能为空")
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
@Schema(description = "支付类型:weixin-微信支付,yue-余额支付,offline-线下支付,alipay-支付包支付")
|
@Schema(description = "支付类型 支付宝ALIPAY 微信WXPAY")
|
||||||
@NotNull(message = "支付类型不能为空")
|
@NotNull(message = "支付类型不能为空")
|
||||||
private String payType;
|
private String payType;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class OrderInfoResponse implements Serializable {
|
||||||
// private StoreCartResponse info;
|
// private StoreCartResponse info;
|
||||||
|
|
||||||
@Schema(description = "商品数量")
|
@Schema(description = "商品数量")
|
||||||
private Integer cartNum;
|
private Integer payNum;
|
||||||
|
|
||||||
// @Schema(description = "唯一id")
|
// @Schema(description = "唯一id")
|
||||||
// @TableField(value = "`unique`")
|
// @TableField(value = "`unique`")
|
||||||
|
|
|
@ -40,6 +40,9 @@ public class OrderPayResultResponse {
|
||||||
|
|
||||||
@Schema(description = "订单支付宝支付")
|
@Schema(description = "订单支付宝支付")
|
||||||
private String alipayRequest;
|
private String alipayRequest;
|
||||||
|
|
||||||
|
@Schema(description ="支付宝返回参数")
|
||||||
|
private String body;
|
||||||
//
|
//
|
||||||
// @Schema(description = "支付宝调起支付参数对象(app支付专用)")
|
// @Schema(description = "支付宝调起支付参数对象(app支付专用)")
|
||||||
// private AliPayJsResultVo aliPayConfig;
|
// private AliPayJsResultVo aliPayConfig;
|
||||||
|
|
|
@ -205,6 +205,8 @@ public class StoreOrderDetailInfoResponse implements Serializable {
|
||||||
@Schema(description = "订单详情")
|
@Schema(description = "订单详情")
|
||||||
private List<OrderInfoResponse> orderInfoList;
|
private List<OrderInfoResponse> orderInfoList;
|
||||||
|
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
// @Schema(description = "订单ID")
|
// @Schema(description = "订单ID")
|
||||||
// private Integer id;
|
// private Integer id;
|
||||||
//
|
//
|
||||||
|
|
|
@ -16,6 +16,8 @@ public class PayConstants {
|
||||||
|
|
||||||
//支付方式
|
//支付方式
|
||||||
public static final String PAY_TYPE_WE_CHAT = "weixin"; //微信支付
|
public static final String PAY_TYPE_WE_CHAT = "weixin"; //微信支付
|
||||||
|
public static final String PAY_TYPE_WE_CHAT_WXPAY = "WXPAY"; //微信支付
|
||||||
|
public static final String PAY_TYPE_WE_CHAT_ALIPAY = "ALIPAY"; //支付宝
|
||||||
public static final String PAY_TYPE_YUE = "yue"; //余额支付
|
public static final String PAY_TYPE_YUE = "yue"; //余额支付
|
||||||
public static final String PAY_TYPE_OFFLINE = "offline"; //线下支付
|
public static final String PAY_TYPE_OFFLINE = "offline"; //线下支付
|
||||||
public static final String PAY_TYPE_ALI_PAY = "alipay"; //支付宝
|
public static final String PAY_TYPE_ALI_PAY = "alipay"; //支付宝
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
package cn.iocoder.yudao.module.shop.controller.admin.notify;
|
package cn.iocoder.yudao.module.shop.controller.admin.notify;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
||||||
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
||||||
import com.alipay.api.AlipayApiException;
|
import com.alipay.api.AlipayApiException;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
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;
|
||||||
|
|
||||||
|
@ -15,7 +13,6 @@ import javax.annotation.security.PermitAll;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Title:AliPayNotifyController
|
* @Title:AliPayNotifyController
|
||||||
|
|
|
@ -4,7 +4,9 @@ package cn.iocoder.yudao.module.shop.controller.admin.notify;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrder;
|
||||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
||||||
|
import cn.iocoder.yudao.module.shop.dal.mysql.order.StoreOrderMapper;
|
||||||
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
||||||
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
||||||
import cn.iocoder.yudao.module.shop.service.recharge.PhoneRecordService;
|
import cn.iocoder.yudao.module.shop.service.recharge.PhoneRecordService;
|
||||||
|
@ -49,7 +51,8 @@ public class WxPayNotifyController {
|
||||||
private RechargeOrderMapper rechargeOrderMapper;
|
private RechargeOrderMapper rechargeOrderMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PhoneRecordService phoneRecordService;
|
private PhoneRecordService phoneRecordService;
|
||||||
|
@Autowired
|
||||||
|
private StoreOrderMapper storeOrderMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description: 微信支付回调接口
|
* Description: 微信支付回调接口
|
||||||
|
@ -130,13 +133,15 @@ public class WxPayNotifyController {
|
||||||
log.info("退款通知=" + JSONUtil.toJsonPrettyStr(result));
|
log.info("退款通知=" + JSONUtil.toJsonPrettyStr(result));
|
||||||
//退款状态
|
//退款状态
|
||||||
if (StringUtils.equals("SUCCESS", result.getRefundStatus())) {
|
if (StringUtils.equals("SUCCESS", result.getRefundStatus())) {
|
||||||
log.info("微信退款回调成功");
|
String outTradeNo = result.getOutTradeNo();
|
||||||
// 验证相关参数-金额
|
// 验证相关参数-金额
|
||||||
// 用户支付金额
|
// 用户支付金额
|
||||||
BigDecimal payerTotal = NumberUtil.div(result.getAmount().getPayerTotal() + "", "100", 2);
|
BigDecimal payerTotal = NumberUtil.div(result.getAmount().getPayerTotal() + "", "100", 2);
|
||||||
|
if (outTradeNo.contains("MEMBER_")) {
|
||||||
|
log.info("-----------------微信会员退款回调成功----------------------");
|
||||||
// 处理相关逻辑
|
// 处理相关逻辑
|
||||||
RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getOrderId, result.getOutTradeNo()));
|
RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getOrderId, outTradeNo));
|
||||||
if(orderDO!=null){
|
if (orderDO != null) {
|
||||||
if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) {
|
if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) {
|
||||||
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal);
|
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal);
|
||||||
return "failure";
|
return "failure";
|
||||||
|
@ -152,6 +157,18 @@ public class WxPayNotifyController {
|
||||||
// 写入
|
// 写入
|
||||||
response.setStatus(HttpServletResponse.SC_OK);
|
response.setStatus(HttpServletResponse.SC_OK);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log.info("-----------------微信会员退款回调成功----------------------");
|
||||||
|
StoreOrder storeOrder = storeOrderMapper.selectOne(Wrappers.<StoreOrder>lambdaQuery().eq(StoreOrder::getOrderId, outTradeNo));
|
||||||
|
if (storeOrder != null) {
|
||||||
|
if (payerTotal.compareTo(storeOrder.getPayPrice()) != 0) {
|
||||||
|
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", storeOrder.getPayPrice(), payerTotal);
|
||||||
|
return "failure";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,9 @@ import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.iocoder.yudao.framework.common.enums.Constants;
|
import cn.iocoder.yudao.framework.common.enums.Constants;
|
||||||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||||
|
import cn.iocoder.yudao.framework.pay.config.AliPayConfig;
|
||||||
import cn.iocoder.yudao.framework.pay.config.WxPayOneAutoConfiguration;
|
import cn.iocoder.yudao.framework.pay.config.WxPayOneAutoConfiguration;
|
||||||
|
import cn.iocoder.yudao.framework.pay.properties.AliPayProperties;
|
||||||
import cn.iocoder.yudao.framework.pay.properties.WxPayProperties;
|
import cn.iocoder.yudao.framework.pay.properties.WxPayProperties;
|
||||||
import cn.iocoder.yudao.module.infra.api.config.ApiConfigApi;
|
import cn.iocoder.yudao.module.infra.api.config.ApiConfigApi;
|
||||||
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
||||||
|
@ -24,6 +26,12 @@ import cn.iocoder.yudao.module.shop.service.product.StoreProductService;
|
||||||
import cn.iocoder.yudao.module.shop.utils.OrderUtil;
|
import cn.iocoder.yudao.module.shop.utils.OrderUtil;
|
||||||
import cn.iocoder.yudao.module.shop.utils.RedisUtil;
|
import cn.iocoder.yudao.module.shop.utils.RedisUtil;
|
||||||
import cn.iocoder.yudao.module.shop.vo.order.WxPayJsResultVo;
|
import cn.iocoder.yudao.module.shop.vo.order.WxPayJsResultVo;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alipay.api.AlipayApiException;
|
||||||
|
import com.alipay.api.AlipayClient;
|
||||||
|
import com.alipay.api.request.AlipayTradeWapPayRequest;
|
||||||
|
import com.alipay.api.response.AlipayTradeWapPayResponse;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderV3Request;
|
import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderV3Request;
|
||||||
import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderV3Result;
|
import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderV3Result;
|
||||||
import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum;
|
import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum;
|
||||||
|
@ -38,10 +46,9 @@ import org.springframework.util.Assert;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -100,7 +107,10 @@ public class OrderPayServiceImpl implements OrderPayService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private WxPayProperties payProperties;
|
private WxPayProperties payProperties;
|
||||||
|
@Autowired
|
||||||
|
private AliPayConfig aliPayConfig;
|
||||||
|
@Autowired
|
||||||
|
private AliPayProperties aliPayProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付成功处理
|
* 支付成功处理
|
||||||
|
@ -218,6 +228,8 @@ public class OrderPayServiceImpl implements OrderPayService {
|
||||||
storeOrder.setIsChannel(1);
|
storeOrder.setIsChannel(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
storeOrder.setIsChannel(7); // 支付宝支付
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean changePayType = storeOrderService.updateById(storeOrder);
|
boolean changePayType = storeOrderService.updateById(storeOrder);
|
||||||
|
@ -243,7 +255,7 @@ public class OrderPayServiceImpl implements OrderPayService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 微信支付,调用微信预下单,返回拉起微信支付需要的信息
|
// 微信支付,调用微信预下单,返回拉起微信支付需要的信息
|
||||||
if (storeOrder.getPayType().equals(PayConstants.PAY_TYPE_WE_CHAT)) {
|
if (storeOrder.getPayType().equals(PayConstants.PAY_TYPE_WE_CHAT_WXPAY)) {
|
||||||
// 预下单
|
// 预下单
|
||||||
WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = unifiedorder(storeOrder, ip, orderPayRequest.getOpenid());
|
WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = unifiedorder(storeOrder, ip, orderPayRequest.getOpenid());
|
||||||
WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService();
|
WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService();
|
||||||
|
@ -270,6 +282,31 @@ public class OrderPayServiceImpl implements OrderPayService {
|
||||||
// storeOrderService.updateById(storeOrder);
|
// storeOrderService.updateById(storeOrder);
|
||||||
response.setJsConfig(vo);
|
response.setJsConfig(vo);
|
||||||
return response;
|
return response;
|
||||||
|
} else if (storeOrder.getPayType().equals(PayConstants.PAY_TYPE_WE_CHAT_ALIPAY)) {
|
||||||
|
AlipayClient alipayClient = aliPayConfig.alipayClient();
|
||||||
|
Assert.notNull(alipayClient, "获取支付宝支付配置失败!");
|
||||||
|
AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest();
|
||||||
|
//异步接收地址,仅支持http/https,公网可访问
|
||||||
|
request.setNotifyUrl(aliPayProperties.getNotifyUrl());
|
||||||
|
//同步跳转地址,仅支持http/https
|
||||||
|
request.setReturnUrl("");
|
||||||
|
/******必传参数******/
|
||||||
|
JSONObject bizContent = new JSONObject();
|
||||||
|
//商户订单号,商家自定义,保持唯一性
|
||||||
|
bizContent.put("out_trade_no", storeOrder.getOrderId());
|
||||||
|
//支付金额,最小值0.01元
|
||||||
|
bizContent.put("total_amount", storeOrder.getPayPrice());
|
||||||
|
//订单标题,不可使用特殊符号
|
||||||
|
bizContent.put("subject", "商品购买");
|
||||||
|
bizContent.put("product_code", "QUICK_WAP_WAY");
|
||||||
|
request.setBizContent(bizContent.toString());
|
||||||
|
try {
|
||||||
|
AlipayTradeWapPayResponse response1 = alipayClient.pageExecute(request,"get");
|
||||||
|
response.setBody(response1.getBody());
|
||||||
|
return response;
|
||||||
|
} catch (AlipayApiException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 余额支付
|
// 余额支付
|
||||||
if (storeOrder.getPayType().equals(PayConstants.PAY_TYPE_YUE)) {
|
if (storeOrder.getPayType().equals(PayConstants.PAY_TYPE_YUE)) {
|
||||||
|
@ -349,7 +386,10 @@ public class OrderPayServiceImpl implements OrderPayService {
|
||||||
wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ip));
|
wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ip));
|
||||||
wxPayRequest.setAppid(payProperties.getAppId());
|
wxPayRequest.setAppid(payProperties.getAppId());
|
||||||
wxPayRequest.setMchid(payProperties.getMchId());
|
wxPayRequest.setMchid(payProperties.getMchId());
|
||||||
wxPayRequest.setTimeExpire(formatLocalDateTime(LocalDateTime.now().plusMinutes(30), "yyyyMMddHHmmss"));
|
StoreOrder one = storeOrderService.getOne(Wrappers.<StoreOrder>lambdaQuery().eq(StoreOrder::getOrderId, storeOrder.getOrderId()));
|
||||||
|
LocalDateTime localDateTime1 = LocalDateTime.ofInstant(one.getCreateTime().toInstant(), ZoneId.systemDefault());
|
||||||
|
|
||||||
|
wxPayRequest.setTimeExpire(formatLocalDateTime(localDateTime1.plusMinutes(30), "yyyyMMddHHmmss"));
|
||||||
try {
|
try {
|
||||||
WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest);
|
WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest);
|
||||||
// map.put("mweb_url",wxPayUnifiedOrderV3Result.getH5Url());
|
// map.put("mweb_url",wxPayUnifiedOrderV3Result.getH5Url());
|
||||||
|
|
|
@ -68,6 +68,9 @@ import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -196,7 +199,10 @@ public class OrderServiceImpl implements OrderService {
|
||||||
});
|
});
|
||||||
convert.setOrderInfoList(orderInfoList);
|
convert.setOrderInfoList(orderInfoList);
|
||||||
}
|
}
|
||||||
|
long time = 30*60*1000;//30分钟
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
|
convert.setEndTime(sdf.format(storeOrder.getCreateTime().getTime()+time));
|
||||||
return convert;
|
return convert;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,7 +630,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
OrderInfoResponse orderInfoResponse = new OrderInfoResponse();
|
OrderInfoResponse orderInfoResponse = new OrderInfoResponse();
|
||||||
orderInfoResponse.setStoreName(e.getInfo().getProductName());
|
orderInfoResponse.setStoreName(e.getInfo().getProductName());
|
||||||
orderInfoResponse.setImage(e.getInfo().getImage());
|
orderInfoResponse.setImage(e.getInfo().getImage());
|
||||||
orderInfoResponse.setCartNum(e.getInfo().getPayNum());
|
orderInfoResponse.setPayNum(e.getInfo().getPayNum());
|
||||||
orderInfoResponse.setPrice(e.getInfo().getPrice());
|
orderInfoResponse.setPrice(e.getInfo().getPrice());
|
||||||
orderInfoResponse.setProductId(e.getProductId());
|
orderInfoResponse.setProductId(e.getProductId());
|
||||||
infoResponseList.add(orderInfoResponse);
|
infoResponseList.add(orderInfoResponse);
|
||||||
|
@ -1106,7 +1112,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
// } else {
|
// } else {
|
||||||
// priceResponse.setCouponFee(storeCouponUser.getMoney());
|
// priceResponse.setCouponFee(storeCouponUser.getMoney());
|
||||||
// }
|
// }
|
||||||
|
priceResponse.setPayFee(priceResponse.getFreightFee().add(orderInfoVo.getPayFee()));
|
||||||
priceResponse.setProTotalFee(orderInfoVo.getProTotalFee());
|
priceResponse.setProTotalFee(orderInfoVo.getProTotalFee());
|
||||||
// 积分部分
|
// 积分部分
|
||||||
|
|
||||||
|
@ -1304,8 +1310,8 @@ public class OrderServiceImpl implements OrderService {
|
||||||
storeOrder.setCouponId(Optional.ofNullable(orderRequest.getCouponId()).orElse(0L));
|
storeOrder.setCouponId(Optional.ofNullable(orderRequest.getCouponId()).orElse(0L));
|
||||||
|
|
||||||
// 订单总价
|
// 订单总价
|
||||||
BigDecimal totalPrice = computedOrderPriceResponse.getProTotalFee().add(computedOrderPriceResponse.getFreightFee());
|
// BigDecimal totalPrice = computedOrderPriceResponse.getProTotalFee().add(computedOrderPriceResponse.getFreightFee());
|
||||||
|
BigDecimal totalPrice = new BigDecimal("0.01");
|
||||||
storeOrder.setTotalPrice(totalPrice);
|
storeOrder.setTotalPrice(totalPrice);
|
||||||
storeOrder.setProTotalPrice(computedOrderPriceResponse.getProTotalFee());
|
storeOrder.setProTotalPrice(computedOrderPriceResponse.getProTotalFee());
|
||||||
storeOrder.setTotalPostage(computedOrderPriceResponse.getFreightFee());
|
storeOrder.setTotalPostage(computedOrderPriceResponse.getFreightFee());
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package cn.iocoder.yudao.module.shop.service.order.impl;
|
package cn.iocoder.yudao.module.shop.service.order.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
@ -13,7 +12,6 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.DateLimitUtilVo;
|
import cn.iocoder.yudao.framework.common.pojo.DateLimitUtilVo;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||||
import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils;
|
|
||||||
import cn.iocoder.yudao.framework.pay.properties.AliPayProperties;
|
import cn.iocoder.yudao.framework.pay.properties.AliPayProperties;
|
||||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
|
@ -22,7 +20,6 @@ import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||||
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
||||||
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||||
import cn.iocoder.yudao.module.member.api.user.dto.PromoterDTO;
|
import cn.iocoder.yudao.module.member.api.user.dto.PromoterDTO;
|
||||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeGearExportReqVO;
|
|
||||||
import cn.iocoder.yudao.module.shop.controller.app.recharge.vo.PhoneRecordAdd;
|
import cn.iocoder.yudao.module.shop.controller.app.recharge.vo.PhoneRecordAdd;
|
||||||
import cn.iocoder.yudao.module.shop.dal.dataobject.express.ExpressDO;
|
import cn.iocoder.yudao.module.shop.dal.dataobject.express.ExpressDO;
|
||||||
import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrder;
|
import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrder;
|
||||||
|
@ -91,7 +88,6 @@ import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -161,7 +157,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private RechargeGearService rechargeGearService;
|
private RechargeGearService rechargeGearService;
|
||||||
|
@Autowired
|
||||||
|
private StoreOrderMapper storeOrderMapper;
|
||||||
/**
|
/**
|
||||||
* 列表(PC)
|
* 列表(PC)
|
||||||
*
|
*
|
||||||
|
@ -1209,6 +1206,9 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
if (flag) {
|
if (flag) {
|
||||||
log.info("ALIPAY====MAP===>{}", params);
|
log.info("ALIPAY====MAP===>{}", params);
|
||||||
String orderId = params.get("out_trade_no");
|
String orderId = params.get("out_trade_no");
|
||||||
|
if (orderId.contains("MEMBER_")) {
|
||||||
|
log.info("ALIPAY====表示充值回调===>{}", params);
|
||||||
|
// 表示充值回调
|
||||||
RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getOrderId, orderId));
|
RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getOrderId, orderId));
|
||||||
if (Objects.isNull(orderDO)) {
|
if (Objects.isNull(orderDO)) {
|
||||||
log.error("订单号错误,未查询到相关信息!入参订单号:{}", orderId);
|
log.error("订单号错误,未查询到相关信息!入参订单号:{}", orderId);
|
||||||
|
@ -1217,6 +1217,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
// 验证相关参数-金额
|
// 验证相关参数-金额
|
||||||
String amount;
|
String amount;
|
||||||
if (null == params.get("receipt_amount")) {
|
if (null == params.get("receipt_amount")) {
|
||||||
|
// 表示退款
|
||||||
amount = params.get("refund_fee");
|
amount = params.get("refund_fee");
|
||||||
orderDO.setPaid(2);
|
orderDO.setPaid(2);
|
||||||
orderDO.setRefundStatus(2);
|
orderDO.setRefundStatus(2);
|
||||||
|
@ -1224,11 +1225,10 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
try {
|
try {
|
||||||
phoneRecordService.deletePhoneGear(orderDO.getOrderId());
|
phoneRecordService.deletePhoneGear(orderDO.getOrderId());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("删除提报记录异常{}", e);
|
log.error("删除提报记录异常{}", e.getMessage());
|
||||||
}
|
}
|
||||||
//删除本地提报记录
|
//删除本地提报记录
|
||||||
phoneRecordService.deletePhoneGearByOrderId(orderDO.getId());
|
phoneRecordService.deletePhoneGearByOrderId(orderDO.getId());
|
||||||
// 表示退款
|
|
||||||
} else {
|
} else {
|
||||||
// 表示支付
|
// 表示支付
|
||||||
amount = params.get("receipt_amount");
|
amount = params.get("receipt_amount");
|
||||||
|
@ -1245,13 +1245,46 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
if (null != params.get("receipt_amount")) {
|
if (null != params.get("receipt_amount")) {
|
||||||
addPhoneRecord(orderDO, orderId);
|
addPhoneRecord(orderDO, orderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
log.info("ALIPAY====表示商城回调===>{}", params);
|
||||||
|
// 表示商城回调
|
||||||
|
StoreOrder storeOrder = storeOrderMapper.selectOne(Wrappers.<StoreOrder>lambdaQuery().eq(StoreOrder::getOrderId, orderId));
|
||||||
|
if (Objects.isNull(storeOrder)) {
|
||||||
|
log.error("订单号错误,未查询到相关信息!入参订单号:{}", orderId);
|
||||||
|
return "failure";
|
||||||
|
}
|
||||||
|
// 验证相关参数-金额
|
||||||
|
String amount;
|
||||||
|
if (null == params.get("receipt_amount")) {
|
||||||
|
// 表示退款
|
||||||
|
amount = params.get("refund_fee");
|
||||||
|
storeOrder.setRefundStatus(2);
|
||||||
|
} else {
|
||||||
|
// 表示支付
|
||||||
|
amount = params.get("receipt_amount");
|
||||||
|
storeOrder.setOutTradeNo(params.get("trade_no"));
|
||||||
|
storeOrder.setPaid(Boolean.TRUE);
|
||||||
|
}
|
||||||
|
if (new BigDecimal(amount).compareTo(storeOrder.getPayPrice()) != 0) {
|
||||||
|
log.error("支付金额不匹配,订单实际支付金额:{},支付宝入参验证金额:{}", storeOrder.getPayPrice(), amount);
|
||||||
|
return "failure";
|
||||||
|
}
|
||||||
|
// 修改订单状态
|
||||||
|
storeOrderMapper.updateById(storeOrder);
|
||||||
|
}
|
||||||
log.debug(">>>>>>>>>>>>>>支付宝订单交易成功!订单号:{}<<<<<<<<<<<<<<<<<<<<", orderId);
|
log.debug(">>>>>>>>>>>>>>支付宝订单交易成功!订单号:{}<<<<<<<<<<<<<<<<<<<<", orderId);
|
||||||
return "success";
|
return "success";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return "failure";
|
return "failure";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String s = "MEMBER_1661994584871321602";
|
||||||
|
System.out.println(s.contains("MEMBER_"));
|
||||||
|
}
|
||||||
public void addPhoneRecord(RechargeOrderDO orderDO, String orderId) {
|
public void addPhoneRecord(RechargeOrderDO orderDO, String orderId) {
|
||||||
List<RechargeOrderInfoDO> infoDOS = rechargeOrderInfoMapper.selectList(Wrappers.<RechargeOrderInfoDO>lambdaQuery().eq(RechargeOrderInfoDO::getOrderNo, orderId));
|
List<RechargeOrderInfoDO> infoDOS = rechargeOrderInfoMapper.selectList(Wrappers.<RechargeOrderInfoDO>lambdaQuery().eq(RechargeOrderInfoDO::getOrderNo, orderId));
|
||||||
List<PhoneRecordDO> recordDOS = new ArrayList<>();
|
List<PhoneRecordDO> recordDOS = new ArrayList<>();
|
||||||
|
@ -1356,12 +1389,12 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
public Boolean wxPayNotify(WxPayOrderNotifyV3Result.DecryptNotifyResult result) {
|
public Boolean wxPayNotify(WxPayOrderNotifyV3Result.DecryptNotifyResult result) {
|
||||||
log.info("支付通知=" + JSONUtil.toJsonPrettyStr(result));
|
log.info("支付通知=" + JSONUtil.toJsonPrettyStr(result));
|
||||||
if (StringUtils.equals("SUCCESS", result.getTradeState())) {
|
if (StringUtils.equals("SUCCESS", result.getTradeState())) {
|
||||||
log.info("WXPAY====result===>");
|
|
||||||
// 验证相关参数-金额
|
|
||||||
String outTradeNo = result.getOutTradeNo();
|
String outTradeNo = result.getOutTradeNo();
|
||||||
// 用户支付金额
|
// 用户支付金额
|
||||||
BigDecimal payerTotal = NumberUtil.div(result.getAmount().getPayerTotal() + "", "100", 2);
|
BigDecimal payerTotal = NumberUtil.div(result.getAmount().getPayerTotal() + "", "100", 2);
|
||||||
// 处理相关逻辑
|
// 处理相关逻辑
|
||||||
|
if (outTradeNo.contains("MEMBER_")) {
|
||||||
|
log.info("WXPAY====会员===>");
|
||||||
RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getOrderId, outTradeNo));
|
RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getOrderId, outTradeNo));
|
||||||
if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) {
|
if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) {
|
||||||
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal);
|
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal);
|
||||||
|
@ -1373,6 +1406,14 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
rechargeOrderMapper.updateById(orderDO);
|
rechargeOrderMapper.updateById(orderDO);
|
||||||
// 写入 充值档位记录表
|
// 写入 充值档位记录表
|
||||||
addPhoneRecord(orderDO, outTradeNo);
|
addPhoneRecord(orderDO, outTradeNo);
|
||||||
|
} else {
|
||||||
|
log.info("WXPAY====商城===>");
|
||||||
|
StoreOrder storeOrder = storeOrderMapper.selectOne(Wrappers.<StoreOrder>lambdaQuery().eq(StoreOrder::getOrderId, outTradeNo));
|
||||||
|
if (payerTotal.compareTo(storeOrder.getPayPrice()) != 0) {
|
||||||
|
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", storeOrder.getPayPrice(), payerTotal);
|
||||||
|
return Boolean.FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
log.debug(">>>>>>>>>>>>>>微信订单交易成功!订单号:{}<<<<<<<<<<<<<<<<<<<<", outTradeNo);
|
log.debug(">>>>>>>>>>>>>>微信订单交易成功!订单号:{}<<<<<<<<<<<<<<<<<<<<", outTradeNo);
|
||||||
}
|
}
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-button size="mini" type="primary" @click="handleAddMenu({id:0,name:'顶层目录'})" v-hasPermi="['product:category:create']" >新增{{ biztype.name }}</el-button>
|
<el-button size="mini" type="primary" @click="handleAddMenu({id:0,name:'顶层目录'})" v-hasPermi="['admin:category:save']" >新增{{ biztype.name }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="treeList"
|
ref="treeList"
|
||||||
|
@ -88,6 +88,7 @@
|
||||||
active-text="显示"
|
active-text="显示"
|
||||||
inactive-text="隐藏"
|
inactive-text="隐藏"
|
||||||
@change="onchangeIsShow(scope.row)"
|
@change="onchangeIsShow(scope.row)"
|
||||||
|
v-hasPermi="['admin:category:save']"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -100,8 +101,8 @@
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleAddMenu(scope.row)"
|
@click="handleAddMenu(scope.row)"
|
||||||
>添加子目录</el-button>
|
>添加子目录</el-button>
|
||||||
<el-button type="text" size="small" @click="handleEditMenu(scope.row)" v-hasPermi="['product:category:update']">编辑</el-button>
|
<el-button type="text" size="small" @click="handleEditMenu(scope.row)" v-hasPermi="['admin:category:update']">编辑</el-button>
|
||||||
<el-button type="text" size="small" @click="handleDelMenu(scope.row)" v-hasPermi="['product:category:delete']">删除</el-button>
|
<el-button type="text" size="small" @click="handleDelMenu(scope.row)" v-hasPermi="['admin:category:delete']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<router-link :to=" { name: 'ProductSpuCreate' } ">
|
<router-link :to=" { name: 'ProductSpuCreate' } " >
|
||||||
<el-button size="small" type="primary" class="mr10">添加商品</el-button>
|
<el-button size="small" type="primary" class="mr10" v-hasPermi="['admin:product:save']">添加商品</el-button>
|
||||||
</router-link>
|
</router-link>
|
||||||
<!-- <el-button size="small" type="success" class="mr10" @click="onCopy">商品采集</el-button>-->
|
<!-- <el-button size="small" type="success" class="mr10" @click="onCopy">商品采集</el-button>-->
|
||||||
<el-button size="small" icon="el-icon-upload2" @click="exports">导出</el-button>
|
<el-button size="small" icon="el-icon-upload2" @click="exports">导出</el-button>
|
||||||
|
@ -119,23 +119,24 @@
|
||||||
active-text="上架"
|
active-text="上架"
|
||||||
inactive-text="下架"
|
inactive-text="下架"
|
||||||
@change="onchangeIsShow(scope.row)"
|
@change="onchangeIsShow(scope.row)"
|
||||||
|
v-hasPermi="['admin:product:u' && 'admin:product:down']"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" min-width="150" fixed="right" align="center">
|
<el-table-column label="操作" min-width="150" fixed="right" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<router-link :to="{path: '/store/add/' + scope.row.id + '/1'}">
|
<router-link :to="{path: '/store/add/' + scope.row.id + '/1'}">
|
||||||
<el-button type="text" size="small" class="mr10">详情</el-button>
|
<el-button type="text" size="small" class="mr10" v-hasPermi="['admin:product:info']">详情</el-button>
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link :to="{path: '/store/add/' + scope.row.id}">
|
<router-link :to="{path: '/store/add/' + scope.row.id}" >
|
||||||
<el-button type="text" size="small" class="mr10" v-if="tableFrom.type !== '5' && tableFrom.type !== '1'">编辑</el-button>
|
<el-button type="text" size="small" class="mr10" v-if="tableFrom.type !== '5' && tableFrom.type !== '1'" v-hasPermi="['admin:product:update']">编辑</el-button>
|
||||||
</router-link>
|
</router-link>
|
||||||
<el-button v-if="tableFrom.type === '5'" type="text" size="small" @click="handleRestore(scope.row.id, scope.$index)">恢复商品</el-button>
|
<el-button v-if="tableFrom.type === '5'" type="text" size="small" @click="handleRestore(scope.row.id, scope.$index)" v-hasPermi="['admin:product:restore']">恢复商品</el-button>
|
||||||
<el-button type="text" size="small" @click="handleDelete(scope.row.id, tableFrom.type)">{{ tableFrom.type === '5' ? '删除' : '加入回收站' }}</el-button>
|
<el-button type="text" size="small" @click="handleDelete(scope.row.id, tableFrom.type)" v-hasPermi="['admin:product:delete']">{{ tableFrom.type === '5' ? '删除' : '加入回收站' }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="block">
|
<div class="block" v-hasPermi="['admin:product:list']">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
:page-sizes="[20, 40, 60, 80]"
|
:page-sizes="[20, 40, 60, 80]"
|
||||||
:page-size="tableFrom.limit"
|
:page-size="tableFrom.limit"
|
||||||
|
|
|
@ -74,6 +74,12 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "收银台"
|
"navigationBarTitleText": "收银台"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/sale_performance/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "发展会员业绩"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/user/index",
|
"path": "pages/user/index",
|
||||||
|
|
|
@ -198,9 +198,10 @@
|
||||||
payType: that.paytype,
|
payType: that.paytype,
|
||||||
createOrderFun: wechatOrderPay,
|
createOrderFun: wechatOrderPay,
|
||||||
payResultHandle: (res) => {
|
payResultHandle: (res) => {
|
||||||
|
console.log(res)
|
||||||
return {
|
return {
|
||||||
jsapiResult: res.jsapiConfig,
|
jsapiResult: res.jsapiConfig,
|
||||||
body: res.data
|
body: res.body
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
wxPaySuccess: () => {
|
wxPaySuccess: () => {
|
||||||
|
|
|
@ -221,7 +221,6 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
overflow: hidden;
|
|
||||||
.u-nav-slot{
|
.u-nav-slot{
|
||||||
::v-deep .u-popup__content{
|
::v-deep .u-popup__content{
|
||||||
padding-bottom: 20% !important;
|
padding-bottom: 20% !important;
|
||||||
|
|
|
@ -258,6 +258,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-button {
|
.right-button {
|
||||||
|
border: 1px solid;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
padding: 7rpx 16rpx;
|
padding: 7rpx 16rpx;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
const res = await memberGradeInfo()
|
const res = await memberGradeInfo()
|
||||||
if(res.data.some((item) => !!parseInt(item.isExist))){
|
if(res.data.some((item) => !!parseInt(item.isExist))){
|
||||||
uni.setTabBarItem({
|
uni.setTabBarItem({
|
||||||
index: 0,
|
index: 2,
|
||||||
pagePath: '/pages/member_equity/index'
|
pagePath: '/pages/member_equity/index'
|
||||||
})
|
})
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
uni.setTabBarItem({
|
uni.setTabBarItem({
|
||||||
index: 0,
|
index: 2,
|
||||||
pagePath: '/pages/member_application/index'
|
pagePath: '/pages/member_application/index'
|
||||||
})
|
})
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
|
|
@ -121,7 +121,6 @@ import store from '@/store/index';
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
goPay() {
|
goPay() {
|
||||||
console.log(this.activeIndex)
|
|
||||||
if(this.activeIndex.length){
|
if(this.activeIndex.length){
|
||||||
this.$set(this, 'pay_close', true);
|
this.$set(this, 'pay_close', true);
|
||||||
const orderInfos = this.activeIndex.map((item) => {
|
const orderInfos = this.activeIndex.map((item) => {
|
||||||
|
|
|
@ -0,0 +1,280 @@
|
||||||
|
<template>
|
||||||
|
<view class="box">
|
||||||
|
<u-navbar autoBack title="发展会员业绩" bgColor="rgba(255,255,255,0)" :placeholder="true" leftIconSize="40"
|
||||||
|
leftIconColor="#fff" titleStyle="font-size:35rpx;color:#fff">
|
||||||
|
<view slot="right">
|
||||||
|
<u-icon name="more-dot-fill" color="#fff"></u-icon>
|
||||||
|
</view>
|
||||||
|
</u-navbar>
|
||||||
|
<u-sticky bgColor="#fff">
|
||||||
|
<u-tabs @change="handleChange" :list="list" itemStyle=" padding-left: 46rpx; padding-right: 46rpx; height: 46px;" lineColor="#DA2E55" lineWidth="48rpx" lineHeight="10rpx" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle"></u-tabs>
|
||||||
|
</u-sticky>
|
||||||
|
<view class="sale_content">
|
||||||
|
<view class="sale_money">
|
||||||
|
<view class="money_total">
|
||||||
|
<view class="money_left">
|
||||||
|
<image src="../../static/images/money1.png" ></image>
|
||||||
|
<text>总计金额</text>
|
||||||
|
</view>
|
||||||
|
<view class="money_right"><text>¥</text>2400</view>
|
||||||
|
</view>
|
||||||
|
<view class="money_statistics">
|
||||||
|
<view class="money_left">
|
||||||
|
<image class="logo" src="../../static/images/money2.png" ></image>
|
||||||
|
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #FFE0C5 47%, #FFFFFF 100%);"></view>
|
||||||
|
<text>已发展会员个数</text>
|
||||||
|
</view>
|
||||||
|
<view class="money_right" style="color: #FF4800;">10个</view>
|
||||||
|
<image class="fillet" src="../../static/images/fillet1.png" ></image>
|
||||||
|
</view>
|
||||||
|
<view class="money_statistics">
|
||||||
|
<view class="money_left">
|
||||||
|
<image class="logo" src="../../static/images/money3.png" ></image>
|
||||||
|
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #C8EFFF 47%, #FFFFFF 100%);"></view>
|
||||||
|
<text>提成比例</text>
|
||||||
|
</view>
|
||||||
|
<view class="money_right" style="color: #1082FF;">5%</view>
|
||||||
|
<image class="fillet" src="../../static/images/fillet2.png" ></image>
|
||||||
|
</view>
|
||||||
|
<view class="money_statistics">
|
||||||
|
<view class="money_left">
|
||||||
|
<image class="logo" src="../../static/images/money4.png" ></image>
|
||||||
|
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #CEF0DA 47%, #FFFFFF 100%);"></view>
|
||||||
|
<text>预计提成金额</text>
|
||||||
|
</view>
|
||||||
|
<view class="money_right" style="color: #32A84F;">120</view>
|
||||||
|
<image class="fillet" src="../../static/images/fillet3.png" ></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="sale_turnover">
|
||||||
|
<view class="turnover_title">
|
||||||
|
流水明细
|
||||||
|
</view>
|
||||||
|
<view class="turnover_list">
|
||||||
|
<view class="list_item">
|
||||||
|
<view>
|
||||||
|
<view class="item_radius"></view>
|
||||||
|
<text>客户1</text>
|
||||||
|
</view>
|
||||||
|
<text>¥640.00</text>
|
||||||
|
</view>
|
||||||
|
<view class="list_item">
|
||||||
|
<view>
|
||||||
|
<view class="item_radius"></view>
|
||||||
|
<text>客户1</text>
|
||||||
|
</view>
|
||||||
|
<text>¥640.00</text>
|
||||||
|
</view>
|
||||||
|
<view class="list_item">
|
||||||
|
<view>
|
||||||
|
<view class="item_radius"></view>
|
||||||
|
<text>客户1</text>
|
||||||
|
</view>
|
||||||
|
<text>¥640.00</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
memberGradeInfo
|
||||||
|
} from '@/api/member.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "member_loding",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeStyle:{
|
||||||
|
fontSize: '34rpx',
|
||||||
|
fontFamily: 'PingFang SC',
|
||||||
|
fontWeight: '400',
|
||||||
|
color: '#DA2E55'
|
||||||
|
},
|
||||||
|
inactiveStyle:{
|
||||||
|
fontSize: '30rpx',
|
||||||
|
fontFamily: 'PingFang SC',
|
||||||
|
fontWeight: '400',
|
||||||
|
color: '#fff'
|
||||||
|
},
|
||||||
|
list: [{
|
||||||
|
name: '今日',
|
||||||
|
}, {
|
||||||
|
name: '上周',
|
||||||
|
}, {
|
||||||
|
name: '上月'
|
||||||
|
}, {
|
||||||
|
name: '累计'
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
async onLoad() {
|
||||||
|
try {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleChange(index){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.box {
|
||||||
|
position: relative;
|
||||||
|
min-height: 100vh;
|
||||||
|
background: url(../../static/images/sale_bg.png);
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-attachment: fixed;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
::v-deep .u-sticky{
|
||||||
|
background: rgba(255, 255, 255, 0) !important;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.sale_content{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.sale_money{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.money_total{
|
||||||
|
margin-bottom: 14rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
min-height: 160rpx;
|
||||||
|
background: url(../../static/images/money_total.png);
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
.money_left{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
text{
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
margin-left: 37rpx;
|
||||||
|
}
|
||||||
|
image{
|
||||||
|
margin:10rpx 0 0 10rpx;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 111rpx;
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.money_right{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 48rpx;
|
||||||
|
font-size: 45rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #DA2E55;
|
||||||
|
text{
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #DA2E55;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.money_statistics{
|
||||||
|
margin-bottom: 14rpx;
|
||||||
|
padding: 19rpx 36rpx 15rpx 19rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 0px 18rpx 0px rgba(127,127,127,0.08);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: relative;
|
||||||
|
.fillet{
|
||||||
|
width: 23rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10rpx;
|
||||||
|
right: 10rpx;
|
||||||
|
}
|
||||||
|
.money_left{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
.logo{
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
.segmentation{
|
||||||
|
margin: 0 24rpx 0 18rpx;
|
||||||
|
width: 6rpx;
|
||||||
|
height: 43rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.money_right{
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.sale_turnover{
|
||||||
|
margin-top: 22rpx;
|
||||||
|
padding: 30rpx 32rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 0px 18rpx 0px rgba(127,127,127,0.08);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
.turnover_title{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
.turnover_list{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.list_item{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 29rpx 0;
|
||||||
|
border-bottom: 1px solid #D8D8D8;
|
||||||
|
text{
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
view{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.item_radius{
|
||||||
|
margin-right: 19rpx;
|
||||||
|
width: 10rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
background: #FF4106;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="navbar">
|
<view class="navbar">
|
||||||
<view class="goback"></view>
|
<view class="goback" @tap="goBack"></view>
|
||||||
<view class="search">
|
<view class="search">
|
||||||
<view class="icon"></view>
|
<view class="icon"></view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<u--input placeholder="搜索我的订单" v-model="value" @change="change"></u--input>
|
<u--input placeholder="搜索我的订单" v-model="value"></u--input>
|
||||||
</view>
|
</view>
|
||||||
<view class="button">搜索</view>
|
<view class="button">搜索</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tabs">
|
<view class="tabs">
|
||||||
<u-tabs :list="list1" @tap="click" lineWidth="60rpx" lineHeight="9rpx"></u-tabs>
|
<u-tabs :current="getTabVal()" :list="list1" @tap="click" lineWidth="60rpx" lineHeight="9rpx"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="item" @tap="goOrderDetails(123)">
|
<!-- <view class="item" @tap="goOrderDetails(123)">
|
||||||
|
@ -93,6 +93,7 @@
|
||||||
// #endif
|
// #endif
|
||||||
import emptyPage from '@/components/emptyPage.vue'
|
import emptyPage from '@/components/emptyPage.vue'
|
||||||
export default {
|
export default {
|
||||||
|
// props:['status'],
|
||||||
components: {
|
components: {
|
||||||
payment,
|
payment,
|
||||||
home,
|
home,
|
||||||
|
@ -110,6 +111,7 @@
|
||||||
orderData: {}, //订单详细统计
|
orderData: {}, //订单详细统计
|
||||||
orderStatus: 0, //订单状态
|
orderStatus: 0, //订单状态
|
||||||
page: 1,
|
page: 1,
|
||||||
|
tabVal: '',
|
||||||
list1: [{
|
list1: [{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
value: '99'
|
value: '99'
|
||||||
|
@ -161,6 +163,7 @@
|
||||||
this.loadmore()
|
this.loadmore()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.tabVal = this.$route.query.status
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.loadend = false;
|
this.loadend = false;
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
|
@ -175,6 +178,21 @@
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 返回上一级
|
||||||
|
goBack(){
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取对应标签
|
||||||
|
getTabVal(){
|
||||||
|
for(let i in this.list1){
|
||||||
|
if(this.list1[i].value == this.tabVal){
|
||||||
|
return i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
getStatus(val) {
|
getStatus(val) {
|
||||||
if (val == '0') {
|
if (val == '0') {
|
||||||
return '待发货'
|
return '待发货'
|
||||||
|
|
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 956 B |
After Width: | Height: | Size: 1021 B |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 696 KiB |