Sfoglia il codice sorgente

联合丽格改版

zhijiezhao 2 anni fa
parent
commit
3a57121198
62 ha cambiato i file con 1094 aggiunte e 1682 eliminazioni
  1. 8 3
      pom.xml
  2. 0 1
      src/main/java/com/caimei/modules/club/controller/CmOperationUserController.java
  3. 3 6
      src/main/java/com/caimei/modules/club/controller/CmUserOrganizeController.java
  4. 0 1
      src/main/java/com/caimei/modules/club/entity/NewCmClub.java
  5. 1 0
      src/main/java/com/caimei/modules/club/service/CmOperationUserService.java
  6. 140 0
      src/main/java/com/caimei/modules/homepage/controller/CmHomePageController.java
  7. 42 0
      src/main/java/com/caimei/modules/homepage/dao/ActiveDao.java
  8. 28 0
      src/main/java/com/caimei/modules/homepage/dao/BannerDao.java
  9. 18 0
      src/main/java/com/caimei/modules/homepage/dao/MainMenuDao.java
  10. 18 0
      src/main/java/com/caimei/modules/homepage/dao/ThemeDao.java
  11. 31 0
      src/main/java/com/caimei/modules/homepage/enity/Active.java
  12. 19 0
      src/main/java/com/caimei/modules/homepage/enity/ActiveImages.java
  13. 40 0
      src/main/java/com/caimei/modules/homepage/enity/Banner.java
  14. 26 0
      src/main/java/com/caimei/modules/homepage/enity/MainMenu.java
  15. 25 0
      src/main/java/com/caimei/modules/homepage/enity/Theme.java
  16. 57 0
      src/main/java/com/caimei/modules/homepage/service/PageService.java
  17. 205 0
      src/main/java/com/caimei/modules/homepage/service/impl/PageServiceImpl.java
  18. 21 6
      src/main/java/com/caimei/modules/order/controller/OrganizeOrderController.java
  19. 1 0
      src/main/java/com/caimei/modules/order/dao/CmDiscernReceiptDao.java
  20. 1 0
      src/main/java/com/caimei/modules/order/dao/CmReceiptOrderRelationDao.java
  21. 1 0
      src/main/java/com/caimei/modules/order/dao/LogisticsBatchDao.java
  22. 1 0
      src/main/java/com/caimei/modules/order/dao/LogisticsInformationDao.java
  23. 1 0
      src/main/java/com/caimei/modules/order/dao/LogisticsRecordDao.java
  24. 1 0
      src/main/java/com/caimei/modules/order/dao/NewOrderProductDao.java
  25. 1 0
      src/main/java/com/caimei/modules/order/dao/NewShopOrderDao.java
  26. 1 0
      src/main/java/com/caimei/modules/order/dao/OrderInvoiceDao.java
  27. 1 0
      src/main/java/com/caimei/modules/order/dao/OrderUserInfoDao.java
  28. 0 4
      src/main/java/com/caimei/modules/order/entity/NewOrder.java
  29. 2 686
      src/main/java/com/caimei/modules/order/entity/NewOrderProduct.java
  30. 3 737
      src/main/java/com/caimei/modules/order/entity/NewShopOrder.java
  31. 14 0
      src/main/java/com/caimei/modules/order/entity/receiptVo.java
  32. 1 0
      src/main/java/com/caimei/modules/order/service/CmReceiptOrderRelationService.java
  33. 1 0
      src/main/java/com/caimei/modules/order/service/NewShopOrderService.java
  34. 1 0
      src/main/java/com/caimei/modules/order/service/OrderUserInfoService.java
  35. 1 0
      src/main/java/com/caimei/modules/order/service/impl/CmReceiptOrderRelationServiceImpl.java
  36. 11 20
      src/main/java/com/caimei/modules/order/service/impl/NewOrderServiceImpl.java
  37. 0 4
      src/main/java/com/caimei/modules/order/service/impl/NewShopOrderServiceImpl.java
  38. 1 0
      src/main/java/com/caimei/modules/order/service/impl/OrderUserInfoServiceImpl.java
  39. 4 19
      src/main/java/com/caimei/modules/products/controller/CmMallOrganizeProductsController.java
  40. 0 2
      src/main/java/com/caimei/modules/products/controller/CmMallProductsClassifyController.java
  41. 0 2
      src/main/java/com/caimei/modules/products/dao/CmMallOrganizeProductsDao.java
  42. 9 16
      src/main/java/com/caimei/modules/products/entity/CmMallOrganizeProducts.java
  43. 0 2
      src/main/java/com/caimei/modules/products/service/CmMallOrganizeProductsService.java
  44. 9 14
      src/main/java/com/caimei/modules/products/service/impl/CmMallOrganizeProductsServiceImpl.java
  45. 0 1
      src/main/java/com/caimei/modules/products/service/impl/CmMallProductsClassifyServiceImpl.java
  46. 4 2
      src/main/java/com/caimei/modules/shiro/auth/AuthRealm.java
  47. 1 1
      src/main/java/com/caimei/modules/shiro/auth/ShiroConfig.java
  48. 1 0
      src/main/java/com/caimei/modules/shiro/controller/HomePageController.java
  49. 1 0
      src/main/java/com/caimei/modules/shiro/dao/UserDao.java
  50. 1 0
      src/main/java/com/caimei/modules/shiro/service/impl/HomePageServiceImpl.java
  51. 1 0
      src/main/java/com/caimei/modules/shiro/service/impl/ShiroServiceImpl.java
  52. 115 0
      src/main/resources/mapper/ActiveMapper.xml
  53. 100 0
      src/main/resources/mapper/BannerMapper.xml
  54. 43 122
      src/main/resources/mapper/CmMallOrganizeProductsMapper.xml
  55. 0 1
      src/main/resources/mapper/CmReturnedPurchaseMapper.xml
  56. 12 10
      src/main/resources/mapper/CmUserMapper.xml
  57. 30 0
      src/main/resources/mapper/MainMenuMapper.xml
  58. 0 2
      src/main/resources/mapper/NewCmClubMapper.xml
  59. 2 6
      src/main/resources/mapper/NewOrderMapper.xml
  60. 6 11
      src/main/resources/mapper/NewOrderProductMapper.xml
  61. 0 3
      src/main/resources/mapper/NewShopOrderMapper.xml
  62. 29 0
      src/main/resources/mapper/ThemeMapper.xml

+ 8 - 3
pom.xml

@@ -17,7 +17,7 @@
     <parent>
     <parent>
         <groupId>org.springframework.boot</groupId>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>1.5.9.RELEASE</version>
+        <version>2.5.6</version>
     </parent>
     </parent>
 
 
     <dependencies>
     <dependencies>
@@ -36,7 +36,12 @@
         <dependency>
         <dependency>
             <groupId>org.mybatis.spring.boot</groupId>
             <groupId>org.mybatis.spring.boot</groupId>
             <artifactId>mybatis-spring-boot-starter</artifactId>
             <artifactId>mybatis-spring-boot-starter</artifactId>
-            <version>1.3.1</version>
+            <version>2.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.3.1</version>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <groupId>org.projectlombok</groupId>
@@ -105,7 +110,7 @@
         <dependency>
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
             <artifactId>gson</artifactId>
-            <version>2.3</version>
+            <version>2.8.6</version>
         </dependency>
         </dependency>
 
 
         <!--  jsoup 对 HTML 文档进行解析和操作 -->
         <!--  jsoup 对 HTML 文档进行解析和操作 -->

+ 0 - 1
src/main/java/com/caimei/modules/club/controller/CmOperationUserController.java

@@ -38,7 +38,6 @@ public class CmOperationUserController {
     /**
     /**
      * 查看运营人员
      * 查看运营人员
      */
      */
-    @ResponseBody
     @GetMapping("/list")
     @GetMapping("/list")
     public JsonModel list(CmOperationUser cmOperationUser, Page page) {
     public JsonModel list(CmOperationUser cmOperationUser, Page page) {
         PageHelper.startPage(page.getIndex(), page.getPageSize());
         PageHelper.startPage(page.getIndex(), page.getPageSize());

+ 3 - 6
src/main/java/com/caimei/modules/club/controller/CmUserOrganizeController.java

@@ -13,10 +13,7 @@ import org.junit.Assert;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
@@ -35,8 +32,8 @@ public class CmUserOrganizeController {
     private final CmUserService cmUserService;
     private final CmUserService cmUserService;
     private final NewCmClubService newCmClubService;
     private final NewCmClubService newCmClubService;
 
 
-    @GetMapping(value = "/clubDetail")
-    public JsonModel userDetail(Integer clubId) {
+    @GetMapping(value = "/clubDetail/{clubId}")
+    public JsonModel userDetail(@PathVariable("clubId") Integer clubId) {
         return JsonModel.newInstance().success(newCmClubService.findClubById(clubId));
         return JsonModel.newInstance().success(newCmClubService.findClubById(clubId));
     }
     }
 
 

+ 0 - 1
src/main/java/com/caimei/modules/club/entity/NewCmClub.java

@@ -28,7 +28,6 @@ public class NewCmClub implements Serializable {
     private Integer spID;        // 协销Id
     private Integer spID;        // 协销Id
     private Integer mainServiceProviderID;        // 协销经理Id
     private Integer mainServiceProviderID;        // 协销经理Id
     private Date scanTime;        // 扫描时间
     private Date scanTime;        // 扫描时间
-    private Date checkTime;        // 上线时间
     private String address;        // 详细地址
     private String address;        // 详细地址
     private String linkMan;        // 联系人
     private String linkMan;        // 联系人
     private String contractPhone;        // 联系电话
     private String contractPhone;        // 联系电话

+ 1 - 0
src/main/java/com/caimei/modules/club/service/CmOperationUserService.java

@@ -5,6 +5,7 @@ import com.caimei.modules.club.entity.CmOperationUser;
 import java.util.List;
 import java.util.List;
 
 
 public interface CmOperationUserService {
 public interface CmOperationUserService {
+
     List<CmOperationUser> findList(CmOperationUser cmOperationUser);
     List<CmOperationUser> findList(CmOperationUser cmOperationUser);
 
 
     List<CmOperationUser> findListBuyBindMobile(CmOperationUser cmOperationUser);
     List<CmOperationUser> findListBuyBindMobile(CmOperationUser cmOperationUser);

+ 140 - 0
src/main/java/com/caimei/modules/homepage/controller/CmHomePageController.java

@@ -0,0 +1,140 @@
+package com.caimei.modules.homepage.controller;
+
+import com.caimei.modules.club.entity.Page;
+import com.caimei.modules.homepage.enity.Active;
+import com.caimei.modules.homepage.enity.Banner;
+import com.caimei.modules.homepage.enity.MainMenu;
+import com.caimei.modules.homepage.enity.Theme;
+import com.caimei.modules.homepage.service.PageService;
+import com.caimei.utils.JsonModel;
+import lombok.RequiredArgsConstructor;
+import org.junit.Assert;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author zzj
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/home/page")
+public class CmHomePageController {
+
+    private final PageService pageService;
+
+    @GetMapping("/banner/{id}/{sort}")
+    public JsonModel bannerSort(@PathVariable("id") Integer id, @PathVariable("sort") Integer sort) {
+        return JsonModel.newInstance().success(pageService.sortChange(id, sort, 1));
+    }
+
+    @GetMapping("/menu/{id}/{sort}")
+    public JsonModel menuSort(@PathVariable("id") Integer id, @PathVariable("sort") Integer sort) {
+        return JsonModel.newInstance().success(pageService.sortChange(id, sort, 2));
+    }
+
+    @GetMapping("/theme/list")
+    public JsonModel themeList(Theme theme, Page page) {
+        Assert.assertNotNull("组织Id不能为空!", theme.getOrganizeId());
+        return JsonModel.newInstance().success(pageService.findThemeList(theme, page));
+    }
+
+    @GetMapping("/check/theme/status/{id}")
+    public JsonModel checkThemeStatus(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.checkThemeStatus(id));
+    }
+
+    @PostMapping("/save/theme")
+    public JsonModel saveTheme(@RequestBody Theme theme) {
+        return JsonModel.newInstance().success(pageService.saveTheme(theme));
+    }
+
+    @GetMapping("/del/theme/{id}")
+    public JsonModel delTheme(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.delTheme(id));
+    }
+
+    @GetMapping("/theme/form/{id}")
+    public JsonModel themeForm(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.themeForm(id));
+    }
+
+    @GetMapping("/banner/form/{id}")
+    public JsonModel bannerForm(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.findBannerById(id));
+    }
+
+    @GetMapping("/banner/list")
+    public JsonModel bannerList(Banner banner, Page page) {
+        Assert.assertNotNull("组织Id不能为空!", banner.getOrganizeId());
+        return JsonModel.newInstance().success(pageService.findBannerList(banner, page));
+    }
+
+    @PostMapping("/save/banner")
+    public JsonModel addBanner(@RequestBody Banner banner) {
+        Assert.assertNotNull("组织Id不能为空!", banner.getOrganizeId());
+        return JsonModel.newInstance().success(pageService.saveBanner(banner));
+    }
+
+    @GetMapping("/check/banner/status/{id}")
+    public JsonModel checkBannerStatus(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.checkStatus(id));
+    }
+
+    @GetMapping("/del/banner/{id}")
+    public JsonModel delBanner(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.deleteBanner(id));
+    }
+
+    @GetMapping("/menu/form/{id}")
+    public JsonModel menuForm(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.findMenuById(id));
+    }
+
+    @PostMapping("/save/menu")
+    public JsonModel saveMainMenu(@RequestBody MainMenu menu) {
+        Assert.assertNotNull("组织Id不能为空!", menu.getOrganizeId());
+        return JsonModel.newInstance().success(pageService.saveMenu(menu));
+    }
+
+    @GetMapping("/menu/list")
+    public JsonModel menuList(MainMenu menu, Page page) {
+        Assert.assertNotNull("组织Id不能为空!", menu.getOrganizeId());
+        return JsonModel.newInstance().success(pageService.findMenuList(menu, page));
+    }
+
+    @GetMapping("/check/menu/status/{id}")
+    public JsonModel checkMenuStatus(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.checkMenuStatus(id));
+    }
+
+    @GetMapping("/del/menu/{id}")
+    public JsonModel delMenu(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.deleteMenu(id));
+    }
+
+    @PostMapping("/save/active")
+    public JsonModel saveActive(@RequestBody Active active) {
+        Assert.assertNotNull("组织Id不能为空!", active.getOrganizeId());
+        return JsonModel.newInstance().success(pageService.saveActive(active));
+    }
+
+    @GetMapping("/active/list")
+    public JsonModel activeList(Active active, Page page) {
+        Assert.assertNotNull("组织Id不能为空!", active.getOrganizeId());
+        return JsonModel.newInstance().success(pageService.findActiveList(active, page));
+    }
+
+    @GetMapping("/check/active/status/{id}")
+    public JsonModel checkActiveStatus(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.checkActiveStatus(id));
+    }
+
+    @GetMapping("/del/active/{id}")
+    public JsonModel delActive(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.delActive(id));
+    }
+
+    @GetMapping("/active/form/{id}")
+    public JsonModel activeForm(@PathVariable("id") Integer id) {
+        return JsonModel.newInstance().success(pageService.activeForm(id));
+    }
+}

+ 42 - 0
src/main/java/com/caimei/modules/homepage/dao/ActiveDao.java

@@ -0,0 +1,42 @@
+package com.caimei.modules.homepage.dao;
+
+import com.caimei.modules.homepage.enity.Active;
+import com.caimei.modules.homepage.enity.ActiveImages;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * @author zzj
+ */
+@Mapper
+public interface ActiveDao {
+
+    void insertActive(Active active);
+
+    void delProducts(Integer id);
+
+    void delImages(Integer id);
+
+    void insertImages(ActiveImages images);
+
+    void insertProducts(Integer id, Integer productId);
+
+    void updateActive(Active active);
+
+    void insertImageProduct(Integer activeId, Integer imageId, List<Integer> productIds);
+
+    List<Active> findActiveList(Active active);
+
+    void checkActiveStatus(Integer id);
+
+    void delActive(Integer id);
+
+    Active findActiveById(Integer id);
+
+    List<Integer> findProductsById(Integer id);
+
+    List<ActiveImages> findImageList(Integer id);
+
+    List<Integer> findProductByImage(Integer id);
+}

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

@@ -0,0 +1,28 @@
+package com.caimei.modules.homepage.dao;
+
+import com.caimei.modules.homepage.enity.Banner;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author zzj
+ */
+@Mapper
+public interface BannerDao {
+
+    List<Banner> findBannerList(Banner banner);
+
+    void insertBanner(Banner banner);
+
+    void updateBanner(Banner banner);
+
+    void checkBannerStatus(Integer id);
+
+    void delBanner(Integer id);
+
+    Banner findBannerById(Integer id);
+
+    void updateSort(@Param("id") Integer id, @Param("sort") Integer sort, @Param("status") Integer status);
+}

+ 18 - 0
src/main/java/com/caimei/modules/homepage/dao/MainMenuDao.java

@@ -0,0 +1,18 @@
+package com.caimei.modules.homepage.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.caimei.modules.homepage.enity.MainMenu;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * @author zzj
+ */
+@Mapper
+public interface MainMenuDao extends BaseMapper<MainMenu> {
+
+    List<MainMenu> findList(MainMenu menu);
+
+    void checkMenuStatus(Integer id);
+}

