浏览代码

联合丽格改版

zhijiezhao 2 年之前
父节点
当前提交
a4769d1ac6
共有 26 个文件被更改,包括 737 次插入316 次删除
  1. 24 0
      src/main/java/com/caimei/modules/config/CorsConfig.java
  2. 10 5
      src/main/java/com/caimei/modules/homepage/dao/ActiveDao.java
  3. 3 0
      src/main/java/com/caimei/modules/homepage/dao/BannerDao.java
  4. 9 2
      src/main/java/com/caimei/modules/homepage/enity/Active.java
  5. 1 1
      src/main/java/com/caimei/modules/homepage/enity/ActiveImages.java
  6. 20 0
      src/main/java/com/caimei/modules/homepage/enity/BackProduct.java
  7. 4 0
      src/main/java/com/caimei/modules/homepage/enity/Banner.java
  8. 18 0
      src/main/java/com/caimei/modules/homepage/enity/MainMenu.java
  9. 17 0
      src/main/java/com/caimei/modules/homepage/enity/Theme.java
  10. 21 8
      src/main/java/com/caimei/modules/homepage/service/impl/PageServiceImpl.java
  11. 0 3
      src/main/java/com/caimei/modules/order/controller/OrganizeOrderController.java
  12. 232 79
      src/main/java/com/caimei/modules/order/entity/NewOrder.java
  13. 0 3
      src/main/java/com/caimei/modules/order/entity/NewOrderProduct.java
  14. 256 88
      src/main/java/com/caimei/modules/order/entity/NewShopOrder.java
  15. 0 19
      src/main/java/com/caimei/modules/order/service/impl/NewOrderServiceImpl.java
  16. 2 1
      src/main/java/com/caimei/modules/products/entity/CmMallOrganizeProducts.java
  17. 10 8
      src/main/java/com/caimei/modules/products/service/impl/CmMallOrganizeProductsServiceImpl.java
  18. 18 0
      src/main/java/com/caimei/modules/shiro/auth/AuthFilter.java
  19. 29 30
      src/main/java/com/caimei/modules/shiro/auth/ShiroConfig.java
  20. 39 16
      src/main/resources/mapper/ActiveMapper.xml
  21. 10 0
      src/main/resources/mapper/BannerMapper.xml
  22. 1 0
      src/main/resources/mapper/CmDiscernReceiptMapper.xml
  23. 10 10
      src/main/resources/mapper/CmMallOrganizeProductsMapper.xml
  24. 2 39
      src/main/resources/mapper/NewOrderMapper.xml
  25. 0 4
      src/main/resources/mapper/NewShopOrderMapper.xml
  26. 1 0
      src/main/resources/mapper/ThemeMapper.xml

+ 24 - 0
src/main/java/com/caimei/modules/config/CorsConfig.java

@@ -0,0 +1,24 @@
+package com.caimei.modules.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class CorsConfig {
+    @Bean
+    public WebMvcConfigurer corsConfigurer() {
+        return new WebMvcConfigurer() {
+            @Override
+            public void addCorsMappings(CorsRegistry registry) {
+                registry.addMapping("/**")
+                        .allowedOrigins("*")
+                        .allowedMethods("GET", "POST", "PUT", "DELETE")
+                        .allowedHeaders("*")
+                        .allowedOriginPatterns("*")
+                        .maxAge(3600);
+            }
+        };
+    }
+}

+ 10 - 5
src/main/java/com/caimei/modules/homepage/dao/ActiveDao.java

@@ -2,6 +2,7 @@ package com.caimei.modules.homepage.dao;
 
 
 import com.caimei.modules.homepage.enity.Active;
 import com.caimei.modules.homepage.enity.Active;
 import com.caimei.modules.homepage.enity.ActiveImages;
 import com.caimei.modules.homepage.enity.ActiveImages;
+import com.caimei.modules.homepage.enity.BackProduct;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
 
 
 import java.util.List;
 import java.util.List;
@@ -20,11 +21,11 @@ public interface ActiveDao {
 
 
     void insertImages(ActiveImages images);
     void insertImages(ActiveImages images);
 
 
-    void insertProducts(Integer id, Integer productId);
+    void insertProducts(Integer id, Integer productId, Integer sort);
 
 
     void updateActive(Active active);
     void updateActive(Active active);
 
 
-    void insertImageProduct(Integer activeId, Integer imageId, List<Integer> productIds);
+    void insertImageProduct(Integer activeId, Integer imageId, Integer productId, Integer sort);
 
 
     List<Active> findActiveList(Active active);
     List<Active> findActiveList(Active active);
 
 
@@ -34,9 +35,13 @@ public interface ActiveDao {
 
 
     Active findActiveById(Integer id);
     Active findActiveById(Integer id);
 
 
-    List<Integer> findProductsById(Integer id);
-
     List<ActiveImages> findImageList(Integer id);
     List<ActiveImages> findImageList(Integer id);
 
 
-    List<Integer> findProductByImage(Integer id);
+    List<BackProduct> findProducts(Integer id);
+
+    List<BackProduct> findProductsByImage(Integer id);
+
+    void delActiveImage(Integer id);
+
+    void delActiveProduct(Integer id);
 }
 }

+ 3 - 0
src/main/java/com/caimei/modules/homepage/dao/BannerDao.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.homepage.dao;
 package com.caimei.modules.homepage.dao;
 
 
+import com.caimei.modules.homepage.enity.BackProduct;
 import com.caimei.modules.homepage.enity.Banner;
 import com.caimei.modules.homepage.enity.Banner;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
@@ -25,4 +26,6 @@ public interface BannerDao {
     Banner findBannerById(Integer id);
     Banner findBannerById(Integer id);
 
 
     void updateSort(@Param("id") Integer id, @Param("sort") Integer sort, @Param("status") Integer status);
     void updateSort(@Param("id") Integer id, @Param("sort") Integer sort, @Param("status") Integer status);
+
+    List<BackProduct> findProducts(Integer jumpProductId);
 }
 }

+ 9 - 2
src/main/java/com/caimei/modules/homepage/enity/Active.java

@@ -1,8 +1,11 @@
 package com.caimei.modules.homepage.enity;
 package com.caimei.modules.homepage.enity;
 
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Data;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -20,12 +23,16 @@ public class Active implements Serializable {
      * 活动类型 1商品列表 2宣传图(一张) 3宣传图(多张)
      * 活动类型 1商品列表 2宣传图(一张) 3宣传图(多张)
      */
      */
     private Integer activeType;
     private Integer activeType;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date addTime;
     /**
     /**
-     * 活动类型1 用prodcutIds
+     * 回显商品
      */
      */
-    private List<Integer> productIds;
+    @TableField(exist = false)
+    private List<BackProduct> products;
     /**
     /**
      * 活动类型不为1则用images
      * 活动类型不为1则用images
      */
      */
+    @TableField(exist = false)
     private List<ActiveImages> images;
     private List<ActiveImages> images;
 }
 }

+ 1 - 1
src/main/java/com/caimei/modules/homepage/enity/ActiveImages.java

@@ -15,5 +15,5 @@ public class ActiveImages implements Serializable {
     private Integer id;
     private Integer id;
     private Integer activeId;
     private Integer activeId;
     private String image;
     private String image;
-    private List<Integer> productIds;
+    private List<BackProduct> products;
 }
 }

+ 20 - 0
src/main/java/com/caimei/modules/homepage/enity/BackProduct.java

@@ -0,0 +1,20 @@
+package com.caimei.modules.homepage.enity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zzj
+ * 回显商品信息
+ */
+@Data
+public class BackProduct implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private Integer productId;
+    private String mainImage;
+    private String productName;
+    private Integer validFlag;
+    private Integer sort;
+}

+ 4 - 0
src/main/java/com/caimei/modules/homepage/enity/Banner.java

@@ -37,4 +37,8 @@ public class Banner implements Serializable {
      * 跳转商品Id
      * 跳转商品Id
      */
      */
     private Integer jumpProductId;
     private Integer jumpProductId;
+    /**
+     * 回显商品信息
+     */
+    private List<BackProduct> products;
 }
 }

+ 18 - 0
src/main/java/com/caimei/modules/homepage/enity/MainMenu.java

@@ -1,26 +1,44 @@
 package com.caimei.modules.homepage.enity;
 package com.caimei.modules.homepage.enity;
 
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.format.annotation.DateTimeFormat;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Date;
+import java.util.List;
 
 
 /**
 /**
  * @author zzj
  * @author zzj
  */
  */
 @Data
 @Data
