Browse Source

数据库清表

zhijiezhao 1 year ago
parent
commit
2c892fc52e
21 changed files with 15 additions and 2004 deletions
  1. 0 6
      src/main/java/com/caimei/modules/cmpage/web/CmPageCentreController.java
  2. 0 15
      src/main/java/com/caimei/modules/product/dao/ActTypeDao.java
  3. 0 19
      src/main/java/com/caimei/modules/product/dao/ProductCustomClassificationDao.java
  4. 9 28
      src/main/java/com/caimei/modules/product/dao/ProductDao.java
  5. 0 51
      src/main/java/com/caimei/modules/product/entity/ProductCustomClassification.java
  6. 0 18
      src/main/java/com/caimei/modules/product/service/ActTypeService.java
  7. 2 4
      src/main/java/com/caimei/modules/product/service/CmTinytypeService.java
  8. 0 53
      src/main/java/com/caimei/modules/product/service/ProductCustomClassificationService.java
  9. 0 83
      src/main/java/com/caimei/modules/product/service/ProductService.java
  10. 0 27
      src/main/java/com/caimei/modules/product/web/ProductActController.java
  11. 2 785
      src/main/java/com/caimei/modules/product/web/ProductController.java
  12. 0 80
      src/main/java/com/caimei/modules/product/web/ProductCustomClassificationController.java
  13. 0 57
      src/main/java/com/caimei/modules/product/web/ProductNewController.java
  14. 0 301
      src/main/java/com/caimei/modules/product/web/ProductsClassifyController.java
  15. 2 0
      src/main/java/com/caimei/modules/user/dao/ClubChangeSpReviewDao.java
  16. 0 75
      src/main/resources/mappings/modules/product/ActTypeMapper.xml
  17. 0 14
      src/main/resources/mappings/modules/product/CmTinytypeMapper.xml
  18. 0 101
      src/main/resources/mappings/modules/product/ProductCustomClassificationMapper.xml
  19. 0 163
      src/main/resources/mappings/modules/product/ProductMapper.xml
  20. 0 66
      src/main/webapp/WEB-INF/views/modules/product/productCustomClassificationForm.jsp
  21. 0 58
      src/main/webapp/WEB-INF/views/modules/product/productCustomClassificationList.jsp

+ 0 - 6
src/main/java/com/caimei/modules/cmpage/web/CmPageCentreController.java

@@ -9,7 +9,6 @@ import com.caimei.modules.hehe.entity.CmHeheProduct;
 import com.caimei.modules.newhome.entity.NewPageFloorContent;
 import com.caimei.modules.newhome.entity.NewPageFloorContent;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.product.entity.ActType;
 import com.caimei.modules.product.entity.ActType;
-import com.caimei.modules.product.service.ActTypeService;
 import com.caimei.redis.RedisService;
 import com.caimei.redis.RedisService;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
@@ -50,9 +49,6 @@ public class CmPageCentreController extends BaseController {
     @Autowired
     @Autowired
     private CmImageService cmImageService;
     private CmImageService cmImageService;
 
 
-    @Autowired
-    private ActTypeService actTypeService;
-
     @Resource
     @Resource
     private CmHeheProductDao cmHeheProductDao;
     private CmHeheProductDao cmHeheProductDao;
 
 
@@ -182,8 +178,6 @@ public class CmPageCentreController extends BaseController {
         Page<CmImage> page = cmImageService.findPage(new Page<CmImage>(request, response), cmImage);
         Page<CmImage> page = cmImageService.findPage(new Page<CmImage>(request, response), cmImage);
         model.addAttribute("page", page);
         model.addAttribute("page", page);
         model.addAttribute("type", cmImage.getType());
         model.addAttribute("type", cmImage.getType());
-        List<ActType> typeList = actTypeService.findList(new ActType());
-        model.addAttribute("typeList", typeList);
         return "modules/cmpage/pageList_multiselect";
         return "modules/cmpage/pageList_multiselect";
     }
     }
 
 

+ 0 - 15
src/main/java/com/caimei/modules/product/dao/ActTypeDao.java

@@ -1,15 +0,0 @@
-package com.caimei.modules.product.dao;
-
-import com.caimei.modules.product.entity.ActType;
-import com.thinkgem.jeesite.common.persistence.CrudDao;
-import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
-
-/**
- * ${DESCRIPTION}
- *
- * @author LG
- * @create 2017-05-10
- **/
-@MyBatisDao
-public interface ActTypeDao extends CrudDao<ActType> {
-}

+ 0 - 19
src/main/java/com/caimei/modules/product/dao/ProductCustomClassificationDao.java

@@ -1,19 +0,0 @@
-package com.caimei.modules.product.dao;
-
-import com.thinkgem.jeesite.common.persistence.CrudDao;
-import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
-import com.caimei.modules.product.entity.ProductCustomClassification;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 商品自定义分类DAO接口
- * @author lwt
- * @version 2018-11-19
- */
-@MyBatisDao
-public interface ProductCustomClassificationDao extends CrudDao<ProductCustomClassification> {
-
-	List<ProductCustomClassification> findCustomClassification(@Param("productID") Integer productID);
-}

+ 9 - 28
src/main/java/com/caimei/modules/product/dao/ProductDao.java