+ 18 - 0
src/main/java/com/caimei/modules/homepage/dao/ThemeDao.java

@@ -0,0 +1,18 @@
+package com.caimei.modules.homepage.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.caimei.modules.homepage.enity.Theme;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * @author zzj
+ */
+@Mapper
+public interface ThemeDao extends BaseMapper<Theme> {
+
+    List<Theme> findList(Theme theme);
+
+    void checkStatus(Integer id);
+}

+ 31 - 0
src/main/java/com/caimei/modules/homepage/enity/Active.java

@@ -0,0 +1,31 @@
+package com.caimei.modules.homepage.enity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author zzj
+ */
+@Data
+public class Active implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private Integer id;
+    private Integer organizeId;
+    private String topic;
+    private Integer enabledStatus;
+    /**
+     * 活动类型 1商品列表 2宣传图(一张) 3宣传图(多张)
+     */
+    private Integer activeType;
+    /**
+     * 活动类型1 用prodcutIds
+     */
+    private List<Integer> productIds;
+    /**
+     * 活动类型不为1则用images
+     */
+    private List<ActiveImages> images;
+}

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

@@ -0,0 +1,19 @@
+package com.caimei.modules.homepage.enity;
+
+import lombok.Data;
+
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author zzj
+ */
+@Data
+public class ActiveImages implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Integer id;
+    private Integer activeId;
+    private String image;
+    private List<Integer> productIds;
+}

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

@@ -0,0 +1,40 @@
+package com.caimei.modules.homepage.enity;
+
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author zzj
+ */
+@Data
+public class Banner implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Integer id;
+    private Integer organizeId;
+    private String bannerName;
+    private Integer sort;
+
+    private String bannerImage;
+    /**
+     * 状态 0停用 1启用
+     */
+    private Integer enabledStatus;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date addTime;
+    /**
+     * 跳转类型 1商品详情 2活动列表
+     */
+    private Integer jumpType;
+    /**
+     * 跳转活动Id
+     */
+    private Integer jumpActiveId;
+    /**
+     * 跳转商品Id
+     */
+    private Integer jumpProductId;
+}

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

@@ -0,0 +1,26 @@
+package com.caimei.modules.homepage.enity;
+
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author zzj
+ */
+@Data
+public class MainMenu implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Integer id;
+    private Integer organizeId;
+    private String topic;
+    private String image;
+    private Integer sort;
+    private Integer enabledStatus;
+    private Integer jumpType;
+    private Integer jumpProductId;
+    private Integer jumpActiveId;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date addTime;
+}

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

@@ -0,0 +1,25 @@
+package com.caimei.modules.homepage.enity;
+
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author zzj
+ */
+@Data
+public class Theme implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Integer id;
+    private Integer organizeId;
+    private String topic;
+    private Integer enabledStatus;
+    private String image;
+    private Integer jumpType;
+    private Integer jumpProductId;
+    private Integer jumpActiveId;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date addTime;
+}

+ 57 - 0
src/main/java/com/caimei/modules/homepage/service/PageService.java

@@ -0,0 +1,57 @@
+package com.caimei.modules.homepage.service;
+
+import com.caimei.modules.club.entity.Page;
+import com.caimei.modules.homepage.enity.Active;
+import com.caimei.modules.homepage.enity.Banner;
+import com.caimei.modules.homepage.enity.MainMenu;
+import com.caimei.modules.homepage.enity.Theme;
+
+import java.util.List;
+
+/**
+ * @author zzj
+ */
+public interface PageService {
+
+    Page<Banner> findBannerList(Banner banner, Page page);
+
+    String saveBanner(Banner banner);
+
+    String checkStatus(Integer id);
+
+    String deleteBanner(Integer id);
+
+    String saveMenu(MainMenu menu);
+
+    Page<MainMenu> findMenuList(MainMenu menu, Page page);
+
+    String checkMenuStatus(Integer id);
+
+    String deleteMenu(Integer id);
+
+    String saveActive(Active active);
+
+    Page<Active> findActiveList(Active active, Page page);
+
+    String checkActiveStatus(Integer id);
+
+    String delActive(Integer id);
+
+    Banner findBannerById(Integer id);
+
+    MainMenu findMenuById(Integer id);
+
+    Page<Theme> findThemeList(Theme theme, Page page);
+
+    String checkThemeStatus(Integer id);
+
+    String saveTheme(Theme theme);
+
+    String delTheme(Integer id);
+
+    Theme themeForm(Integer id);
+
+    Active activeForm(Integer id);
+
+    String sortChange(Integer id, Integer sort, Integer i);
+}

+ 205 - 0
src/main/java/com/caimei/modules/homepage/service/impl/PageServiceImpl.java

@@ -0,0 +1,205 @@
+package com.caimei.modules.homepage.service.impl;
+
+import com.caimei.modules.club.entity.Page;
+import com.caimei.modules.homepage.dao.ActiveDao;
+import com.caimei.modules.homepage.dao.BannerDao;
+import com.caimei.modules.homepage.dao.MainMenuDao;
+import com.caimei.modules.homepage.dao.ThemeDao;
+import com.caimei.modules.homepage.enity.*;
+import com.caimei.modules.homepage.service.PageService;
+import com.github.pagehelper.PageHelper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author zzj
+ */
+@Service
+@Slf4j
+public class PageServiceImpl implements PageService {
+
+    @Resource
+    private BannerDao bannerDao;
+    @Resource
+    private MainMenuDao menuDao;
+    @Resource
+    private ActiveDao activeDao;
+    @Resource
+    private ThemeDao themeDao;
+
+    @Override
+    public Page<Banner> findBannerList(Banner banner, Page page) {
+        PageHelper.startPage(page.getIndex(), page.getPageSize());
+        List<Banner> bannerList = bannerDao.findBannerList(banner);
+        return new Page<>(bannerList);
+    }
+
+    @Override
+    public String saveBanner(Banner banner) {
+        if (null != banner.getId()) {
+            bannerDao.updateBanner(banner);
+            return "修改成功!";
+        }
+        bannerDao.insertBanner(banner);
+        return "添加成功!";
+    }
+
+    @Override
+    public String checkStatus(Integer id) {
+        bannerDao.checkBannerStatus(id);
+        return "成功!";
+    }
+
+    @Override
+    public String deleteBanner(Integer id) {
+        bannerDao.delBanner(id);
+        return "删除成功!";
+    }
+
+    @Override
+    public String saveMenu(MainMenu menu) {
+        if (null != menu.getId()) {
+            menuDao.updateById(menu);
+            return "修改成功!";
+        }
+        menu.setAddTime(new Date());
+        menuDao.insert(menu);
+        return "添加成功!";
+    }
+
+    @Override
+    public Page<MainMenu> findMenuList(MainMenu menu, Page page) {
+        PageHelper.startPage(page.getIndex(), page.getPageSize());
+        List<MainMenu> list = menuDao.findList(menu);
+        return new Page<>(list);
+    }
+
+    @Override
+    public String checkMenuStatus(Integer id) {
+        menuDao.checkMenuStatus(id);
+        return "成功!";
+    }
+
+    @Override
+    public String deleteMenu(Integer id) {
+        menuDao.deleteById(id);
+        return "删除成功!";
+    }
+
+    @Override
+    public String saveActive(Active active) {
+        if (null != active.getId()) {
+            activeDao.delProducts(active.getId());
+            activeDao.delImages(active.getId());
+            activeDao.updateActive(active);
+        } else {
+            activeDao.insertActive(active);
+        }
+        /**
+         * type 为1时,仅需保存productId
+         */
+        if (1 != active.getActiveType()) {
+            active.getImages().forEach(i -> {
+                i.setActiveId(active.getId());
+                activeDao.insertImages(i);
+                log.info("imageId--------------" + i.getId());
+                activeDao.insertImageProduct(active.getId(), i.getId(), i.getProductIds());
+            });
+            return "保存成功!";
+        }
+        active.getProductIds().forEach(p -> activeDao.insertProducts(active.getId(), p));
+        return "保存成功!";
+    }
+
+    @Override
+    public Page<Active> findActiveList(Active active, Page page) {
+        PageHelper.startPage(page.getIndex(), page.getPageSize());
+        List<Active> activeList = activeDao.findActiveList(active);
+        return new Page<>(activeList);
+    }
+
+    @Override
+    public String checkActiveStatus(Integer id) {
+        activeDao.checkActiveStatus(id);
+        return "成功!";
+    }
+
+    @Override
+    public String delActive(Integer id) {
+        activeDao.delActive(id);
+        return "删除成功";
+    }
+
+    @Override
+    public Banner findBannerById(Integer id) {
+        return bannerDao.findBannerById(id);
+    }
+
+    @Override
+    public MainMenu findMenuById(Integer id) {
+        return menuDao.selectById(id);
+    }
+
+    @Override
+    public Page<Theme> findThemeList(Theme theme, Page page) {
+        PageHelper.startPage(page.getIndex(), page.getPageSize());
+        List<Theme> list = themeDao.findList(theme);
+        return new Page<>(list);
+    }
+
+    @Override
+    public String checkThemeStatus(Integer id) {
+        themeDao.checkStatus(id);
+        return "成功!";
+    }
+
+    @Override
+    public String saveTheme(Theme theme) {
+        if (null != theme.getId()) {
+            themeDao.updateById(theme);
+            return "修改成功!";
+        }
+        theme.setAddTime(new Date());
+        themeDao.insert(theme);
+        return "添加成功!";
+    }
+
+    @Override
+    public String delTheme(Integer id) {
+        themeDao.deleteById(id);
+        return "删除成功";
+    }
+
+    @Override
+    public Theme themeForm(Integer id) {
+        return themeDao.selectById(id);
+    }
+
+    @Override
+    public Active activeForm(Integer id) {
+        Active active = activeDao.findActiveById(id);
+        if (1 == active.getActiveType()) {
+            active.setProductIds(activeDao.findProductsById(id));
+        } else {
+            List<ActiveImages> imageList = activeDao.findImageList(id);
+            imageList.forEach(i -> i.setProductIds(activeDao.findProductByImage(i.getId())));
+            active.setImages(imageList);
+        }
+        return active;
+    }
+
+    @Override
+    public String sortChange(Integer id, Integer sort, Integer status) {
+        /**
+         *  status 1  banner
+         *  status 2  menu
+         */
+        bannerDao.updateSort(id, sort, status);
+        return "修改排序成功!";
+    }
+
+}

+ 21 - 6
src/main/java/com/caimei/modules/order/controller/OrganizeOrderController.java

@@ -49,6 +49,17 @@ public class OrganizeOrderController {
         return entity;
         return entity;
     }
     }
 
 