+@TableName(value = "cm_mall_mainmenu")
 public class MainMenu implements Serializable {
 public class MainMenu implements Serializable {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
+    @TableId(value = "id", type = IdType.AUTO)
     private Integer id;
     private Integer id;
+    @TableField(value = "organizeId")
     private Integer organizeId;
     private Integer organizeId;
+    @TableField(value = "topic")
     private String topic;
     private String topic;
+    @TableField(value = "image")
     private String image;
     private String image;
+    @TableField(value = "sort")
     private Integer sort;
     private Integer sort;
+    @TableField(value = "enabledStatus")
     private Integer enabledStatus;
     private Integer enabledStatus;
+    @TableField(value = "jumpType")
     private Integer jumpType;
     private Integer jumpType;
+    @TableField(value = "jumpProductId")
     private Integer jumpProductId;
     private Integer jumpProductId;
+    @TableField(value = "jumpActiveId")
     private Integer jumpActiveId;
     private Integer jumpActiveId;
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField(value = "addTime")
     private Date addTime;
     private Date addTime;
+    @TableField(exist = false)
+    private List<BackProduct> products;
 }
 }

+ 17 - 0
src/main/java/com/caimei/modules/homepage/enity/Theme.java

@@ -1,25 +1,42 @@
 package com.caimei.modules.homepage.enity;
 package com.caimei.modules.homepage.enity;
 
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.format.annotation.DateTimeFormat;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Date;
+import java.util.List;
 
 
 /**
 /**
  * @author zzj
  * @author zzj
  */
  */
 @Data
 @Data
+@TableName(value = "cm_mall_theme")
 public class Theme implements Serializable {
 public class Theme implements Serializable {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
+    @TableId(value = "id",type = IdType.AUTO)
     private Integer id;
     private Integer id;
+    @TableField(value = "organizeId")
     private Integer organizeId;
     private Integer organizeId;
+    @TableField(value = "topic")
     private String topic;
     private String topic;
+    @TableField(value = "enabledStatus")
     private Integer enabledStatus;
     private Integer enabledStatus;
+    @TableField(value = "image")
     private String image;
     private String image;
+    @TableField(value = "jumpType")
     private Integer jumpType;
     private Integer jumpType;
+    @TableField(value = "jumpProductId")
     private Integer jumpProductId;
     private Integer jumpProductId;
+    @TableField(value = "jumpActiveId")
     private Integer jumpActiveId;
     private Integer jumpActiveId;
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField(value = "addTime")
     private Date addTime;
     private Date addTime;
+    @TableField(exist = false)
+    private List<BackProduct> products;
 }
 }

+ 21 - 8
src/main/java/com/caimei/modules/homepage/service/impl/PageServiceImpl.java

@@ -106,12 +106,11 @@ public class PageServiceImpl implements PageService {
             active.getImages().forEach(i -> {
             active.getImages().forEach(i -> {
                 i.setActiveId(active.getId());
                 i.setActiveId(active.getId());
                 activeDao.insertImages(i);
                 activeDao.insertImages(i);
-                log.info("imageId--------------" + i.getId());
-                activeDao.insertImageProduct(active.getId(), i.getId(), i.getProductIds());
+                i.getProducts().forEach(p -> activeDao.insertImageProduct(active.getId(), i.getId(), p.getProductId(), p.getSort()));
             });
             });
             return "保存成功!";
             return "保存成功!";
         }
         }
-        active.getProductIds().forEach(p -> activeDao.insertProducts(active.getId(), p));
+        active.getProducts().forEach(p -> activeDao.insertProducts(active.getId(), p.getProductId(), p.getSort()));
         return "保存成功!";
         return "保存成功!";
     }
     }
 
 
