瀏覽代碼

线上支付限制

plf 4 年之前
父節點
當前提交
cfdb4fb9eb

+ 10 - 0
base-module/src/main/java/com/caimei/module/base/entity/po/CmOrderProduct.java

@@ -139,6 +139,16 @@ public class CmOrderProduct implements Serializable {
      */
     private BigDecimal discountPrice;
 
+    /**
+     * 是否含税 0不含税,1含税,2未知
+     */
+    private String includedTax;
+
+    /**
+     * 发票类型(基于是否含税基础) 1增值税票,2普通票, 3不能开票
+     */
+    private String invoiceType;
+
     /**
      * 后台设置该商品税率
      */

+ 0 - 10
base-module/src/main/java/com/caimei/module/base/entity/vo/OrderProductVo.java

@@ -39,16 +39,6 @@ public class OrderProductVo extends CmOrderProduct {
      */
     private String productCategory;
 
-    /**
-     * 是否含税 0不含税,1含税,2未知
-     */
-    private String includedTax;
-
-    /**
-     * 发票类型(基于是否含税基础) 1增值税票,2普通票, 3不能开票
-     */
-    private String invoiceType;
-
     /**
      * 二手商品分类,1二手仪器,2临期产品,3其他
      */

+ 3 - 1
pay/src/main/java/com/caimei/module/pay/service/impl/PayServiceImpl.java

@@ -107,7 +107,9 @@ public class PayServiceImpl implements PayService {
         //商品数据
         List<OrderProductVo> orderProductList = payDao.fandAllOrderProduct(orderId);
         orderProductList.forEach(o -> {
-            if (StringUtils.isBlank(o.getIncludedTax()) || "2".equals(o.getIncludedTax())) {
+            if (StringUtils.isBlank(o.getIncludedTax()) || StringUtils.isBlank(o.getInvoiceType()) || "2".equals(o.getIncludedTax())
+                    || ("2".equals(order.getInvoiceFlag()) && "0".equals(o.getIncludedTax()) && "3".equals(o.getInvoiceType()))) {
+                //订单选择开发票,商品属性:不含税-不能开票
                 order.setInvoiceStatus(true);
             }
         });

+ 1 - 9
pay/src/main/resources/com-caimei-module-pay/PayMapper.xml

@@ -352,15 +352,7 @@
     </select>
 
     <select id="fandAllOrderProduct" resultType="com.caimei.module.base.entity.vo.OrderProductVo">
-        SELECT
-            p.invoiceType,
-            p.includedTax,
-            cop.*
-        FROM
-          cm_order_product cop
-          LEFT JOIN product p ON cop.productID = p.productID
-        WHERE
-          orderID = #{orderId}
+        SELECT * FROM cm_order_product WHERE orderID = #{orderId}
     </select>
 
     <select id="findUser" resultType="com.caimei.module.base.entity.vo.UserVo">