+    /**
+     * 收款列表
+     * 查询参数: 订单ID  订单编号  下单时间  客户名称
+     *
+     * @return
+     */
+    @GetMapping("receiptlist")
+    public JsonModel receiptList() {
+        return null;
+    }
+
     /**
     /**
      * 订单列表
      * 订单列表
      * 查询参数 :订单Id,订单编号,下单时间/终止时间,买家,收货人,订单状态,收款状态,发货状态,退款状态,待审核退款
      * 查询参数 :订单Id,订单编号,下单时间/终止时间,买家,收货人,订单状态,收款状态,发货状态,退款状态,待审核退款
@@ -135,16 +146,19 @@ public class OrganizeOrderController {
         Double returnedPurchaseFee = 0D;    //退款(退货)总金额
         Double returnedPurchaseFee = 0D;    //退款(退货)总金额
         Double refundFee = 0D;  //退款总额(给买家)
         Double refundFee = 0D;  //退款总额(给买家)
         for (CmReturnedPurchase bean : dataList) {
         for (CmReturnedPurchase bean : dataList) {
-            if (!bean.getStatus().equals("3")) {
+            if (!"3".equals(bean.getStatus())) {
                 returnedPurchaseFee += bean.getReturnedPurchaseFee();
                 returnedPurchaseFee += bean.getReturnedPurchaseFee();
                 refundFee += bean.getRefundFee();
                 refundFee += bean.getRefundFee();
             }
             }
         }
         }
-        Double returnValue = 0d;   //退货价值
+        //退货价值
+        Double returnValue = 0d;
         if (order.getDiscountFee() >= returnedPurchaseFee) {
         if (order.getDiscountFee() >= returnedPurchaseFee) {
-            returnValue = 0d;   //如果经理折扣大于退款(退货)总金额之和  那么先抵扣经理折扣  退款价值为0
+            //如果经理折扣大于退款(退货)总金额之和  那么先抵扣经理折扣  退款价值为0
+            returnValue = 0d;
         } else {
         } else {
-            returnValue = returnedPurchaseFee - order.getDiscountFee(); //抵用完经理折扣后才是真实价值
+            //抵用完经理折扣后才是真实价值
+            returnValue = returnedPurchaseFee - order.getDiscountFee();
         }
         }
         //订单已收金额
         //订单已收金额
         Double receiptAmount = cmDiscernReceiptService.findOrderReceipt(order.getOrderID());
         Double receiptAmount = cmDiscernReceiptService.findOrderReceipt(order.getOrderID());
@@ -175,9 +189,10 @@ public class OrganizeOrderController {
             NewOrder newOrder = newOrderService.get(cmReturnedPurchase.getOrderID().toString());
             NewOrder newOrder = newOrderService.get(cmReturnedPurchase.getOrderID().toString());
             List<CmReceiptOrderRelation> listRelation = cmReceiptOrderRelationService.findByOrderID(newOrder.getOrderID());
             List<CmReceiptOrderRelation> listRelation = cmReceiptOrderRelationService.findByOrderID(newOrder.getOrderID());
             List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
             List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
-            Double refundFee = 0D;  //退款总额
+            //退款总额
+            Double refundFee = 0D;
             for (CmReturnedPurchase bean : dataList) {
             for (CmReturnedPurchase bean : dataList) {
-                if (!bean.getStatus().equals("3")) {
+                if (!"3".equals(bean.getStatus())) {
                     refundFee += bean.getRefundFee();
                     refundFee += bean.getRefundFee();
                 }
                 }
             }
             }

+ 1 - 0
src/main/java/com/caimei/modules/order/dao/CmDiscernReceiptDao.java

@@ -7,6 +7,7 @@ import java.util.List;
 
 
 @Mapper
 @Mapper
 public interface CmDiscernReceiptDao {
 public interface CmDiscernReceiptDao {
+
     List<Integer> findRebateOrderID(@Param("orderIds") List<Integer> collect);
     List<Integer> findRebateOrderID(@Param("orderIds") List<Integer> collect);
 
 
     Double findOrderReceipt(Integer orderID);
     Double findOrderReceipt(Integer orderID);

+ 1 - 0
src/main/java/com/caimei/modules/order/dao/CmReceiptOrderRelationDao.java

@@ -7,6 +7,7 @@ import java.util.List;
 
 
 @Mapper
 @Mapper
 public interface CmReceiptOrderRelationDao {
 public interface CmReceiptOrderRelationDao {
+
     List<Integer> toAudit(Integer orderID);
     List<Integer> toAudit(Integer orderID);
 
 
     List<CmReceiptOrderRelation> findByOrderID(Integer orderID);
     List<CmReceiptOrderRelation> findByOrderID(Integer orderID);

+ 1 - 0
src/main/java/com/caimei/modules/order/dao/LogisticsBatchDao.java

@@ -8,5 +8,6 @@ import java.util.List;
 
 
 @Mapper
 @Mapper
 public interface LogisticsBatchDao {
 public interface LogisticsBatchDao {
+
     List<LogisticsBatch> findBatch(@Param("orderID")Integer orderID, @Param("logisticsBatchID")String logisticsBatchID);
     List<LogisticsBatch> findBatch(@Param("orderID")Integer orderID, @Param("logisticsBatchID")String logisticsBatchID);
 }
 }

+ 1 - 0
src/main/java/com/caimei/modules/order/dao/LogisticsInformationDao.java

@@ -8,5 +8,6 @@ import java.util.List;
 
 
 @Mapper
 @Mapper
 public interface LogisticsInformationDao {
 public interface LogisticsInformationDao {
+    
     List<LogisticsInformation> findByLogisticsBatchID(@Param("logisticsBatchID") Integer logisticsBatchID);
     List<LogisticsInformation> findByLogisticsBatchID(@Param("logisticsBatchID") Integer logisticsBatchID);
 }
 }

+ 1 - 0
src/main/java/com/caimei/modules/order/dao/LogisticsRecordDao.java

@@ -8,5 +8,6 @@ import java.util.List;
 
 
 @Mapper
 @Mapper
 public interface LogisticsRecordDao {
 public interface LogisticsRecordDao {
+
     List<LogisticsRecord> findByLogisticsBatchID(@Param("logisticsBatchID") Integer logisticsBatchID);
     List<LogisticsRecord> findByLogisticsBatchID(@Param("logisticsBatchID") Integer logisticsBatchID);
 }
 }

+ 1 - 0
src/main/java/com/caimei/modules/order/dao/NewOrderProductDao.java

@@ -7,6 +7,7 @@ import java.util.List;
 
 
 @Mapper
 @Mapper
 public interface NewOrderProductDao {
 public interface NewOrderProductDao {
+
     NewOrderProduct get(Integer orderProductID);
     NewOrderProduct get(Integer orderProductID);
 
 
     List<NewOrderProduct> findListByShopOrderID(Integer shopOrderID);
     List<NewOrderProduct> findListByShopOrderID(Integer shopOrderID);

+ 1 - 0
src/main/java/com/caimei/modules/order/dao/NewShopOrderDao.java

@@ -7,6 +7,7 @@ import java.util.List;
 
 
 @Mapper
 @Mapper
 public interface NewShopOrderDao {
 public interface NewShopOrderDao {
+
     NewShopOrder get(Integer shopOrderID);
     NewShopOrder get(Integer shopOrderID);
 
 
     NewShopOrder findByShopOrderID(Integer shopOrderID);
     NewShopOrder findByShopOrderID(Integer shopOrderID);

+ 1 - 0
src/main/java/com/caimei/modules/order/dao/OrderInvoiceDao.java

@@ -5,5 +5,6 @@ import org.apache.ibatis.annotations.Mapper;
 
 
 @Mapper
 @Mapper
 public interface OrderInvoiceDao {
 public interface OrderInvoiceDao {
+
     OrderInvoice getWithorderId(String orderId);
     OrderInvoice getWithorderId(String orderId);
 }
 }

+ 1 - 0
src/main/java/com/caimei/modules/order/dao/OrderUserInfoDao.java

@@ -5,5 +5,6 @@ import org.apache.ibatis.annotations.Mapper;
 
 
 @Mapper
 @Mapper
 public interface OrderUserInfoDao {
 public interface OrderUserInfoDao {
+
     OrderUserInfo findByOrderID(Integer orderID);
     OrderUserInfo findByOrderID(Integer orderID);
 }
 }

+ 0 - 4
src/main/java/com/caimei/modules/order/entity/NewOrder.java

@@ -34,14 +34,10 @@ public class NewOrder implements Serializable {
     private String note;                // text comment '订单备注',
     private String note;                // text comment '订单备注',
     private Integer clubID;              // bigint(11),
     private Integer clubID;              // bigint(11),
     private String clubScanTime;        // varchar(19),
     private String clubScanTime;        // varchar(19),
-    private String payWay;              // 支付方式,(协销订单可能会存在多种进账方式用,隔开),
     private Integer payTypeID;           // int(11) comment '支付类型',
     private Integer payTypeID;           // int(11) comment '支付类型',
     private String orderSource;         // char(1) comment '订单来源',
     private String orderSource;         // char(1) comment '订单来源',
     private String orderTime;           // datetime comment '订单提交时间',
     private String orderTime;           // datetime comment '订单提交时间',
     private String confirmTime;           // datetime comment '订单确认时间',
     private String confirmTime;           // datetime comment '订单确认时间',
-    private String cooFreeFlag;          // char(1) comment '库分期免息状态',
-    private Integer cooFreeRate;         // int(3) comment '库分期分期费率',
-    private Double cooFreeAmount;       // decimal(20,2) comment '库分期免息金额',
     private String confirmFlag;         // char(1) comment '订单确认标志',
     private String confirmFlag;         // char(1) comment '订单确认标志',
     private Integer clauseID;            // bigint(11) comment '条款ID',
     private Integer clauseID;            // bigint(11) comment '条款ID',
     private String clauseContent;       // text comment '条款内容',
     private String clauseContent;       // text comment '条款内容',

+ 2 - 686
src/main/java/com/caimei/modules/order/entity/NewOrderProduct.java

@@ -2,10 +2,12 @@ package com.caimei.modules.order.entity;
 
 
 import com.caimei.modules.club.entity.CmProductSn;
 import com.caimei.modules.club.entity.CmProductSn;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.AppUtils;
+import lombok.Data;
 
 
 import java.beans.Transient;
 import java.beans.Transient;
 import java.util.List;
 import java.util.List;
 
 
+@Data
 public class NewOrderProduct {
 public class NewOrderProduct {
     private Integer orderProductID;//       int(11) not null auto_increment,
     private Integer orderProductID;//       int(11) not null auto_increment,
     private Integer shopOrderID;//       int(11) comment '子订单Id',
     private Integer shopOrderID;//       int(11) comment '子订单Id',
@@ -17,8 +19,6 @@ public class NewOrderProduct {
     private Integer presentNum;//   int(11) comment '赠送数量',
     private Integer presentNum;//   int(11) comment '赠送数量',
     private String outStoreType;// char(1) comment '出库类型',
     private String outStoreType;// char(1) comment '出库类型',
     private Integer skuID;//     int(11) comment 'skuId',
     private Integer skuID;//     int(11) comment 'skuId',
-    private String props;//     national varchar(1000) comment 'sku属性',
-    private String propName;//   national varchar(1000) comment '属性名',
     private String productNo;//    national varchar(50) comment '商品编号',
     private String productNo;//    national varchar(50) comment '商品编号',
     private Double price;//     float comment '订单商品购买价格',
     private Double price;//     float comment '订单商品购买价格',
     private Double shopProductAmount;        // 商品费  =  成本价快照  *  (购买数量  + 赠品数量)
     private Double shopProductAmount;        // 商品费  =  成本价快照  *  (购买数量  + 赠品数量)
@@ -37,9 +37,6 @@ public class NewOrderProduct {
     private Double singleOtherFee;//   decimal(20,6) comment '单个应付第三方金额',
     private Double singleOtherFee;//   decimal(20,6) comment '单个应付第三方金额',
     private Double singleCmFee;//   decimal(20,6) comment '单个应付采美金额',
     private Double singleCmFee;//   decimal(20,6) comment '单个应付采美金额',
     private Double shouldPayFee;//   decimal(20,6) comment '应付金额',
     private Double shouldPayFee;//   decimal(20,6) comment '应付金额',
-    private String commentFlag;//        national char(1) comment '是否已评论:1是,空或0未评论',
-    private Double price0;//   float(10,2),
-    private Double price1;//   float comment '普通会员价',
     private Double totalFee;//   float comment '总价',
     private Double totalFee;//   float comment '总价',
     private Double totalBeans;//  decimal(10,2) comment '获取到的总采美豆值',
     private Double totalBeans;//  decimal(10,2) comment '获取到的总采美豆值',
     private Double useBalanceAmount;//  double comment '使用余额金额',notOutStore
     private Double useBalanceAmount;//  double comment '使用余额金额',notOutStore
@@ -73,7 +70,6 @@ public class NewOrderProduct {
     private Integer outStoreTimes;  // 发货批次
     private Integer outStoreTimes;  // 发货批次
     private Double costPrice; // 成本价(快照商品成本价格)
     private Double costPrice; // 成本价(快照商品成本价格)
     private Integer stock; // 库存
     private Integer stock; // 库存
-    private Integer status; // 状态
     private String logisticsBatchID; // 发货批次ID
     private String logisticsBatchID; // 发货批次ID
     //private List<NewCmFinanceCharge> newCmFinanceChargeList; //订单商品id对应的多个出账记录
     //private List<NewCmFinanceCharge> newCmFinanceChargeList; //订单商品id对应的多个出账记录
     //private List<NewCmFinanceReceipts> newCmFinanceReceiptsList; //订单商品id对应一个进账记录  订单id对应多个
     //private List<NewCmFinanceReceipts> newCmFinanceReceiptsList; //订单商品id对应一个进账记录  订单id对应多个
@@ -97,684 +93,4 @@ public class NewOrderProduct {
     private Double singleShouldPayTotalTax; //单个付供应商税费
     private Double singleShouldPayTotalTax; //单个付供应商税费
     private Integer frequency;  //订单量
     private Integer frequency;  //订单量
     private Integer totalNum;   //销售量
     private Integer totalNum;   //销售量
-
-    public Integer getOrderProductID() {
-        return orderProductID;
-    }
-
-    public void setOrderProductID(Integer orderProductID) {
-        this.orderProductID = orderProductID;
-    }
-
-    public Integer getShopOrderID() {
-        return shopOrderID;
-    }
-
-    public void setShopOrderID(Integer shopOrderID) {
-        this.shopOrderID = shopOrderID;
-    }
-
-    public String getShopOrderNo() {
-        return shopOrderNo;
-    }
-
-    public void setShopOrderNo(String shopOrderNo) {
-        this.shopOrderNo = shopOrderNo;
-    }
-
-    public Integer getShopID() {
-        return shopID;
-    }
-
-    public void setShopID(Integer shopID) {
-        this.shopID = shopID;
-    }
-
-    public String getLedgerNo() {
-        return ledgerNo;
-    }
-
-    public void setLedgerNo(String ledgerNo) {
-        this.ledgerNo = ledgerNo;
-    }
-
-    public Integer getProductID() {
-        return productID;
-    }
-
-    public void setProductID(Integer productID) {
-        this.productID = productID;
-    }
-
-    public Integer getNum() {
-        return num;
-    }
-
-    public void setNum(Integer num) {
-        this.num = num;
-    }
-
-    public Integer getPresentNum() {
-        return presentNum;
-    }
-
-    public void setPresentNum(Integer presentNum) {
-        this.presentNum = presentNum;
-    }
-
-    public String getOutStoreType() {
-        return outStoreType;
-    }
-
-    public void setOutStoreType(String outStoreType) {
-        this.outStoreType = outStoreType;
-    }
-
-    public Integer getSkuID() {
-        return skuID;
-    }
-
-    public void setSkuID(Integer skuID) {
-        this.skuID = skuID;
-    }
-
-    public String getProps() {
-        return props;
-    }
-
-    public void setProps(String props) {
-        this.props = props;
-    }
-
-    public String getPropName() {
-        return propName;
-    }
-
-    public void setPropName(String propName) {
-        this.propName = propName;
-    }
-
-    public String getProductNo() {
-        return productNo;
-    }
-
-    public void setProductNo(String productNo) {
-        this.productNo = productNo;
-    }
-
-    public Double getPrice() {
-        return price;
-    }
-
-    public void setPrice(Double price) {
-        this.price = price;
-    }
-
-    public Double getShopProductAmount() {
-        return shopProductAmount;
-    }
-
-    public void setShopProductAmount(Double shopProductAmount) {
-        this.shopProductAmount = shopProductAmount;
-    }
-
-    public Double getNormalPrice() {
-        return normalPrice;
-    }
-
-    public void setNormalPrice(Double normalPrice) {
-        this.normalPrice = normalPrice;
-    }
-
-    public Double getTotalAmount() {
-        return totalAmount;
-    }
-
-    public void setTotalAmount(Double totalAmount) {
-        this.totalAmount = totalAmount;
-    }
-
-    public Double getDiscount() {
-        return discount;
-    }
-
-    public void setDiscount(Double discount) {
-        this.discount = discount;
-    }
-
-    public Double getDiscountPrice() {
-        return discountPrice;
-    }
-
-    public void setDiscountPrice(Double discountPrice) {
-        this.discountPrice = discountPrice;
-    }
-
-    public Double getTaxRate() {
-        return taxRate;
-    }
-
-    public void setTaxRate(Double taxRate) {
-        this.taxRate = taxRate;
-    }
-
-    public Double getAddedValueTax() {
-        return addedValueTax;
-    }
-
-    public void setAddedValueTax(Double addedValueTax) {
-        this.addedValueTax = addedValueTax;
-    }
-
-    public Double getTotalAddedValueTax() {
-        return totalAddedValueTax;
-    }
-
-    public void setTotalAddedValueTax(Double totalAddedValueTax) {
-        this.totalAddedValueTax = totalAddedValueTax;
-    }
-
-    public Double getShouldPayTotalTax() {
-        return shouldPayTotalTax;
-    }
-
-    public void setShouldPayTotalTax(Double shouldPayTotalTax) {
-        this.shouldPayTotalTax = shouldPayTotalTax;
-    }
-
-    public Double getShopFee() {
-        return shopFee;
-    }
-
-    public void setShopFee(Double shopFee) {
-        this.shopFee = shopFee;
-    }
-
-    public Double getOtherFee() {
-        return otherFee;
-    }
-
-    public void setOtherFee(Double otherFee) {
-        this.otherFee = otherFee;
-    }
-
-    public Double getCmFee() {
-        return cmFee;
-    }
-
-    public void setCmFee(Double cmFee) {
-        this.cmFee = cmFee;
-    }
-
-    public Double getSingleShopFee() {
-        return singleShopFee;
-    }
-
-    public void setSingleShopFee(Double singleShopFee) {
-        this.singleShopFee = singleShopFee;
-    }
-
-    public Double getSingleOtherFee() {
-        return singleOtherFee;
-    }
-
-    public void setSingleOtherFee(Double singleOtherFee) {
-        this.singleOtherFee = singleOtherFee;
-    }
-
-    public Double getSingleCmFee() {
-        return singleCmFee;
-    }
-
-    public void setSingleCmFee(Double singleCmFee) {
-        this.singleCmFee = singleCmFee;
-    }
-
-    public Double getShouldPayFee() {
-        return shouldPayFee;
-    }
-
-    public void setShouldPayFee(Double shouldPayFee) {
-        this.shouldPayFee = shouldPayFee;
-    }
-
-    public String getCommentFlag() {
-        return commentFlag;
-    }
-
-    public void setCommentFlag(String commentFlag) {
-        this.commentFlag = commentFlag;
-    }
-
-    public Double getPrice0() {
-        return price0;
-    }
-
-    public void setPrice0(Double price0) {
-        this.price0 = price0;
-    }
-
-    public Double getPrice1() {
-        return price1;
-    }
-
-    public void setPrice1(Double price1) {
-        this.price1 = price1;
-    }
-
-    public Double getTotalFee() {
-        return totalFee;
-    }
-
-    public void setTotalFee(Double totalFee) {
-        this.totalFee = totalFee;
-    }
-
-    public Double getTotalBeans() {
-        return totalBeans;
-    }
-
-    public void setTotalBeans(Double totalBeans) {
-        this.totalBeans = totalBeans;
-    }
-
-    public Double getUseBalanceAmount() {
-        return useBalanceAmount;
-    }
-
-    public void setUseBalanceAmount(Double useBalanceAmount) {
-        this.useBalanceAmount = useBalanceAmount;
-    }
-
-    public Integer getUseBeanAmount() {
-        return useBeanAmount;
-    }
-
-    public void setUseBeanAmount(Integer useBeanAmount) {
-        this.useBeanAmount = useBeanAmount;
-    }
-
-    public Integer getNotOutStore() {
-        return notOutStore;
-    }
-
-    public void setNotOutStore(Integer notOutStore) {
-        this.notOutStore = notOutStore;
-    }
-
-    public Integer getCmbeanPrice() {
-        return cmbeanPrice;
-    }
-
-    public void setCmbeanPrice(Integer cmbeanPrice) {
-        this.cmbeanPrice = cmbeanPrice;
-    }
-
-    public String getIsGiftProduct() {
-        return isGiftProduct;
-    }
-
-    public void setIsGiftProduct(String isGiftProduct) {
-        this.isGiftProduct = isGiftProduct;
-    }
-
-    public String getProductActInfo() {
-        return productActInfo;
-    }
-
-    public void setProductActInfo(String productActInfo) {
-        this.productActInfo = productActInfo;
-    }
-
-    public String getBuyAgainFlag() {
-        return buyAgainFlag;
-    }
-
-    public void setBuyAgainFlag(String buyAgainFlag) {
-        this.buyAgainFlag = buyAgainFlag;
-    }
-
-    public String getConfirmProductFlag() {
-        return confirmProductFlag;
-    }
-
-    public void setConfirmProductFlag(String confirmProductFlag) {
-        this.confirmProductFlag = confirmProductFlag;
-    }
-
-    public NewShopOrder getNewShopOrder() {
-        return newShopOrder;
-    }
-
-    public void setNewShopOrder(NewShopOrder newShopOrder) {
-        this.newShopOrder = newShopOrder;
-    }
-
-    public String getShopFeeFlag() {
-        return shopFeeFlag;
-    }
-
-    public void setShopFeeFlag(String shopFeeFlag) {
-        this.shopFeeFlag = shopFeeFlag;
-    }
-
-    public String getOrderNo() {
-        return orderNo;
-    }
-
-    public void setOrderNo(String orderNo) {
-        this.orderNo = orderNo;
-    }
-
-    public Integer getOrderID() {
-        return orderID;
-    }
-
-    public void setOrderID(Integer orderID) {
-        this.orderID = orderID;
-    }
-
-    public String getShopName() {
-        return shopName;
-    }
-
-    public void setShopName(String shopName) {
-        this.shopName = shopName;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getAliasName() {
-        return aliasName;
-    }
-
-    public void setAliasName(String aliasName) {
-        this.aliasName = aliasName;
-    }
-
-    public String getUnit() {
-        return unit;
-    }
-
-    public void setUnit(String unit) {
-        this.unit = unit;
-    }
-
-    public String getPayStatus() {
-        return payStatus;
-    }
-
-    public void setPayStatus(String payStatus) {
-        this.payStatus = payStatus;
-    }
-
-    public Double getPreferential() {
-        return preferential;
-    }
-
-    public void setPreferential(Double preferential) {
-        this.preferential = preferential;
-    }
-
-    public Double getActPreferential() {
-        return actPreferential;
-    }
-
-    public void setActPreferential(Double actPreferential) {
-        this.actPreferential = actPreferential;
-    }
-
-    public String getImage() {
-        return image;
-    }
-
-    public void setImage(String image) {
-        this.image = image;
-    }
-
-    public Double getDiscountFee() {
-        return discountFee;
-    }
-
-    public void setDiscountFee(Double discountFee) {
-        this.discountFee = discountFee;
-    }
-
-    public String getProductUnit() {
-        return productUnit;
-    }
-
-    public void setProductUnit(String productUnit) {
-        this.productUnit = productUnit;
-    }
-
-    public String getProductImage() {
-        return productImage;
-    }
-
-    public void setProductImage(String productImage) {
-        this.productImage = productImage;
-    }
-
-    public String getShopFee1() {
-        return shopFee1;
-    }
-
-    public void setShopFee1(String shopFee1) {
-        this.shopFee1 = shopFee1;
-    }
-
-    public String getOtherFee1() {
-        return otherFee1;
-    }
-
-    public void setOtherFee1(String otherFee1) {
-        this.otherFee1 = otherFee1;
-    }
-
-    public String getCmFee1() {
-        return cmFee1;
-    }
-
-    public void setCmFee1(String cmFee1) {
-        this.cmFee1 = cmFee1;
-    }
-
-    public Integer getDeliveryNum() {
-        return deliveryNum;
-    }
-
-    public void setDeliveryNum(Integer deliveryNum) {
-        this.deliveryNum = deliveryNum;
-    }
-
-    public Integer getOutStoreTimes() {
-        return outStoreTimes;
-    }
-
-    public void setOutStoreTimes(Integer outStoreTimes) {
-        this.outStoreTimes = outStoreTimes;
-    }
-
-    public Double getCostPrice() {
-        return costPrice;
-    }
-
-    public void setCostPrice(Double costPrice) {
-        this.costPrice = costPrice;
-    }
-
-    public Integer getStock() {
-        return stock;
-    }
-
-    public void setStock(Integer stock) {
-        this.stock = stock;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public String getLogisticsBatchID() {
-        return logisticsBatchID;
-    }
-
-    public void setLogisticsBatchID(String logisticsBatchID) {
-        this.logisticsBatchID = logisticsBatchID;
-    }
-
-    public String getSplitFlag() {
-        return splitFlag;
-    }
-
-    public void setSplitFlag(String splitFlag) {
-        this.splitFlag = splitFlag;
-    }
-
-    public String getCostCheckFlag() {
-        return costCheckFlag;
-    }
-
-    public void setCostCheckFlag(String costCheckFlag) {
-        this.costCheckFlag = costCheckFlag;
-    }
-
-    public Double getCostProportional() {
-        return costProportional;
-    }
-
-    public void setCostProportional(Double costProportional) {
-        this.costProportional = costProportional;
-    }
-
-    public List<CmProductSn> getCmProductSnList() {
-        return cmProductSnList;
-    }
-
-    public void setCmProductSnList(List<CmProductSn> cmProductSnList) {
-        this.cmProductSnList = cmProductSnList;
-    }
-
-    public String getConsignee() {
-        return consignee;
-    }
-
-    public void setConsignee(String consignee) {
-        this.consignee = consignee;
-    }
-
-    public String getBuyer() {
-        return buyer;
-    }
-
-    public void setBuyer(String buyer) {
-        this.buyer = buyer;
-    }
-
-    public Integer getThisTimePostNum() {
-        return thisTimePostNum;
-    }
-
-    public void setThisTimePostNum(Integer thisTimePostNum) {
-        this.thisTimePostNum = thisTimePostNum;
-    }
-
-    public Integer getReturnedPurchaseProductNum() {
-        return returnedPurchaseProductNum;
-    }
-
-    public void setReturnedPurchaseProductNum(Integer returnedPurchaseProductNum) {
-        this.returnedPurchaseProductNum = returnedPurchaseProductNum;
-    }
-
-    public Integer getReturningPurchaseProductNum() {
-        return returningPurchaseProductNum;
-    }
-
-    public void setReturningPurchaseProductNum(Integer returningPurchaseProductNum) {
-        this.returningPurchaseProductNum = returningPurchaseProductNum;
-    }
-
-    public Integer getCancelProductNum() {
-        return cancelProductNum;
-    }
-
-    public void setCancelProductNum(Integer cancelProductNum) {
-        this.cancelProductNum = cancelProductNum;
-    }
-
-    public Integer getReceivedNum() {
-        return receivedNum;
-    }
-
-    public void setReceivedNum(Integer receivedNum) {
-        this.receivedNum = receivedNum;
-    }
-
-    public Integer getReturningNum() {
-        return returningNum;
-    }
-
-    public void setReturningNum(Integer returningNum) {
-        this.returningNum = returningNum;
-    }
-
-    public Integer getReturnedNum() {
-        return returnedNum;
-    }
-
-    public void setReturnedNum(Integer returnedNum) {
-        this.returnedNum = returnedNum;
-    }
-
-    public Boolean getFirstReturn() {
-        return firstReturn;
-    }
-
-    public void setFirstReturn(Boolean firstReturn) {
-        this.firstReturn = firstReturn;
-    }
-
-    public Double getNewCostPrice() {
-        return newCostPrice;
-    }
-
-    public void setNewCostPrice(Double newCostPrice) {
-        this.newCostPrice = newCostPrice;
-    }
-
-    public Double getSingleShouldPayTotalTax() {
-        return singleShouldPayTotalTax;
-    }
-
-    public void setSingleShouldPayTotalTax(Double singleShouldPayTotalTax) {
-        this.singleShouldPayTotalTax = singleShouldPayTotalTax;
-    }
-
-    public Integer getFrequency() {
-        return frequency;
-    }
-
-    public void setFrequency(Integer frequency) {
-        this.frequency = frequency;
-    }
-
-    public Integer getTotalNum() {
-        return totalNum;
-    }
-
-    public void setTotalNum(Integer totalNum) {
-        this.totalNum = totalNum;
-    }
 }
 }

+ 3 - 737
src/main/java/com/caimei/modules/order/entity/NewShopOrder.java

@@ -1,5 +1,7 @@
 package com.caimei.modules.order.entity;
 package com.caimei.modules.order.entity;
 
 
+import lombok.Data;
+
 import java.math.BigInteger;
 import java.math.BigInteger;
 import java.util.List;
 import java.util.List;
 
 
@@ -8,6 +10,7 @@ import java.util.List;
  * @date 2018-07-24
  * @date 2018-07-24
  * @description 子订单表
  * @description 子订单表
  */
  */