@@ -131,17 +130,27 @@ public class PageServiceImpl implements PageService {
     @Override
     @Override
     public String delActive(Integer id) {
     public String delActive(Integer id) {
         activeDao.delActive(id);
         activeDao.delActive(id);
+        activeDao.delActiveImage(id);
+        activeDao.delActiveProduct(id);
         return "删除成功";
         return "删除成功";
     }
     }
 
 
     @Override
     @Override
     public Banner findBannerById(Integer id) {
     public Banner findBannerById(Integer id) {
-        return bannerDao.findBannerById(id);
+        Banner banner = bannerDao.findBannerById(id);
+        if (1 == banner.getJumpType()) {
+            banner.setProducts(bannerDao.findProducts(banner.getJumpProductId()));
+        }
+        return banner;
     }
     }
 
 
     @Override
     @Override
     public MainMenu findMenuById(Integer id) {
     public MainMenu findMenuById(Integer id) {
-        return menuDao.selectById(id);
+        MainMenu mainMenu = menuDao.selectById(id);
+        if (1 == mainMenu.getJumpType()) {
+            mainMenu.setProducts(bannerDao.findProducts(mainMenu.getJumpProductId()));
+        }
+        return mainMenu;
     }
     }
 
 
     @Override
     @Override
@@ -176,17 +185,21 @@ public class PageServiceImpl implements PageService {
 
 
     @Override
     @Override
     public Theme themeForm(Integer id) {
     public Theme themeForm(Integer id) {
-        return themeDao.selectById(id);
+        Theme theme = themeDao.selectById(id);
+        if (1 == theme.getJumpType()) {
+            theme.setProducts(bannerDao.findProducts(theme.getJumpProductId()));
+        }
+        return theme;
     }
     }
 
 
     @Override
     @Override
     public Active activeForm(Integer id) {
     public Active activeForm(Integer id) {
         Active active = activeDao.findActiveById(id);
         Active active = activeDao.findActiveById(id);
         if (1 == active.getActiveType()) {
         if (1 == active.getActiveType()) {
-            active.setProductIds(activeDao.findProductsById(id));
+            active.setProducts(activeDao.findProducts(id));
         } else {
         } else {
             List<ActiveImages> imageList = activeDao.findImageList(id);
             List<ActiveImages> imageList = activeDao.findImageList(id);
-            imageList.forEach(i -> i.setProductIds(activeDao.findProductByImage(i.getId())));
+            imageList.forEach(i -> i.setProducts(activeDao.findProductsByImage(i.getId())));
             active.setImages(imageList);
             active.setImages(imageList);
         }
         }
         return active;
         return active;

+ 0 - 3
src/main/java/com/caimei/modules/order/controller/OrganizeOrderController.java

@@ -119,9 +119,6 @@ public class OrganizeOrderController {
         if (order.getProductCount() == null) {
         if (order.getProductCount() == null) {
             order.setProductCount(1);
             order.setProductCount(1);
         }
         }
-        if (order.getProductCount() <= count) {
-            order.setSplitFlag("0");
-        }
         map.put("order", order);
         map.put("order", order);
 //        if ("0".equals(order.getStatus())) {
 //        if ("0".equals(order.getStatus())) {
 //            try {
 //            try {

+ 232 - 79
src/main/java/com/caimei/modules/order/entity/NewOrder.java

@@ -12,90 +12,243 @@ import java.util.List;
  */
  */
 @Data
 @Data
 public class NewOrder implements Serializable {
 public class NewOrder implements Serializable {
-    private Integer orderID;             // bigint(11) not null,
-    private String orderNo;             // varchar(30) comment '订单编号',
-    private Integer userID;              // bigint(11), 订单归属人
-    //采美组织: 默认为null,具体对应cm_mall_organize表ID
+
+    private Integer orderID;
+
+    private String orderNo;
+    /**
+     *   订单归属人
+     **/
+    private Integer userID;
+    /**
+     *  采美组织: 默认为null,具体对应cm_mall_organize表ID
+     **/
     private Integer organizeID;
     private Integer organizeID;
-    private String shopOrderIDs;        // varchar(100) comment '子订单ID',
-    private String orderSubmitType;     // char(2) comment '订单提交类型',
-    private String status;      // char(2) comment '订单状态'
-    // v5.0.0新状态 '0待确认,11待收待发,12待收部发,13待收全发,21部收待发,22部收部发,23部收全发,31已收待发,32已收部发,33已收全发,4交易完成,5订单完成,6已关闭,7交易全退'
-    private Double productTotalFee;   // decimal(20,6) comment '商品总金额',
-    private Double shouldPayProduct;            //应收商品金额==应付合计(只需要付商品金额)
-    private String hasActProduct; // '是否包含活动商品(受订单未支付自动关闭时间影响)  0 否 1 是',
-    private Double orderTotalFee;    // decimal(20,6) comment '订单总金额',
-    private Double payableAmount;       // 应付金额
-    private Double payTotalFee;         // decimal(20,6) comment '支付金额',
-    private Double balancePayFee;       // decimal(20,6) comment '余额支付',
-    private Double discountFee;         // decimal(20,6) comment '折扣金额',
-    private Integer spID;                // bigint(11),
-    private Integer mainSpID;            // bigint(6),
-    private String note;                // text comment '订单备注',
-    private Integer clubID;              // bigint(11),
-    private String clubScanTime;        // varchar(19),
-    private Integer payTypeID;           // int(11) comment '支付类型',
-    private String orderSource;         // char(1) comment '订单来源',
-    private String orderTime;           // datetime comment '订单提交时间',
-    private String confirmTime;           // datetime comment '订单确认时间',
-    private String confirmFlag;         // char(1) comment '订单确认标志',
-    private Integer clauseID;            // bigint(11) comment '条款ID',
-    private String clauseContent;       // text comment '条款内容',
-    private String clauseName;          // varchar(50) comment '条款名称',
-    private String freePostFlag;        // char(1) comment 免邮标志 运费:-1到付,0包邮,1需要运费
-    private Double freight;             // decimal(20,0) comment '运费' v5.0版本已废弃,运费已使用商品形式存储,
-    private Integer buyUserID;//            下单人
-    private String orderType;//      char(2) comment '订单类型 协销订单0 普通订单1',
+
+    /**
+     * 订单提交类型
+     **/
+    private String orderSubmitType;
+    /**
+     * 订单状态
+     * 0待确认,11待收待发,12待收部发,13待收全发,21部收待发,22部收部发,23部收全发,31已收待发,32已收部发,
+     * 33已收全发,4交易完成,5订单完成,6已关闭,7交易全退
+     */
+    private String status;
+    /**
+     * 商品总金额
+     */
+    private Double productTotalFee;
+    /**
+     * 应收商品金额==应付合计(只需要付商品金额)
+     */
+    private Double shouldPayProduct;
+    /**
+     * 是否包含活动商品(受订单未支付自动关闭时间影响)  0 否 1 是
+     */
+    private String hasActProduct;
+    /**
+     * 订单总金额
+     */
+    private Double orderTotalFee;
+    /**
+     * 应付金额
+     */
+    private Double payableAmount;
+    /**
+     * 支付金额
+     */
+    private Double payTotalFee;
+    /**
+     * 余额支付
+     */
+    private Double balancePayFee;
+    /**
+     * 折扣金额
+     */
+    private Double discountFee;
+    /**
+     * 协销id
+     */
+    private Integer spID;
+
+    /**
+     * 订单备注
+     */
+    private String note;
+
+    private Integer clubID;
+
+    /**
+     * 订单提交时间
+     */
+    private String orderTime;
+    /**
+     * 订单确认时间
+     */
+    private String confirmTime;
+    /**
+     * 订单确认标志
+     */
+    private String confirmFlag;
+    /**
+     * 条款ID
+     */
+    private Integer clauseID;
+    /**
+     * 条款内容
+     */
+    private String clauseContent;
+    /**
+     * 条款名称
+     */
+    private String clauseName;
+    /**
+     * 免邮标志 运费:-1到付,0包邮,1需要运费
+     */
+    private String freePostFlag;
+    /**
+     * '运费' v5.0版本已废弃,运费已使用商品形式存储,
+     */
+    private Double freight;
+    /**
+     * 下单人
+     */
+    private Integer buyUserID;
+
     private List<NewShopOrder> newShopOrders;
     private List<NewShopOrder> newShopOrders;
-    private OrderUserInfo bpOrderUserinfo; //订单用户信息表
+    /**
+     *  订单用户信息
+     */
+    private OrderUserInfo bpOrderUserinfo;
+    /**
+     *
+     */
     private OrderInvoice orderInvoice;
     private OrderInvoice orderInvoice;
-    private Integer productCount;        // 商品总数
-    private Integer presentCount;        // 赠送总数
-    private String payTime; //订单支付时间
-    private String payFlag;//是否已支付 未支付0 已支付1
-    private String onlinePayFlag;//能否显示支付 :0 能线上 1 线下
-    private Double preferential; //总优惠 自助下单活动优惠 协销下单price-折后单价
-    private String splitFlag; // 订单能否拆分 1 为可拆分, 0为不可拆分
-    private String closeReason; //订单取消原因
-    private String invoiceFlag;      //是否开发票 0 不开 1 开发票
-    // ---------------- v5.0.0 新加
-    private String receiptStatus; //(收款买家)收款状态:1待收款、2部分收款、3已收款
-    private String payStatus; //(付款供应商)付款状态:1待付款、2部分付款、3已付款
-    private String sendOutStatus; //发货状态:1待发货、2部分发货、3已发货
-    private String refundType; //退货退款类型:1部分退、2全部退
-    private String postageOrderFlag = "0"; //邮费订单标识 1是邮费订单  0不是邮费订单
-    private Double paidAmount;//已付金额(用户已支付金额包括余额支付和线上线下支付)
-    private Double totalDiscount;//订单退款已退的经理折扣金额
-    // -----------------  v5.0.0 end
+    /**
+     * 商品总数
+     */
+    private Integer productCount;
+    /**
+     * 赠送总数
+     */
+    private Integer presentCount;
+    /**
+     * 订单支付时间
+     */
+    private String payTime;
+    /**
+     * 是否已支付 未支付0 已支付1
+     */
+    private String payFlag;
+    /**
+     * 能否显示支付 :0 能线上 1 线下
+     */
+    private String onlinePayFlag;
+    /**
+     * 总优惠 自助下单活动优惠 协销下单price-折后单价
+     */
+    private Double preferential;
+    /**
+     * 订单取消原因
+     */
+    private String closeReason;
+    /**
+     * 是否开发票 0 不开 1 开发票
+     */
+    private String invoiceFlag;
+    /**
+     * (收款买家)收款状态:1待收款、2部分收款、3已收款
+     */
+    private String receiptStatus;
+    /**
+     * (付款供应商)付款状态:1待付款、2部分付款、3已付款
+     */
+    private String payStatus;
+    /**
+     * 发货状态:1待发货、2部分发货、3已发货
+     */
+    private String sendOutStatus;
+    /**
+     *  退货退款类型:1部分退、2全部退
+     */
+    private String refundType;
+    /**
+     * 邮费订单标识 1是邮费订单  0不是邮费订单
+     */
+    private String postageOrderFlag = "0";
+    /**
+     * 已付金额(用户已支付金额包括余额支付和线上线下支付)
+     */
+    private Double paidAmount;
 
 
-    //-------------        虚拟字段   ----------------------------
-    private String shopName;            //供应商
-    private String receiver;//收货人
-    private String buyer;//买家
-    private String alreadyReceipt;//已收金额(需要包含运费,目前只存在普通订单存在运费)
-    private String unReceipt;//未收金额(需要包含运费,目前只存在普通订单存在运费)
-    private String paid;//已付金额(不需要包含运费,等同于订单商品金额)
-    private String unpaid;//未付金额(不需要包含运费,等同于订单商品金额)
-    private String brokerage;//佣金
-    private String buyerName; //买家名称
-    private String mobile; //手机
-    private String address; //地址
+    /**
+     * 虚拟字段
+     *
+     *
+     * 供应商
+     */
+    private String shopName;
+    /**
+     * 收货人
+     */
+    private String receiver;
+    /**
+     * 买家
+     */
+    private String buyer;
+    /**
+     * 已收金额(需要包含运费,目前只存在普通订单存在运费)
+     */
+    private String alreadyReceipt;
+    /**
+     * 佣金
+     */
+    private String brokerage;
+    /**
+     * 买家名称
+     */
+    private String buyerName;
+    /**
+     * 手机
+     */
+    private String mobile;
+    /**
+     * 地址
+     */
+    private String address;
+    /**
+     * 订单提交时间
+     */
     private String startTime;
     private String startTime;
     private String endTime;
     private String endTime;
-    private String startRefundTime;
-    private String endRefundTime;
-    private Double totalAddedValueTax;//总税费
-    private String shopNameInfo;//
-    private String orderRefundType = "";//
-    private String returnedPurchaseStatus;//1审核中,0不是审核中
-    private String applyReturnedPurchaseFlag;//0不可以申请,1可以申请(此标记只用于是否存在审核中或者审核不通过记录,存在记录则不可以申请)
-    private String spName;
-    private List<NewOrderProduct> orderProduct;// 订单内的商品集合
-    private String searchflag;//0搜索,1导出
-    private String[] shopNote;  //子订单备注   修改时用来记录一下的
-    private String rebateOrder;  //是不是返佣订单 是的1,  不是的0
-    private String[] ps;    //付款状态集合
-    private String shopOrderNo;//       varchar(30) comment '子订单编号'
-    private String toAudit;   //有没有收款待审核的订单 , 有的1
+    /**
+     * 总税费
+     */
+    private Double totalAddedValueTax;
+    /**
+     * 退款状态
+     */
+    private String orderRefundType = "";
+    /**
+     * 1审核中,0不是审核中
+     */
+    private String returnedPurchaseStatus;
+    /**
+     * 0不可以申请,1可以申请(此标记只用于是否存在审核中或者审核不通过记录,存在记录则不可以申请)
+     */
+    private String applyReturnedPurchaseFlag;
+    /**
+     *  订单内的商品集合
+     */
+    private List<NewOrderProduct> orderProduct;
+    /**
+     * 子订单编号
+     */
+    private String shopOrderNo;
+    /**
+     * 有没有收款待审核的订单 , 有的1
+     */
+    private String toAudit;
 }
 }
 
 

+ 0 - 3
src/main/java/com/caimei/modules/order/entity/NewOrderProduct.java

@@ -71,9 +71,6 @@ public class NewOrderProduct {
     private Double costPrice; // 成本价(快照商品成本价格)
     private Double costPrice; // 成本价(快照商品成本价格)
     private Integer stock; // 库存
     private Integer stock; // 库存
     private String logisticsBatchID; // 发货批次ID
     private String logisticsBatchID; // 发货批次ID
-    //private List<NewCmFinanceCharge> newCmFinanceChargeList; //订单商品id对应的多个出账记录
-    //private List<NewCmFinanceReceipts> newCmFinanceReceiptsList; //订单商品id对应一个进账记录  订单id对应多个
-    private String splitFlag;//订单商品是否可拆分   1可拆分(不可以进账确认) 0不可拆分----统计子订单中的
     private String costCheckFlag; //成本价选中标志:1固定成本 2比例成
     private String costCheckFlag; //成本价选中标志:1固定成本 2比例成
     private Double costProportional;//比例成本百分比
     private Double costProportional;//比例成本百分比
     private List<CmProductSn> cmProductSnList; //(重光电/轻光电)SN码
     private List<CmProductSn> cmProductSnList; //(重光电/轻光电)SN码

+ 256 - 88
src/main/java/com/caimei/modules/order/entity/NewShopOrder.java

@@ -12,98 +12,266 @@ import java.util.List;
  */
  */
 @Data
 @Data
 public class NewShopOrder {
 public class NewShopOrder {
-    private Integer shopOrderID;//        int(11) not null auto_increment comment '子订单ID',
-    private Integer organizeID;//        组织Id
-    private String shopOrderNo;//       varchar(30) comment '子订单编号',
-    private String orderNo;//        varchar(30) comment '主订单编号',
-    private Integer orderID;             // bigint(11) not null 主订单ID,
-    private String receiptStatus;//主订单收款状态
-    private Double receiptTotalFee;//主订单已收金额
-    private Integer userID;//       int(11) comment '用户Id',
-    private Integer shopID;//       int(11) comment '供应商Id',
-    private Integer itemCount;//       int(11) comment '商品数量',
-    private Integer townID;//       int(11) comment '收货地址县区Id',
-    private Double productAmount;//     float comment '商品金额',
-    private Double shouldPayProduct;            //应收商品金额==应付合计(只需要付商品金额)
-    private Double fee;//     float comment '运费:-1到付,0包邮,其他为具体运费'    ****-----v5.0版本已废弃,运费已使用商品形式存储,
-    private Double discountAmount;//     float,
-    private Double accountAmount;//     decimal(20,2) comment '余额支付时使用的金额',
-    private Double totalAmount;//     decimal(20,2) comment '总价',
-    private String payFlag;//     national char(1) comment '是否已支付:1是,0否',
-    private String payTime;//     national varchar(19) comment '支付时间',
-    private String finishTime;//     national varchar(19) comment '订单完成时间',
-    private Integer refundStatus;//    int(11),
-    private BigInteger deliveryTimeMills;//   bigint(20) comment '发货时间(时间戳)',
-    private Double needPayAmount;//   decimal(20,2) comment '实付金额',
-    private Double canRefundAmount;//   float comment '退款金额',
-    private Double refundAmount;//   float,
-    private Integer clubID;//  int(11),
-    private Integer spID;//   int(11),
-    private Integer mainSpID;//    int(11),
-    private Integer orderBeanAmount;//   int(11) default 0,
-    private Integer useBeanAmount;//   int(11) default 0 comment '使用采美豆数量',
-    private Integer useBeanFlag;//     int(11) default 0 comment '是否使用采美豆',
-    private Integer canRefundFlag;//    int(11) default 0 comment '是否可以退货 1可以退款/退货 0不可退款/退货',
-    private Integer useBalanceFlag;//    int(11) default 0 comment '是否使用余额',
-    private Integer canRefundBeans;//    int(11) comment '可以退还的采美豆个数',
-    private Integer orderDeliveryID;//   int(1) comment '运费订单ID',
-    private Double freePostageFee;//    decimal(10,2) comment '订单包邮时本该支付的运费',
-    private Integer freePostageTicketID;//  int(11) comment '使用的包邮券Id,为空表示未使用包邮券',
-    private Double brokerage;//        decimal(11,2) comment '佣金',
-    private String delFlag;//        national varchar(20) default '0' comment '后台删除状态 0正常,其他删除',
-    private Double refundsAmount;//      decimal(20,2) default 0.00 comment '订单退款金额',
-    private String orderStatusFlag;//    national char(1) default '1' comment '订单状态标识,1:非退货退款订单、2:退货退款中、3退货退款完成',
-    private String buyStatus;//       national varchar(255),
+    /**
+     *  子订单ID
+     */
+    private Integer shopOrderID;
+    private Integer organizeID;
+    private String shopOrderNo;
+    private String orderNo;
+    private Integer orderID;
+    /**
+     * 主订单收款状态
+     */
+    private String receiptStatus;
+    /**
+     * 主订单已收金额
+     */
+    private Double receiptTotalFee;
+    private Integer userID;
+    private Integer shopID;
+    /**
+     * 商品数量
+     */
+    private Integer itemCount;
+    /**
+     * 收货地址县区Id
+     */
+    private Integer townID;
+    /**
+     * 商品金额
+     */
+    private Double productAmount;
+    /**
+     * 应收商品金额==应付合计(只需要付商品金额)
+     */
+    private Double shouldPayProduct;
+    /**
+     * 运费:-1到付,0包邮,其他为具体运费
+     */
+    private Double fee;
+    private Double discountAmount;
+    /**
+     *  余额支付时使用的金额
+     */
+    private Double accountAmount;
+    /**
+     * 总价
+     */
+    private Double totalAmount;
+    /**
+     * 是否已支付:1是,0否',
+     */
+    private String payFlag;
+    /**
+     * 支付时间
+     */
+    private String payTime;
+    /**
+     * 订单完成时间
+     */
+    private String finishTime;
+    private Integer refundStatus;
+    /**
+     * 发货时间(时间戳)
+     */
+    private BigInteger deliveryTimeMills;
+    /**
+     *  实付金额
+     */
+    private Double needPayAmount;
+    /**
+     * 退款金额
+     */
+    private Double canRefundAmount;
+    private Double refundAmount;
+    private Integer clubID;
+    private Integer spID;
+    private Integer orderBeanAmount;
+    /**
+     * 使用采美豆数量
+     */
+    private Integer useBeanAmount;
+    /**
+     * 是否使用采美豆
+     */
+    private Integer useBeanFlag;
+    /**
+     * 是否可以退货 1可以退款/退货 0不可退款/退货
+     */
+    private Integer canRefundFlag;
+    /**
+     * 是否使用余额
+     */
+    private Integer useBalanceFlag;
+    /**
+     * 可以退还的采美豆个数
+     */
+    private Integer canRefundBeans;
+    /**
+     * 订单包邮时本该支付的运费
+     */
+    private Double freePostageFee;
+    /**
+     * 佣金
+     */
+    private Double brokerage;
+    /**
+     * 后台删除状态 0正常,其他删除
+     */
+    private String delFlag;
+    /**
+     * 订单退款金额
+     */
+    private Double refundsAmount;
+    /**
+     * 订单状态标识,1:非退货退款订单、2:退货退款中、3退货退款完成
+     */
+    private String orderStatusFlag;
+
     private NewOrder order;
     private NewOrder order;
     private List<NewOrderProduct> newOrderProducts;
     private List<NewOrderProduct> newOrderProducts;
-    private Double preferential; //订单商品的总优惠
+    /**
+     * 订单商品的总优惠
+     */
+    private Double preferential;
     private int orderSubmitType;
     private int orderSubmitType;
-    private int orderType;             // 订单类型
-    private String orderTime;//下单时间
-    private Integer presentNum;//赠品数量
-    private Integer outStoreNum;//已经发货的商品数量
-    private Integer outStoreTimes;//第几批发货  default 0
-    private Double totalAddedValueTax; // 税费
-    private String splitFlag; // 订单能否拆分 1 为可拆分, 0为不可拆分
-    private Double discountFee; // 经历折扣  v5.0版本已废弃,经理折扣只和主订单有关
-    private Long autoReceiveTimeMills;//自动收货时间点 毫秒计算
-    private Long autoOverTimeMills;// 订单彻底完成时间 不能售后 毫秒
-    private String receiveGoodsTime;//收货时间
-    private String note;//子订单备注信息
-    private String payStatus; //(付款供应商)付款状态:1待付款、2部分付款、3已付款
-    private String sendOutStatus; //发货状态:1待发货、2部分发货、3已发货
-    private String[] ps;    //付款状态集合
-    //-------------        虚拟字段   ----------------------------
-    private String shopName;            //供应商
-    private String receiver;//收货人
-    private String buyer;//买家
-    private String orderSource;//订单来源
-    private String alreadyReceipt;//已收金额
-    private String unReceipt;//未收金额
-    private String paid;//已付金额
-    private String unpaid;//未付金额
-    private String postFeeCos = "0";   //'0'=不是邮费商品子订单; '1'=是邮费商品子订单
-    private List<NewOrderProduct> snOrderProducts;//需要使用sn码的订单产品列表
-    private Boolean defaultStatus;  //控制填写的默认状态(运费订单,部分收款订单 默认不能操作,)
+    /**
+     * 下单时间
+     */
+    private String orderTime;
+    /**
+     * 赠品数量
+     */
+    private Integer presentNum;
+    /**
+     * 已经发货的商品数量
+     */
+    private Integer outStoreNum;
+    /**
+     * 第几批发货 默认值 = 0 即没过发货
+     */
+    private Integer outStoreTimes;
+    /**
+     * 税费
+     */
+    private Double totalAddedValueTax;
+    /**
+     * 自动收货时间点 毫秒计算
+     */
+    private Long autoReceiveTimeMills;
+    /**
+     * 订单彻底完成时间 不能售后 毫秒
+     */
+    private Long autoOverTimeMills;
+    /**
+     * 收货时间
+     */
+    private String receiveGoodsTime;
+    /**
+     * 子订单备注信息
+     */
+    private String note;
+    /**
+     * (付款供应商)付款状态:1待付款、2部分付款、3已付款
+     */
+    private String payStatus;
+    /**
+     * 发货状态:1待发货、2部分发货、3已发货
+     */
+    private String sendOutStatus;
+
+    /**
+     *      虚拟字段
+     */
+    private String shopName;
+    /**
+     * 收货人
+     */
+    private String receiver;
+    /**
+     * 买家
+     */
+    private String buyer;
+    /**
+     * '0'=不是邮费商品子订单; '1'=是邮费商品子订单
+     */
+    private String postFeeCos = "0";
+    /**
+     * 需要使用sn码的订单产品列表
+     */
+    private List<NewOrderProduct> snOrderProducts;
 
 
-    //--------------- 付款列表展示数据 ------------
-    private String paying;// 是否处于给供应商状态中   0不是的,  1是的
-    private String refunding;// 是否处于供应商退款状态中   0不是的,  1是的
-    private Double payTotalFee;  //主订单金额,  列表中展示需要
-    private Double shopProductAmount;  //付款单的商品费, 子订单商品的成本价的和
-    private Double shopPostFee;  // 付给供应商的运费
-    private Double shopTaxFee;  // 付给供应商的税费
-    private Double shouldPayShopAmount;  //付供应商 = 商品费 + 运费 + 税费
-    private Double payedShopAmount;  //已付款金额
-    private Double shopOtherFee;  //付第三方
-    private Double waitPayShop;  //待付
+    /**
+     *  付款列表展示数据
+     *
+     *  是否处于给供应商状态中   0不是的,  1是的
+     */
+    private String paying;
+    /**
+     *  是否处于供应商退款状态中   0不是的,  1是的
+     */
+    private String refunding;
+    /**
+     * 主订单金额,  列表中展示需要
+     */
+    private Double payTotalFee;
+    /**
+     * 付款单的商品费, 子订单商品的成本价的和
+     */
+    private Double shopProductAmount;
+    /**
+     * 付给供应商的运费
+     */
+    private Double shopPostFee;
+    /**
+     * 付给供应商的税费
+     */
+    private Double shopTaxFee;
+    /**
+     * 付供应商 = 商品费 + 运费 + 税费
+     */
+    private Double shouldPayShopAmount;
+    /**
+     * 已付款金额
+     */
+    private Double payedShopAmount;
+    /**
+     * 付第三方
+     */
+    private Double shopOtherFee;
+    /**
+     * 待付
+     */
+    private Double waitPayShop;
     private String startTime;
     private String startTime;
     private String endTime;
     private String endTime;
-    private String operatingMode = "1";// 付款列表操作模式    1付款申请, 2已付退款, 3查看信息
-    private String costType;     //固定成本1,  比例成本2  为空就是还没有设置过
-    private Double proportional;//比例成本的比例值
-    private String modifyShouldPayNote; //修改应付必填备注信息
-    private String modifyShouldPayUserID;  //修改应付金额的用户ID
-    private String modifyShouldPayDate;   //修改应付金额的时间
-    private Double payed;//已付金额
+    /**
+     * 付款列表操作模式    1付款申请, 2已付退款, 3查看信息
+     */
+    private String operatingMode = "1";
+    /**
+     * 固定成本1,  比例成本2  为空就是还没有设置过
+     */
+    private String costType;
+    /**
+     * 比例成本的比例值
+     */
+    private Double proportional;
+    /**
+     * 修改应付必填备注信息
+     */
+    private String modifyShouldPayNote;
+    /**
+     * 修改应付金额的用户ID
+     */
+    private String modifyShouldPayUserID;
+    /**
+     * 修改应付金额的时间
+     */
+    private String modifyShouldPayDate;
+    /**
+     * 已付金额
+     */
+    private Double payed;
 }
 }

+ 0 - 19
src/main/java/com/caimei/modules/order/service/impl/NewOrderServiceImpl.java

@@ -47,11 +47,6 @@ public class NewOrderServiceImpl implements NewOrderService {
         PageHelper.startPage(page.getIndex(), page.getPageSize());
         PageHelper.startPage(page.getIndex(), page.getPageSize());
         List<NewOrder> orderList = newOrderDao.findList(newOrder);
         List<NewOrder> orderList = newOrderDao.findList(newOrder);
         List<Integer> oId = orderList.stream().map(NewOrder::getOrderID).collect(Collectors.toList());
         List<Integer> oId = orderList.stream().map(NewOrder::getOrderID).collect(Collectors.toList());
-        //看看这些订单有哪些是返佣订单 返回他们的orderID
-        List<Integer> orderIds = null;
-        if (CollectionUtils.isNotEmpty(oId)) {
-            orderIds = cmDiscernReceiptDao.findRebateOrderID(orderList.stream().map(NewOrder::getOrderID).collect(Collectors.toList()));
-        }
         //从查询到的订单列表中 找到正在退款中的订单集合
         //从查询到的订单列表中 找到正在退款中的订单集合
         List<Integer> orderIdsInReturn = null;
         List<Integer> orderIdsInReturn = null;
         List<Integer> orderIdsInApplyReturn = null;//查询可以申请退款的订单ID
         List<Integer> orderIdsInApplyReturn = null;//查询可以申请退款的订单ID
@@ -60,15 +55,6 @@ public class NewOrderServiceImpl implements NewOrderService {
             orderIdsInApplyReturn = cmReturnedPurchaseDao.findOrderIDsInApplyReturnFlag(oId);
             orderIdsInApplyReturn = cmReturnedPurchaseDao.findOrderIDsInApplyReturnFlag(oId);
         }
         }
         for (NewOrder order : orderList) {
         for (NewOrder order : orderList) {
-            if (orderIds != null && orderIds.contains(order.getOrderID())) {
-                order.setRebateOrder("1");
-            } else {
-                order.setRebateOrder("0");
-                List<Integer> ids = cmReceiptOrderRelationDao.toAudit(order.getOrderID());
-                if (ids != null && ids.size() > 0) {
-                    order.setToAudit("1");
-                }
-            }
             if (orderIdsInReturn != null && orderIdsInReturn.contains(order.getOrderID())) {
             if (orderIdsInReturn != null && orderIdsInReturn.contains(order.getOrderID())) {
                 order.setReturnedPurchaseStatus("1");
                 order.setReturnedPurchaseStatus("1");
             } else {
             } else {
@@ -88,9 +74,7 @@ public class NewOrderServiceImpl implements NewOrderService {
             for (NewShopOrder shopOrder : order.getNewShopOrders()) {
             for (NewShopOrder shopOrder : order.getNewShopOrders()) {
                 shopOrder.setOrderID(order.getOrderID());
                 shopOrder.setOrderID(order.getOrderID());
                 shopOrder.setOrderNo(order.getOrderNo());
                 shopOrder.setOrderNo(order.getOrderNo());
-                shopOrder.setOrderType(Integer.valueOf(order.getOrderType()));
                 shopOrder.setReceiver(order.getReceiver());
                 shopOrder.setReceiver(order.getReceiver());
-                shopOrder.setOrderSource(order.getOrderSource());
                 shopOrder.setOrderTime(order.getOrderTime());
                 shopOrder.setOrderTime(order.getOrderTime());
                 shopOrder.setBuyer(order.getBuyer());
                 shopOrder.setBuyer(order.getBuyer());
                 if (shopOrder.getShopID() != 998) {
                 if (shopOrder.getShopID() != 998) {
@@ -112,9 +96,6 @@ public class NewOrderServiceImpl implements NewOrderService {
             if (order.getProductCount() == null) {
             if (order.getProductCount() == null) {
                 order.setProductCount(1);
                 order.setProductCount(1);
             }
             }
-            if (order.getProductCount() <= count) {
-                order.setSplitFlag("0");
-            }
         }
         }
         Page<NewOrder> orderPage = new Page<>(orderList);
         Page<NewOrder> orderPage = new Page<>(orderList);
         return orderPage;
         return orderPage;

+ 2 - 1
src/main/java/com/caimei/modules/products/entity/CmMallOrganizeProducts.java

@@ -18,7 +18,8 @@ public class CmMallOrganizeProducts implements Serializable {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
     private Integer id;
     private Integer id;
     private String organizeID;        // 组织ID,具体对应cm_mall_organize表ID
     private String organizeID;        // 组织ID,具体对应cm_mall_organize表ID
-    private String productID;        // 商品ID,具体对应product表
+    private String productId;        // 商品ID,具体对应product表
+    private String cmProductId;     // 采美商品id
     private String normalPrice;        // 市场价
     private String normalPrice;        // 市场价
     private String price;        // 售价
     private String price;        // 售价
     private String minBuyNumber;        // 最小起订量
     private String minBuyNumber;        // 最小起订量

+ 10 - 8
src/main/java/com/caimei/modules/products/service/impl/CmMallOrganizeProductsServiceImpl.java

@@ -37,13 +37,15 @@ public class CmMallOrganizeProductsServiceImpl implements CmMallOrganizeProducts
     public Page<CmMallOrganizeProducts> findPage(Page page, CmMallOrganizeProducts cmMallOrganizeProducts) {
     public Page<CmMallOrganizeProducts> findPage(Page page, CmMallOrganizeProducts cmMallOrganizeProducts) {
         PageHelper.startPage(page.getIndex(), page.getPageSize());
         PageHelper.startPage(page.getIndex(), page.getPageSize());
         List<CmMallOrganizeProducts> products = cmMallOrganizeProductsDao.findList(cmMallOrganizeProducts);
         List<CmMallOrganizeProducts> products = cmMallOrganizeProductsDao.findList(cmMallOrganizeProducts);
-        products.forEach(p -> {
-            List<Sku> skus = cmMallOrganizeProductsDao.findSkus(p.getProductID());
-            p.setSkus(skus);
-            p.setCostPrice(skus.get(0).getCostPrice());
-            p.setPrice(skus.get(0).getPrice().toString());
-            p.setMinBuyNumber(skus.get(0).getMinBuyNumber().toString());
-        });
+        if (null != products && products.size() > 0) {
+            products.forEach(p -> {
+                List<Sku> skus = cmMallOrganizeProductsDao.findSkus(p.getProductId());
+                p.setSkus(skus);
+                p.setCostPrice(skus.get(0).getCostPrice());
+                p.setPrice(skus.get(0).getPrice().toString());
+                p.setMinBuyNumber(skus.get(0).getMinBuyNumber().toString());
+            });
+        }
         return new Page<>(products);
         return new Page<>(products);
     }
     }
 
 
@@ -62,7 +64,7 @@ public class CmMallOrganizeProductsServiceImpl implements CmMallOrganizeProducts
     @Override
     @Override
     public CmMallOrganizeProducts get(Integer id) {
     public CmMallOrganizeProducts get(Integer id) {
         CmMallOrganizeProducts cmMallOrganizeProducts = cmMallOrganizeProductsDao.get(id);
         CmMallOrganizeProducts cmMallOrganizeProducts = cmMallOrganizeProductsDao.get(id);
-        cmMallOrganizeProducts.setSkus(cmMallOrganizeProductsDao.findSkus(cmMallOrganizeProducts.getProductID()));
+        cmMallOrganizeProducts.setSkus(cmMallOrganizeProductsDao.findSkus(cmMallOrganizeProducts.getProductId()));
         return cmMallOrganizeProducts;
         return cmMallOrganizeProducts;
     }
     }
 
 

+ 18 - 0
src/main/java/com/caimei/modules/shiro/auth/AuthFilter.java

@@ -7,6 +7,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationToken;
 import org.apache.shiro.authc.AuthenticationToken;
 import org.apache.shiro.web.filter.authc.AuthenticatingFilter;
 import org.apache.shiro.web.filter.authc.AuthenticatingFilter;
+import org.springframework.http.HttpStatus;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestMethod;
 
 
@@ -23,6 +24,23 @@ import java.util.Map;
  */
  */
 @Component
 @Component
 public class AuthFilter extends AuthenticatingFilter {
 public class AuthFilter extends AuthenticatingFilter {
+
+    @Override
+    protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception {
+        HttpServletRequest httpServletRequest = (HttpServletRequest) request;
+        HttpServletResponse httpServletResponse = (HttpServletResponse) response;
+        httpServletResponse.setHeader("Access-control-Allow-Origin", httpServletRequest.getHeader("Origin"));
+        httpServletResponse.setHeader("Access-Control-Allow-Methods", "GET,POST,OPTIONS,PUT,DELETE");
+        httpServletResponse.setHeader("Access-Control-Allow-Headers", httpServletRequest.getHeader("Access-Control-Request-Headers"));
+        httpServletResponse.setHeader("Access-Control-Allow-Credentials", "true");
+        // 跨域时会首先发送一个option请求,这里我们给option请求直接返回正常状态
+        if (httpServletRequest.getMethod().equals(RequestMethod.OPTIONS.name())) {
+            httpServletResponse.setStatus(HttpStatus.OK.value());
+            return false;
+        }
+        return super.preHandle(request, response);
+    }
+
     /**
     /**
      * 生成自定义token
      * 生成自定义token
      *
      *

+ 29 - 30
src/main/java/com/caimei/modules/shiro/auth/ShiroConfig.java

@@ -12,9 +12,7 @@ import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
 import org.springframework.web.filter.CorsFilter;
 import org.springframework.web.filter.CorsFilter;
 
 
 import javax.servlet.Filter;
 import javax.servlet.Filter;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
+import java.util.*;
 
 
 /**
 /**
  * @Author plf
  * @Author plf
@@ -65,32 +63,33 @@ public class ShiroConfig {
         return advisor;
         return advisor;
     }
     }
 
 
-    @Bean
-    public FilterRegistrationBean corsFilter() {
-        final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
-        final CorsConfiguration config = new CorsConfiguration();
-        // 允许cookies跨域
-        config.addAllowedOriginPattern("*");
-        // #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin
-        config.addAllowedOrigin("*");
-        // #允许访问的头信息,*表示全部
-        config.addAllowedHeader("*");
-        // 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
-        config.setMaxAge(18000L);
-        // 允许提交请求的方法,*表示全部允许
-        config.addAllowedMethod("OPTIONS");
-        config.addAllowedMethod("HEAD");
-        config.addAllowedMethod("GET");
-        config.addAllowedMethod("PUT");
-        config.addAllowedMethod("POST");
-        config.addAllowedMethod("DELETE");
-        config.addAllowedMethod("PATCH");
-        source.registerCorsConfiguration("/**", config);
-
-        FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source));
-        // 设置监听器的优先级
-        bean.setOrder(0);
 
 
-        return bean;
-    }
+//    @Bean
+//    public FilterRegistrationBean corsFilter() {
+//        final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+//        final CorsConfiguration config = new CorsConfiguration();
+//        // 允许cookies跨域
+//        config.addAllowedOriginPattern("*");
+//        // #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin
+//        config.addAllowedOrigin("*");
+//        // #允许访问的头信息,*表示全部
+//        config.addAllowedHeader("*");
+//        // 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
+//        config.setMaxAge(18000L);
+//        // 允许提交请求的方法,*表示全部允许
+//        config.addAllowedMethod("OPTIONS");
+//        config.addAllowedMethod("HEAD");
+//        config.addAllowedMethod("GET");
+//        config.addAllowedMethod("PUT");
+//        config.addAllowedMethod("POST");
+//        config.addAllowedMethod("DELETE");
+//        config.addAllowedMethod("PATCH");
+//        source.registerCorsConfiguration("/**", config);
+//
+//        FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source));
+//        // 设置监听器的优先级
+//        bean.setOrder(0);
+//
+//        return bean;
+//    }
 }
 }

+ 39 - 16
src/main/resources/mapper/ActiveMapper.xml

@@ -18,15 +18,13 @@
     </insert>
     </insert>
 
 
     <insert id="insertProducts">
     <insert id="insertProducts">
-        insert into cm_mall_active_product(activeId, productId)
-        VALUES (#{id}, #{productId})
+        insert into cm_mall_active_product(activeId, productId, sort)
+        VALUES (#{id}, #{productId}, #{sort})
     </insert>
     </insert>
 
 
     <insert id="insertImageProduct">
     <insert id="insertImageProduct">
-        insert into cm_mall_active_product(activeId, productId ,imageId) values
-        <foreach collection="productIds" item="productId" separator=",">
-            (#{activeId}, #{productId} ,#{imageId})
-        </foreach>
+        insert into cm_mall_active_product(activeId, imageId, productId, sort)
+        values (#{activeId}, #{imageId}, #{productId}, #{sort})
     </insert>
     </insert>
 
 
     <update id="updateActive">
     <update id="updateActive">
@@ -70,6 +68,18 @@
         where id = #{id}
         where id = #{id}
     </delete>
     </delete>
 
 
+    <delete id="delActiveImage">
+        delete
+        from cm_mall_active_image
+        where activeId = #{id}
+    </delete>
+
+    <delete id="delActiveProduct">
+        delete
+        from cm_mall_active_product
+        where activeId = #{id}
+    </delete>
+
     <select id="findActiveList" resultType="com.caimei.modules.homepage.enity.Active">
     <select id="findActiveList" resultType="com.caimei.modules.homepage.enity.Active">
         select id, organizeId, topic, enabledstatus, activeType, addtime
         select id, organizeId, topic, enabledstatus, activeType, addtime
         from cm_mall_active
         from cm_mall_active
@@ -85,6 +95,7 @@
                 AND activeType = #{activeType}
                 AND activeType = #{activeType}
             </if>
             </if>
         </where>
         </where>
+        order by addTime desc
     </select>
     </select>
 
 
     <select id="findActiveById" resultType="com.caimei.modules.homepage.enity.Active">
     <select id="findActiveById" resultType="com.caimei.modules.homepage.enity.Active">
@@ -93,22 +104,34 @@
         where id = #{id}
         where id = #{id}
     </select>
     </select>
 
 
-    <select id="findProductsById" resultType="java.lang.Integer">
-        select productId
-        from cm_mall_active_product
-        where activeId = #{id}
-    </select>
-
     <select id="findImageList" resultType="com.caimei.modules.homepage.enity.ActiveImages">
     <select id="findImageList" resultType="com.caimei.modules.homepage.enity.ActiveImages">
         select id, image
         select id, image
         from cm_mall_active_image
         from cm_mall_active_image
         where activeId = #{id}
         where activeId = #{id}
     </select>
     </select>
 
 
-    <select id="findProductByImage" resultType="java.lang.Integer">
-        select productId
-        from cm_mall_active_product
-        where imageId = #{id}
+    <select id="findProducts" resultType="com.caimei.modules.homepage.enity.BackProduct">
+        select DISTINCT p.name  as productName,
+                        p.mainImage,
+                        cmop.id as productId,
+                        cmop.validFlag,
+                        cmp.sort
+        from cm_mall_active_product cmp
+        left join cm_mall_organize_products cmop on cmp.productId = cmop.id
+        left join product p on cmop.productId = p.productID
+        where cmp.activeId = #{id}
+    </select>
+
+    <select id="findProductsByImage" resultType="com.caimei.modules.homepage.enity.BackProduct">
+        select DISTINCT p.name  as productName,
+                        p.mainImage,
+                        cmop.id as productId,
+                        cmop.validFlag,
+                        cmp.sort
+        from cm_mall_active_product cmp
+        left join cm_mall_organize_products cmop on cmp.productId = cmop.id
+        left join product p on cmop.productId = p.productID
+        where cmp.imageId = #{id}
     </select>
     </select>
 
 
 
 

+ 10 - 0
src/main/resources/mapper/BannerMapper.xml

@@ -97,4 +97,14 @@
         from cm_mall_banner_image
         from cm_mall_banner_image
         where id = #{id}
         where id = #{id}
     </select>
     </select>
+
+    <select id="findProducts" resultType="com.caimei.modules.homepage.enity.BackProduct">
+        select p.name as productName,
+               p.mainImage,
+               cmop.id as productId,
+               cmop.validFlag
+        from cm_mall_organize_products cmop
+        left join product p on p.productID = cmop.productID
+        where cmop.id = #{jumpProductId}
+    </select>
 </mapper>
 </mapper>

+ 1 - 0
src/main/resources/mapper/CmDiscernReceiptMapper.xml

@@ -3,6 +3,7 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.order.dao.CmDiscernReceiptDao">
 <mapper namespace="com.caimei.modules.order.dao.CmDiscernReceiptDao">
+
     <select id="findRebateOrderID" resultType="integer">
     <select id="findRebateOrderID" resultType="integer">
         select cso.orderID AS orderID
         select cso.orderID AS orderID
         from cm_receipt_order_relation cror left join cm_shop_order cso
         from cm_receipt_order_relation cror left join cm_shop_order cso

+ 10 - 10
src/main/resources/mapper/CmMallOrganizeProductsMapper.xml

@@ -4,9 +4,9 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.products.dao.CmMallOrganizeProductsDao">
 <mapper namespace="com.caimei.modules.products.dao.CmMallOrganizeProductsDao">
     <sql id="cmMallOrganizeProductsColumns">
     <sql id="cmMallOrganizeProductsColumns">
-        a.id AS "id",
+        a.id AS "productId",
 		a.organizeID AS "organizeID",
 		a.organizeID AS "organizeID",
-		a.productID AS "productID",
+		a.productID AS "cmProductId",
 		a.validFlag AS "validFlag",
 		a.validFlag AS "validFlag",
 		a.addTime AS "addTime",
 		a.addTime AS "addTime",
 		a.delFlag AS "delFlag",
 		a.delFlag AS "delFlag",
@@ -30,8 +30,8 @@
             <if test="id != null and id != ''">
             <if test="id != null and id != ''">
                 AND a.id = #{id}
                 AND a.id = #{id}
             </if>
             </if>
-            <if test="productID != null and productID != ''">
-                AND a.productID = #{productID}
+            <if test="productId != null and productId != ''">
+                AND a.productID = #{productId}
             </if>
             </if>
             <if test="organizeID != null and organizeID != ''">
             <if test="organizeID != null and organizeID != ''">
                 AND a.organizeID = #{organizeID}
                 AND a.organizeID = #{organizeID}
@@ -73,7 +73,7 @@
 
 
     <update id="updateValidFlag">
     <update id="updateValidFlag">
         UPDATE cm_mall_organize_products
         UPDATE cm_mall_organize_products
-        SET validFlag  = #{validFlag}
+        SET validFlag = #{validFlag}
         WHERE id = #{id}
         WHERE id = #{id}
     </update>
     </update>
 
 
@@ -101,8 +101,8 @@
             <if test="id != null and id != ''">
             <if test="id != null and id != ''">
                 AND a.id = #{id}
                 AND a.id = #{id}
             </if>
             </if>
-            <if test="productID != null and productID != ''">
-                AND a.productID = #{productID}
+            <if test="productId != null and productId != ''">
+                AND a.productID = #{productId}
             </if>
             </if>
             <if test="organizeID != null and organizeID != ''">
             <if test="organizeID != null and organizeID != ''">
                 AND a.organizeID = #{organizeID}
                 AND a.organizeID = #{organizeID}
@@ -143,9 +143,9 @@
                cmps.minBuyNumber,
                cmps.minBuyNumber,
                cmps.price,
                cmps.price,
                cs.unit
                cs.unit
-        from cm_sku cs
-                 left join cm_mall_product_sku cmps on cs.skuId = cmps.skuId
-        where cs.productId = #{productID}
+        from cm_mall_product_sku cmps
+        left join cm_sku cs on cmps.skuId = cs.skuId
+        where cmps.mallProductId = #{productID}
         order by cmps.price asc
         order by cmps.price asc
     </select>
     </select>
 
 

+ 2 - 39
src/main/resources/mapper/NewOrderMapper.xml

@@ -9,9 +9,7 @@
 		a.organizeID AS organizeID,
 		a.organizeID AS organizeID,
 		a.userID AS userID,
 		a.userID AS userID,
 		a.buyUserID AS buyUserID,
 		a.buyUserID AS buyUserID,
-		a.shopOrderIDs AS shopOrderIDs,
 		a.orderSubmitType AS orderSubmitType,
 		a.orderSubmitType AS orderSubmitType,
-		a.orderType AS orderType,
 		a.status AS status,
 		a.status AS status,
 		a.productTotalFee AS productTotalFee,
 		a.productTotalFee AS productTotalFee,
 		a.orderTotalFee AS orderTotalFee,
 		a.orderTotalFee AS orderTotalFee,
@@ -20,11 +18,8 @@
 		a.balancePayFee  AS balancePayFee ,
 		a.balancePayFee  AS balancePayFee ,
 		a.discountFee AS discountFee,
 		a.discountFee AS discountFee,
 		a.spID AS spID,
 		a.spID AS spID,
-		a.mainSpID AS mainSpID,
 		a.note AS note,
 		a.note AS note,
 		a.clubID AS clubID,
 		a.clubID AS clubID,
-		a.clubScanTime AS clubScanTime,
-		a.orderSource AS orderSource,
 		a.orderTime AS orderTime,
 		a.orderTime AS orderTime,
 		a.confirmTime AS confirmTime,
 		a.confirmTime AS confirmTime,
 		a.productCount AS productCount,
 		a.productCount AS productCount,
@@ -38,7 +33,6 @@
 		a.delFlag AS delFlag,
 		a.delFlag AS delFlag,
 		a.onlinePayFlag AS onlinePayFlag,
 		a.onlinePayFlag AS onlinePayFlag,
 		a.payTime AS payTime,
 		a.payTime AS payTime,
-		a.splitFlag AS splitFlag,
 		(select sum(cop.totalAddedValueTax) from cm_order_product cop where cop.orderID = a.orderID) AS totalAddedValueTax,
 		(select sum(cop.totalAddedValueTax) from cm_order_product cop where cop.orderID = a.orderID) AS totalAddedValueTax,
 		a.preferential AS preferential,
 		a.preferential AS preferential,
 		a.closeReason AS closeReason,
 		a.closeReason AS closeReason,
@@ -46,24 +40,19 @@
 		a.payStatus	as payStatus,
 		a.payStatus	as payStatus,
 		a.sendOutStatus as sendOutStatus,
 		a.sendOutStatus as sendOutStatus,
 		a.refundType as refundType,
 		a.refundType as refundType,
-		a.postageOrderFlag AS postageOrderFlag,
-        a.rebateFlag  as rebateOrder
+		a.postageOrderFlag AS postageOrderFlag
 	</sql>
 	</sql>
 
 
     <resultMap id="orderDisplayList" type="com.caimei.modules.order.entity.NewOrder">
     <resultMap id="orderDisplayList" type="com.caimei.modules.order.entity.NewOrder">
         <id column="orderID" property="orderID"/>
         <id column="orderID" property="orderID"/>
         <result column="orderNo" property="orderNo"/>
         <result column="orderNo" property="orderNo"/>
         <result column="organizeID" property="organizeID"/>
         <result column="organizeID" property="organizeID"/>
-        <result column="orderType" property="orderType"/>
         <result column="shopName" property="shopName"/>
         <result column="shopName" property="shopName"/>
         <result column="receiver" property="receiver"/>
         <result column="receiver" property="receiver"/>
         <result column="buyer" property="buyer"/>
         <result column="buyer" property="buyer"/>
-        <result column="orderSource" property="orderSource"/>
         <result column="orderTotalFee" property="orderTotalFee"/>
         <result column="orderTotalFee" property="orderTotalFee"/>
         <result column="orderTime" property="orderTime"/>
         <result column="orderTime" property="orderTime"/>
         <result column="productCount" property="productCount"/>
         <result column="productCount" property="productCount"/>
-        <result column="alreadyReceipt" property="alreadyReceipt"/>
-        <result column="unReceipt" property="unReceipt"/>
         <result column="payTotalFee" property="payTotalFee"/>
         <result column="payTotalFee" property="payTotalFee"/>
         <result column="status" property="status"/>
         <result column="status" property="status"/>
         <collection property="newShopOrders" ofType="com.caimei.modules.order.entity.NewShopOrder"
         <collection property="newShopOrders" ofType="com.caimei.modules.order.entity.NewShopOrder"
@@ -76,11 +65,9 @@
         co.orderID AS orderID,
         co.orderID AS orderID,
         co.orderNo AS orderNo,
         co.orderNo AS orderNo,
         co.organizeID AS organizeID,
         co.organizeID AS organizeID,
-        co.orderType AS orderType,
         co.onlinePayFlag AS onlinePayFlag,
         co.onlinePayFlag AS onlinePayFlag,
         bou.shouHuoRen AS receiver,
         bou.shouHuoRen AS receiver,
         bou.name AS buyer,
         bou.name AS buyer,
-        co.orderSource AS orderSource,
         co.orderTotalFee AS orderTotalFee,
         co.orderTotalFee AS orderTotalFee,
         co.orderTime AS orderTime,
         co.orderTime AS orderTime,
         co.payTotalFee AS payTotalFee,
         co.payTotalFee AS payTotalFee,
@@ -91,13 +78,7 @@
         co.productCount AS productCount,
         co.productCount AS productCount,
         (SELECT IFNULL(sum(cop.shouldPayFee),0) FROM cm_order_product cop WHERE cop.orderId=co.orderID) AS "shouldPayProduct",
         (SELECT IFNULL(sum(cop.shouldPayFee),0) FROM cm_order_product cop WHERE cop.orderId=co.orderID) AS "shouldPayProduct",
         co.status AS status,
         co.status AS status,
-        co.splitFlag AS splitFlag,
-        co.postageOrderFlag AS postageOrderFlag,
-        (case when co.orderType = '0' then
-        (select linkMan from serviceprovider where serviceProviderID = co.spID)
-        else
-        ''
-        end) AS spName
+        co.postageOrderFlag AS postageOrderFlag
         FROM cm_order co
         FROM cm_order co
         LEFT JOIN bp_order_userinfo bou ON bou.orderId = co.orderID
         LEFT JOIN bp_order_userinfo bou ON bou.orderId = co.orderID
         <where>
         <where>
@@ -126,12 +107,6 @@
             <if test="buyer != null and buyer != ''">
             <if test="buyer != null and buyer != ''">
                 AND bou.name LIKE concat('%',#{buyer},'%')
                 AND bou.name LIKE concat('%',#{buyer},'%')
             </if>
             </if>
-            <if test="orderType != null and orderType != ''">
-                AND co.orderType = #{orderType}
-            </if>
-            <if test="orderSource != null and orderSource != ''">
-                AND co.orderSource = #{orderSource}
-            </if>
             <if test="orderTime != null and orderTime != ''">
             <if test="orderTime != null and orderTime != ''">
                 AND co.orderTime = #{orderTime}
                 AND co.orderTime = #{orderTime}
             </if>
             </if>
@@ -203,18 +178,6 @@
                     AND (select count(1) from cm_returned_purchase crp where co.orderID = crp.orderID and crp.status = 3 and crp.delFlag = 0) > 0
                     AND (select count(1) from cm_returned_purchase crp where co.orderID = crp.orderID and crp.status = 3 and crp.delFlag = 0) > 0
                 </if>
                 </if>
             </if>
             </if>
-            <if test="rebateOrder != null and rebateOrder != ''">
-                AND
-                <if test="rebateOrder == 1">
-                    exists
-                </if>
-                <if test="rebateOrder == 0">
-                    not exists
-                </if>
-                (select 1 from cm_receipt_order_relation c1 where c1.relationType = '1'
-                and c1.orderID in (select c2.shopOrderID from cm_shop_order c2 where c2.orderID = co.orderID)
-                and c1.delFlag = '0')
-            </if>
             AND co.delFlag = 0
             AND co.delFlag = 0
         </where>
         </where>
             ORDER BY co.orderID DESC, co.orderTime DESC
             ORDER BY co.orderID DESC, co.orderTime DESC

+ 0 - 4
src/main/resources/mapper/NewShopOrderMapper.xml

@@ -26,7 +26,6 @@
 			a.refundAmount AS  refundAmount,
 			a.refundAmount AS  refundAmount,
 			a.clubID  AS clubID,
 			a.clubID  AS clubID,
 			a.spID AS  spID,
 			a.spID AS  spID,
-			a.mainSpID  AS mainSpID,
 			a.orderBeanAmount AS  orderBeanAmount,
 			a.orderBeanAmount AS  orderBeanAmount,
 			a.useBeanAmount AS  useBeanAmount,
 			a.useBeanAmount AS  useBeanAmount,
 			a.useBeanFlag AS  useBeanFlag,
 			a.useBeanFlag AS  useBeanFlag,
@@ -39,16 +38,13 @@
 			a.delFlag  AS delFlag,
 			a.delFlag  AS delFlag,
 			a.refundsAmount  AS refundsAmount,
 			a.refundsAmount  AS refundsAmount,
 			a.orderStatusFlag  AS orderStatusFlag,
 			a.orderStatusFlag  AS orderStatusFlag,
-			a.buyStatus AS buyStatus,
 			a.orderSubmitType AS orderSubmitType,
 			a.orderSubmitType AS orderSubmitType,
-			a.orderType AS orderType,
 			a.orderTime AS orderTime,
 			a.orderTime AS orderTime,
 			a.deliveryTimeMills AS deliveryTimeMills,
 			a.deliveryTimeMills AS deliveryTimeMills,
 			a.presentNum AS presentNum,
 			a.presentNum AS presentNum,
 			a.preferential AS preferential,
 			a.preferential AS preferential,
 			a.outStoreNum AS outStoreNum,
 			a.outStoreNum AS outStoreNum,
 			IFNULL(a.outStoreTimes, 0) AS outStoreTimes,
 			IFNULL(a.outStoreTimes, 0) AS outStoreTimes,
-			a.splitFlag AS splitFlag,
 			a.autoReceiveTimeMills AS autoReceiveTimeMills,
 			a.autoReceiveTimeMills AS autoReceiveTimeMills,
 			a.autoOverTimeMills AS autoOverTimeMills,
 			a.autoOverTimeMills AS autoOverTimeMills,
     		a.receiveGoodsTime AS receiveGoodsTime,
     		a.receiveGoodsTime AS receiveGoodsTime,

+ 1 - 0
src/main/resources/mapper/ThemeMapper.xml

@@ -25,5 +25,6 @@
                 AND enabledStatus = #{enabledStatus}
                 AND enabledStatus = #{enabledStatus}
             </if>
             </if>
         </where>
         </where>
+        order by addTime desc
     </select>
     </select>
 </mapper>
 </mapper>