@@ -14,9 +14,6 @@ import java.util.Map;
 @MyBatisDao
 @MyBatisDao
 public interface ProductDao extends CrudDao<Product> {
 public interface ProductDao extends CrudDao<Product> {
 
 
-    List<ActType> getAllActType();
-
-
     int saveSort(@Param("sort") String sort, @Param("id") String id);
     int saveSort(@Param("sort") String sort, @Param("id") String id);
 
 
     int findLadderPriceByNum(@Param("productID") String productID);
     int findLadderPriceByNum(@Param("productID") String productID);
@@ -27,21 +24,21 @@ public interface ProductDao extends CrudDao<Product> {
      * @param product
      * @param product
      * @return
      * @return
      */
      */
-    public List<Product> getSupplierProductList(Product product);
+    List<Product> getSupplierProductList(Product product);
 
 
     /**
     /**
      * 获取所有已添加存在的小程序商品集合
      * 获取所有已添加存在的小程序商品集合
      *
      *
      * @return
      * @return
      */
      */
-    public List<Integer> getAllExistsProductList(@Param("organizeID") String organizeID);
+     List<Integer> getAllExistsProductList(@Param("organizeID") String organizeID);
 
 
     List<Product> findListBuyMall(Product product);
     List<Product> findListBuyMall(Product product);
 
 
 
 
     void deleteProduct(@Param("id") String id, @Param("DateTime") Long DateTime);
     void deleteProduct(@Param("id") String id, @Param("DateTime") Long DateTime);
 
 
-    public List<Product> getrecommendProductList(Product product);
+     List<Product> getrecommendProductList(Product product);
 
 
     int insertAddProduct(@Param("productID") Integer productID, @Param("tinyTypeID") Integer tinyTypeID);
     int insertAddProduct(@Param("productID") Integer productID, @Param("tinyTypeID") Integer tinyTypeID);
 
 
@@ -51,7 +48,7 @@ public interface ProductDao extends CrudDao<Product> {
      * @param giftProduct
      * @param giftProduct
      * @return
      * @return
      */
      */
-    public List<GiftProduct> getGiftProductInfo(GiftProduct giftProduct);
+     List<GiftProduct> getGiftProductInfo(GiftProduct giftProduct);
 
 
     /**
     /**
      * 后去商品购买库存
      * 后去商品购买库存
@@ -59,28 +56,26 @@ public interface ProductDao extends CrudDao<Product> {
      * @param productId
      * @param productId
      * @return
      * @return
      */
      */
-    public Sku getProductSku(@Param("productId") Integer productId);
+     Sku getProductSku(@Param("productId") Integer productId);
 
 
     /**
     /**
      * 更新赠送
      * 更新赠送
      *
      *
      * @return
      * @return
      */
      */
-    public int updateGiftProudct(GiftProduct giftProduct);
+     int updateGiftProudct(GiftProduct giftProduct);
 
 
     /**
     /**
      * 删除赠送
      * 删除赠送
      *
      *
      * @return
      * @return
      */
      */
-    public int insertGiftProudct(GiftProduct giftProduct);
-
+     int insertGiftProudct(GiftProduct giftProduct);
 
 
-    public int insertProductPriceRecord(ProductPriceRecord productPriceRecord);
 
 
-    /*    public int updateCRMFlag(String enabledStatus, String[] ids);*/
+     int insertProductPriceRecord(ProductPriceRecord productPriceRecord);
 
 
-    public int updatePostFlag(String enabledStatus, String[] ids);
+     int updatePostFlag(String enabledStatus, String[] ids);
 
 
     public String findProductBigTypeByProductID(Integer productID);
     public String findProductBigTypeByProductID(Integer productID);
 
 
@@ -92,22 +87,8 @@ public interface ProductDao extends CrudDao<Product> {
 
 
     Map<String, Object> getProductTypeNameAndID(@Param("tinyTypeID") Integer tinyTypeID);
     Map<String, Object> getProductTypeNameAndID(@Param("tinyTypeID") Integer tinyTypeID);
 
 
-    void deleteCustomClassification(@Param("productID") Integer productID);
-
-    void insertCustomClassification(ProductCustomClassification obj);
-
-    List<Product> relatedProductList(Product product);
-
-    void deleteProductCustomClassification(@Param("productID") Integer productID, @Param("tinyTypeID") Integer tinyTypeID);
-
-    List<Product> toAddProductCustomClassificationList(Product product);
-
     List<Product> toAddProductList(Product product);
     List<Product> toAddProductList(Product product);
 
 
-    List<ProductCustomClassification> getProductTypes(@Param("productID") Integer productID);
-
-    List<Product> findRecommendActivityListPage(Product product);
-
     List<ProductBigType> findBigTypeList(ProductBigType productBigType);
     List<ProductBigType> findBigTypeList(ProductBigType productBigType);
 
 
     List<ProductSmallType> findSmallTypeList(ProductSmallType productSmallType);
     List<ProductSmallType> findSmallTypeList(ProductSmallType productSmallType);

+ 0 - 51
src/main/java/com/caimei/modules/product/entity/ProductCustomClassification.java

@@ -1,51 +0,0 @@
-package com.caimei.modules.product.entity;
-
-import com.thinkgem.jeesite.common.persistence.DataEntity;
-
-/**
- * 商品自定义分类
- *
- * @author Lwt
- * @create 2018-11-19
- **/
-public class ProductCustomClassification extends DataEntity<ProductCustomClassification> {
-
-    private static final long serialVersionUID = 1L;
-
-    private Integer productID;
-    private Integer bigTypeID;
-    private Integer smallTypeID;
-    private Integer tinyTypeID;
-
-    public Integer getProductID() {
-        return productID;
-    }
-
-    public void setProductID(Integer productID) {
-        this.productID = productID;
-    }
-
-    public Integer getBigTypeID() {
-        return bigTypeID;
-    }
-
-    public void setBigTypeID(Integer bigTypeID) {
-        this.bigTypeID = bigTypeID;
-    }
-
-    public Integer getSmallTypeID() {
-        return smallTypeID;
-    }
-
-    public void setSmallTypeID(Integer smallTypeID) {
-        this.smallTypeID = smallTypeID;
-    }
-
-    public Integer getTinyTypeID() {
-        return tinyTypeID;
-    }
-
-    public void setTinyTypeID(Integer tinyTypeID) {
-        this.tinyTypeID = tinyTypeID;
-    }
-}

+ 0 - 18
src/main/java/com/caimei/modules/product/service/ActTypeService.java

@@ -1,18 +0,0 @@
-package com.caimei.modules.product.service;
-
-import com.caimei.modules.product.dao.ActTypeDao;
-import com.caimei.modules.product.entity.ActType;
-import com.thinkgem.jeesite.common.service.CrudService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * ${DESCRIPTION}
- *
- * @author LG
- * @create 2017-05-10
- **/
-@Service
-@Transactional(readOnly = true)
-public class ActTypeService extends CrudService<ActTypeDao, ActType> {
-}

+ 2 - 4
src/main/java/com/caimei/modules/product/service/CmTinytypeService.java

@@ -35,13 +35,11 @@ public class CmTinytypeService extends CrudService<CmTinytypeDao, CmTinytype> {
 	public CmTinytype get(String tinyTypeID) {
 	public CmTinytype get(String tinyTypeID) {
 		return super.get(tinyTypeID);
 		return super.get(tinyTypeID);
 	}
 	}
+
 	public List<CmTinytype> getByCode(String tinyTypeCode,String smallTypeCode) {
 	public List<CmTinytype> getByCode(String tinyTypeCode,String smallTypeCode) {
 		return cmTinytypeDao.getByCode(tinyTypeCode,smallTypeCode);
 		return cmTinytypeDao.getByCode(tinyTypeCode,smallTypeCode);
 	}
 	}
-	@Transactional(readOnly = false)
-	public void mutiUpdateCode(String newTinyTypeId){
-		cmTinytypeDao.mutiUpdateCode(newTinyTypeId);
-	}
+
 	public List<CmTinytype> findList(CmTinytype cmTinytype) {
 	public List<CmTinytype> findList(CmTinytype cmTinytype) {
 		return super.findList(cmTinytype);
 		return super.findList(cmTinytype);
 	}
 	}

+ 0 - 53
src/main/java/com/caimei/modules/product/service/ProductCustomClassificationService.java

@@ -1,53 +0,0 @@
-package com.caimei.modules.product.service;
-
-import java.util.List;
-
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.service.CrudService;
-import com.caimei.modules.product.entity.ProductCustomClassification;
-import com.caimei.modules.product.dao.ProductCustomClassificationDao;
-
-import javax.annotation.Resource;
-
-/**
- * 商品自定义分类Service
- * @author lwt
- * @version 2018-11-19
- */
-@Service
-@Transactional(readOnly = true)
-public class ProductCustomClassificationService extends CrudService<ProductCustomClassificationDao, ProductCustomClassification> {
-
-	@Resource
-	private ProductCustomClassificationDao productCustomClassificationDao;
-
-	public ProductCustomClassification get(String id) {
-		return super.get(id);
-	}
-	
-	public List<ProductCustomClassification> findList(ProductCustomClassification productCustomClassification) {
-		return super.findList(productCustomClassification);
-	}
-	
-	public Page<ProductCustomClassification> findPage(Page<ProductCustomClassification> page, ProductCustomClassification productCustomClassification) {
-		return super.findPage(page, productCustomClassification);
-	}
-	
-	@Transactional(readOnly = false)
-	public void save(ProductCustomClassification productCustomClassification) {
-		super.save(productCustomClassification);
-	}
-	
-	@Transactional(readOnly = false)
-	public void delete(ProductCustomClassification productCustomClassification) {
-		super.delete(productCustomClassification);
-	}
-
-	@Transactional(readOnly = false)
-	public List<ProductCustomClassification> findCustomClassification(Integer productID) {
-		return productCustomClassificationDao.findCustomClassification(productID);
-	}
-}

+ 0 - 83
src/main/java/com/caimei/modules/product/service/ProductService.java

@@ -109,11 +109,6 @@ public class ProductService extends CrudService<ProductDao, Product> {
         super.delete(product);
         super.delete(product);
     }
     }
 
 
-    public List<ActType> getAllActType() {
-        return productDao.getAllActType();
-    }
-
-
     public List<Product> getSupplierProductList(Product product) {
     public List<Product> getSupplierProductList(Product product) {
         return productDao.getSupplierProductList(product);
         return productDao.getSupplierProductList(product);
     }
     }
@@ -148,14 +143,6 @@ public class ProductService extends CrudService<ProductDao, Product> {
         return productDao.insertGiftProudct(giftProduct);
         return productDao.insertGiftProudct(giftProduct);
     }
     }
 
 
-    public int insertProductPriceRecord(ProductPriceRecord productPriceRecord) {
-        return productDao.insertProductPriceRecord(productPriceRecord);
-    }
-
-//    @Transactional(readOnly = false)
-//    public void updateCRMFlag(String status, String[] ids) {
-//        productDao.updateCRMFlag(status, ids);
-//    }
 
 
     @Transactional(readOnly = false)
     @Transactional(readOnly = false)
     public void updatePostFlag(String status, String[] ids) {
     public void updatePostFlag(String status, String[] ids) {
@@ -178,71 +165,12 @@ public class ProductService extends CrudService<ProductDao, Product> {
         return productDao.getProductTypeNameAndID(tinyTypeID);
         return productDao.getProductTypeNameAndID(tinyTypeID);
     }
     }
 
 
-    public JsonModel editProductCustomClassification(Integer productID, String[] ids) throws Exception {
-        try {
-            productDao.deleteCustomClassification(productID);
-            for (String id : ids) {
-                Map<String, Object> map = productDao.getProductTypeNameAndID(Integer.valueOf(id));
-                ProductCustomClassification obj = new ProductCustomClassification();
-                obj.setProductID(productID);
-                obj.setBigTypeID(Integer.valueOf(map.get("bigTypeID").toString()));
-                obj.setSmallTypeID(Integer.valueOf(map.get("smallTypeID").toString()));
-                obj.setTinyTypeID(Integer.valueOf(map.get("tinyTypeID").toString()));
-                obj.setCreateDate(new Date());
-                obj.setUpdateDate(new Date());
-                productDao.insertCustomClassification(obj);
-            }
-            return JsonModel.newInstance().success();
-        } catch (Exception e) {
-            throw e;
-        }
-    }
-
-    public Page<Product> relatedProductList(Page<Product> page, Product product) {
-        product.setPage(page);
-        page.setList(productDao.relatedProductList(product));
-        return page;
-    }
-
-    public void deleteProductCustomClassification(Integer productID, Integer tinyTypeID) throws Exception {
-        try {
-            productDao.deleteProductCustomClassification(productID, tinyTypeID);
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw e;
-        }
-
-    }
-
-    public Page<Product> toAddProductCustomClassificationList(Page<Product> page, Product product) {
-        product.setPage(page);
-        page.setList(productDao.toAddProductCustomClassificationList(product));
-        for (Product p : page.getList()) {
-            Map<String, Object> map = productDao.getProductTypeNameAndID(p.getTinyTypeID());
-            String s = map.get("bigTypeName").toString() + "-" + map.get("smallTypeName").toString() + map.get("tinyTypeName").toString();
-            p.setDefaultTypeName(s);
-        }
-        return page;
-    }
-
     public Page<Product> toAddProductList(Page<Product> page, Product product) {
     public Page<Product> toAddProductList(Page<Product> page, Product product) {
         product.setPage(page);
         product.setPage(page);
         page.setList(productDao.toAddProductList(product));
         page.setList(productDao.toAddProductList(product));
         return page;
         return page;
     }
     }
 
 
-    public void addProductCustomClassification(Integer productID, Integer tinyTypeID) {
-        Map<String, Object> map = productDao.getProductTypeNameAndID(tinyTypeID);
-        ProductCustomClassification obj = new ProductCustomClassification();
-        obj.setProductID(productID);
-        obj.setBigTypeID(Integer.valueOf(map.get("bigTypeID").toString()));
-        obj.setSmallTypeID(Integer.valueOf(map.get("smallTypeID").toString()));
-        obj.setTinyTypeID(Integer.valueOf(map.get("tinyTypeID").toString()));
-        obj.setCreateDate(new Date());
-        obj.setUpdateDate(new Date());
-        productDao.insertCustomClassification(obj);
-    }
-
     public void addProduct(Integer productID, Integer tinyTypeID) {
     public void addProduct(Integer productID, Integer tinyTypeID) {
         productDao.insertAddProduct(productID, tinyTypeID);
         productDao.insertAddProduct(productID, tinyTypeID);
     }
     }
@@ -256,17 +184,6 @@ public class ProductService extends CrudService<ProductDao, Product> {
         productDao.deleteProduct(id, DateTime);
         productDao.deleteProduct(id, DateTime);
     }
     }
 
 
-    public List<ProductCustomClassification> getProductTypes(Integer productID) {
-        return productDao.getProductTypes(productID);
-    }
-
-    public Page<Product> findRecommendActivityListPage(Page<Product> productPage, Product product) {
-        product.setPage(productPage);
-        List<Product> list = productDao.findRecommendActivityListPage(product);
-        return productPage.setList(list);
-
-    }
-
     public List<ProductBigType> findBigTypeList(ProductBigType productBigType) {
     public List<ProductBigType> findBigTypeList(ProductBigType productBigType) {
         return productDao.findBigTypeList(productBigType);
         return productDao.findBigTypeList(productBigType);
     }
     }

+ 0 - 27
src/main/java/com/caimei/modules/product/web/ProductActController.java

@@ -2,7 +2,6 @@ package com.caimei.modules.product.web;
 
 
 import com.caimei.modules.product.dao.ProductDao;
 import com.caimei.modules.product.dao.ProductDao;
 import com.caimei.modules.product.entity.Product;
 import com.caimei.modules.product.entity.Product;
-import com.caimei.modules.product.entity.ProductCustomClassification;
 import com.caimei.modules.product.service.*;
 import com.caimei.modules.product.service.*;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.AppUtils;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
@@ -41,8 +40,6 @@ public class ProductActController extends BaseController {
     private ProductService productService;
     private ProductService productService;
     @Autowired
     @Autowired
     private ProductDao productDao;
     private ProductDao productDao;
-    @Resource
-    private ProductCustomClassificationService productCustomClassificationService;
 
 
     @ModelAttribute
     @ModelAttribute
     public Product get(@RequestParam(required = false) String id) {
     public Product get(@RequestParam(required = false) String id) {
@@ -63,31 +60,7 @@ public class ProductActController extends BaseController {
         List<Product> list = page.getList();
         List<Product> list = page.getList();
         if(CollectionUtils.isNotEmpty(list)){
         if(CollectionUtils.isNotEmpty(list)){
             for(Product p :list){
             for(Product p :list){
-//                String actStatus= p.getActStatus();
-//                if(null != actStatus && StringUtils.equals("1",actStatus)){//活动商品
-//                    Date beginTime = p.getBeginTime();
-//                    Date endTime = p.getEndTime();
-//                    Date now = new Date();
-//                    //活动状态 1:即将开始 2:进行中 3:已结束
-//                    if(null != beginTime && null != endTime && (endTime.getTime() > beginTime.getTime() ) && (beginTime.getTime() > now.getTime())){//活动开始时间小于当前时间
-//                        // 即将开始
-//                        p.setActStatus("1");
-//                    }
-//                    if(null != beginTime && null != endTime && (now.getTime() > endTime.getTime()) && (endTime.getTime() > beginTime.getTime())) {//活动结束时间小于结束时间
-//                        // 已结束
-//                        p.setActStatus("3");
-//                    }
-//                    if(null != beginTime && null != endTime && (endTime.getTime() > now.getTime() ) && (beginTime.getTime() < now.getTime())) { //当前时间小于活动开始,小于活动结束时间
-//                        //进行中
-//                        p.setActStatus("2");
-//                    }
-//                }
                 p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
                 p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
-                //自定义分类
-                List<ProductCustomClassification> typeList = productCustomClassificationService.findCustomClassification(Integer.valueOf(p.getId()));
-                if (CollectionUtils.isNotEmpty(typeList)) {
-                    p.setCustomClass(true); // 有自定义分类
-                }
             }
             }
         }
         }
         model.addAttribute("page", page);
         model.addAttribute("page", page);

+ 2 - 785
src/main/java/com/caimei/modules/product/web/ProductController.java

@@ -66,16 +66,8 @@ public class ProductController extends BaseController{
     private BuyerProductHistoryPriceService buyerProductHistoryPriceService;
     private BuyerProductHistoryPriceService buyerProductHistoryPriceService;
     @Autowired
     @Autowired
     private ProductDao productDao;
     private ProductDao productDao;
-    @Resource
-    private CmProductRecommendService cmProductRecommendService;
     @Autowired
     @Autowired
     private CmUserOrganizeService cmUserOrganizeService;
     private CmUserOrganizeService cmUserOrganizeService;
-    @Resource
-    private ProductCustomClassificationService productCustomClassificationService;
-	@Autowired
-	private AreaService areaService;
-    @Autowired
-    private CmMallProductLadderPriceDao cmMallProductLadderPriceDao;
 
 
     @ModelAttribute
     @ModelAttribute
     public Product get(@RequestParam(required=false) String id) {
     public Product get(@RequestParam(required=false) String id) {
@@ -102,9 +94,7 @@ public class ProductController extends BaseController{
     public String productPageMulti(Product product,String type,HttpServletRequest request, HttpServletResponse response, Model model) {
     public String productPageMulti(Product product,String type,HttpServletRequest request, HttpServletResponse response, Model model) {
         if(StringUtils.equals(type, "homeProduct")){
         if(StringUtils.equals(type, "homeProduct")){
             product.getSqlMap().put("dsf", " AND productID NOT IN (SELECT productID FROM crm_home_product b WHERE b.productId=a.productID) ");
             product.getSqlMap().put("dsf", " AND productID NOT IN (SELECT productID FROM crm_home_product b WHERE b.productId=a.productID) ");
-        }/*else if(StringUtils.equals(type, "smallType")){
-            model.addAttribute("crmSmallTypeId", product.getCrmSmallTypeId());
-        }*/
+        }
         Page<Product> page = productService.findPage(new Page<Product>(request, response), product);
         Page<Product> page = productService.findPage(new Page<Product>(request, response), product);
         model.addAttribute("type", type);
         model.addAttribute("type", type);
         model.addAttribute("page", page);
         model.addAttribute("page", page);
@@ -118,30 +108,7 @@ public class ProductController extends BaseController{
         List<Product> list = page.getList();
         List<Product> list = page.getList();
         if(CollectionUtils.isNotEmpty(list)){
         if(CollectionUtils.isNotEmpty(list)){
             for(Product p :list){
             for(Product p :list){
-                String actFlag = p.getActFlag();
-//                if(null != actFlag && StringUtils.equals("1",actFlag)){//活动商品
-//                    Date beginTime = p.getBeginTime();
-//                    Date endTime = p.getEndTime();
-//                    Date now = new Date();
-//                    //活动状态 1:即将开始 2:进行中 3:已结束
-//                    if(null != beginTime && null != endTime && (endTime.getTime() > beginTime.getTime() ) && (beginTime.getTime() > now.getTime())){//活动开始时间小于当前时间
-//                        // 即将开始
-//                        p.setActStatus("1");
-//                    }
-//                    if(null != beginTime && null != endTime && (now.getTime() > endTime.getTime()) && (endTime.getTime() > beginTime.getTime())) {//活动结束时间小于结束时间
-//                        // 已结束
-//                        p.setActStatus("3");
-//                    }
-//                    if(null != beginTime && null != endTime && (endTime.getTime() > now.getTime() ) && (beginTime.getTime() < now.getTime())) { //当前时间小于活动开始,小于活动结束时间
-//                        //进行中
-//                        p.setActStatus("2");
-//                    }
-//                }
                 p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
                 p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
-                //自定义分类
-                List<ProductCustomClassification> typeList = productCustomClassificationService.findCustomClassification(Integer.valueOf(p.getId()));
-                if (CollectionUtils.isNotEmpty(typeList))
-                    p.setCustomClass(true); // 有自定义分类
             }
             }
         }
         }
 
 
@@ -149,134 +116,6 @@ public class ProductController extends BaseController{
         return "modules/product/productList";
         return "modules/product/productList";
     }
     }
 
 
-/*    @RequiresPermissions("product:product:view")
-    @RequestMapping("activity/list")
-    public String actlist(Product product, HttpServletRequest request, HttpServletResponse response, Model model) {
-        Page<Product> page = productService.findActListPage(new Page<Product>(request, response), product);
-        List<Product> list = page.getList();
-        if(CollectionUtils.isNotEmpty(list)){
-            for(Product p :list){
-                String actStatus= p.getActStatus();
-                if(null != actStatus && StringUtils.equals("1",actStatus)){//活动商品
-                    Date beginTime = p.getBeginTime();
-                    Date endTime = p.getEndTime();
-                    Date now = new Date();
-                    //活动状态 1:即将开始 2:进行中 3:已结束
-                    if(null != beginTime && null != endTime && (endTime.getTime() > beginTime.getTime() ) && (beginTime.getTime() > now.getTime())){//活动开始时间小于当前时间
-                        // 即将开始
-                        p.setActStatus("1");
-                    }
-                    if(null != beginTime && null != endTime && (now.getTime() > endTime.getTime()) && (endTime.getTime() > beginTime.getTime())) {//活动结束时间小于结束时间
-                        // 已结束
-                        p.setActStatus("3");
-                    }
-                    if(null != beginTime && null != endTime && (endTime.getTime() > now.getTime() ) && (beginTime.getTime() < now.getTime())) { //当前时间小于活动开始,小于活动结束时间
-                        //进行中
-                        p.setActStatus("2");
-                    }
-                }
-                p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
-                //自定义分类
-                List<ProductCustomClassification> typeList = productCustomClassificationService.findCustomClassification(Integer.valueOf(p.getId()));
-                if (CollectionUtils.isNotEmpty(typeList)) {
-                    p.setCustomClass(true); // 有自定义分类
-                }
-            }
-        }
-        model.addAttribute("page", page);
-        return "modules/product/actList";
-    }
-
-    @RequiresPermissions("product:product:view")
-    @RequestMapping("activity/addPage")
-    public String addActPage(Product product, Model model) {
-        model.addAttribute("product", product);
-        return "modules/product/addActPage";
-    }
-
-    @RequestMapping(value = "activity/toAdd")
-    public String toAddProduct3(Product product, Page page, Model model, HttpServletRequest request, HttpServletResponse response) {
-        page = productService.findPage(new Page<Product>(request, response), product);
-        model.addAttribute("page", page);
-        return "modules/product/actSelectProduct";
-    }
-
-    @ResponseBody
-    @RequestMapping(value = "activity/saveTemp")
-    public Map<String, Object> saveTemp() {
-        Map<String, Object> map = Maps.newLinkedHashMap();
-        map.put("success", true);
-        map.put("msg", "添加成功");
-        return map;
-    }
-
-
-    @RequiresPermissions("product:product:view")
-    @RequestMapping("activity/saveAdd")
-    public String addActProduct(Product product){
-        try {
-            Product actProduct = new Product();
-            actProduct.setId(product.getId());
-            actProduct.setProductID(product.getProductID());
-            actProduct.setActStatus("1");
-            actProduct.setActPrice1(product.getActPrice1());
-            actProduct.setBeginTime(product.getBeginTime());
-            actProduct.setEndTime(product.getEndTime());
-            productDao.updateActive(actProduct);
-            return "redirect:"+ Global.getAdminPath()+"/product/activity/list";
-        } catch (Exception e) {
-            logger.debug(e.toString(), e);
-            return "redirect:"+ Global.getAdminPath()+"/product/activity/addPage";
-        }
-    }
-
-    @RequiresPermissions("product:product:view")
-    @RequestMapping("activity/delete")
-    public  String addActProduct(Integer id){
-        try {
-            Product actProduct = new Product();
-            actProduct.setId(id.toString());
-            actProduct.setProductID(id);
-            actProduct.setActStatus("0");
-            *//*actProduct.setActPrice1(null);
-            actProduct.setBeginTime(null);
-            actProduct.setEndTime(null);*//*
-            productDao.updateActive(actProduct);
-        } catch (Exception e) {
-            logger.debug(e.toString(), e);
-        }
-        return "redirect:"+ Global.getAdminPath()+"/product/activity/list";
-    }*/
-
-    /*@ResponseBody
-    @RequestMapping(value = {"/addPreferred"})
-    public Map<String, Object> addPreferred(Integer productId, Integer preferredFlag) {
-        Map<String, Object> map = Maps.newLinkedHashMap();
-        try {
-            Product product = new Product();
-            product.setProductID(productId);
-            product.setPreferredFlag(preferredFlag);
-            productService.updatePreferred(product);
-            map.put("success", true);
-            map.put("msg", "操作成功");
-        } catch (Exception e) {
-            logger.debug(e.toString(), e);
-            map.put("success", false);
-            map.put("msg", "操作失败");
-        }
-        return map;
-    }*/
-
-    /*@RequestMapping(value = {"/preferredPage"})
-    public String preferredPage(CmPageModules cmPageModules, Model model) {
-        CmPageModules modules =  cmUserOrganizeService.getCmPageModulesInfoByOrganizeID(cmPageModules.getOrganizeID(), null);
-        //获取组织列表
-        List<CmUserOrganize> cmUserOrganizeList = cmUserOrganizeService.findList(new CmUserOrganize());
-        model.addAttribute("cmUserOrganizeList", cmUserOrganizeList);
-        model.addAttribute("cmPageModules", modules);
-        return "modules/applets/setHomePage";
-    }*/
-
     @RequestMapping(value = "saveUserOrganizeModules")
     @RequestMapping(value = "saveUserOrganizeModules")
     public String saveUserOrganizeModules(CmPageModules cmPageModules, Model model, HttpServletRequest request, HttpServletResponse response) {
     public String saveUserOrganizeModules(CmPageModules cmPageModules, Model model, HttpServletRequest request, HttpServletResponse response) {
         Integer organizeID = cmPageModules.getOrganizeID();
         Integer organizeID = cmPageModules.getOrganizeID();
@@ -322,38 +161,6 @@ public class ProductController extends BaseController{
         return "redirect:"+ Global.getAdminPath()+"/product/new/list";
         return "redirect:"+ Global.getAdminPath()+"/product/new/list";
     }
     }
 
 
-/*    @RequiresPermissions("product:product:view")
-    @RequestMapping(value = "productEdit")
-    public String editProduct(Product product, Model model) {
-        if( null != product.getProductID()){
-            ProductDetailInfo productDetailInfo = productService.getProductDetailInfo(product.getProductID());
-            List<ProductLadderPrice> ladderPriceList = productService.findLadderPrice(product.getProductID());
-            if (null != productDetailInfo) {
-                product.setDetailInfo(productDetailInfo.getDetailInfo());
-                product.setServiceInfo(productDetailInfo.getServiceInfo());
-                product.setOrderInfo(productDetailInfo.getOrderInfo());
-            }
-            product.setLadderPriceList(ladderPriceList);
-        }
-        List<CmBrand> brandList = productService.findBrandList();
-        Map<String, Object> classify = productService.findClassify(1);
-        List<Province> provinceList = areaService.loadProvince();
-        model.addAttribute("brandList", brandList);
-        model.addAttribute("classify", classify);
-		model.addAttribute("provinceList", provinceList);
-        model.addAttribute("product", product);
-        return "modules/product/productEdit";
-    }*/
-
-    /*@RequiresPermissions("product:product:edit")
-    @RequestMapping(value = "productSave")
-    public String productSave(Product product, ProductDetailInfo productDetailInfo, RedirectAttributes redirectAttributes) {
-    	productDetailInfo.setProductID(product.getProductID());
-        productService.saveProduct(product, productDetailInfo);
-        addMessage(redirectAttributes, "保存商品成功");
-        return "redirect:" + Global.getAdminPath() + "/product/list/";
-    }*/
-
     @RequiresPermissions("product:product:view")
     @RequiresPermissions("product:product:view")
     @RequestMapping(value = "form")
     @RequestMapping(value = "form")
     public String form(Product product, Model model) {
     public String form(Product product, Model model) {
@@ -731,30 +538,6 @@ public class ProductController extends BaseController{
         return "modules/bulkpurchase/productRedPriceList";
         return "modules/bulkpurchase/productRedPriceList";
     }
     }
 
 
-    /**
-     * 商品参加活动
-     * @param product
-     * @param model
-     * @return
-     */
-    @RequiresPermissions("product:product:view")
-    @RequestMapping(value = "joinAct")
-    public String joinAct(Product product, Model model) {
-        model.addAttribute("product", product);
-//        Date beginTime = product.getBeginTime();
-//        Date endTime = product.getEndTime();
-//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-//        if(null != beginTime && null != endTime){
-//            String beginTimeStr = sdf.format(beginTime);
-//            String endTimeStr = sdf.format(endTime);
-//            product.setBeginTimeStr(beginTimeStr);
-//            product.setEndTimeStr(endTimeStr);
-//        }
-        List<ActType> actTypeList = productService.getAllActType();
-        model.addAttribute("actTypeList", actTypeList);
-        return "modules/product/productJoinActForm";
-    }
-
     /**
     /**
      * 取消商品参加活动	 * @param product
      * 取消商品参加活动	 * @param product
      * @return
      * @return
@@ -984,338 +767,6 @@ public class ProductController extends BaseController{
         return jsonModel;
         return jsonModel;
     }
     }
 
 
-
-//    /**
-//     * 参加{买赠,买送,满减}活动
-//     * @param param 包含(活动类型:actType(1:满赠、2:买赠、3满减、4表示团购、5:热卖)、fullGiftProductId(参与活动商品ID))
-//     *              开始时间beginTime  结束时间endTime 市1:满赠、2:买赠、3满减场价normalPrice 活动普通价actPrice0   活动会员价actPrice1  满金额fullAmount   减金额reduceAmount
-//     *              满数量fullNumber  赠送商品giftProducts(格式[{"id":1,"num":80},{"id":2,"num":100}])
-//     * @return
-//     */
-//    @ResponseBody
-//    @RequestMapping("joinActivity")
-//    public JsonModel joinActivity(String param) {
-//        JsonModel jsonModel=new JsonModel();
-//        if (com.caimei.utils.StringUtils.isBlank(param)) {
-//            jsonModel.error(CodeMsg.PARAMETER_NULL_ERRO.getCode(), CodeMsg.PARAMETER_NULL_ERRO.getMsg());
-//            return jsonModel;
-//        }
-//        Map<String, Object> map = Maps.newHashMap();
-//        try {
-//            map = (Map<String, Object>) JsonMapper.getInstance().fromJsonString(param, Map.class);
-//            if (MapUtils.isEmpty(map)) {
-//                jsonModel.error("参数不能为空");
-//                return jsonModel;
-//            }
-//            if(null==map.get("actType")|| StringUtils.isEmpty(String.valueOf(map.get("actType")))){
-//                jsonModel.error("活动类型 参数为空");
-//                return jsonModel;
-//            }
-//            if(null==map.get("fullGiftProductId")|| StringUtils.isEmpty(String.valueOf(map.get("fullGiftProductId")))){
-//                jsonModel.error("商品ID参数为空");
-//                return jsonModel;
-//            }
-//            if(null==map.get("beginTime") || StringUtils.isEmpty(String.valueOf(map.get("beginTime")))){
-//                jsonModel.error("开始时间参数为空");
-//                return jsonModel;
-//            }
-//            if(null==map.get("endTime")|| StringUtils.isEmpty(String.valueOf(map.get("endTime")))){
-//                jsonModel.error("结束时间参数为空");
-//                return jsonModel;
-//            }
-//            if(null==map.get("normalPrice")|| StringUtils.isEmpty(String.valueOf(map.get("normalPrice")))){
-//                jsonModel.error("市场价参数为空");
-//                return jsonModel;
-//            }
-//            if(null==map.get("actPrice0")|| StringUtils.isEmpty(String.valueOf(map.get("actPrice0")))){
-//                jsonModel.error("普通价参数为空");
-//                return jsonModel;
-//            }
-//            if(null==map.get("actPrice1") || StringUtils.isEmpty(String.valueOf(map.get("actPrice1")))){
-//                jsonModel.error("会员价参数为空");
-//                return jsonModel;
-//            }
-//            Integer actType = (Integer)map.get("actType");
-//            Integer fullGiftProductId = Integer.parseInt(map.get("fullGiftProductId").toString());
-//
-//            SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
-//            String start = map.get("beginTime") +" 00:00:00";
-//            String end = map.get("endTime") +" 23:59:59";
-//            Date beginTime=sdf.parse(start);
-//            Date endTime=sdf.parse(end);
-//            Float normalPrice = Float.parseFloat(map.get("normalPrice").toString());
-//            Float actPrice0 = Float.parseFloat(map.get("actPrice0").toString());
-//            Float actPrice1 = Float.parseFloat(map.get("actPrice1").toString());
-//
-//            Product productInfo = productService.get(String.valueOf(fullGiftProductId));
-//            if("1".equals(actType.toString())){//1满赠
-//                Product product = productInfo;
-//                if(null==map.get("fullAmount") || StringUtils.isEmpty(String.valueOf(map.get("fullAmount")))){
-//                    jsonModel.error("满含金额为空");
-//                    return jsonModel;
-//                }
-////                Float fullAmount = Float.parseFloat(map.get("fullAmount").toString());
-////                product.setActFullGiftAmount(fullAmount);
-//                //保存商品参加活动信息
-//                saveJoinActivity(product,productInfo,actType,beginTime,endTime,normalPrice,actPrice0,actPrice1,fullGiftProductId);
-//                //保存赠送商品信息
-//                if (null == map.get("giftProducts") || StringUtils.isEmpty(String.valueOf(map.get("giftProducts")))) {
-//                    jsonModel.error("赠送商品不能为空");
-//                    return jsonModel;
-//                }
-//                List<Map<String,Object>> products = (List<Map<String, Object>>) map.get("giftProducts");//需要赠送的商品
-//                for (Map<String,Object> m:products) {
-//                    Integer giftProductId = Integer.parseInt(m.get("id").toString());
-//                    Integer giftProductNum = Integer.parseInt(m.get("num").toString());
-//                    jsonModel = savejoinProductGift(String.valueOf(actType), fullGiftProductId, giftProductId, giftProductNum);
-//                    if("1".equals(jsonModel.getErrcode())){
-//                        //存在异常
-//                        return jsonModel;
-//                    }
-//                }
-//            }else if("2".equals(actType.toString())){//2买赠
-//                Product product = productInfo;;
-//                if(null==map.get("fullNumber")  || StringUtils.isEmpty(String.valueOf(map.get("fullNumber")))){
-//                    jsonModel.error("满送数量为空");
-//                    return jsonModel;
-//                }
-//                Integer fullNumber = Integer.parseInt(map.get("fullNumber").toString());
-//                product.setActBuyGiftNum(fullNumber);
-//                //保存商品参加活动信息
-//                saveJoinActivity(product,productInfo,actType,beginTime,endTime,normalPrice,actPrice0,actPrice1,fullGiftProductId);
-//                //保存赠送商品信息
-//                if (null == map.get("giftProducts") || StringUtils.isEmpty(String.valueOf(map.get("giftProducts")))) {
-//                    jsonModel.error("赠送商品不能为空");
-//                    return jsonModel;
-//                }
-//                List<Map<String,Object>> products = (List<Map<String, Object>>) map.get("giftProducts");//需要赠送的商品
-//                for (Map<String,Object> m:products) {
-//                    Integer giftProductId = Integer.parseInt(m.get("id").toString());
-//                    Integer giftProductNum = Integer.parseInt(m.get("num").toString());
-//                    jsonModel = savejoinProductGift(String.valueOf(actType), fullGiftProductId, giftProductId, giftProductNum);
-//                    if("1".equals(jsonModel.getErrcode())){
-//                        //存在异常
-//                        return jsonModel;
-//                    }
-//                }
-//            }else if("3".equals(actType.toString())){//3满减
-//                if(null==map.get("reduceAmount")|| StringUtils.isEmpty(String.valueOf(map.get("reduceAmount")))){
-//                    jsonModel.error("满减金额为空");
-//                    return jsonModel;
-//                }
-//                if(null==map.get("fullAmount")|| StringUtils.isEmpty(String.valueOf(map.get("fullAmount")))){
-//                    jsonModel.error("满减金额为空");
-//                    return jsonModel;
-//                }
-//                Float reduceAmount = Float.parseFloat(map.get("reduceAmount").toString());
-//                Float fullAmount = Float.parseFloat(map.get("fullAmount").toString());
-//                Product product = productInfo;
-//                product.setActFullReduceAmount(fullAmount);//满减金额(达到该金额后可享直减)--满减
-//                product.setActReduceAmount(reduceAmount);//购买直减金额(达到满金额后)
-//                //保存商品参加活动信息
-//                saveJoinActivity(product,productInfo,actType,beginTime,endTime,normalPrice,actPrice0,actPrice1,fullGiftProductId);
-//            }else if("4".equals(actType.toString())){//表示团购
-//                Product product = productInfo;
-//                //保存商品参加活动信息
-//                saveJoinActivity(product,productInfo,actType,beginTime,endTime,normalPrice,actPrice0,actPrice1,fullGiftProductId);
-//
-//
-//            }else if("5".equals(actType.toString())){//表示热卖
-//                Product product = productInfo;
-//                //保存商品参加活动信息
-//                saveJoinActivity(product,productInfo,actType,beginTime,endTime,normalPrice,actPrice0,actPrice1,fullGiftProductId);
-//
-//            }else{
-//                jsonModel.error("活动类型错误");
-//                return jsonModel;
-//            }
-//            jsonModel.success();
-//        }catch (Exception e){
-//            jsonModel.error(CodeMsg.COMMON_ERRO.getCode(),CodeMsg.COMMON_ERRO.getMsg());
-//            logger.error(e.toString(),e);
-//        }
-//        return jsonModel;
-//    }
-//
-
-//    /**
-//     * 满减、满赠、买赠 通用方法
-//     * @param product
-//     * @param productInfo
-//     * @param actType 1:满赠、2:买赠、3满减、4团购、5热卖
-//     * @param beginTime
-//     * @param endTime
-//     * @param normalPrice
-//     * @param actPrice0
-//     * @param actPrice1
-//     * @param fullGiftProductId
-//     */
-//    public void saveJoinActivity(Product product, Product productInfo, Integer actType, Date beginTime, Date endTime, Float normalPrice, Float actPrice0, Float actPrice1, Integer fullGiftProductId){
-//        //活动类型(1000热卖  1001团购  1002分期  1003满减   1004满增  1005买增)
-//        if("1".equals(actType.toString())){
-//            product.setActType("1004");
-//        }
-//        if("2".equals(actType.toString())){
-//            product.setActType("1005");
-//        }
-//        if("3".equals(actType.toString())){
-//            product.setActType("1003");
-//        }
-//        if("4".equals(actType.toString())){
-//            product.setActType("1001");
-//        }
-//        if("5".equals(actType.toString())){
-//            product.setActType("1000");
-//        }
-//        product.setActFlag("1");//是否活动商品:1是,空或0不是
-////		product.setValidFlag(ProductStatus.WAIT_CHECK.getCode());
-//        product.setBeginTime(beginTime);
-//        product.setEndTime(endTime);
-//        product.setNormalPrice(normalPrice);
-//        product.setActPrice0(actPrice0);
-//        product.setActPrice1(actPrice1);
-//        product.setUpdateTime(DateUtils.getDate());
-//
-//        //保存商品价格修改记录
-//        ProductPriceRecord record = new ProductPriceRecord();
-//        if(null != productInfo && actPrice0.equals(productInfo.getPrice0()) && actPrice1.equals(productInfo.getPrice1())) {
-//            record = null;
-//        } else {
-//            Product p = productService.get(String.valueOf(fullGiftProductId));
-//            record.setPrice0(actPrice0);
-//            record.setPrice1(actPrice1);
-//            record.setShopID(productInfo.getShopID());
-//            record.setUpdateTime(DateUtils.getDate());
-//            record.setProductID(fullGiftProductId);
-//        }
-//        //保存加入购物车
-//        productService.save(product);
-//        if(record != null) {
-//            productService.insertProductPriceRecord(record);
-//        }
-//    }
-
-
-//    /**
-//     * 保存赠送商品公用方法
-//     * @param actType actType  活动类型,1:满赠、2:买赠
-//     * @param fullGiftProductId 参与满、买赠商品ID
-//     * @param giftProductId  赠送商品ID
-//     * @Param giftProductNum 赠送商品数量
-//     * @return
-//     */
-//    public JsonModel savejoinProductGift(String actType,Integer fullGiftProductId,Integer giftProductId,Integer giftProductNum) {
-//        JsonModel jsonModel=new JsonModel();
-//        try{
-//            Product productInfo = productService.get(String.valueOf(giftProductId));
-//            GiftProduct giftProduct = new GiftProduct();//需要通过满赠、活动类型、赠送商品ID来唯一确认(标记删除也需要)
-//            giftProduct.setActType(actType);
-//            giftProduct.setFullGiftProductId(fullGiftProductId);
-//            giftProduct.setGiftProductId(giftProductId);
-//            List<GiftProduct> giftProductInfo = productService.getGiftProductInfo(giftProduct);
-//            if(CollectionUtils.isNotEmpty(giftProductInfo) && giftProductInfo.size() == 1){
-//                //执行更新
-//                giftProduct = giftProductInfo.get(0);
-//                if(null != productInfo){
-//                    giftProduct.setProductName(productInfo.getName());
-//                }
-//
-//                giftProduct.setGiftProductNum(giftProductNum);
-//                giftProduct.setUpdateBy(UserUtils.getUser());
-//                giftProduct.setUpdateDate(new Date());
-//                giftProduct.setDelFlag("0");//存在更新标记删除的,复用删除数据
-//                //保存数据
-//                productService.updateGiftProudct(giftProduct);
-//
-//            }else if(CollectionUtils.isEmpty(giftProductInfo)){
-//                //执行插入
-//                if(null != productInfo){
-//                    giftProduct.setProductName(productInfo.getName());
-//                }
-//                giftProduct.setGiftProductNum(giftProductNum);
-//                giftProduct.setCreateBy(UserUtils.getUser());
-//                giftProduct.setCreateDate(new Date());
-//                giftProduct.setUpdateBy(UserUtils.getUser());
-//                giftProduct.setUpdateDate(new Date());
-//                giftProduct.setDelFlag("0");
-//                //保存数据
-//                productService.insertGiftProudct(giftProduct);
-//            }else{
-//                jsonModel.error("赠品信息异常");
-//                return jsonModel;
-//            }
-//            jsonModel.success();
-//        }catch (Exception e){
-//            jsonModel.error(CodeMsg.COMMON_ERRO.getCode(),CodeMsg.COMMON_ERRO.getMsg());
-//            logger.error(e.toString(),e);
-//        }
-//        return jsonModel;
-//    }
-
-
-//    /**
-//     * 移除赠送商品
-//     * @param actType  活动类型,1:满赠、2:买赠
-//     * @param fullGiftProductId  满赠商品的ID
-//     * @param giftProductId 赠送商品的ID
-//     * @return
-//     */
-//    @ResponseBody
-//    @RequestMapping("joinActProductInfo")
-//    public JsonModel joinActProductInfo(String actType,Integer fullGiftProductId,Integer giftProductId) {
-//        JsonModel jsonModel=new JsonModel();
-//        com.thinkgem.jeesite.modules.sys.entity.User user = UserUtils.getUser();
-//        try{
-//            Product productInfo = productService.get(String.valueOf(giftProductId));
-//            GiftProduct giftProduct = new GiftProduct();//需要通过满赠、活动类型、赠送商品ID来唯一确认(标记删除也需要)
-//            giftProduct.setActType(actType);
-//            giftProduct.setFullGiftProductId(fullGiftProductId);
-//            giftProduct.setGiftProductId(giftProductId);
-//            List<GiftProduct> giftProductInfo = productService.getGiftProductInfo(giftProduct);
-//            if(CollectionUtils.isNotEmpty(giftProductInfo) && giftProductInfo.size() == 1){
-//                //执行更新
-//                giftProduct = giftProductInfo.get(0);
-//                giftProduct.setUpdateBy(UserUtils.getUser());
-//                giftProduct.setUpdateDate(new Date());
-//                giftProduct.setDelFlag(DateUtils.getDateTime());//标记暂时移除
-//                //保存数据
-//                productService.updateGiftProudct(giftProduct);
-//            }
-//            jsonModel.success();
-//        }catch (Exception e){
-//            jsonModel.error(CodeMsg.COMMON_ERRO.getCode(),CodeMsg.COMMON_ERRO.getMsg());
-//            logger.error(e.toString(),e);
-//        }
-//        return jsonModel;
-//    }
-
-//    /**
-//     * 1开启 0 不启用
-//     * @param enabledStatus
-//     * @param ids
-//     * @param supplierIDs
-//     * @param request
-//     * @param response
-//     * @return
-//     */
-//    @RequiresPermissions("product:product:edit")
-//    @ResponseBody
-//    @RequestMapping(value="updateCRMFlag")
-//    public Map<String, Object> updateCRMFlag(String enabledStatus, String[] ids, String [] supplierIDs, HttpServletRequest request, HttpServletResponse response){
-//        Map<String, Object> map = Maps.newLinkedHashMap();
-//        try {
-//            productService.updateCRMFlag(enabledStatus,ids);
-//            map.put("success",true);
-//            map.put("msg", "修改成功");
-//        } catch (Exception e) {
-//            logger.debug(e.toString(),e);
-//            map.put("success",false);
-//            map.put("msg", "修改失败");
-//        }
-//        return map;
-//    }
-
-
     /**
     /**
      * 是否包邮 0包邮 1不包邮
      * 是否包邮 0包邮 1不包邮
      * @param enabledStatus
      * @param enabledStatus
@@ -1359,27 +810,6 @@ public class ProductController extends BaseController{
         return map;
         return map;
     }
     }
 
 
-
-    @ResponseBody
-    @RequestMapping(value="getBigTypeList")
-    public JsonModel getBigTypeList(Integer bigTypeID, Integer productID) {
-        JsonModel jsonModel = JsonModel.newInstance();
-        List<ProductBigType> data = productService.getBigTypeList(bigTypeID);
-        if (productID != null) {
-            List<ProductCustomClassification> types = productService.getProductTypes(productID);
-            for (ProductCustomClassification p : types) {
-                for (ProductBigType b : data) {
-                    if (p.getBigTypeID().intValue() == b.getBigTypeID()) {
-                        b.setCheck(true);
-                    }
-                }
-            }
-        }
-        return jsonModel.success(data);
-    }
-
-
-
     @ResponseBody
     @ResponseBody
     @RequestMapping(value="getProductTypeNameAndID")
     @RequestMapping(value="getProductTypeNameAndID")
     public JsonModel getProductTypeNameAndID(Integer tinyTypeID) {
     public JsonModel getProductTypeNameAndID(Integer tinyTypeID) {
@@ -1388,147 +818,11 @@ public class ProductController extends BaseController{
         return jsonModel.success(data);
         return jsonModel.success(data);
     }
     }
 
 
-    /** request params ====>  {id: productID, typeIDs : 1_2_3_4.....自定义分类不能超过5个}
-     * @param product 商品
-     * @param typeIDs  最小分类的 tinyID
-     * @return
-     */
-    @ResponseBody
-    @RequestMapping(value="editProductCustomClassification")
-    public JsonModel editProductCustomClassification(Product product, String typeIDs) {
-        logger.info("typeIDs: " + typeIDs);
-        JsonModel jsonModel = JsonModel.newInstance();
-        if (product.getId() == null)
-            return jsonModel.error("商品不存在");
-        if (StringUtils.isEmpty(typeIDs)) {
-            return jsonModel.error("分类信息异常");
-        }
-        String[] ids = typeIDs.split("_");
-        List<String> list = new ArrayList<>();
-        for (String s : ids) {
-            if (!list.contains(s) && !"".equals(s))
-                list.add(s);
-        }
-        ids = list.toArray(new String[list.size()]);
-        if (ids.length > 5) {
-            return jsonModel.error("自定义分类不能超过5个");
-        }
-        try {
-            jsonModel = productService.editProductCustomClassification(Integer.valueOf(product.getId()), ids);
-        } catch (Exception e){
-            jsonModel.error("数据异常");
-        }
-        return jsonModel;
-    }
-
-    @ResponseBody
-    @RequestMapping(value="getSmallTypeList")
-    public JsonModel getSmallTypeList(Integer bigTypeID, Integer smallTypeID, Integer productID) {
-        JsonModel jsonModel = JsonModel.newInstance();
-        List<ProductSmallType> data = productService.getSmallTypeList(bigTypeID, smallTypeID);
-        if (productID != null) {
-            List<ProductCustomClassification> types = productService.getProductTypes(productID);
-            for (ProductCustomClassification p : types) {
-                for (ProductSmallType b : data) {
-                    if (p.getSmallTypeID().intValue() == b.getSmallTypeID()) {
-                        b.setCheck(true);
-                    }
-                }
-            }
-        }
-        return jsonModel.success(data);
-    }
-
-    @ResponseBody
-    @RequestMapping(value="getTinyTypeList")
-    public JsonModel getTinyTypeList(Integer smallTypeID, Integer tinyTypeID, Integer productID) {
-        JsonModel jsonModel = JsonModel.newInstance();
-        List<ProducTinyType> data = productService.getTinyTypeList(smallTypeID, tinyTypeID);
-        if (productID != null) {
-            List<ProductCustomClassification> types = productService.getProductTypes(productID);
-            for (ProductCustomClassification p : types) {
-                for (ProducTinyType b : data) {
-                    if (p.getTinyTypeID().intValue() == b.getTinyTypeID()) {
-                        b.setCheck(true);
-                    }
-                }
-            }
-        }
-        return jsonModel.success(data);
-    }
-
-    /**
-     * 最小分类的相关商品
-     * @return
-     */
-    @RequestMapping(value="relatedProductList")
-    public String relatedProductList(Product product, HttpServletRequest request, HttpServletResponse response, Model model) {
-        Page<Product> page = productService.relatedProductList(new Page<Product>(request, response), product);
-        if(null!= page && null != page.getList()){
-            List<Product> list = page.getList();
-            for(Product p:list){
-                p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
-            }
-        }
-        model.addAttribute("page", page);
-        model.addAttribute("tinyTypeID", product.getTinyTypeID());
-        return "modules/product/relatedProductList";
-    }
-
-    /**
-     * 删除自定义分类  params productID tinyTypeID
-     * @return
-     */
-    @ResponseBody
-    @RequestMapping(value="deleteProductCustomClassification")
-    public JsonModel deleteProductCustomClassification(Integer productID, Integer tinyTypeID) {
-        JsonModel jsonModel = JsonModel.newInstance();
-        try{
-            productService.deleteProductCustomClassification(productID, tinyTypeID);
-            jsonModel.success();
-        } catch (Exception e){
-            jsonModel.error("数据异常");
-        }
-        return jsonModel;
-    }
-
-    /**
-     * 细分类下 添加自定义分类商品的商品选择列表
-     * @return
-     */
-    @ResponseBody
-    @RequestMapping(value="toAddProductCustomClassificationList")
-    public JsonModel toAddProductCustomClassificationList(Product product, Model model, HttpServletRequest request, HttpServletResponse response) {
-        JsonModel jsonModel = JsonModel.newInstance();
-        Page<Product> page = productService.toAddProductCustomClassificationList(new Page<Product>(request, response), product);
-        if(null!= page && null != page.getList()){
-            List<Product> list = page.getList();
-            for(Product p:list){
-                p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
-            }
-        }
-        return jsonModel.success(page);
-    }
-
-    /**
-     * 添加商品至自定义分类
-     * @param productID
-     * @param tinyTypeID
-     * @return
-     */
-    @RequestMapping(value="addProductCustomClassification")
-    public String addProductCustomClassification(Integer productID, Integer tinyTypeID, RedirectAttributes redirectAttributes) {
-        productService.addProductCustomClassification(productID, tinyTypeID);
-        addMessage(redirectAttributes, "保存商品信息成功");
-        return "redirect:"+ Global.getAdminPath()+"/product/relatedProductList?tinyTypeID="+tinyTypeID;
-    }
-
     @ResponseBody
     @ResponseBody
     @RequestMapping(value="getProductTypes")
     @RequestMapping(value="getProductTypes")
     public JsonModel getProductTypes(Integer productID) {
     public JsonModel getProductTypes(Integer productID) {
         JsonModel jsonModel = JsonModel.newInstance();
         JsonModel jsonModel = JsonModel.newInstance();
-        List<ProductCustomClassification> data = productService.getProductTypes(productID);
-        return jsonModel.success(data);
+        return jsonModel.success();
     }
     }
 
 
 
 
@@ -1562,83 +856,6 @@ public class ProductController extends BaseController{
         return  map;
         return  map;
     }
     }
 
 
-/*    *//**
-     * 相关商品推荐
-     * @return
-     *//*
-    @RequestMapping(value="productRecommend")
-    public String productRecommend(Integer productID, Integer bigTypeID, Integer smallTypeID, Integer tinyTypeID,
-                                   String productName, String shopName, String recommendType,
-                                   HttpServletRequest request, HttpServletResponse response, Model model) {
-        Product product = productService.get(String.valueOf(productID));
-        List<CmProductRecommend> recommendList;
-        int manualRecommend; //记录手动推荐时数据库中相关商品的数量
-        if ("1".equals(product.getRecommendType())) {
-            recommendList = productService.findProductRecommendList(productID);
-            manualRecommend = recommendList.size();
-        }  else {
-            recommendList = productService.findRecommendBySys(product);
-            manualRecommend = productService.findProductRecommendCount(productID);
-        }
-        List<CmProductRecommend> list = productService.findProductList(bigTypeID, smallTypeID,
-                tinyTypeID, productName, shopName);
-        for (CmProductRecommend l : list) {
-            l.setImg(AppUtils.getImageURL("product", l.getImg(), 0, ""));
-            for (CmProductRecommend cpr : recommendList) {
-                if (cpr.getRecommendProductID().intValue() == l.getProductID()) {
-                    l.setSort(cpr.getSort());
-                    l.setCheck(true);
-                    break;
-                }
-            }
-        }
-        for (CmProductRecommend cpr : recommendList) {
-            cpr.setImg(AppUtils.getImageURL("product", cpr.getImg(), 0, ""));
-        }
-        if (StringUtils.isEmpty(recommendType))
-            model.addAttribute("recommendType", product.getRecommendType());
-        else
-            model.addAttribute("recommendType", recommendType);
-        model.addAttribute("product", product);
-        model.addAttribute("recommendList", recommendList);
-        model.addAttribute("list", list);
-        model.addAttribute("bigTypeID", bigTypeID);
-        model.addAttribute("smallTypeID", smallTypeID);
-        model.addAttribute("tinyTypeID", tinyTypeID);
-        model.addAttribute("productName", productName);
-        model.addAttribute("shopName", shopName);
-        //最多只能添加15条相关商品
-        model.addAttribute("full", recommendList.size() >= 15 ? 1 : 0);
-        model.addAttribute("dbProductNum", manualRecommend);
-
-        return "/modules/product/recommendProductList";
-    }
-
-    *//**g
-     * 保存相关商品推荐
-     * @param params  [productID:sort, .....]
-     * @return
-     *//*
-    @RequestMapping(value="addProductRecommend")
-    public String addProductRecommend(String productID, String[] params, String recommendType) {
-        productService.updateRecommendType(productID, recommendType);
-        if (params != null) {
-            for (String base : params) {
-                cmProductRecommendService.addRecommendProduct(productID, base.split(":")[0], base.split(":")[1]);
-            }
-        }
-        return "redirect:"+Global.getAdminPath()+"/product/productRecommend/?productID=" + productID;
-    }
-
-    *//**
-     * 保存相关商品推荐
-     * @return
-     *//*
-    @RequestMapping(value="deleteProductRecommend")
-    public String deleteProductRecommend(String productID, String id) {
-        cmProductRecommendService.deleteProductRecommend(id);
-        return "redirect:"+Global.getAdminPath()+"/product/productRecommend/?productID=" + productID;
-    }*/
     /**
     /**
      * 获取产品推荐排序
      * 获取产品推荐排序
      */
      */

+ 0 - 80
src/main/java/com/caimei/modules/product/web/ProductCustomClassificationController.java

@@ -1,80 +0,0 @@
-package com.caimei.modules.product.web;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.servlet.mvc.support.RedirectAttributes;
-
-import com.thinkgem.jeesite.common.config.Global;
-import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.web.BaseController;
-import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.caimei.modules.product.entity.ProductCustomClassification;
-import com.caimei.modules.product.service.ProductCustomClassificationService;
-
-/**
- * 商品自定义分类Controller
- * @author lwt
- * @version 2018-11-19
- */
-@Controller
-@RequestMapping(value = "${adminPath}/product/productCustomClassification")
-public class ProductCustomClassificationController extends BaseController {
-
-	@Autowired
-	private ProductCustomClassificationService productCustomClassificationService;
-	
-	@ModelAttribute
-	public ProductCustomClassification get(@RequestParam(required=false) String id) {
-		ProductCustomClassification entity = null;
-		if (StringUtils.isNotBlank(id)){
-			entity = productCustomClassificationService.get(id);
-		}
-		if (entity == null){
-			entity = new ProductCustomClassification();
-		}
-		return entity;
-	}
-	
-	@RequiresPermissions("product:productCustomClassification:view")
-	@RequestMapping(value = {"list", ""})
-	public String list(ProductCustomClassification productCustomClassification, HttpServletRequest request, HttpServletResponse response, Model model) {
-		Page<ProductCustomClassification> page = productCustomClassificationService.findPage(new Page<ProductCustomClassification>(request, response), productCustomClassification); 
-		model.addAttribute("page", page);
-		return "modules/product/productCustomClassificationList";
-	}
-
-	@RequiresPermissions("product:productCustomClassification:view")
-	@RequestMapping(value = "form")
-	public String form(ProductCustomClassification productCustomClassification, Model model) {
-		model.addAttribute("productCustomClassification", productCustomClassification);
-		return "modules/product/productCustomClassificationForm";
-	}
-
-	@RequiresPermissions("product:productCustomClassification:edit")
-	@RequestMapping(value = "save")
-	public String save(ProductCustomClassification productCustomClassification, Model model, RedirectAttributes redirectAttributes) {
-		if (!beanValidator(model, productCustomClassification)){
-			return form(productCustomClassification, model);
-		}
-		productCustomClassificationService.save(productCustomClassification);
-		addMessage(redirectAttributes, "保存商品自定义分类成功");
-		return "redirect:"+Global.getAdminPath()+"/product/productCustomClassification/?repage";
-	}
-	
-	@RequiresPermissions("product:productCustomClassification:delete")
-	@RequestMapping(value = "delete")
-	public String delete(ProductCustomClassification productCustomClassification, RedirectAttributes redirectAttributes) {
-		productCustomClassificationService.delete(productCustomClassification);
-		addMessage(redirectAttributes, "删除商品自定义分类成功");
-		return "redirect:"+Global.getAdminPath()+"/product/productCustomClassification/?repage";
-	}
-
-}

+ 0 - 57
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -73,8 +73,6 @@ public class ProductNewController extends BaseController {
     private ProductNewService productNewService;
     private ProductNewService productNewService;
     @Autowired
     @Autowired
     private CmUserOrganizeService cmUserOrganizeService;
     private CmUserOrganizeService cmUserOrganizeService;
-    @Resource
-    private ProductCustomClassificationService productCustomClassificationService;
     @Autowired
     @Autowired
     private AreaService areaService;
     private AreaService areaService;
     @Resource
     @Resource
@@ -202,12 +200,6 @@ public class ProductNewController extends BaseController {
         if (CollectionUtils.isNotEmpty(list)) {
         if (CollectionUtils.isNotEmpty(list)) {
             for (Product p : list) {
             for (Product p : list) {
                 p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
                 p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
-                //自定义分类
-                List<ProductCustomClassification> typeList = productCustomClassificationService.findCustomClassification(Integer.valueOf(p.getId()));
-                if (CollectionUtils.isNotEmpty(typeList)) {
-                    // 有自定义分类
-                    p.setCustomClass(true);
-                }
                 //获取品牌信息
                 //获取品牌信息
                 Integer brandID = p.getBrandID();
                 Integer brandID = p.getBrandID();
                 CmBrand brand = new CmBrand();
                 CmBrand brand = new CmBrand();
@@ -633,55 +625,6 @@ public class ProductNewController extends BaseController {
         return "modules/product-new/fastEdit";
         return "modules/product-new/fastEdit";
     }
     }
 
 
-    /**
-     * 已废弃
-     */
-    @RequiresPermissions("product:product:view")
-    @RequestMapping(value = "setCategory")
-    public String setCategory(Product product, Model model) {
-        if (null == product.getProductID()) {
-            return "redirect:" + Global.getAdminPath() + "/product/new/list/";
-        }
-        model.addAttribute("product", product);
-
-        Map<String, Object> classify = productService.findClassify(1);
-        model.addAttribute("classify", classify);
-
-        List<ProductCustomClassification> customClassify = productService.getProductTypes(product.getProductID());
-        model.addAttribute("customClassify", customClassify);
-
-        return "modules/product-new/setCategory";
-    }
-
-
-    @RequiresPermissions("product:product:edit")
-    @ResponseBody
-    @RequestMapping(value = "saveCustom")
-    public JsonModel saveCustom(Integer productId, String typeIDs) {
-        logger.info("typeIDs: " + typeIDs);
-        JsonModel jsonModel = JsonModel.newInstance();
-        if (StringUtils.isEmpty(typeIDs)) {
-            return jsonModel.error("分类信息异常");
-        }
-        String[] ids = typeIDs.split(",");
-        List<String> list = new ArrayList<>();
-        for (String s : ids) {
-            if (!list.contains(s) && !"".equals(s)) {
-                list.add(s);
-            }
-        }
-        ids = list.toArray(new String[list.size()]);
-        if (ids.length > 5) {
-            return jsonModel.error("自定义分类不能超过5个");
-        }
-        try {
-            jsonModel = productService.editProductCustomClassification(productId, ids);
-            cleanRedisCache();
-        } catch (Exception e) {
-            jsonModel.error("数据异常");
-        }
-        return jsonModel;
-    }
 
 
     @RequiresPermissions("product:product:edit")
     @RequiresPermissions("product:product:edit")
     @RequestMapping(value = "fastSave")
     @RequestMapping(value = "fastSave")

+ 0 - 301
src/main/java/com/caimei/modules/product/web/ProductsClassifyController.java

@@ -1,301 +0,0 @@
-//package com.caimei.modules.product.web;
-//
-//import com.alibaba.fastjson.JSON;
-//import com.alibaba.fastjson.JSONArray;
-//import com.caimei.dfs.image.beens.ImageUploadInfo;
-//import com.caimei.modules.common.utils.UploadUtils;
-//import com.caimei.modules.opensearch.CoreServiceUitls;
-//import com.caimei.modules.product.entity.CmMallProductsClassify;
-//import com.caimei.modules.product.entity.Product;
-//import com.caimei.modules.product.service.ProductsClassifyService;
-//import com.caimei.modules.sys.utils.UploadImageUtils;
-//import com.caimei.utils.AppUtils;
-//import com.google.common.collect.Maps;
-//import com.thinkgem.jeesite.common.config.Global;
-//import com.thinkgem.jeesite.common.persistence.Page;
-//import com.thinkgem.jeesite.common.utils.Encodes;
-//import com.thinkgem.jeesite.common.utils.StringUtils;
-//import com.thinkgem.jeesite.common.web.BaseController;
-//import org.apache.commons.collections.CollectionUtils;
-//import org.apache.shiro.authz.annotation.RequiresPermissions;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Controller;
-//import org.springframework.ui.Model;
-//import org.springframework.web.bind.annotation.ModelAttribute;
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import org.springframework.web.bind.annotation.RequestParam;
-//import org.springframework.web.bind.annotation.ResponseBody;
-//import org.springframework.web.servlet.mvc.support.RedirectAttributes;
-//
-//import javax.servlet.http.HttpServletRequest;
-//import javax.servlet.http.HttpServletResponse;
-//import java.util.Date;
-//import java.util.List;
-//import java.util.Map;
-//import java.util.regex.Pattern;
-//
-///**
-// * Description
-// * <p>
-// * 采美小程序商品分类
-// *
-// * @author : plf
-// * @date : 2020/4/16
-// */
-//@Controller
-//@RequestMapping(value = "${adminPath}/product/classify")
-//public class ProductsClassifyController extends BaseController {
-//    @Autowired
-//    private ProductsClassifyService productsClassifyService;
-//    @Autowired
-//    private CoreServiceUitls coreServiceUitls;
-//
-//    @ModelAttribute
-//    public CmMallProductsClassify get(@RequestParam(required = false) String id) {
-//        CmMallProductsClassify entity = null;
-//        if (StringUtils.isNotBlank(id)) {
-//            entity = productsClassifyService.get(id);
-//        }
-//        if (entity == null) {
-//            entity = new CmMallProductsClassify();
-//        }
-//        return entity;
-//    }
-//
-//    /**
-//     * 分类列表
-//     */
-//    @RequiresPermissions("product:productsClassify:view")
-//    @RequestMapping(value = {"list", ""})
-//    public String list(CmMallProductsClassify cmMallProductsClassify, HttpServletRequest request, HttpServletResponse response, Model model) {
-//        Page<CmMallProductsClassify> page = productsClassifyService.findPage(new Page<CmMallProductsClassify>(request, response), cmMallProductsClassify);
-//        for (CmMallProductsClassify productsClassify : page.getList()) {
-//            List<Product> productsList = productsClassifyService.findProductsList(productsClassify.getId());
-//            if (productsList != null && productsList.size() > 0) {
-//                productsClassify.setContainsProduct("1");
-//            }
-//        }
-//        model.addAttribute("page", page);
-//        return "modules/product/productsClassifyList";
-//    }
-//
-//    /**
-//     * 添加回显
-//     */
-//    @RequiresPermissions("product:productsClassify:view")
-//    @RequestMapping(value = "form")
-//    public String form(CmMallProductsClassify cmMallProductsClassify, Model model) {
-//        model.addAttribute("cmMallProductsClassify", cmMallProductsClassify);
-//        return "modules/product/productsClassifyForm";
-//    }
-//
-//    /**
-//     * 保存编辑分类
-//     */
-//    @RequiresPermissions("product:productsClassify:edit")
-//    @RequestMapping(value = "save")
-//    public String save(CmMallProductsClassify cmMallProductsClassify, Model model, RedirectAttributes redirectAttributes) {
-//        if (!beanValidator(model, cmMallProductsClassify)) {
-//            return form(cmMallProductsClassify, model);
-//        }
-//        //保存商品名字不能重复
-//        List<CmMallProductsClassify> productsClassifyListByName = productsClassifyService.getProductsClassifyListByName(cmMallProductsClassify);
-//        if (CollectionUtils.isNotEmpty(productsClassifyListByName) && productsClassifyListByName.size() > 0) {
-//            addMessage(model, "分类名称不能重复");
-//            return form(cmMallProductsClassify, model);
-//        }
-//        //判断该商品是是否选择的是停用,如果停用判断该分类下是否存在商品
-//        if (StringUtils.equals("2", cmMallProductsClassify.getStatus())) {
-//            List<Product> productList = productsClassifyService.findProductsList(cmMallProductsClassify.getId());
-//            if (CollectionUtils.isNotEmpty(productList)) {
-//                addMessage(model, "该分类中还存在商品,请把该分类的商品转移到别的分类后,再停用该分类");
-//                return form(cmMallProductsClassify, model);
-//            }
-//        }
-//
-//        Date date = new Date();
-//        if (StringUtils.isEmpty(cmMallProductsClassify.getId())) {//是新增
-//            cmMallProductsClassify.setAddTime(date);
-//            cmMallProductsClassify.setDelFlag("0");
-//        }
-//        cmMallProductsClassify.setUpdateTime(date);
-//        //修改图片全路径
-//        ImageUploadInfo saveImageSerivce = new ImageUploadInfo();
-//        String photoServer = Global.getConfig("photoServer");
-//        String classifyImage = cmMallProductsClassify.getClassifyImage();
-//        if (StringUtils.isNotBlank(classifyImage) && !classifyImage.startsWith("http:") && !classifyImage.startsWith("https:")) {
-//            classifyImage = Encodes.urlDecode(classifyImage);
-//            String realPath = UploadImageUtils.getAbsolutePath(classifyImage);
-//            int pointerIndex = realPath.lastIndexOf(".");
-//            try {
-//                saveImageSerivce = UploadUtils.saveImageSerivce(realPath, pointerIndex, realPath);
-//                cmMallProductsClassify.setClassifyImage(photoServer + saveImageSerivce.getSource());
-//            } catch (Exception e) {
-//                logger.error("图片上传错误:" + e.toString(), e);
-//            }
-//        }
-//        productsClassifyService.save(cmMallProductsClassify);
-//        Product product = new Product();
-//        //product.setClassifyId(Integer.parseInt(cmMallProductsClassify.getId()));
-//        List<Product> productList = productsClassifyService.productList(product);
-//        for (Product p : productList) {
-//            // 更新索引
-//            coreServiceUitls.updateProductIndex(p.getProductID());
-//        }
-//        addMessage(redirectAttributes, "保存成功");
-//        return "redirect:" + Global.getAdminPath() + "/product/classify/list";
-//    }
-//
-//    /**
-//     * 停启用分类
-//     */
-//    @RequestMapping(value = "onClassify")
-//    public String onClassify(CmMallProductsClassify cmMallProductsClassify, HttpServletRequest request, HttpServletResponse response, Model model) {
-//        if ("1".equals(cmMallProductsClassify.getStatus())) {
-//            cmMallProductsClassify.setStatus("2");//1启用,2停用
-//        } else {
-//            cmMallProductsClassify.setStatus("1");//1启用,2停用
-//        }
-//        cmMallProductsClassify.setUpdateDate(new Date());
-//        productsClassifyService.updateStatus(cmMallProductsClassify);//更新会所表数据
-//
-//        //跳转列表页面
-//        CmMallProductsClassify productsClassify = new CmMallProductsClassify();
-//        productsClassify.setOrganizeID(cmMallProductsClassify.getOrganizeID());
-//        Page<CmMallProductsClassify> page = productsClassifyService.findPage(new Page<CmMallProductsClassify>(request, response), productsClassify);
-//        model.addAttribute("page", page);
-//        return "modules/product/productsClassifyList";
-//    }
-//
-//    /**
-//     * 批量更新排序
-//     */
-//    @RequestMapping(value = "batchSaveSort")
-//    @ResponseBody
-//    public Map<String, Object> batchSaveSort(String newProducSorttList, HttpServletRequest request, Model model, RedirectAttributes redirectAttributes) {
-//        Map<String, Object> map = Maps.newLinkedHashMap();
-//        try {
-//            String[] newPageLists = newProducSorttList.split(",");
-//            for (String list : newPageLists) {
-//                String[] split = list.split("-");
-//                if (split.length == 1 || split.length < 1) {
-//                    map.put("success", false);
-//                    map.put("msg", "排序值不能为空!");
-//                    return map;
-//                }
-//                String s = split[1];//判断是否是数字,或者为空
-//                if (StringUtils.isNotEmpty(s)) {
-//                    if (isInteger(s)) {
-//                        if (StringUtils.equals("0", s)) {
-//                            map.put("success", false);
-//                            map.put("msg", "排序值只能填写大于等于1的整数");
-//                            return map;
-//                        }
-//                        String id = split[0];
-//                        String sort = split[1];
-//                        productsClassifyService.saveSort(sort, id);
-//                    } else {
-//                        map.put("success", false);
-//                        map.put("msg", "排序值只能为数字");
-//                        return map;
-//                    }
-//                } else {
-//                    map.put("success", false);
-//                    map.put("msg", "排序值不能为空!");
-//                    return map;
-//                }
-//            }
-//            map.put("success", true);
-//            map.put("msg", "更新排序成功");
-//            return map;
-//        } catch (Exception e) {
-//            map.put("success", false);
-//            map.put("msg", "更新排序失败");
-//            return map;
-//        }
-//    }
-//
-//    /**
-//     * 商品列表
-//     */
-//    @RequestMapping("/productList")
-//    public String productList(Product product, Page page, Model model) {
-//        if (page == null) page = new Page();
-//        if (0 == page.getPageSize() || -1 == page.getPageSize()) page.setPageSize(30);
-//        product.setPage(page);
-//        List<Product> productList = productsClassifyService.productList(product);
-//        for (Product p : productList) {
-//            p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
-//        }
-//        //CmMallProductsClassify classify = productsClassifyService.get(product.getClassifyId().toString());
-//        page.setList(productList);
-//        model.addAttribute("page", page);
-//        //model.addAttribute("classify", classify);
-//        //model.addAttribute("classifyId", product.getClassifyId());
-//        return "modules/product/productsList";
-//    }
-//
-//    public static boolean isInteger(String str) {
-//        Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
-//        return pattern.matcher(str).matches();
-//    }
-//
-//    /**
-//     * 添加商品页面数据
-//     */
-//    @RequestMapping(value = "toAddProduct")
-//    public String toAddProduct(Product product, Page page, Model model) {
-//        if (0 == page.getPageSize() || -1 == page.getPageSize()) page.setPageSize(30);
-//        if (0 == page.getPageNo()) page.setPageNo(1);
-//        product.setPage(page);
-////        List<Integer> ids = productsClassifyService.findClassifyId(product.getClassifyId());
-////        product.setIds(ids);
-//        List<Product> productList = productsClassifyService.findAddProduct(product);
-//        String wwwServer = Global.getConfig("wwwServer");
-//        for (Product p : productList) {
-//            p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, wwwServer));
-//        }
-//        page.setList(productList);
-//        model.addAttribute("page", page);
-//        return "modules/product/toAddProduct";
-//    }
-//
-//    /**
-//     * 添加商品
-//     */
-//    @ResponseBody
-//    @RequestMapping(value = "saveAddProductInfo")
-//    public Map<String, Object> saveAddProductInfo(Product product) {
-//        Map<String, Object> map = Maps.newLinkedHashMap();
-//        try {
-//            JSONArray parse = (JSONArray) JSON.parse(product.getItemsList());
-//            if (null != parse && parse.size() > 0) {
-//                for (int j = 0; j < parse.size(); j++) {
-//                    String productID = (String) parse.get(j);//获取商品ID
-//                    product.setProductID(Integer.valueOf(productID));
-//                    //product.setClassifyAddTime(new Date());
-//                    productsClassifyService.insertProductsToClassify(product);
-//                    // 更新索引,暂时不走搜索
-//                    //searchUitls.updateProductIndex(product.getProductID());
-//                }
-//            }
-//            map.put("success", true);
-//            map.put("msg", "添加成功");
-//        } catch (Exception e) {
-//            logger.debug(e.toString(), e);
-//            map.put("success", false);
-//            map.put("msg", "添加失败");
-//        }
-//        return map;
-//    }
-//
-//    @RequestMapping("/delectClassifyProduct")
-//    public String delectClassifyProduct(Product product, RedirectAttributes redirectAttributes) {
-//        //productsClassifyService.delectClassifyProduct(product.getProductID(), product.getClassifyId());
-//        // 更新索引
-//        //searchUitls.updateProductIndex(product.getProductID());
-//        addMessage(redirectAttributes, "删除成功");
-//        //return "redirect:" + Global.getAdminPath() + "/product/classify/productList?classifyId=" + product.getClassifyId();
-//        return "redirect:" + Global.getAdminPath() + "/product/classify/productList";
-//    }
-//}

+ 2 - 0
src/main/java/com/caimei/modules/user/dao/ClubChangeSpReviewDao.java

@@ -13,7 +13,9 @@ import java.util.Date;
  */
  */
 @MyBatisDao
 @MyBatisDao
 public interface ClubChangeSpReviewDao extends CrudDao<ClubChangeSp> {
 public interface ClubChangeSpReviewDao extends CrudDao<ClubChangeSp> {
+
     int updateCheckStatusById(ClubChangeSp clubChangeSp);
     int updateCheckStatusById(ClubChangeSp clubChangeSp);
+
     ClubChangeSp getClubChangeSpById(Integer clubChangeSpRecordID);
     ClubChangeSp getClubChangeSpById(Integer clubChangeSpRecordID);
 
 
 }
 }

+ 0 - 75
src/main/resources/mappings/modules/product/ActTypeMapper.xml

@@ -1,75 +0,0 @@
-<?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.product.dao.ActTypeDao">
-    
-	<sql id="bigTypeColumns">
-		a.actTypeID AS "id",
-		a.name AS "name",
-		a.image AS "image",
-		a.validFlag AS "validFlag",
-		a.sortIndex AS "sortIndex"
-	</sql>
-	
-	<sql id="bigTypeJoins">
-	</sql>
-    
-	<select id="get" resultType="ActType">
-		SELECT 
-			<include refid="bigTypeColumns"/>
-		FROM acttype a
-		<include refid="bigTypeJoins"/>
-		WHERE a.actTypeID = #{id}
-	</select>
-	
-	<select id="findList" resultType="ActType">
-		SELECT 
-			<include refid="bigTypeColumns"/>
-		FROM acttype a
-		<include refid="bigTypeJoins"/>
-		<where>
-			<if test="id != null and id != ''">
-				AND a.actTypeID = #{id}
-			</if>
-			<if test="name != null and name != ''">
-				AND a.name LIKE concat('%',#{name},'%')
-			</if>
-			<if test="validFlag != null and validFlag != ''">
-				AND a.validFlag = #{validFlag}
-			</if>
-
-		</where>
-		<choose>
-			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
-				ORDER BY ${page.orderBy}
-			</when>
-			<otherwise>
-			</otherwise>
-		</choose>
-	</select>
-	
-	<select id="findAllList" resultType="BigType">
-
-	</select>
-	
-	<insert id="insert" parameterType="ActType"  keyProperty="id" useGeneratedKeys="true">
-
-	</insert>
-	
-	<update id="update">
-
-	</update>
-	
-	<update id="delete">
-		UPDATE crm_big_type a SET a.delFlag= #{DEL_FLAG_DELETE}
-		WHERE id = #{id}
-	</update>
-	
-	<update id="updateEnabledStatusByIds">
-		UPDATE crm_big_type a SET a.enabledStatus = #{param1} 
-		WHERE  a.id IN
-	 	<foreach collection="param2" item="id" index="index" open="(" separator="," close=")" >
-	       #{id}
-	 	</foreach>
-	</update>
-	
-</mapper>

+ 0 - 14
src/main/resources/mappings/modules/product/CmTinytypeMapper.xml

@@ -15,21 +15,10 @@
 		a.addTime AS "addTime"
 		a.addTime AS "addTime"
 	</sql>
 	</sql>
 
 
-	<!--事务过程 修改分类 批量更新商品编码 存储过程名称 caimei4developer.update_productcode_tiny-->
-	<select id="mutiUpdateCode" parameterType="java.lang.String" statementType="CALLABLE">
-		{call caimei.update_productcode_tiny(
-		#{newTinyTypeId,jdbcType=VARCHAR,mode=IN}
-		)}
-	</select>
-
-	<sql id="cmTinytypeJoins">
-	</sql>
-
 	<select id="get" resultType="CmTinytype">
 	<select id="get" resultType="CmTinytype">
 		SELECT
 		SELECT
 			<include refid="cmTinytypeColumns"/>
 			<include refid="cmTinytypeColumns"/>
 		FROM tinytype a
 		FROM tinytype a
-		<include refid="cmTinytypeJoins"/>
 		WHERE a.tinyTypeID = #{tinyTypeID}
 		WHERE a.tinyTypeID = #{tinyTypeID}
 	</select>
 	</select>
 
 
@@ -37,7 +26,6 @@
 		SELECT
 		SELECT
 		<include refid="cmTinytypeColumns"/>
 		<include refid="cmTinytypeColumns"/>
 		FROM tinytype a
 		FROM tinytype a
-		<include refid="cmTinytypeJoins"/>
 		WHERE a.tinyTypeCode = #{param1} AND a.smallTypeID = #{param2}
 		WHERE a.tinyTypeCode = #{param1} AND a.smallTypeID = #{param2}
 	</select>
 	</select>
 
 
@@ -45,7 +33,6 @@
 		SELECT
 		SELECT
 			<include refid="cmTinytypeColumns"/>
 			<include refid="cmTinytypeColumns"/>
 		FROM tinytype a
 		FROM tinytype a
-		<include refid="cmTinytypeJoins"/>
 		<where>
 		<where>
 			<!-- validFlag = '1' -->
 			<!-- validFlag = '1' -->
 			<if test="name != null and name != ''">
 			<if test="name != null and name != ''">
@@ -84,7 +71,6 @@
 		SELECT
 		SELECT
 			<include refid="cmTinytypeColumns"/>
 			<include refid="cmTinytypeColumns"/>
 		FROM tinytype a
 		FROM tinytype a
-		<include refid="cmTinytypeJoins"/>
 		<where>
 		<where>
 
 
 		</where>
 		</where>

+ 0 - 101
src/main/resources/mappings/modules/product/ProductCustomClassificationMapper.xml

@@ -1,101 +0,0 @@
-<?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.product.dao.ProductCustomClassificationDao">
-    
-	<sql id="productCustomClassificationColumns">
-		a.id AS "id",
-		a.productID AS "productID",
-		a.bigTypeID AS "bigTypeID",
-		a.smallTypeID AS "smallTypeID",
-		a.tinyTypeID AS "tinyTypeID",
-		a.createDate AS "createDate",
-		a.updateDate AS "updateDate"
-	</sql>
-	
-	<sql id="productCustomClassificationJoins">
-	</sql>
-    
-	<select id="get" resultType="ProductCustomClassification">
-		SELECT 
-			<include refid="productCustomClassificationColumns"/>
-		FROM product_custom_classification a
-		<include refid="productCustomClassificationJoins"/>
-		WHERE a.id = #{id}
-	</select>
-	
-	<select id="findList" resultType="ProductCustomClassification">
-		SELECT 
-			<include refid="productCustomClassificationColumns"/>
-		FROM product_custom_classification a
-		<include refid="productCustomClassificationJoins"/>
-		<where>
-			
-		</where>
-		<choose>
-			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
-				ORDER BY ${page.orderBy}
-			</when>
-			<otherwise>
-			</otherwise>
-		</choose>
-	</select>
-	
-	<select id="findAllList" resultType="ProductCustomClassification">
-		SELECT 
-			<include refid="productCustomClassificationColumns"/>
-		FROM product_custom_classification a
-		<include refid="productCustomClassificationJoins"/>
-		<where>
-			
-		</where>		
-		<choose>
-			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
-				ORDER BY ${page.orderBy}
-			</when>
-			<otherwise>
-			</otherwise>
-		</choose>
-	</select>
-	
-	<insert id="insert" parameterType="ProductCustomClassification"  keyProperty="id" useGeneratedKeys="true">
-		INSERT INTO product_custom_classification(
-			id,
-			productID,
-			bigTypeID,
-			smallTypeID,
-			tinyTypeID,
-			createDate,
-			updateDate
-		) VALUES (
-			#{id},
-			#{productID},
-			#{bigTypeID},
-			#{smallTypeID},
-			#{tinyTypeID},
-			#{createDate},
-			#{updateDate}
-		)
-	</insert>
-	
-	<update id="update">
-		UPDATE product_custom_classification SET 	
-			productID = #{productID},
-			bigTypeID = #{bigTypeID},
-			smallTypeID = #{smallTypeID},
-			tinyTypeID = #{tinyTypeID},
-			createDate = #{createDate},
-			updateDate = #{updateDate}
-		WHERE id = #{id}
-	</update>
-	
-	<delete id="delete">
-		DELETE FROM product_custom_classification
-		WHERE id = #{id}
-	</delete>
-
-	<select id="findCustomClassification" resultType="com.caimei.modules.product.entity.ProductCustomClassification">
-		select <include refid="productCustomClassificationColumns"/>
-		from product_custom_classification a where a.productID = #{productID}
-	</select>
-	
-</mapper>

+ 0 - 163
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -622,14 +622,6 @@
         WHERE id = #{id}
         WHERE id = #{id}
     </update>
     </update>
 
 
-
-    <select id="getAllActType" resultType="com.caimei.po.ActType">
-        SELECT *
-        FROM acttype
-        where validFlag = 1
-    </select>
-
-
     <select id="getSupplierProductList" resultType="com.caimei.modules.product.entity.Product">
     <select id="getSupplierProductList" resultType="com.caimei.modules.product.entity.Product">
         SELECT
         SELECT
         *
         *
@@ -781,14 +773,6 @@
                 #{updateTime})
                 #{updateTime})
     </insert>
     </insert>
 
 
-    <!--	<update id="updateCRMFlag">-->
-    <!--		UPDATE product a SET a.displayOnCRMFlag = #{param1}-->
-    <!--		WHERE  a.productID IN-->
-    <!--		<foreach collection="param2" item="id" index="index" open="(" separator="," close=")" >-->
-    <!--			#{id}-->
-    <!--		</foreach>-->
-    <!--	</update>-->
-
     <update id="deleteActive">
     <update id="deleteActive">
         UPDATE product a
         UPDATE product a
         SET a.actFlag = 0
         SET a.actFlag = 0
@@ -854,29 +838,6 @@
         where t.tinyTypeID = #{tinyTypeID}
         where t.tinyTypeID = #{tinyTypeID}
     </select>
     </select>
 
 
-    <delete id="deleteCustomClassification">
-        delete
-        from product_custom_classification
-        where productID = #{productID}
-    </delete>
-
-    <insert id="insertCustomClassification"
-            parameterType="com.caimei.modules.product.entity.ProductCustomClassification" keyProperty="userId"
-            useGeneratedKeys="true">
-        INSERT INTO product_custom_classification(productID,
-                                                  bigTypeID,
-                                                  smallTypeID,
-                                                  tinyTypeID,
-                                                  createDate,
-                                                  updateDate)
-        VALUES (#{productID},
-                #{bigTypeID},
-                #{smallTypeID},
-                #{tinyTypeID},
-                #{createDate},
-                #{updateDate})
-    </insert>
-
     <insert id="insertAddProduct">
     <insert id="insertAddProduct">
         INSERT INTO cm_search_recommend_product(productID,
         INSERT INTO cm_search_recommend_product(productID,
                                                 tinyTypeID,
                                                 tinyTypeID,
@@ -1123,40 +1084,6 @@
         ORDER BY csrp.sort DESC
         ORDER BY csrp.sort DESC
     </select>
     </select>
 
 
-
-    <select id="relatedProductList" resultType="product">
-        select
-        <include refid="productColumns"/>,
-        b.name AS brandName,
-        (case when a.tinyTypeID = #{tinyTypeID} then '1' else '0' end) AS defaultType
-        FROM product a
-        <include refid="productJoins"/>
-        left join brand b on b.brandID = a.brandID
-        WHERE (a.productID
-        IN (select productID from product_custom_classification where tinyTypeID = #{tinyTypeID})
-        OR a.tinyTypeID = #{tinyTypeID})
-        <if test="name != null and name != ''">
-            AND a.name like concat('%', #{name} ,'%')
-        </if>
-        <if test="validFlag !=null and validFlag !=''">
-            AND a.validFlag=#{validFlag}
-        </if>
-        <if test="shopName != null and shopName != ''">
-            AND s.name like concat('%', #{shopName} ,'%')
-        </if>
-        <if test="brandName != null and brandName != ''">
-            AND b.name like concat('%', #{brandName} ,'%')
-        </if>
-        AND a.validFlag != 0
-        and a.productCategory = 1
-    </select>
-
-    <delete id="deleteProductCustomClassification">
-        delete
-        from product_custom_classification
-        where productID = #{productID}
-          and tinyTypeID = #{tinyTypeID}
-    </delete>
     <delete id="deleteLadderPriceByProductId">
     <delete id="deleteLadderPriceByProductId">
         DELETE
         DELETE
         FROM product_ladder_price
         FROM product_ladder_price
@@ -1196,32 +1123,6 @@
         select productId from cm_sku where skuId=#{productId}
         select productId from cm_sku where skuId=#{productId}
     </select>
     </select>
 
 
-    <select id="toAddProductCustomClassificationList" resultType="product">
-        select
-        <include refid="productColumns"/>,
-        b.name AS brandName
-        FROM product a
-        <include refid="productJoins"/>
-        left join cm_brand b on b.id = a.brandID
-        WHERE a.tinyTypeID != #{tinyTypeID}
-        and not exists
-        (select pcc.id from product_custom_classification pcc where pcc.productID = a.productID and pcc.tinyTypeID =
-        #{tinyTypeID})
-        and a.validFlag = '2'
-        and (select count(id) from product_custom_classification pcc where pcc.productID = a.productID) <![CDATA[ < ]]>
-        5
-        <if test="name != null and name != ''">
-            and a.name like concat('%', #{name} ,'%')
-        </if>
-        <if test="shopName != null and shopName != ''">
-            AND s.name like concat('%', #{shopName} ,'%')
-        </if>
-        <if test="brandName != null and brandName != ''">
-            AND b.name like concat('%', #{brandName} ,'%')
-        </if>
-    </select>
-
-
     <select id="toAddProductList" resultType="product">
     <select id="toAddProductList" resultType="product">
         select
         select
         a.*,
         a.*,
@@ -1246,70 +1147,6 @@
         and a.productCategory = 1
         and a.productCategory = 1
     </select>
     </select>
 
 
-    <select id="getProductTypes" resultType="com.caimei.modules.product.entity.ProductCustomClassification">
-        select *
-        from product_custom_classification
-        where productID = #{productID}
-    </select>
-
-
-    <select id="findRecommendActivityListPage" resultType="Product">
-        SELECT
-        <include refid="productColumns"/>
-        FROM product a
-        <include refid="ActivityJoins"/>
-        <where>
-            <if test="id !=null and id !=''">
-                AND a.productID=#{id}
-            </if>
-            <if test="tinyTypeID != null and tinyTypeID != ''">
-                AND a.tinyTypeID = #{tinyTypeID}
-            </if>
-            <if test="smallTypeID != null and smallTypeID != ''">
-                AND a.smallTypeID = #{smallTypeID}
-            </if>
-            <if test="bigTypeID != null and bigTypeID != ''">
-                AND a.bigTypeID = #{bigTypeID}
-            </if>
-            <if test="shopID != null and shopID != ''">
-                AND a.shopID = #{shopID}
-            </if>
-            <if test="name != null and name != ''">
-                AND a.name LIKE
-                <if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
-                <if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
-                <if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
-            </if>
-            <if test="shopName != null and shopName != ''">
-                AND s.name LIKE
-                <if test="dbName == 'oracle'">'%'||#{shopName}||'%'</if>
-                <if test="dbName == 'mssql'">'%'+#{shopName}+'%'</if>
-                <if test="dbName == 'mysql'">concat('%',#{shopName},'%')</if>
-            </if>
-            <if test="actFlag !=null and actFlag !=''">
-                AND a.actFlag=#{actFlag}
-            </if>
-
-
-            <if test="sqlMap !=null and sqlMap !=''">
-                ${sqlMap.dsf}
-            </if>
-            AND a.validFlag = 2
-            AND (a.actType != 3 or a.`actType` IS NULL or (a.actType = 3 and STR_TO_DATE(a.endTime,'%Y-%m-%d %H:%i')
-            <![CDATA[  <  ]]> STR_TO_DATE(SYSDATE(),'%Y-%m-%d %H:%i')))
-            AND a.shopID not in (SELECT s.`value` FROM `sys_dict` s WHERE s.type='heheShopID')
-            and a.productCategory = 1
-        </where>
-        <choose>
-            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
-                ORDER BY ${page.orderBy}
-            </when>
-            <otherwise>
-                order by case WHEN a.validFlag = 1 then 0 else 1 END asc,a.productID desc
-            </otherwise>
-        </choose>
-    </select>
-
     <select id="findGroupActivityListPage" resultType="Product">
     <select id="findGroupActivityListPage" resultType="Product">
         SELECT
         SELECT
         <include refid="productColumns"/>
         <include refid="productColumns"/>

+ 0 - 66
src/main/webapp/WEB-INF/views/modules/product/productCustomClassificationForm.jsp

@@ -1,66 +0,0 @@
-<%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
-<html>
-<head>
-	<title>商品自定义分类管理</title>
-	<meta name="decorator" content="default"/>
-	<script type="text/javascript">
-		$(document).ready(function() {
-			//$("#name").focus();
-			$("#inputForm").validate({
-				submitHandler: function(form){
-					loading('正在提交,请稍等...');
-					form.submit();
-				},
-				errorContainer: "#messageBox",
-				errorPlacement: function(error, element) {
-					$("#messageBox").text("输入有误,请先更正。");
-					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-						error.appendTo(element.parent().parent());
-					} else {
-						error.insertAfter(element);
-					}
-				}
-			});
-		});
-	</script>
-</head>
-<body>
-	<ul class="nav nav-tabs">
-		<li><a href="${ctx}/product/productCustomClassification/">商品自定义分类列表</a></li>
-		<li class="active"><a href="${ctx}/product/productCustomClassification/form?id=${productCustomClassification.id}">商品自定义分类<shiro:hasPermission name="product:productCustomClassification:edit">${not empty productCustomClassification.id?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission name="product:productCustomClassification:edit">查看</shiro:lacksPermission></a></li>
-	</ul><br/>
-	<form:form id="inputForm" modelAttribute="productCustomClassification" action="${ctx}/product/productCustomClassification/save" method="post" class="form-horizontal">
-		<form:hidden path="id"/>
-		<sys:message content="${message}"/>		
-		<div class="control-group">
-			<label class="control-label">商品ID:</label>
-			<div class="controls">
-				<form:input path="productID" htmlEscape="false" maxlength="11" class="input-xlarge  digits"/>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">一级分类Id:</label>
-			<div class="controls">
-				<form:input path="bigTypeID" htmlEscape="false" maxlength="11" class="input-xlarge "/>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">二级分类Id:</label>
-			<div class="controls">
-				<form:input path="smallTypeID" htmlEscape="false" maxlength="11" class="input-xlarge "/>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">三级分类Id:</label>
-			<div class="controls">
-				<form:input path="tinyTypeID" htmlEscape="false" maxlength="11" class="input-xlarge "/>
-			</div>
-		</div>
-		<div class="form-actions">
-			<shiro:hasPermission name="product:productCustomClassification:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
-			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
-		</div>
-	</form:form>
-</body>
-</html>

+ 0 - 58
src/main/webapp/WEB-INF/views/modules/product/productCustomClassificationList.jsp

@@ -1,58 +0,0 @@
-<%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
-<html>
-<head>
-	<title>商品自定义分类管理</title>
-	<meta name="decorator" content="default"/>
-	<style type="text/css">
-		.table th{text-align: center;}
-		.table td{text-align: center;}
-	</style>
-	<script type="text/javascript">
-		$(document).ready(function() {
-			
-		});
-		function page(n,s){
-			$("#pageNo").val(n);
-			$("#pageSize").val(s);
-			$("#searchForm").submit();
-        	return false;
-        }
-	</script>
-</head>
-<body>
-	<ul class="nav nav-tabs">
-		<li class="active"><a href="${ctx}/product/productCustomClassification/">商品自定义分类列表</a></li>
-		<shiro:hasPermission name="product:productCustomClassification:edit"><li><a href="${ctx}/product/productCustomClassification/form">商品自定义分类添加</a></li></shiro:hasPermission>
-	</ul>
-	<form:form id="searchForm" modelAttribute="productCustomClassification" action="${ctx}/product/productCustomClassification/" method="post" class="breadcrumb form-search">
-		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
-		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
-		<div class="ul-form">
-			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
-			<div class="clearfix"></div>
-		</div>
-	</form:form>
-	<sys:message content="${message}"/>
-	<table id="contentTable" class="table table-striped table-bordered table-condensed">
-		<thead>
-			<tr>
-				<shiro:hasPermission name="product:productCustomClassification:edit"><th>操作</th></shiro:hasPermission>
-			</tr>
-		</thead>
-		<tbody>
-		<c:forEach items="${page.list}" var="productCustomClassification">
-			<tr>
-				<shiro:hasPermission name="product:productCustomClassification:edit"><td>
-    				<a href="${ctx}/product/productCustomClassification/form?id=${productCustomClassification.id}">编辑</a>
-    				<shiro:hasPermission name="product:productCustomClassification:delete">
-					<a href="${ctx}/product/productCustomClassification/delete?id=${productCustomClassification.id}" onclick="return confirmx('确认要删除该商品自定义分类吗?', this.href)">删除</a>
-					</shiro:hasPermission>
-				</td></shiro:hasPermission>
-			</tr>
-		</c:forEach>
-		</tbody>
-	</table>
-	<div class="pagination">${page}</div>
-</body>
-</html>