+@Data
 public class NewShopOrder {
 public class NewShopOrder {
     private Integer shopOrderID;//        int(11) not null auto_increment comment '子订单ID',
     private Integer shopOrderID;//        int(11) not null auto_increment comment '子订单ID',
     private Integer organizeID;//        组织Id
     private Integer organizeID;//        组织Id
@@ -29,7 +32,6 @@ public class NewShopOrder {
     private String payFlag;//     national char(1) comment '是否已支付:1是,0否',
     private String payFlag;//     national char(1) comment '是否已支付:1是,0否',
     private String payTime;//     national varchar(19) comment '支付时间',
     private String payTime;//     national varchar(19) comment '支付时间',
     private String finishTime;//     national varchar(19) comment '订单完成时间',
     private String finishTime;//     national varchar(19) comment '订单完成时间',
-    private Integer status;//     int(11) comment '订单状态:见表c_orderstatus或枚举OrderStatus'   v5.0版本已废弃只有主订单状态,
     private Integer refundStatus;//    int(11),
     private Integer refundStatus;//    int(11),
     private BigInteger deliveryTimeMills;//   bigint(20) comment '发货时间(时间戳)',
     private BigInteger deliveryTimeMills;//   bigint(20) comment '发货时间(时间戳)',
     private Double needPayAmount;//   decimal(20,2) comment '实付金额',
     private Double needPayAmount;//   decimal(20,2) comment '实付金额',
@@ -104,740 +106,4 @@ public class NewShopOrder {
     private String modifyShouldPayUserID;  //修改应付金额的用户ID
     private String modifyShouldPayUserID;  //修改应付金额的用户ID
     private String modifyShouldPayDate;   //修改应付金额的时间
     private String modifyShouldPayDate;   //修改应付金额的时间
     private Double payed;//已付金额
     private Double payed;//已付金额
-
-    public Integer getShopOrderID() {
-        return shopOrderID;
-    }
-
-    public void setShopOrderID(Integer shopOrderID) {
-        this.shopOrderID = shopOrderID;
-    }
-
-    public Integer getOrganizeID() {
-        return organizeID;
-    }
-
-    public void setOrganizeID(Integer organizeID) {
-        this.organizeID = organizeID;
-    }
-
-    public String getShopOrderNo() {
-        return shopOrderNo;
-    }
-
-    public void setShopOrderNo(String shopOrderNo) {
-        this.shopOrderNo = shopOrderNo;
-    }
-
-    public String getOrderNo() {
-        return orderNo;
-    }
-
-    public void setOrderNo(String orderNo) {
-        this.orderNo = orderNo;
-    }
-
-    public Integer getOrderID() {
-        return orderID;
-    }
-
-    public void setOrderID(Integer orderID) {
-        this.orderID = orderID;
-    }
-
-    public String getReceiptStatus() {
-        return receiptStatus;
-    }
-
-    public void setReceiptStatus(String receiptStatus) {
-        this.receiptStatus = receiptStatus;
-    }
-
-    public Double getReceiptTotalFee() {
-        return receiptTotalFee;
-    }
-
-    public void setReceiptTotalFee(Double receiptTotalFee) {
-        this.receiptTotalFee = receiptTotalFee;
-    }
-
-    public Integer getUserID() {
-        return userID;
-    }
-
-    public void setUserID(Integer userID) {
-        this.userID = userID;
-    }
-
-    public Integer getShopID() {
-        return shopID;
-    }
-
-    public void setShopID(Integer shopID) {
-        this.shopID = shopID;
-    }
-
-    public Integer getItemCount() {
-        return itemCount;
-    }
-
-    public void setItemCount(Integer itemCount) {
-        this.itemCount = itemCount;
-    }
-
-    public Integer getTownID() {
-        return townID;
-    }
-
-    public void setTownID(Integer townID) {
-        this.townID = townID;
-    }
-
-    public Double getProductAmount() {
-        return productAmount;
-    }
-
-    public void setProductAmount(Double productAmount) {
-        this.productAmount = productAmount;
-    }
-
-    public Double getShouldPayProduct() {
-        return shouldPayProduct;
-    }
-
-    public void setShouldPayProduct(Double shouldPayProduct) {
-        this.shouldPayProduct = shouldPayProduct;
-    }
-
-    public Double getFee() {
-        return fee;
-    }
-
-    public void setFee(Double fee) {
-        this.fee = fee;
-    }
-
-    public Double getDiscountAmount() {
-        return discountAmount;
-    }
-
-    public void setDiscountAmount(Double discountAmount) {
-        this.discountAmount = discountAmount;
-    }
-
-    public Double getAccountAmount() {
-        return accountAmount;
-    }
-
-    public void setAccountAmount(Double accountAmount) {
-        this.accountAmount = accountAmount;
-    }
-
-    public Double getTotalAmount() {
-        return totalAmount;
-    }
-
-    public void setTotalAmount(Double totalAmount) {
-        this.totalAmount = totalAmount;
-    }
-
-    public String getPayFlag() {
-        return payFlag;
-    }
-
-    public void setPayFlag(String payFlag) {
-        this.payFlag = payFlag;
-    }
-
-    public String getPayTime() {
-        return payTime;
-    }
-
-    public void setPayTime(String payTime) {
-        this.payTime = payTime;
-    }
-
-    public String getFinishTime() {
-        return finishTime;
-    }
-
-    public void setFinishTime(String finishTime) {
-        this.finishTime = finishTime;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public Integer getRefundStatus() {
-        return refundStatus;
-    }
-
-    public void setRefundStatus(Integer refundStatus) {
-        this.refundStatus = refundStatus;
-    }
-
-    public BigInteger getDeliveryTimeMills() {
-        return deliveryTimeMills;
-    }
-
-    public void setDeliveryTimeMills(BigInteger deliveryTimeMills) {
-        this.deliveryTimeMills = deliveryTimeMills;
-    }
-
-    public Double getNeedPayAmount() {
-        return needPayAmount;
-    }
-
-    public void setNeedPayAmount(Double needPayAmount) {
-        this.needPayAmount = needPayAmount;
-    }
-
-    public Double getCanRefundAmount() {
-        return canRefundAmount;
-    }
-
-    public void setCanRefundAmount(Double canRefundAmount) {
-        this.canRefundAmount = canRefundAmount;
-    }
-
-    public Double getRefundAmount() {
-        return refundAmount;
-    }
-
-    public void setRefundAmount(Double refundAmount) {
-        this.refundAmount = refundAmount;
-    }
-
-    public Integer getClubID() {
-        return clubID;
-    }
-
-    public void setClubID(Integer clubID) {
-        this.clubID = clubID;
-    }
-
-    public Integer getSpID() {
-        return spID;
-    }
-
-    public void setSpID(Integer spID) {
-        this.spID = spID;
-    }
-
-    public Integer getMainSpID() {
-        return mainSpID;
-    }
-
-    public void setMainSpID(Integer mainSpID) {
-        this.mainSpID = mainSpID;
-    }
-
-    public Integer getOrderBeanAmount() {
-        return orderBeanAmount;
-    }
-
-    public void setOrderBeanAmount(Integer orderBeanAmount) {
-        this.orderBeanAmount = orderBeanAmount;
-    }
-
-    public Integer getUseBeanAmount() {
-        return useBeanAmount;
-    }
-
-    public void setUseBeanAmount(Integer useBeanAmount) {
-        this.useBeanAmount = useBeanAmount;
-    }
-
-    public Integer getUseBeanFlag() {
-        return useBeanFlag;
-    }
-
-    public void setUseBeanFlag(Integer useBeanFlag) {
-        this.useBeanFlag = useBeanFlag;
-    }
-
-    public Integer getCanRefundFlag() {
-        return canRefundFlag;
-    }
-
-    public void setCanRefundFlag(Integer canRefundFlag) {
-        this.canRefundFlag = canRefundFlag;
-    }
-
-    public Integer getUseBalanceFlag() {
-        return useBalanceFlag;
-    }
-
-    public void setUseBalanceFlag(Integer useBalanceFlag) {
-        this.useBalanceFlag = useBalanceFlag;
-    }
-
-    public Integer getCanRefundBeans() {
-        return canRefundBeans;
-    }
-
-    public void setCanRefundBeans(Integer canRefundBeans) {
-        this.canRefundBeans = canRefundBeans;
-    }
-
-    public Integer getOrderDeliveryID() {
-        return orderDeliveryID;
-    }
-
-    public void setOrderDeliveryID(Integer orderDeliveryID) {
-        this.orderDeliveryID = orderDeliveryID;
-    }
-
-    public Double getFreePostageFee() {
-        return freePostageFee;
-    }
-
-    public void setFreePostageFee(Double freePostageFee) {
-        this.freePostageFee = freePostageFee;
-    }
-
-    public Integer getFreePostageTicketID() {
-        return freePostageTicketID;
-    }
-
-    public void setFreePostageTicketID(Integer freePostageTicketID) {
-        this.freePostageTicketID = freePostageTicketID;
-    }
-
-    public Double getBrokerage() {
-        return brokerage;
-    }
-
-    public void setBrokerage(Double brokerage) {
-        this.brokerage = brokerage;
-    }
-
-    public String getDelFlag() {
-        return delFlag;
-    }
-
-    public void setDelFlag(String delFlag) {
-        this.delFlag = delFlag;
-    }
-
-    public Double getRefundsAmount() {
-        return refundsAmount;
-    }
-
-    public void setRefundsAmount(Double refundsAmount) {
-        this.refundsAmount = refundsAmount;
-    }
-
-    public String getOrderStatusFlag() {
-        return orderStatusFlag;
-    }
-
-    public void setOrderStatusFlag(String orderStatusFlag) {
-        this.orderStatusFlag = orderStatusFlag;
-    }
-
-    public String getBuyStatus() {
-        return buyStatus;
-    }
-
-    public void setBuyStatus(String buyStatus) {
-        this.buyStatus = buyStatus;
-    }
-
-    public NewOrder getOrder() {
-        return order;
-    }
-
-    public void setOrder(NewOrder order) {
-        this.order = order;
-    }
-
-    public List<NewOrderProduct> getNewOrderProducts() {
-        return newOrderProducts;
-    }
-
-    public void setNewOrderProducts(List<NewOrderProduct> newOrderProducts) {
-        this.newOrderProducts = newOrderProducts;
-    }
-
-    public Double getPreferential() {
-        return preferential;
-    }
-
-    public void setPreferential(Double preferential) {
-        this.preferential = preferential;
-    }
-
-    public int getOrderSubmitType() {
-        return orderSubmitType;
-    }
-
-    public void setOrderSubmitType(int orderSubmitType) {
-        this.orderSubmitType = orderSubmitType;
-    }
-
-    public int getOrderType() {
-        return orderType;
-    }
-
-    public void setOrderType(int orderType) {
-        this.orderType = orderType;
-    }
-
-    public String getOrderTime() {
-        return orderTime;
-    }
-
-    public void setOrderTime(String orderTime) {
-        this.orderTime = orderTime;
-    }
-
-    public Integer getPresentNum() {
-        return presentNum;
-    }
-
-    public void setPresentNum(Integer presentNum) {
-        this.presentNum = presentNum;
-    }
-
-    public Integer getOutStoreNum() {
-        return outStoreNum;
-    }
-
-    public void setOutStoreNum(Integer outStoreNum) {
-        this.outStoreNum = outStoreNum;
-    }
-
-    public Integer getOutStoreTimes() {
-        return outStoreTimes;
-    }
-
-    public void setOutStoreTimes(Integer outStoreTimes) {
-        this.outStoreTimes = outStoreTimes;
-    }
-
-    public Double getTotalAddedValueTax() {
-        return totalAddedValueTax;
-    }
-
-    public void setTotalAddedValueTax(Double totalAddedValueTax) {
-        this.totalAddedValueTax = totalAddedValueTax;
-    }
-
-    public String getSplitFlag() {
-        return splitFlag;
-    }
-
-    public void setSplitFlag(String splitFlag) {
-        this.splitFlag = splitFlag;
-    }
-
-    public Double getDiscountFee() {
-        return discountFee;
-    }
-
-    public void setDiscountFee(Double discountFee) {
-        this.discountFee = discountFee;
-    }
-
-    public Long getAutoReceiveTimeMills() {
-        return autoReceiveTimeMills;
-    }
-
-    public void setAutoReceiveTimeMills(Long autoReceiveTimeMills) {
-        this.autoReceiveTimeMills = autoReceiveTimeMills;
-    }
-
-    public Long getAutoOverTimeMills() {
-        return autoOverTimeMills;
-    }
-
-    public void setAutoOverTimeMills(Long autoOverTimeMills) {
-        this.autoOverTimeMills = autoOverTimeMills;
-    }
-
-    public String getReceiveGoodsTime() {
-        return receiveGoodsTime;
-    }
-
-    public void setReceiveGoodsTime(String receiveGoodsTime) {
-        this.receiveGoodsTime = receiveGoodsTime;
-    }
-
-    public String getNote() {
-        return note;
-    }
-
-    public void setNote(String note) {
-        this.note = note;
-    }
-
-    public String getPayStatus() {
-        return payStatus;
-    }
-
-    public void setPayStatus(String payStatus) {
-        this.payStatus = payStatus;
-    }
-
-    public String getSendOutStatus() {
-        return sendOutStatus;
-    }
-
-    public void setSendOutStatus(String sendOutStatus) {
-        this.sendOutStatus = sendOutStatus;
-    }
-
-    public String[] getPs() {
-        return ps;
-    }
-
-    public void setPs(String[] ps) {
-        this.ps = ps;
-    }
-
-    public String getShopName() {
-        return shopName;
-    }
-
-    public void setShopName(String shopName) {
-        this.shopName = shopName;
-    }
-
-    public String getReceiver() {
-        return receiver;
-    }
-
-    public void setReceiver(String receiver) {
-        this.receiver = receiver;
-    }
-
-    public String getBuyer() {
-        return buyer;
-    }
-
-    public void setBuyer(String buyer) {
-        this.buyer = buyer;
-    }
-
-    public String getOrderSource() {
-        return orderSource;
-    }
-
-    public void setOrderSource(String orderSource) {
-        this.orderSource = orderSource;
-    }
-
-    public String getAlreadyReceipt() {
-        return alreadyReceipt;
-    }
-
-    public void setAlreadyReceipt(String alreadyReceipt) {
-        this.alreadyReceipt = alreadyReceipt;
-    }
-
-    public String getUnReceipt() {
-        return unReceipt;
-    }
-
-    public void setUnReceipt(String unReceipt) {
-        this.unReceipt = unReceipt;
-    }
-
-    public String getPaid() {
-        return paid;
-    }
-
-    public void setPaid(String paid) {
-        this.paid = paid;
-    }
-
-    public String getUnpaid() {
-        return unpaid;
-    }
-
-    public void setUnpaid(String unpaid) {
-        this.unpaid = unpaid;
-    }
-
-    public String getPostFeeCos() {
-        return postFeeCos;
-    }
-
-    public void setPostFeeCos(String postFeeCos) {
-        this.postFeeCos = postFeeCos;
-    }
-
-    public List<NewOrderProduct> getSnOrderProducts() {
-        return snOrderProducts;
-    }
-
-    public void setSnOrderProducts(List<NewOrderProduct> snOrderProducts) {
-        this.snOrderProducts = snOrderProducts;
-    }
-
-    public Boolean getDefaultStatus() {
-        return defaultStatus;
-    }
-
-    public void setDefaultStatus(Boolean defaultStatus) {
-        this.defaultStatus = defaultStatus;
-    }
-
-    public String getPaying() {
-        return paying;
-    }
-
-    public void setPaying(String paying) {
-        this.paying = paying;
-    }
-
-    public String getRefunding() {
-        return refunding;
-    }
-
-    public void setRefunding(String refunding) {
-        this.refunding = refunding;
-    }
-
-    public Double getPayTotalFee() {
-        return payTotalFee;
-    }
-
-    public void setPayTotalFee(Double payTotalFee) {
-        this.payTotalFee = payTotalFee;
-    }
-
-    public Double getShopProductAmount() {
-        return shopProductAmount;
-    }
-
-    public void setShopProductAmount(Double shopProductAmount) {
-        this.shopProductAmount = shopProductAmount;
-    }
-
-    public Double getShopPostFee() {
-        return shopPostFee;
-    }
-
-    public void setShopPostFee(Double shopPostFee) {
-        this.shopPostFee = shopPostFee;
-    }
-
-    public Double getShopTaxFee() {
-        return shopTaxFee;
-    }
-
-    public void setShopTaxFee(Double shopTaxFee) {
-        this.shopTaxFee = shopTaxFee;
-    }
-
-    public Double getShouldPayShopAmount() {
-        return shouldPayShopAmount;
-    }
-
-    public void setShouldPayShopAmount(Double shouldPayShopAmount) {
-        this.shouldPayShopAmount = shouldPayShopAmount;
-    }
-
-    public Double getPayedShopAmount() {
-        return payedShopAmount;
-    }
-
-    public void setPayedShopAmount(Double payedShopAmount) {
-        this.payedShopAmount = payedShopAmount;
-    }
-
-    public Double getShopOtherFee() {
-        return shopOtherFee;
-    }
-
-    public void setShopOtherFee(Double shopOtherFee) {
-        this.shopOtherFee = shopOtherFee;
-    }
-
-    public Double getWaitPayShop() {
-        return waitPayShop;
-    }
-
-    public void setWaitPayShop(Double waitPayShop) {
-        this.waitPayShop = waitPayShop;
-    }
-
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
-
-    public String getOperatingMode() {
-        return operatingMode;
-    }
-
-    public void setOperatingMode(String operatingMode) {
-        this.operatingMode = operatingMode;
-    }
-
-    public String getCostType() {
-        return costType;
-    }
-
-    public void setCostType(String costType) {
-        this.costType = costType;
-    }
-
-    public Double getProportional() {
-        return proportional;
-    }
-
-    public void setProportional(Double proportional) {
-        this.proportional = proportional;
-    }
-
-    public String getModifyShouldPayNote() {
-        return modifyShouldPayNote;
-    }
-
-    public void setModifyShouldPayNote(String modifyShouldPayNote) {
-        this.modifyShouldPayNote = modifyShouldPayNote;
-    }
-
-    public String getModifyShouldPayUserID() {
-        return modifyShouldPayUserID;
-    }
-
-    public void setModifyShouldPayUserID(String modifyShouldPayUserID) {
-        this.modifyShouldPayUserID = modifyShouldPayUserID;
-    }
-
-    public String getModifyShouldPayDate() {
-        return modifyShouldPayDate;
-    }
-
-    public void setModifyShouldPayDate(String modifyShouldPayDate) {
-        this.modifyShouldPayDate = modifyShouldPayDate;
-    }
-
-    public Double getPayed() {
-        return payed;
-    }
-
-    public void setPayed(Double payed) {
-        this.payed = payed;
-    }
 }
 }

+ 14 - 0
src/main/java/com/caimei/modules/order/entity/receiptVo.java

@@ -0,0 +1,14 @@
+package com.caimei.modules.order.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zzj
+ * 收款列表
+ */
+@Data
+public class receiptVo implements Serializable {
+
+}

+ 1 - 0
src/main/java/com/caimei/modules/order/service/CmReceiptOrderRelationService.java

@@ -5,6 +5,7 @@ import com.caimei.modules.order.entity.CmReceiptOrderRelation;
 import java.util.List;
 import java.util.List;
 
 
 public interface CmReceiptOrderRelationService {
 public interface CmReceiptOrderRelationService {
+
     List<Integer> toAudit(Integer orderID);
     List<Integer> toAudit(Integer orderID);
 
 
     List<CmReceiptOrderRelation> findByOrderID(Integer orderID);
     List<CmReceiptOrderRelation> findByOrderID(Integer orderID);

+ 1 - 0
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -6,6 +6,7 @@ import com.caimei.modules.order.entity.NewShopOrder;
 import java.util.List;
 import java.util.List;
 
 
 public interface NewShopOrderService {
 public interface NewShopOrderService {
+
     NewShopOrder findByShopOrderID(Integer shopOrderID);
     NewShopOrder findByShopOrderID(Integer shopOrderID);
 
 
     List<LogisticsInfoVo> logisticsDetails(Integer orderID, String logisticsBatchID);
     List<LogisticsInfoVo> logisticsDetails(Integer orderID, String logisticsBatchID);

+ 1 - 0
src/main/java/com/caimei/modules/order/service/OrderUserInfoService.java

@@ -3,5 +3,6 @@ package com.caimei.modules.order.service;
 import com.caimei.modules.order.entity.OrderUserInfo;
 import com.caimei.modules.order.entity.OrderUserInfo;
 
 
 public interface OrderUserInfoService {
 public interface OrderUserInfoService {
+
     OrderUserInfo findByOrderID(Integer orderID);
     OrderUserInfo findByOrderID(Integer orderID);
 }
 }

+ 1 - 0
src/main/java/com/caimei/modules/order/service/impl/CmReceiptOrderRelationServiceImpl.java

@@ -11,6 +11,7 @@ import java.util.List;
 
 
 @Service
 @Service
 public class CmReceiptOrderRelationServiceImpl implements CmReceiptOrderRelationService {
 public class CmReceiptOrderRelationServiceImpl implements CmReceiptOrderRelationService {
+
     @Autowired
     @Autowired
     private CmReceiptOrderRelationDao cmReceiptOrderRelationDao;
     private CmReceiptOrderRelationDao cmReceiptOrderRelationDao;
 
 

+ 11 - 20
src/main/java/com/caimei/modules/order/service/impl/NewOrderServiceImpl.java

@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicReference;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
 @Service
 @Service
@@ -122,14 +123,6 @@ public class NewOrderServiceImpl implements NewOrderService {
     @Override
     @Override
     public NewOrder get(String id) {
     public NewOrder get(String id) {
         NewOrder newOrder = newOrderDao.get(id);
         NewOrder newOrder = newOrderDao.get(id);
-        List<Integer> l = new ArrayList<>();
-        l.add(newOrder.getOrderID());
-        List<Integer> orderIds = cmDiscernReceiptDao.findRebateOrderID(l);
-        if (orderIds.contains(newOrder.getOrderID())) {
-            newOrder.setRebateOrder("1");
-        } else {
-            newOrder.setRebateOrder("0");
-        }
         if (null != newOrder) {
         if (null != newOrder) {
             //获取订单客户
             //获取订单客户
             OrderUserInfo orderUserInfo = orderUserInfoService.findByOrderID(newOrder.getOrderID());
             OrderUserInfo orderUserInfo = orderUserInfoService.findByOrderID(newOrder.getOrderID());
@@ -139,6 +132,8 @@ public class NewOrderServiceImpl implements NewOrderService {
             //获取订单商品
             //获取订单商品
             List<NewOrderProduct> list = new ArrayList<>();
             List<NewOrderProduct> list = new ArrayList<>();
             List<NewShopOrder> shopOrders = newShopOrderDao.findListByOrderID(newOrder.getOrderID());
             List<NewShopOrder> shopOrders = newShopOrderDao.findListByOrderID(newOrder.getOrderID());
+            AtomicReference<Double> freight = new AtomicReference<>(0D);
+            AtomicReference<Double> totalAddedValueTax = new AtomicReference<>(0D);
             if (CollectionUtils.isNotEmpty(shopOrders)) {
             if (CollectionUtils.isNotEmpty(shopOrders)) {
                 for (NewShopOrder shopOrder : shopOrders) {
                 for (NewShopOrder shopOrder : shopOrders) {
                     List<NewOrderProduct> pList = newOrderProductDao.findListByShopOrderID(shopOrder.getShopOrderID());
                     List<NewOrderProduct> pList = newOrderProductDao.findListByShopOrderID(shopOrder.getShopOrderID());
@@ -159,6 +154,10 @@ public class NewOrderServiceImpl implements NewOrderService {
                             Integer receivedNum = newOrderProductDao.getReceivedNum(item.getOrderProductID());
                             Integer receivedNum = newOrderProductDao.getReceivedNum(item.getOrderProductID());
                             item.setReceivedNum(receivedNum);
                             item.setReceivedNum(receivedNum);
                         }
                         }
+                        if (item.getProductID() == 999) { //邮费商品
+                            freight.updateAndGet(v -> (v + item.getPrice()));
+                        }
+                        totalAddedValueTax.updateAndGet(v -> (v + item.getTotalAddedValueTax()));
                         item.setProductImage(AppUtils.getProductImageURL(item.getProductImage(), AppKeys.ORIGINAL_PICTURE, domain));
                         item.setProductImage(AppUtils.getProductImageURL(item.getProductImage(), AppKeys.ORIGINAL_PICTURE, domain));
                     });
                     });
                     Double payed = cmPayShopRecordDao.sumByShopOrderID(shopOrder.getShopOrderID());
                     Double payed = cmPayShopRecordDao.sumByShopOrderID(shopOrder.getShopOrderID());
@@ -168,19 +167,11 @@ public class NewOrderServiceImpl implements NewOrderService {
             }
             }
             if (CollectionUtils.isNotEmpty(list)) {
             if (CollectionUtils.isNotEmpty(list)) {
                 newOrder.setOrderProduct(list);
                 newOrder.setOrderProduct(list);
-                double freight = 0D;
-                double totalAddedValueTax = 0D;
-                for (NewOrderProduct op : list) {
-                    if (op.getProductID() == 999) { //邮费商品
-                        freight += op.getPrice();
-                    }
-                    totalAddedValueTax += op.getTotalAddedValueTax();
-                }
-                if ("1".equals(newOrder.getFreePostFlag())) {
-                    newOrder.setFreight(freight);
-                }
-                newOrder.setTotalAddedValueTax(totalAddedValueTax);
             }
             }
+            if ("1".equals(newOrder.getFreePostFlag())) {
+                newOrder.setFreight(freight.get());
+            }
+            newOrder.setTotalAddedValueTax(totalAddedValueTax.get());
             shopOrders.sort((so1, so2) -> {
             shopOrders.sort((so1, so2) -> {
                 //给子订单排序  邮费排在最后  其余的按shopOrderID  asc
                 //给子订单排序  邮费排在最后  其余的按shopOrderID  asc
                 if ("1".equals(so1.getPostFeeCos())) {
                 if ("1".equals(so1.getPostFeeCos())) {

+ 0 - 4
src/main/java/com/caimei/modules/order/service/impl/NewShopOrderServiceImpl.java

@@ -71,10 +71,6 @@ public class NewShopOrderServiceImpl implements NewShopOrderService {
             List<LogisticsRecord> lrs = logisticsRecordDao.findByLogisticsBatchID(l.getId());
             List<LogisticsRecord> lrs = logisticsRecordDao.findByLogisticsBatchID(l.getId());
             // 每一批的发货物流记录
             // 每一批的发货物流记录
             List<LogisticsInformation> lis = logisticsInformationDao.findByLogisticsBatchID(l.getId());
             List<LogisticsInformation> lis = logisticsInformationDao.findByLogisticsBatchID(l.getId());
-            for (LogisticsInformation information : lis) {
-                List<LogisticsDetailVo> routers = JSONArray.parseArray(information.getInfo(), LogisticsDetailVo.class);
-                information.setLogisticsDetailVos(routers);
-            }
             liv.setLogisticsBatch(l);
             liv.setLogisticsBatch(l);
             liv.setLogisticsInformationList(lis);
             liv.setLogisticsInformationList(lis);
             liv.setLogisticsRecordList(lrs);
             liv.setLogisticsRecordList(lrs);

+ 1 - 0
src/main/java/com/caimei/modules/order/service/impl/OrderUserInfoServiceImpl.java

@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
 
 
 @Service
 @Service
 public class OrderUserInfoServiceImpl implements OrderUserInfoService {
 public class OrderUserInfoServiceImpl implements OrderUserInfoService {
+
     @Autowired
     @Autowired
     private OrderUserInfoDao orderUserInfoDao;
     private OrderUserInfoDao orderUserInfoDao;
 
 

+ 4 - 19
src/main/java/com/caimei/modules/products/controller/CmMallOrganizeProductsController.java

@@ -38,7 +38,6 @@ public class CmMallOrganizeProductsController {
 
 
     private final CmMallOrganizeProductsService cmMallOrganizeProductsService;
     private final CmMallOrganizeProductsService cmMallOrganizeProductsService;
     private final CmMallProductsClassifyService cmMallProductsClassifyService;
     private final CmMallProductsClassifyService cmMallProductsClassifyService;
-    private final ShiroService shiroService;
 
 
     /**
     /**
      * 商品列表
      * 商品列表
@@ -75,7 +74,7 @@ public class CmMallOrganizeProductsController {
      * @return
      * @return
      */
      */
     @PostMapping(value = "saveEditProductInfo")
     @PostMapping(value = "saveEditProductInfo")
-    public JsonModel saveEditProductInfo(@RequestBody CmMallOrganizeProducts cmMallOrganizeProducts, HttpServletRequest httpRequest) {
+    public JsonModel saveEditProductInfo(@RequestBody CmMallOrganizeProducts cmMallOrganizeProducts) {
         JsonModel jsonModel = JsonModel.newInstance();
         JsonModel jsonModel = JsonModel.newInstance();
         cmMallOrganizeProductsService.updateProductInfo(cmMallOrganizeProducts);
         cmMallOrganizeProductsService.updateProductInfo(cmMallOrganizeProducts);
         return jsonModel.success("修改成功");
         return jsonModel.success("修改成功");
@@ -87,14 +86,10 @@ public class CmMallOrganizeProductsController {
      * @param id 商品id
      * @param id 商品id
      * @return
      * @return
      */
      */
-    @GetMapping(value = "switchLine")
-    public JsonModel switchLine(Integer id) {
+    @GetMapping(value = "/switchLine/{id}")
+    public JsonModel switchLine(@PathVariable("id") Integer id) {
         CmMallOrganizeProducts organizeProducts = cmMallOrganizeProductsService.get(id);
         CmMallOrganizeProducts organizeProducts = cmMallOrganizeProductsService.get(id);
         if ("1".equals(organizeProducts.getValidFlag())) {
         if ("1".equals(organizeProducts.getValidFlag())) {
-            //下线商品
-            organizeProducts.setPreferredProduct("0");
-            organizeProducts.setCommonlyProduct("0");
-            organizeProducts.setPreferentialProduct("0");
             organizeProducts.setValidFlag("2");
             organizeProducts.setValidFlag("2");
         } else {
         } else {
             //上线商品
             //上线商品
@@ -171,16 +166,7 @@ public class CmMallOrganizeProductsController {
     public JsonModel saveAddProductInfo(@RequestBody CmMallOrganizeProducts cmMallOrganizeProducts) {
     public JsonModel saveAddProductInfo(@RequestBody CmMallOrganizeProducts cmMallOrganizeProducts) {
         JsonModel jsonModel = JsonModel.newInstance();
         JsonModel jsonModel = JsonModel.newInstance();
         try {
         try {
-            JSONArray parse = (JSONArray) JSON.parse(cmMallOrganizeProducts.getItemsList());
-            if (null != parse && parse.size() > 0) {
-                for (int j = 0; j < parse.size(); j++) {
-                    Integer productID = (Integer) parse.get(j);//获取商品ID
-                    CmMallOrganizeProducts cop = new CmMallOrganizeProducts();
-                    cop.setId(productID);
-                    cop.setModules(cmMallOrganizeProducts.getModules());
-                    cmMallOrganizeProductsService.updateProductInfo1(cop);
-                }
-            }
+
             return jsonModel.success("添加成功", "");
             return jsonModel.success("添加成功", "");
         } catch (Exception e) {
         } catch (Exception e) {
             return jsonModel.error("添加失败");
             return jsonModel.error("添加失败");
@@ -195,7 +181,6 @@ public class CmMallOrganizeProductsController {
      */
      */
     @PostMapping(value = "canncelProduct")
     @PostMapping(value = "canncelProduct")
     public JsonModel canncelProduct(@RequestBody CmMallOrganizeProducts cmMallOrganizeProducts) {
     public JsonModel canncelProduct(@RequestBody CmMallOrganizeProducts cmMallOrganizeProducts) {
-        cmMallOrganizeProducts.setUpdateTime(new Date());
         cmMallOrganizeProductsService.canncelPreferredProduct(cmMallOrganizeProducts);
         cmMallOrganizeProductsService.canncelPreferredProduct(cmMallOrganizeProducts);
         return JsonModel.newInstance().success();
         return JsonModel.newInstance().success();
     }
     }

+ 0 - 2
src/main/java/com/caimei/modules/products/controller/CmMallProductsClassifyController.java

@@ -73,7 +73,6 @@ public class CmMallProductsClassifyController {
         if (StringUtils.equals("2", cmMallProductsClassify.getStatus())) {
         if (StringUtils.equals("2", cmMallProductsClassify.getStatus())) {
             CmMallOrganizeProducts cmMallOrganizeProducts = new CmMallOrganizeProducts();
             CmMallOrganizeProducts cmMallOrganizeProducts = new CmMallOrganizeProducts();
             cmMallOrganizeProducts.setOrganizeID(cmMallProductsClassify.getOrganizeID());
             cmMallOrganizeProducts.setOrganizeID(cmMallProductsClassify.getOrganizeID());
-            cmMallOrganizeProducts.setClassifyID(String.valueOf(cmMallProductsClassify.getId()));
             List<CmMallOrganizeProducts> list1 = cmMallOrganizeProductsService.findList(cmMallOrganizeProducts);
             List<CmMallOrganizeProducts> list1 = cmMallOrganizeProductsService.findList(cmMallOrganizeProducts);
             if (CollectionUtils.isNotEmpty(list1)) {
             if (CollectionUtils.isNotEmpty(list1)) {
                 return jsonModel.error("该分类中还存在商品,请把该分类的商品转移到别的分类后,再停用该分类");
                 return jsonModel.error("该分类中还存在商品,请把该分类的商品转移到别的分类后,再停用该分类");
@@ -102,7 +101,6 @@ public class CmMallProductsClassifyController {
         CmMallProductsClassify mallProductsClassify = cmMallProductsClassifyService.get(id);
         CmMallProductsClassify mallProductsClassify = cmMallProductsClassifyService.get(id);
         CmMallOrganizeProducts cmMallOrganizeProducts = new CmMallOrganizeProducts();
         CmMallOrganizeProducts cmMallOrganizeProducts = new CmMallOrganizeProducts();
         cmMallOrganizeProducts.setOrganizeID(mallProductsClassify.getOrganizeID());
         cmMallOrganizeProducts.setOrganizeID(mallProductsClassify.getOrganizeID());
-        cmMallOrganizeProducts.setClassifyID(String.valueOf(id));
         List<CmMallOrganizeProducts> list = cmMallOrganizeProductsService.findList(cmMallOrganizeProducts);
         List<CmMallOrganizeProducts> list = cmMallOrganizeProductsService.findList(cmMallOrganizeProducts);
         if (CollectionUtils.isNotEmpty(list)) {
         if (CollectionUtils.isNotEmpty(list)) {
             return jsonModel.error("该分类中还存在商品,请把该分类的商品转移到别的分类后,再停用该分类");
             return jsonModel.error("该分类中还存在商品,请把该分类的商品转移到别的分类后,再停用该分类");

+ 0 - 2
src/main/java/com/caimei/modules/products/dao/CmMallOrganizeProductsDao.java

@@ -30,8 +30,6 @@ public interface CmMallOrganizeProductsDao {
 
 
     List<Integer> getAllExistsProductList(Integer modules);
     List<Integer> getAllExistsProductList(Integer modules);
 
 
-    void updateProductInfo1(CmMallOrganizeProducts cop);
-
     void canncelPreferredProduct(CmMallOrganizeProducts cmMallOrganizeProducts);
     void canncelPreferredProduct(CmMallOrganizeProducts cmMallOrganizeProducts);
 
 
     List<Sku> findSkus(String productID);
     List<Sku> findSkus(String productID);

+ 9 - 16
src/main/java/com/caimei/modules/products/entity/CmMallOrganizeProducts.java

@@ -17,32 +17,25 @@ 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 classifyID;        // 对应cm_mall_products_classify商品分类表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 normalPrice;        // 市场价
     private String normalPrice;        // 市场价
-    private String costPrice;        // 成本价
-    private String retailPrice;        // 售价
+    private String price;        // 售价
     private String minBuyNumber;        // 最小起订量
     private String minBuyNumber;        // 最小起订量
-    private String preferredProduct;        // 是否是优选商品:0不是优选,1优选商品
-    private String commonlyProduct;        // 是否是常用商品:0不是常用,1常用商品
-    private String preferentialProduct;        // 是否是星范精品:0不是特惠,1星范精品商品
     private String validFlag;        // 商品状态,1已上架,2已下架
     private String validFlag;        // 商品状态,1已上架,2已下架
-    private String preferredProductSort;        //(优选排序)排序默认为空,排序优先级1最高,空最后
-    private String commonlyProductSort;        //(常用排序)排序默认为空,排序优先级1最高,空最后
-    private String preferentialProductSort;        //(精品排序)排序默认为空,排序优先级1最高,空最后
     private Date addTime;        // 添加时间
     private Date addTime;        // 添加时间
-    private Date updateTime;        // 更新时间
-    private Integer modules;     //第几个模块
-
+    /**
+     * 规格
+     */
+    private String unit;
+    /**
+     * 成本价
+     */
+    private Double costPrice;
     private List<Sku> skus;
     private List<Sku> skus;
     //非小程序商城商品信息
     //非小程序商城商品信息
     private String mainImage;//商品图片
     private String mainImage;//商品图片
     private String productName;//商品名称
     private String productName;//商品名称
     private String shopName;//供应商名称
     private String shopName;//供应商名称
-    private String productClassifyName;//商品分类名字
-
-    private String itemsList;//添加商品字符串
-    private String existsFlag;//是否已存在小程序商品中 1已存在,其他都为不存在
 
 
 }
 }

+ 0 - 2
src/main/java/com/caimei/modules/products/service/CmMallOrganizeProductsService.java

@@ -24,7 +24,5 @@ public interface CmMallOrganizeProductsService {
 
 
     List<CmMallOrganizeProducts> findListBuyMall(CmMallOrganizeProducts cmMallOrganizeProducts);
     List<CmMallOrganizeProducts> findListBuyMall(CmMallOrganizeProducts cmMallOrganizeProducts);
 
 
-    void updateProductInfo1(CmMallOrganizeProducts cop);
-
     void canncelPreferredProduct(CmMallOrganizeProducts cmMallOrganizeProducts);
     void canncelPreferredProduct(CmMallOrganizeProducts cmMallOrganizeProducts);
 }
 }

+ 9 - 14
src/main/java/com/caimei/modules/products/service/impl/CmMallOrganizeProductsServiceImpl.java

@@ -36,8 +36,15 @@ public class CmMallOrganizeProductsServiceImpl implements CmMallOrganizeProducts
     @Override
     @Override
     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> organizeProductsDaoList = cmMallOrganizeProductsDao.findList(cmMallOrganizeProducts);
-        return new Page<>(organizeProductsDaoList);
+        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());
+        });
+        return new Page<>(products);
     }
     }
 
 
     @Override
     @Override
@@ -72,26 +79,14 @@ public class CmMallOrganizeProductsServiceImpl implements CmMallOrganizeProducts
     @Override
     @Override
     public List<CmMallOrganizeProducts> findListBuyMall(CmMallOrganizeProducts cmMallOrganizeProducts) {
     public List<CmMallOrganizeProducts> findListBuyMall(CmMallOrganizeProducts cmMallOrganizeProducts) {
         List<CmMallOrganizeProducts> listBuyMall = cmMallOrganizeProductsDao.findListBuyMall(cmMallOrganizeProducts);
         List<CmMallOrganizeProducts> listBuyMall = cmMallOrganizeProductsDao.findListBuyMall(cmMallOrganizeProducts);
-        List<Integer> allExistsProductList = cmMallOrganizeProductsDao.getAllExistsProductList(cmMallOrganizeProducts.getModules());
         if (CollectionUtils.isNotEmpty(listBuyMall)) {
         if (CollectionUtils.isNotEmpty(listBuyMall)) {
             for (CmMallOrganizeProducts c : listBuyMall) {
             for (CmMallOrganizeProducts c : listBuyMall) {
                 c.setMainImage(AppUtils.getProductImageURL(c.getMainImage(), 0, domain));
                 c.setMainImage(AppUtils.getProductImageURL(c.getMainImage(), 0, domain));
-                if (CollectionUtils.isNotEmpty(allExistsProductList)) {
-                    boolean contains = allExistsProductList.contains(c.getId());
-                    if (contains) {
-                        c.setExistsFlag("1");
-                    }
-                }
             }
             }
         }
         }
         return listBuyMall;
         return listBuyMall;
     }
     }
 
 
-    @Override
-    public void updateProductInfo1(CmMallOrganizeProducts cop) {
-        cmMallOrganizeProductsDao.updateProductInfo1(cop);
-    }
-
     @Override
     @Override
     public void canncelPreferredProduct(CmMallOrganizeProducts cmMallOrganizeProducts) {
     public void canncelPreferredProduct(CmMallOrganizeProducts cmMallOrganizeProducts) {
         cmMallOrganizeProductsDao.canncelPreferredProduct(cmMallOrganizeProducts);
         cmMallOrganizeProductsDao.canncelPreferredProduct(cmMallOrganizeProducts);

+ 0 - 1
src/main/java/com/caimei/modules/products/service/impl/CmMallProductsClassifyServiceImpl.java

@@ -25,7 +25,6 @@ public class CmMallProductsClassifyServiceImpl implements CmMallProductsClassify
             for (CmMallProductsClassify c : classifyList) {
             for (CmMallProductsClassify c : classifyList) {
                 CmMallOrganizeProducts cmMallOrganizeProducts = new CmMallOrganizeProducts();
                 CmMallOrganizeProducts cmMallOrganizeProducts = new CmMallOrganizeProducts();
                 cmMallOrganizeProducts.setOrganizeID(c.getOrganizeID());
                 cmMallOrganizeProducts.setOrganizeID(c.getOrganizeID());
-                cmMallOrganizeProducts.setClassifyID(String.valueOf(c.getId()));
                 List<CmMallOrganizeProducts> list1 = cmMallOrganizeProductsService.findList(cmMallOrganizeProducts);
                 List<CmMallOrganizeProducts> list1 = cmMallOrganizeProductsService.findList(cmMallOrganizeProducts);
                 if (CollectionUtils.isNotEmpty(list1)) {
                 if (CollectionUtils.isNotEmpty(list1)) {
                     c.setContainsProduct("1");//是否包含商品,1包含商品,其它为不包含商品
                     c.setContainsProduct("1");//是否包含商品,1包含商品,其它为不包含商品

+ 4 - 2
src/main/java/com/caimei/modules/shiro/auth/AuthRealm.java

@@ -20,12 +20,13 @@ public class AuthRealm extends AuthorizingRealm {
     @Autowired
     @Autowired
     private ShiroService shiroService;
     private ShiroService shiroService;
 
 
-    @Override
+
     /**
     /**
      * 授权(验证权限时候调用
      * 授权(验证权限时候调用
      *@param  [principals]
      *@param  [principals]
      *@return org.apache.shiro.authz.AuthorizationInfo
      *@return org.apache.shiro.authz.AuthorizationInfo
      */
      */
+    @Override
     protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
     protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
         //1. 从 PrincipalCollection 中来获取登录用户的信息
         //1. 从 PrincipalCollection 中来获取登录用户的信息
         CmMallAdminUser user = (CmMallAdminUser) principals.getPrimaryPrincipal();
         CmMallAdminUser user = (CmMallAdminUser) principals.getPrimaryPrincipal();
@@ -43,12 +44,13 @@ public class AuthRealm extends AuthorizingRealm {
         return simpleAuthorizationInfo;
         return simpleAuthorizationInfo;
     }
     }
 
 
-    @Override
+
     /**
     /**
      * 认证(登陆时候调用)
      * 认证(登陆时候调用)
      *@param  [token]
      *@param  [token]
      *@return org.apache.shiro.authc.AuthenticationInfo
      *@return org.apache.shiro.authc.AuthenticationInfo
      */
      */
+    @Override
     protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
     protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
         String accessToken = TokenEncryptUtils.decoded((String) token.getPrincipal());
         String accessToken = TokenEncryptUtils.decoded((String) token.getPrincipal());
         //2. token失效
         //2. token失效

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

@@ -70,7 +70,7 @@ public class ShiroConfig {
         final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
         final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
         final CorsConfiguration config = new CorsConfiguration();
         final CorsConfiguration config = new CorsConfiguration();
         // 允许cookies跨域
         // 允许cookies跨域
-        config.setAllowCredentials(true);
+        config.addAllowedOriginPattern("*");
         // #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin
         // #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin
         config.addAllowedOrigin("*");
         config.addAllowedOrigin("*");
         // #允许访问的头信息,*表示全部
         // #允许访问的头信息,*表示全部

+ 1 - 0
src/main/java/com/caimei/modules/shiro/controller/HomePageController.java

@@ -14,6 +14,7 @@ import java.util.Map;
 @RestController
 @RestController
 @RequestMapping("homepage")
 @RequestMapping("homepage")
 public class HomePageController {
 public class HomePageController {
+
     @Autowired
     @Autowired
     private HomePageService homePageService;
     private HomePageService homePageService;
 
 

+ 1 - 0
src/main/java/com/caimei/modules/shiro/dao/UserDao.java

@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Param;
 
 
 @Mapper
 @Mapper
 public interface UserDao {
 public interface UserDao {
+
     CmMallAdminUser findByUsername(@Param("account") String account);
     CmMallAdminUser findByUsername(@Param("account") String account);
 
 
     CmMallAdminUser findByUserId(Integer id);
     CmMallAdminUser findByUserId(Integer id);

+ 1 - 0
src/main/java/com/caimei/modules/shiro/service/impl/HomePageServiceImpl.java

@@ -15,6 +15,7 @@ import java.util.*;
 
 
 @Service
 @Service
 public class HomePageServiceImpl implements HomePageService {
 public class HomePageServiceImpl implements HomePageService {
+
     @Autowired
     @Autowired
     private HomePageDao homePageDao;
     private HomePageDao homePageDao;
     @Value("${malladmin.domain}")
     @Value("${malladmin.domain}")

+ 1 - 0
src/main/java/com/caimei/modules/shiro/service/impl/ShiroServiceImpl.java

@@ -18,6 +18,7 @@ import java.util.Date;
 
 
 @Service
 @Service
 public class ShiroServiceImpl implements ShiroService {
 public class ShiroServiceImpl implements ShiroService {
+
     @Autowired
     @Autowired
     private UserDao userDao;
     private UserDao userDao;
 
 

+ 115 - 0
src/main/resources/mapper/ActiveMapper.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.homepage.dao.ActiveDao">
+
+    <insert id="insertActive" keyColumn="id" keyProperty="id" parameterType="com.caimei.modules.homepage.enity.Active"
+            useGeneratedKeys="true">
+        insert into cm_mall_active (organizeId, topic, enabledStatus, activeType, addTime)
+        VALUES (#{organizeId}, #{topic}, #{enabledStatus}, #{activeType}, now())
+    </insert>
+
+    <insert id="insertImages" keyColumn="id" keyProperty="id"
+            parameterType="com.caimei.modules.homepage.enity.ActiveImages"
+            useGeneratedKeys="true">
+        insert into cm_mall_active_image(activeId, image)
+        VALUES (#{activeId}, #{image})
+    </insert>
+
+    <insert id="insertProducts">
+        insert into cm_mall_active_product(activeId, productId)
+        VALUES (#{id}, #{productId})
+    </insert>
+
+    <insert id="insertImageProduct">
+        insert into cm_mall_active_product(activeId, productId ,imageId) values
+        <foreach collection="productIds" item="productId" separator=",">
+            (#{activeId}, #{productId} ,#{imageId})
+        </foreach>
+    </insert>
+
+    <update id="updateActive">
+        update cm_mall_active
+        <set>
+            <if test="topic != null and topic !=''">
+                topic = #{topic},
+            </if>
+            <if test="enabledStatus != null and enabledStatus != ''">
+                enabledStatus = #{enabledStatus}
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <update id="checkActiveStatus">
+        UPDATE cm_mall_active
+        SET enabledStatus=
+                (CASE
+                     WHEN enabledStatus = 1
+                         THEN 0
+                     ELSE 1 END)
+        WHERE id = #{id}
+    </update>
+
+    <delete id="delProducts">
+        delete
+        from cm_mall_active_product
+        where activeId = #{id}
+    </delete>
+
+    <delete id="delImages">
+        delete
+        from cm_mall_active_image
+        where activeId = #{id}
+    </delete>
+
+    <delete id="delActive">
+        delete
+        from cm_mall_active
+        where id = #{id}
+    </delete>
+
+    <select id="findActiveList" resultType="com.caimei.modules.homepage.enity.Active">
+        select id, organizeId, topic, enabledstatus, activeType, addtime
+        from cm_mall_active
+        <where>
+            organizeID = #{organizeId}
+            <if test="topic != null and topic != ''">
+                AND topic LIKE concat('%',#{topic},'%')
+            </if>
+            <if test="enabledStatus != null and enabledStatus != ''">
+                AND enabledStatus = #{enabledStatus}
+            </if>
+            <if test="activeType !=null and activeType !=''">
+                AND activeType = #{activeType}
+            </if>
+        </where>
+    </select>
+
+    <select id="findActiveById" resultType="com.caimei.modules.homepage.enity.Active">
+        select id, organizeId, topic, enabledStatus, activeType, addTime
+        from cm_mall_active
+        where id = #{id}
+    </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, image
+        from cm_mall_active_image
+        where activeId = #{id}
+    </select>
+
+    <select id="findProductByImage" resultType="java.lang.Integer">
+        select productId
+        from cm_mall_active_product
+        where imageId = #{id}
+    </select>
+
+
+</mapper>

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

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.homepage.dao.BannerDao">
+    <insert id="insertBanner">
+        insert into cm_mall_banner_image (organizeID, bannerName, bannerImage, sort, jumpType, jumpProductId,
+                                          jumpActiveId, enabledStatus, addTime, updateTime)
+        VALUES (#{organizeId}, #{bannerName}, #{bannerImage}, #{sort}, #{jumpType}, #{jumpProductId},
+                #{jumpActiveId}, #{enabledStatus}, now(), now())
+    </insert>
+
+    <update id="updateBanner">
+        update cm_mall_banner_image
+        <set>
+            <if test="bannerName != null and bannerName != ''">
+                bannerName = #{bannerName},
+            </if>
+            <if test="bannerImage != null and bannerImage != ''">
+                bannerImage = #{bannerImage},
+            </if>
+            <if test="sort != null and sort != ''">
+                sort = #{sort},
+            </if>
+            <if test="jumpType != null and jumpType != ''">
+                jumpType = #{jumpType},
+            </if>
+            <if test="jumpProductId != null and jumpProductId != ''">
+                jumpProductId = #{jumpProductId},
+            </if>
+            <if test="jumpActiveId != null and jumpActiveId != ''">
+                jumpActiveId = #{jumpActiveId},
+            </if>
+            <if test="enabledStatus != null and enabledStatus != ''">
+                enabledStatus = #{enabledStatus},
+            </if>
+            updateTime = now()
+        </set>
+        where id = #{id}
+    </update>
+
+    <update id="checkBannerStatus">
+        UPDATE cm_mall_banner_image
+        SET enabledStatus=
+                (CASE
+                     WHEN enabledStatus = 1
+                         THEN 0
+                     ELSE 1 END)
+        WHERE id = #{id}
+    </update>
+
+    <update id="updateSort">
+        update
+        <if test="status == 1">
+            cm_mall_banner_image
+        </if>
+        <if test="status == 2">
+            cm_mall_mainmenu
+        </if>
+        set sort = #{sort}
+        where id = #{id}
+    </update>
+
+    <delete id="delBanner">
+        delete
+        from cm_mall_banner_image
+        where id = #{id}
+    </delete>
+
+    <select id="findBannerList" resultType="com.caimei.modules.homepage.enity.Banner">
+        select id, organizeID, bannerName, bannerImage, sort, enabledStatus, addTime, updateTime
+        from cm_mall_banner_image
+        <where>
+            organizeID = #{organizeId}
+            <if test="bannerName != null and bannerName != ''">
+                AND bannerName LIKE concat('%',#{bannerName},'%')
+            </if>
+            <if test="enabledStatus != null and enabledStatus != ''">
+                AND enabledStatus = #{enabledStatus}
+            </if>
+        </where>
+        order by sort asc
+    </select>
+
+    <select id="findBannerById" resultType="com.caimei.modules.homepage.enity.Banner">
+        select id,
+               organizeID,
+               bannerName,
+               bannerImage,
+               sort,
+               jumpType,
+               jumpProductId,
+               jumpActiveId,
+               enabledStatus,
+               addTime,
+               updateTime
+        from cm_mall_banner_image
+        where id = #{id}
+    </select>
+</mapper>

+ 43 - 122
src/main/resources/mapper/CmMallOrganizeProductsMapper.xml

@@ -4,42 +4,25 @@
         "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.classifyID AS "classifyID",
+        a.id AS "id",
 		a.organizeID AS "organizeID",
 		a.organizeID AS "organizeID",
 		a.productID AS "productID",
 		a.productID AS "productID",
-		a.normalPrice AS "normalPrice",
-		a.costPrice AS "costPrice",
-        a.ladderPriceFlag AS "ladderPriceFlag",
-		a.retailPrice AS "retailPrice",
-		a.minBuyNumber AS "minBuyNumber",
-		a.preferredProduct AS "preferredProduct",
-		a.commonlyProduct AS "commonlyProduct",
-		a.preferentialProduct AS "preferentialProduct",
 		a.validFlag AS "validFlag",
 		a.validFlag AS "validFlag",
-		a.preferredProductSort AS "preferredProductSort",
-		a.commonlyProductSort AS "commonlyProductSort",
-		a.preferentialProductSort AS "preferentialProductSort",
 		a.addTime AS "addTime",
 		a.addTime AS "addTime",
-		a.updateTime AS "updateTime",
 		a.delFlag AS "delFlag",
 		a.delFlag AS "delFlag",
 		p.mainImage AS "mainImage",
 		p.mainImage AS "mainImage",
 		p.name AS "productName",
 		p.name AS "productName",
-		s.name AS "shopName",
-		cmpc.classifyName AS "productClassifyName"
-	</sql>
+		s.name AS "shopName"
+    </sql>
 
 
     <sql id="cmMallOrganizeProductsJoins">
     <sql id="cmMallOrganizeProductsJoins">
-		LEFT JOIN product p on p.productID = a.productID
+        LEFT JOIN product p on p.productID = a.productID
 		LEFT JOIN shop s on s.shopID = p.shopID
 		LEFT JOIN shop s on s.shopID = p.shopID
-		LEFT JOIN cm_mall_products_classify cmpc on cmpc.id = a.classifyID
-	</sql>
+    </sql>
 
 
     <select id="findList" resultType="com.caimei.modules.products.entity.CmMallOrganizeProducts">
     <select id="findList" resultType="com.caimei.modules.products.entity.CmMallOrganizeProducts">
         SELECT
         SELECT
         <include refid="cmMallOrganizeProductsColumns"/>
         <include refid="cmMallOrganizeProductsColumns"/>
-        (SELECT unit FROM cm_sku WHERE productId=a.productId ORDER BY price LIMIT 1) AS unit,
-        (SELECT price FROM cm_sku WHERE productId=a.productId ORDER BY price LIMIT 1) AS price
         FROM cm_mall_organize_products a
         FROM cm_mall_organize_products a
         <include refid="cmMallOrganizeProductsJoins"/>
         <include refid="cmMallOrganizeProductsJoins"/>
         <where>
         <where>
@@ -53,27 +36,6 @@
             <if test="organizeID != null and organizeID != ''">
             <if test="organizeID != null and organizeID != ''">
                 AND a.organizeID = #{organizeID}
                 AND a.organizeID = #{organizeID}
             </if>
             </if>
-            <if test="classifyID != null and classifyID != ''">
-                AND a.classifyID = #{classifyID}
-            </if>
-            <if test="preferredProduct != null and preferredProduct !=  '' and preferredProduct == 1">
-                AND a.preferredProduct = 1
-            </if>
-            <if test="preferredProduct != null and preferredProduct !=  '' and preferredProduct == 0">
-                AND (a.preferredProduct = 0 OR a.preferredProduct is NULL)
-            </if>
-            <if test="commonlyProduct != null and commonlyProduct != '' and commonlyProduct == 1 ">
-                AND a.commonlyProduct = 1
-            </if>
-            <if test="commonlyProduct != null and commonlyProduct != '' and commonlyProduct == 0 ">
-                AND (a.commonlyProduct = 0 OR a.commonlyProduct is NULL )
-            </if>
-            <if test="preferentialProduct != null and preferentialProduct != '' and preferentialProduct == 1">
-                AND a.preferentialProduct = 1
-            </if>
-            <if test="preferentialProduct != null and preferentialProduct != '' and preferentialProduct == 0">
-                AND (a.preferentialProduct = 0 or a.preferentialProduct is NULL)
-            </if>
             <if test="validFlag != null and validFlag != ''">
             <if test="validFlag != null and validFlag != ''">
                 AND a.validFlag = #{validFlag}
                 AND a.validFlag = #{validFlag}
             </if>
             </if>
@@ -84,34 +46,22 @@
                 AND s.name LIKE concat('%',#{shopName},'%')
                 AND s.name LIKE concat('%',#{shopName},'%')
             </if>
             </if>
         </where>
         </where>
-            ORDER BY
-        <if test="preferredProduct != null and preferredProduct !=  '' and preferredProduct == 1">
-            -a.preferredProductSort DESC,
-        </if>
-        <if test="commonlyProduct != null and commonlyProduct != '' and commonlyProduct == 1 ">
-            -a.commonlyProductSort DESC,
-        </if>
-        <if test="preferentialProduct != null and preferentialProduct != '' and preferentialProduct == 1">
-            -a.preferentialProductSort DESC,
-        </if>
-            a.addTime DESC,a.id DESC
+        ORDER BY
+        a.addTime DESC,a.id DESC
     </select>
     </select>
 
 
     <select id="findAllModule" resultType="com.caimei.modules.products.entity.CmMallPageModules" parameterType="int">
     <select id="findAllModule" resultType="com.caimei.modules.products.entity.CmMallPageModules" parameterType="int">
-        SELECT
-          *
-        FROM
-          cm_mall_page_modules
-        WHERE
-          organizeID = #{organizeID}
+        SELECT *
+        FROM cm_mall_page_modules
+        WHERE organizeID = #{organizeID}
     </select>
     </select>
 
 
     <update id="updateProductInfo">
     <update id="updateProductInfo">
-		UPDATE cm_mall_organize_products
-		SET validFlag = #{validFlag},
-		    updateTime = now()
-		WHERE id = #{id}
-	</update>
+        UPDATE cm_mall_organize_products
+        SET validFlag  = #{validFlag},
+            updateTime = now()
+        WHERE id = #{id}
+    </update>
 
 
     <select id="get" resultType="com.caimei.modules.products.entity.CmMallOrganizeProducts">
     <select id="get" resultType="com.caimei.modules.products.entity.CmMallOrganizeProducts">
         SELECT
         SELECT
@@ -122,24 +72,14 @@
     </select>
     </select>
 
 
     <update id="updateValidFlag">
     <update id="updateValidFlag">
-        UPDATE cm_mall_organize_products SET
-        <if test="preferredProduct != null and preferredProduct != ''">
-            preferredProduct = #{preferredProduct},
-        </if>
-        <if test="commonlyProduct != null and commonlyProduct != ''">
-            commonlyProduct = #{commonlyProduct},
-        </if>
-        <if test="preferentialProduct != null and preferentialProduct != ''">
-            preferentialProduct = #{preferentialProduct},
-        </if>
-        validFlag = #{validFlag},
-        updateTime = #{updateTime}
+        UPDATE cm_mall_organize_products
+        SET validFlag  = #{validFlag}
         WHERE id = #{id}
         WHERE id = #{id}
     </update>
     </update>
 
 
     <update id="saveSort">
     <update id="saveSort">
-		UPDATE cm_mall_organize_products SET
-		<if test="modules == 1">
+        UPDATE cm_mall_organize_products SET
+        <if test="modules == 1">
             preferredProductSort = #{sort}
             preferredProductSort = #{sort}
         </if>
         </if>
         <if test="modules == 2">
         <if test="modules == 2">
@@ -148,8 +88,8 @@
         <if test="modules == 3">
         <if test="modules == 3">
             commonlyProductSort = #{sort}
             commonlyProductSort = #{sort}
         </if>
         </if>
-		WHERE id = #{id}
-	</update>
+        WHERE id = #{id}
+    </update>
 
 
     <select id="findListBuyMall" resultType="com.caimei.modules.products.entity.CmMallOrganizeProducts">
     <select id="findListBuyMall" resultType="com.caimei.modules.products.entity.CmMallOrganizeProducts">
         SELECT
         SELECT
@@ -167,18 +107,6 @@
             <if test="organizeID != null and organizeID != ''">
             <if test="organizeID != null and organizeID != ''">
                 AND a.organizeID = #{organizeID}
                 AND a.organizeID = #{organizeID}
             </if>
             </if>
-            <if test="classifyID != null and classifyID != ''">
-                AND a.classifyID = #{classifyID}
-            </if>
-            <if test="preferredProduct != null and preferredProduct != ''">
-                AND IFNULL(a.preferredProduct,'') != #{preferredProduct}
-            </if>
-            <if test="commonlyProduct != null and commonlyProduct != ''">
-                AND IFNULL(a.commonlyProduct,'') != #{commonlyProduct}
-            </if>
-            <if test="preferentialProduct != null and preferentialProduct != ''">
-                AND IFNULL(a.preferentialProduct,'') != #{preferentialProduct}
-            </if>
             <if test="productName != null and productName != ''">
             <if test="productName != null and productName != ''">
                 AND p.name LIKE concat('%',#{productName},'%')
                 AND p.name LIKE concat('%',#{productName},'%')
             </if>
             </if>
@@ -187,15 +115,15 @@
             </if>
             </if>
             AND a.validFlag = 1
             AND a.validFlag = 1
         </where>
         </where>
-            ORDER BY a.addTime DESC,a.id DESC
+        ORDER BY a.addTime DESC,a.id DESC
     </select>
     </select>
 
 
     <select id="getAllExistsProductList" resultType="Integer">
     <select id="getAllExistsProductList" resultType="Integer">
-		SELECT
-		a.id
-		FROM cm_mall_organize_products a
-		WHERE a.delFlag = 0
-		<if test="modules == 1">
+        SELECT
+        a.id
+        FROM cm_mall_organize_products a
+        WHERE a.delFlag = 0
+        <if test="modules == 1">
             and a.preferredProduct = 1
             and a.preferredProduct = 1
         </if>
         </if>
         <if test="modules == 2">
         <if test="modules == 2">
@@ -204,32 +132,25 @@
         <if test="modules == 3">
         <if test="modules == 3">
             and a.commonlyProduct = 1
             and a.commonlyProduct = 1
         </if>
         </if>
-	</select>
+    </select>
 
 
     <select id="findSkus" resultType="com.caimei.modules.products.entity.Sku">
     <select id="findSkus" resultType="com.caimei.modules.products.entity.Sku">
-        select cs.productId,cs.skuId,costProportional,costCheckFlag,costPrice,cmps.minBuyNumber,cmps.price,cs.unit
+        select cs.productId,
+               cs.skuId,
+               costProportional,
+               costCheckFlag,
+               ROUND(IF(costCheckFlag = 1, costprice, cs.price * costProportional / 100), 2) AS costPrice,
+               cmps.minBuyNumber,
+               cmps.price,
+               cs.unit
         from cm_sku cs
         from cm_sku cs
-        left join cm_mall_product_sku cmps on cs.skuId = cmps.skuId
+                 left join cm_mall_product_sku cmps on cs.skuId = cmps.skuId
         where cs.productId = #{productID}
         where cs.productId = #{productID}
+        order by cmps.price asc
     </select>
     </select>
 
 
-    <update id="updateProductInfo1">
-		UPDATE cm_mall_organize_products SET
-        <if test="modules == 1">
-            preferredProduct = 1,
-        </if>
-        <if test="modules == 2">
-            preferentialProduct = 1,
-        </if>
-        <if test="modules == 3">
-            commonlyProduct = 1,
-        </if>
-		updateTime = #{updateTime}
-		WHERE id = #{id}
-	</update>
-
     <update id="canncelPreferredProduct">
     <update id="canncelPreferredProduct">
-		UPDATE cm_mall_organize_products SET
+        UPDATE cm_mall_organize_products SET
         <if test="modules == 1">
         <if test="modules == 1">
             preferredProduct = 0,
             preferredProduct = 0,
             preferredProductSort = null,
             preferredProductSort = null,
@@ -242,14 +163,14 @@
             commonlyProduct = 0,
             commonlyProduct = 0,
             commonlyProductSort = null,
             commonlyProductSort = null,
         </if>
         </if>
-		updateTime = #{updateTime}
-		WHERE id = #{id}
-	</update>
+        updateTime = #{updateTime}
+        WHERE id = #{id}
+    </update>
 
 
     <update id="updateSku">
     <update id="updateSku">
         update cm_mall_product_sku
         update cm_mall_product_sku
         set minBuyNumber = #{minBuyNumber},
         set minBuyNumber = #{minBuyNumber},
-            price = #{price}
+            price        = #{price}
         where skuId = #{skuId}
         where skuId = #{skuId}
     </update>
     </update>
 </mapper>
 </mapper>

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

@@ -12,7 +12,6 @@
 		a.returnedWay AS "returnedWay",
 		a.returnedWay AS "returnedWay",
 		a.payType AS "payType",
 		a.payType AS "payType",
 		a.operatingOrderStatus AS "operatingOrderStatus",
 		a.operatingOrderStatus AS "operatingOrderStatus",
-		a.returnedBankInfo AS "returnedBankInfo",
 		a.returnedPurchaseFee AS "returnedPurchaseFee",
 		a.returnedPurchaseFee AS "returnedPurchaseFee",
 		a.refundFee AS "refundFee",
 		a.refundFee AS "refundFee",
 		a.image1 AS "image1",
 		a.image1 AS "image1",

+ 12 - 10
src/main/resources/mapper/CmUserMapper.xml

@@ -10,11 +10,12 @@
         a.bindMobile,
         a.bindMobile,
         a.clubStatus,
         a.clubStatus,
         a.registerTime,
         a.registerTime,
-        ,c.linkMan AS "linkMan"
-        ,t.name as "town"
-        ,ci.name as "city"
-        ,p.name as "province"
-        ,c.address AS "address"
+        c.clubID,
+        c.linkMan AS "linkMan",
+        t.name as "town",
+        ci.name as "city",
+        p.name as "province",
+        c.address AS "address"
         FROM user a
         FROM user a
         LEFT JOIN club c on c.userID = a.userID
         LEFT JOIN club c on c.userID = a.userID
         LEFT JOIN town t on t.townID = c.townID
         LEFT JOIN town t on t.townID = c.townID
@@ -58,13 +59,14 @@
     </select>
     </select>
 
 
     <select id="findUserById" resultType="com.caimei.modules.club.entity.CmUser">
     <select id="findUserById" resultType="com.caimei.modules.club.entity.CmUser">
-            select c.name,c.businessLicenseImage,c.address,c.linkMan,c.contractPhone as mobile,
-            from club c
-            left join user u on c.userID = u.userID
-            where c.userID = #{userId}
+        select c.name, c.businessLicenseImage, c.address, c.linkMan, c.contractPhone as mobile,
+        from club c
+                 left join user u on c.userID = u.userID
+        where c.userID = #{userId}
     </select>
     </select>
 
 
-    <insert id="insert" parameterType="com.caimei.modules.club.entity.CmUser" keyProperty="userID" useGeneratedKeys="true">
+    <insert id="insert" parameterType="com.caimei.modules.club.entity.CmUser" keyProperty="userID"
+            useGeneratedKeys="true">
         INSERT INTO user(
         INSERT INTO user(
         userOrganizeID,
         userOrganizeID,
         account,
         account,

+ 30 - 0
src/main/resources/mapper/MainMenuMapper.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.homepage.dao.MainMenuDao">
+
+    <update id="checkMenuStatus">
+        UPDATE cm_mall_mainmenu
+        SET enabledStatus=
+        (CASE WHEN enabledStatus = 1
+              THEN 0
+              ELSE 1 END)
+        WHERE id = #{id}
+    </update>
+
+    <select id="findList" resultType="com.caimei.modules.homepage.enity.MainMenu">
+        select id, organizeId, topic, image, sort, enabledStatus, jumpType, jumpProductId, jumpActiveId, addTime
+        from cm_mall_mainmenu
+        <where>
+            organizeID = #{organizeId}
+            <if test="topic != null and topic != ''">
+                AND topic LIKE concat('%',#{topic},'%')
+            </if>
+            <if test="enabledStatus != null and enabledStatus != ''">
+                AND enabledStatus = #{enabledStatus}
+            </if>
+        </where>
+        order by sort asc
+    </select>
+</mapper>

+ 0 - 2
src/main/resources/mapper/NewCmClubMapper.xml

@@ -19,7 +19,6 @@
 		a.spID AS "spID",
 		a.spID AS "spID",
 		a.mainServiceProviderID AS "mainServiceProviderID",
 		a.mainServiceProviderID AS "mainServiceProviderID",
 		a.scanTime AS "scanTime",
 		a.scanTime AS "scanTime",
-		a.checkTime AS "checkTime",
 		a.address AS "address",
 		a.address AS "address",
 		a.linkMan AS "linkMan",
 		a.linkMan AS "linkMan",
 		a.contractPhone AS "contractPhone",
 		a.contractPhone AS "contractPhone",
@@ -31,7 +30,6 @@
 		a.auditNote AS "auditNote",
 		a.auditNote AS "auditNote",
 		a.status AS "status",
 		a.status AS "status",
 		a.businessLicenseImage AS "businessLicenseImage",
 		a.businessLicenseImage AS "businessLicenseImage",
-		a.sortIndex AS "sortIndex",
 		a.defaultServiceProviderID AS "defaultServiceProviderID",
 		a.defaultServiceProviderID AS "defaultServiceProviderID",
 		a.defaultServiceProviderUpdTime AS "defaultServiceProviderUpdTime",
 		a.defaultServiceProviderUpdTime AS "defaultServiceProviderUpdTime",
 		a.empnum AS "empnum",
 		a.empnum AS "empnum",

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

@@ -24,14 +24,10 @@
 		a.note AS note,
 		a.note AS note,
 		a.clubID AS clubID,
 		a.clubID AS clubID,
 		a.clubScanTime AS clubScanTime,
 		a.clubScanTime AS clubScanTime,
-		a.payWay AS payWay,
 		a.orderSource AS orderSource,
 		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,
-		a.cooFreeFlag AS cooFreeFlag,
-		a.cooFreeRate AS cooFreeRate,
-		a.cooFreeAmount AS cooFreeAmount,
 		a.confirmFlag AS confirmFlag,
 		a.confirmFlag AS confirmFlag,
 		a.clauseID AS clauseID,
 		a.clauseID AS clauseID,
 		a.clauseContent AS clauseContent,
 		a.clauseContent AS clauseContent,
@@ -50,7 +46,8 @@
 		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.postageOrderFlag AS postageOrderFlag,
+        a.rebateFlag  as rebateOrder
 	</sql>
 	</sql>
 
 
     <resultMap id="orderDisplayList" type="com.caimei.modules.order.entity.NewOrder">
     <resultMap id="orderDisplayList" type="com.caimei.modules.order.entity.NewOrder">
@@ -68,7 +65,6 @@
         <result column="alreadyReceipt" property="alreadyReceipt"/>
         <result column="alreadyReceipt" property="alreadyReceipt"/>
         <result column="unReceipt" property="unReceipt"/>
         <result column="unReceipt" property="unReceipt"/>
         <result column="payTotalFee" property="payTotalFee"/>
         <result column="payTotalFee" property="payTotalFee"/>
-        <result column="payWay" property="payWay"/>
         <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"
                     select="loadShopOrders" column="orderNo" fetchType="eager">
                     select="loadShopOrders" column="orderNo" fetchType="eager">

+ 6 - 11
src/main/resources/mapper/NewOrderProductMapper.xml

@@ -15,13 +15,9 @@
 		  a.`presentNum` AS `presentNum`,
 		  a.`presentNum` AS `presentNum`,
 		  a.`outStoreType` AS `outStoreType`,
 		  a.`outStoreType` AS `outStoreType`,
 		  a.`skuID` AS `skuID`,
 		  a.`skuID` AS `skuID`,
-		  a.`props` AS `props`,
-		  a.`propName` AS `propName`,
 		  a.`productNo` AS `productNo`,
 		  a.`productNo` AS `productNo`,
 		  a.`price` AS `price`,
 		  a.`price` AS `price`,
 		  a.`normalPrice` AS `normalPrice`,
 		  a.`normalPrice` AS `normalPrice`,
-		  a.`price0` AS `price0`,
-		  a.`price1` AS `price1`,
 		  a.`totalAmount` AS `totalAmount`,
 		  a.`totalAmount` AS `totalAmount`,
 		  a.`totalFee` AS `totalFee`,
 		  a.`totalFee` AS `totalFee`,
 		  a.`shouldPayFee` AS `shouldPayFee`,
 		  a.`shouldPayFee` AS `shouldPayFee`,
@@ -38,7 +34,6 @@
 		  a.`singleOtherFee` AS `singleOtherFee`,
 		  a.`singleOtherFee` AS `singleOtherFee`,
 		  a.`singleCmFee` AS `singleCmFee`,
 		  a.`singleCmFee` AS `singleCmFee`,
 		  a.`status` AS `status`,
 		  a.`status` AS `status`,
-		  a.`commentFlag` AS `commentFlag`,
 		  a.`totalBeans` AS `totalBeans`,
 		  a.`totalBeans` AS `totalBeans`,
 		  a.`useBalanceAmount` AS `useBalanceAmount`,
 		  a.`useBalanceAmount` AS `useBalanceAmount`,
 		  a.`useBeanAmount` AS `useBeanAmount`,
 		  a.`useBeanAmount` AS `useBeanAmount`,
@@ -51,20 +46,19 @@
 		  a.`confirmProductFlag` AS `confirmProductFlag`,
 		  a.`confirmProductFlag` AS `confirmProductFlag`,
 		  a.`payStatus` AS `payStatus`,
 		  a.`payStatus` AS `payStatus`,
 		  a.`name` AS `name`,
 		  a.`name` AS `name`,
-		  p.`unit` AS `unit`,
+		  cs.`unit` AS `unit`,
 		  a.`actType` AS `actType`,
 		  a.`actType` AS `actType`,
 		  a.`actPreferential` AS `actPreferential`,
 		  a.`actPreferential` AS `actPreferential`,
 		  a.`preferential` AS `preferential`,
 		  a.`preferential` AS `preferential`,
 		  (select mainImage from product p where p.productID = a.productID) AS image,
 		  (select mainImage from product p where p.productID = a.productID) AS image,
 		  a.`discountFee` AS `discountFee`,
 		  a.`discountFee` AS `discountFee`,
-		  (select cso.status from cm_shop_order cso where cso.shopOrderID = a.shopOrderID) AS status,
 		  a.`productUnit` AS `productUnit`,
 		  a.`productUnit` AS `productUnit`,
 		  a.`productImage` AS `productImage`,
 		  a.`productImage` AS `productImage`,
 		  a.`shopName` AS `shopName`,
 		  a.`shopName` AS `shopName`,
-		  p.costProportional AS costProportional,
-		  p.stock AS stock,
-		  p.costCheckFlag AS costCheckFlag,
-		  p.costPrice AS costPrice,
+		  cs.costProportional AS costProportional,
+		  cs.stock AS stock,
+		  cs.costCheckFlag AS costCheckFlag,
+		  cs.costPrice AS costPrice,
 		  a.costPrice as newCostPrice,
 		  a.costPrice as newCostPrice,
 		  p.aliasName AS aliasName,
 		  p.aliasName AS aliasName,
 		  a.singleShouldPayTotalTax AS singleShouldPayTotalTax
 		  a.singleShouldPayTotalTax AS singleShouldPayTotalTax
@@ -72,6 +66,7 @@
 
 
     <sql id="orderProductJoins">
     <sql id="orderProductJoins">
 		LEFT JOIN product p ON p.productID = a.productID
 		LEFT JOIN product p ON p.productID = a.productID
+		left join cm_sku cs on a.skuId = cs.skuId
     </sql>
     </sql>
 
 
     <select id="get" resultType="com.caimei.modules.order.entity.NewOrderProduct">
     <select id="get" resultType="com.caimei.modules.order.entity.NewOrderProduct">

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

@@ -14,14 +14,12 @@
 			a.itemCount  AS itemCount,
 			a.itemCount  AS itemCount,
 			a.townID  AS townID,
 			a.townID  AS townID,
 			a.productAmount  AS productAmount,
 			a.productAmount  AS productAmount,
-			a.fee  AS fee,
 			a.discountAmount AS  discountAmount,
 			a.discountAmount AS  discountAmount,
 			a.accountAmount AS  accountAmount,
 			a.accountAmount AS  accountAmount,
 			a.totalAmount AS  totalAmount,
 			a.totalAmount AS  totalAmount,
 			a.payFlag  AS payFlag,
 			a.payFlag  AS payFlag,
 			a.payTime  AS payTime,
 			a.payTime  AS payTime,
 			a.finishTime AS finishTime,
 			a.finishTime AS finishTime,
-			a.status  AS status,
 			a.refundStatus AS  refundStatus,
 			a.refundStatus AS  refundStatus,
 			a.needPayAmount AS  needPayAmount,
 			a.needPayAmount AS  needPayAmount,
 			a.canRefundAmount AS  canRefundAmount,
 			a.canRefundAmount AS  canRefundAmount,
@@ -50,7 +48,6 @@
 			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.discountFee AS discountFee,
 			a.splitFlag AS splitFlag,
 			a.splitFlag AS splitFlag,
 			a.autoReceiveTimeMills AS autoReceiveTimeMills,
 			a.autoReceiveTimeMills AS autoReceiveTimeMills,
 			a.autoOverTimeMills AS autoOverTimeMills,
 			a.autoOverTimeMills AS autoOverTimeMills,

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

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.homepage.dao.ThemeDao">
+
+    <update id="checkStatus">
+        UPDATE cm_mall_theme
+        SET enabledStatus=
+                (CASE WHEN enabledStatus = 1
+                          THEN 0
+                      ELSE 1 END)
+        WHERE id = #{id}
+    </update>
+
+    <select id="findList" resultType="com.caimei.modules.homepage.enity.Theme">
+        select id, organizeId, topic, image, enabledStatus, jumpType, jumpProductId, jumpActiveId, addTime
+        from cm_mall_theme
+        <where>
+            organizeID = #{organizeId}
+            <if test="topic != null and topic != ''">
+                AND topic LIKE concat('%',#{topic},'%')
+            </if>
+            <if test="enabledStatus != null and enabledStatus != ''">
+                AND enabledStatus = #{enabledStatus}
+            </if>
+        </where>
+    </select>
+</mapper>