浏览代码

【数据库整理】商品相关

chao 3 年之前
父节点
当前提交
ab833e6079
共有 37 个文件被更改,包括 1498 次插入2521 次删除
  1. 15 15
      src/main/java/com/caimei/modules/miniprogram/entity/ProductPo.java
  2. 31 30
      src/main/java/com/caimei/modules/newhome/web/NewActivityController.java
  3. 25 25
      src/main/java/com/caimei/modules/order/entity/NewOrderProduct.java
  4. 3 3
      src/main/java/com/caimei/modules/order/service/NewOrderService.java
  5. 39 38
      src/main/java/com/caimei/modules/order/web/NewOrderController.java
  6. 1 1
      src/main/java/com/caimei/modules/product/dao/ProductDao.java
  7. 5 5
      src/main/java/com/caimei/modules/product/entity/CmSecondHandDetail.java
  8. 500 562
      src/main/java/com/caimei/modules/product/entity/Product.java
  9. 4 4
      src/main/java/com/caimei/modules/product/service/ProductService.java
  10. 1 1
      src/main/java/com/caimei/modules/product/web/CmPromotionController.java
  11. 2 2
      src/main/java/com/caimei/modules/product/web/CmSecondHandDetailController.java
  12. 23 23
      src/main/java/com/caimei/modules/product/web/ProductActController.java
  13. 358 358
      src/main/java/com/caimei/modules/product/web/ProductController.java
  14. 301 300
      src/main/java/com/caimei/modules/product/web/ProductsClassifyController.java
  15. 1 1
      src/main/java/com/caimei/modules/weisha/web/CmOrganizePromotionController.java
  16. 5 5
      src/main/java/com/cmme/modules/product/entity/CmmeProduct.java
  17. 1 1
      src/main/resources/mappings/modules/bulkpurchase/PurchaseProductMapper.xml
  18. 5 5
      src/main/resources/mappings/modules/cmme/product/CmmeProductMapper.xml
  19. 1 1
      src/main/resources/mappings/modules/product/CmPromotionMapper.xml
  20. 1 1
      src/main/resources/mappings/modules/product/CmSecondHandDetailMapper.xml
  21. 29 568
      src/main/resources/mappings/modules/product/ProductMapper.xml
  22. 103 528
      src/main/resources/mappings/modules/product/ProductNewMapper.xml
  23. 1 1
      src/main/resources/mappings/modules/svip/CmSvipProductMapper.xml
  24. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/actList.jsp
  25. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/actSelectProduct.jsp
  26. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/addActPage.jsp
  27. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/multiPromotionForm.jsp
  28. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/multiPromotionList.jsp
  29. 12 12
      src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp
  30. 4 4
      src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp
  31. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/promotionSelectProducts.jsp
  32. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/promotionSelectSingleProduct.jsp
  33. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/secondHand.jsp
  34. 11 11
      src/main/webapp/WEB-INF/views/modules/product-new/singlePromotionForm.jsp
  35. 2 2
      src/main/webapp/WEB-INF/views/modules/product-new/singlePromotionList.jsp
  36. 3 3
      src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp
  37. 3 3
      src/main/webapp/WEB-INF/views/modules/product/productForm.jsp

+ 15 - 15
src/main/java/com/caimei/modules/miniprogram/entity/ProductPo.java

@@ -32,10 +32,10 @@ public class ProductPo extends DataEntity<ProductPo>{
 	private String price0TextFlag;		// 普通用户价格展示标志 0 否 1 是
 	private BigDecimal price1;		// 普通会员价
 	private String price1Text;		// 会员用户价格文字
-	private String price1TextFlag;		// 会员用户价格展示标志 0 否 1 是
+	private String priceFlag;		// 会员用户价格展示标志 0 否 1 是
 	private BigDecimal price8;		// 游客价格
-	private String price8Text;		// 游客价格文字
-	private String price8TextFlag;		// 游客文字展示标志 0 否 价格 1 是 文字
+	private String beautyActFlag;		// 游客价格文字
+	private String beautyActFlagFlag;		// 游客文字展示标志 0 否 价格 1 是 文字
 	private String ladderPriceFlag;		// 启用阶梯价格标识 0否 1是
 	private BigDecimal price2;		// 银卡价
 	private BigDecimal price3;		// 金卡价
@@ -304,12 +304,12 @@ public class ProductPo extends DataEntity<ProductPo>{
 		this.price1Text = price1Text;
 	}
 
-	public String getPrice1TextFlag() {
-		return price1TextFlag;
+	public String getPriceFlag() {
+		return priceFlag;
 	}
 
-	public void setPrice1TextFlag(String price1TextFlag) {
-		this.price1TextFlag = price1TextFlag;
+	public void setPriceFlag(String priceFlag) {
+		this.priceFlag = priceFlag;
 	}
 
 	public BigDecimal getPrice8() {
@@ -320,20 +320,20 @@ public class ProductPo extends DataEntity<ProductPo>{
 		this.price8 = price8;
 	}
 
-	public String getPrice8Text() {
-		return price8Text;
+	public String getbeautyActFlag() {
+		return beautyActFlag;
 	}
 
-	public void setPrice8Text(String price8Text) {
-		this.price8Text = price8Text;
+	public void setbeautyActFlag(String beautyActFlag) {
+		this.beautyActFlag = beautyActFlag;
 	}
 
-	public String getPrice8TextFlag() {
-		return price8TextFlag;
+	public String getbeautyActFlagFlag() {
+		return beautyActFlagFlag;
 	}
 
-	public void setPrice8TextFlag(String price8TextFlag) {
-		this.price8TextFlag = price8TextFlag;
+	public void setbeautyActFlagFlag(String beautyActFlagFlag) {
+		this.beautyActFlagFlag = beautyActFlagFlag;
 	}
 
 	public String getLadderPriceFlag() {

+ 31 - 30
src/main/java/com/caimei/modules/newhome/web/NewActivityController.java

@@ -61,26 +61,26 @@ public class NewActivityController extends BaseController {
         Page<Product> page = new Page<Product>();
         if(reqSource.contains("groupList")){
             //团购促销
-            product.setActType("3");
-            page = productService.findPage(new Page<Product>(request, response), product);
-            List<Product> list = page.getList();
-            if(list != null){
-                for(Product bean : list){
-                    if(bean.getBeginTime()!=null && bean.getEndTime()!=null){
-                        Date beginTime = bean.getBeginTime();
-                        Date endTime = bean.getEndTime();
-                        bean.setActTime(DateUtils.format(beginTime,DateUtils.YMDHMS)+"--"+DateUtils.format(endTime,DateUtils.YMDHMS));
-                        Date currentTime = new Date();
-                        if(currentTime.before(beginTime)){
-                            bean.setActStatus("未开始");
-                        }else if(currentTime.before(endTime) && currentTime.after(beginTime)){
-                            bean.setActStatus("进行中");
-                        }else{
-                            bean.setActStatus("已结束");
-                        }
-                    }
-                }
-            }
+//            product.setActType("3");
+//            page = productService.findPage(new Page<Product>(request, response), product);
+//            List<Product> list = page.getList();
+//            if(list != null){
+//                for(Product bean : list){
+//                    if(bean.getBeginTime()!=null && bean.getEndTime()!=null){
+//                        Date beginTime = bean.getBeginTime();
+//                        Date endTime = bean.getEndTime();
+//                        bean.setActTime(DateUtils.format(beginTime,DateUtils.YMDHMS)+"--"+DateUtils.format(endTime,DateUtils.YMDHMS));
+//                        Date currentTime = new Date();
+//                        if(currentTime.before(beginTime)){
+//                            bean.setActStatus("未开始");
+//                        }else if(currentTime.before(endTime) && currentTime.after(beginTime)){
+//                            bean.setActStatus("进行中");
+//                        }else{
+//                            bean.setActStatus("已结束");
+//                        }
+//                    }
+//                }
+//            }
             returnUrl = "modules/newhome/newGroupActivityList";
         }else{
             page = productService.findRecommendPage(new Page<Product>(request, response), product);
@@ -114,10 +114,10 @@ public class NewActivityController extends BaseController {
 	@RequiresPermissions("newhome:newActivity:view")
 	@RequestMapping(value = "form")
 	public String form(Product product, Model model) {
-	    if(product.getActType().equals("3")){
-	        product.setBeginTimeStr(DateUtils.format(product.getBeginTime(),DateUtils.YMDHMS));
-            product.setEndTimeStr(DateUtils.format(product.getEndTime(),DateUtils.YMDHMS));
-        }
+//	    if(product.getActType().equals("3")){
+//	        product.setBeginTimeStr(DateUtils.format(product.getBeginTime(),DateUtils.YMDHMS));
+//            product.setEndTimeStr(DateUtils.format(product.getEndTime(),DateUtils.YMDHMS));
+//        }
         if(null != product.getActCreateTime()){
             product.setActCreateTimeStr(DateUtils.format(product.getActCreateTime(),DateUtils.YMDHMS));
         }
@@ -130,8 +130,9 @@ public class NewActivityController extends BaseController {
 		type2.setActName("推荐上新");
 		list.add(type1);
 		list.add(type2);
-		if (StringUtils.isNoneBlank(product.getMainImage()))
+		if (StringUtils.isNoneBlank(product.getMainImage())) {
             product.setMainImage(AppUtils.getImageURL("product", product.getMainImage(), 0, ""));
+        }
 		model.addAttribute("product", product);
 		model.addAttribute("tags", list);
 		return "modules/newhome/newActivityForm";
@@ -170,11 +171,11 @@ public class NewActivityController extends BaseController {
         List<Product> list = page.getList();
         if(CollectionUtils.isNotEmpty(list)){
             for(Product p :list){
-                    if(p.getBeginTime()!=null && p.getEndTime()!=null){
-                        Date beginTime = p.getBeginTime();
-                        Date endTime = p.getEndTime();
-                        p.setActTime(DateUtils.format(beginTime,DateUtils.YMDHMS)+"--"+DateUtils.format(endTime,DateUtils.YMDHMS));
-                    }
+//                    if(p.getBeginTime()!=null && p.getEndTime()!=null){
+//                        Date beginTime = p.getBeginTime();
+//                        Date endTime = p.getEndTime();
+//                        p.setActTime(DateUtils.format(beginTime,DateUtils.YMDHMS)+"--"+DateUtils.format(endTime,DateUtils.YMDHMS));
+//                    }
                 p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, ""));
             }
         }

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

@@ -20,7 +20,7 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
     private Integer presentNum;//   int(11) comment '赠送数量',
     private String outStoreType;// char(1) comment '出库类型',
     private Integer skuID;//     int(11) comment 'skuId',
-    private String props;//     national varchar(1000) comment 'sku属性',
+//    private String props;//     national varchar(1000) comment 'sku属性',
     private String propName;//   national varchar(1000) comment '属性名',
     private String productNo;//    national varchar(50) comment '商品编号',
     private Double price;//     float comment '订单商品购买价格',
@@ -45,8 +45,8 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
     private Double singleCmFee;//   decimal(20,6) comment '单个应付采美金额',
     private Double shouldPayFee;//   decimal(20,6) comment '应付金额',
     //private String commentFlag;//        national char(1) comment '是否已评论:1是,空或0未评论',
-    private Double price0;//   float(10,2),
-    private Double price1;//   float comment '普通会员价',
+//    private Double price0;//   float(10,2),
+//    private Double price1;//   float comment '普通会员价',
     private Double totalFee;//   float comment '总价',
     private Double totalBeans;//  decimal(10,2) comment '获取到的总采美豆值',
     private Double useBalanceAmount;//  double comment '使用余额金额',notOutStore
@@ -261,13 +261,13 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
         this.skuID = skuID;
     }
 
-    public String getProps() {
-        return props;
-    }
-
-    public void setProps(String props) {
-        this.props = props;
-    }
+//    public String getProps() {
+//        return props;
+//    }
+//
+//    public void setProps(String props) {
+//        this.props = props;
+//    }
 
     public String getPropName() {
         return propName;
@@ -541,21 +541,21 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
         this.name = name;
     }
 
-    public Double getPrice0() {
-        return price0;
-    }
-
-    public void setPrice0(Double price0) {
-        this.price0 = price0;
-    }
-
-    public Double getPrice1() {
-        return price1;
-    }
-
-    public void setPrice1(Double price1) {
-        this.price1 = price1;
-    }
+//    public Double getPrice0() {
+//        return price0;
+//    }
+//
+//    public void setPrice0(Double price0) {
+//        this.price0 = price0;
+//    }
+//
+//    public Double getPrice1() {
+//        return price1;
+//    }
+//
+//    public void setPrice1(Double price1) {
+//        this.price1 = price1;
+//    }
 
     public String getPayStatus() {
         return payStatus;

+ 3 - 3
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -960,12 +960,12 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         orderProduct.setNum(1);
         orderProduct.setPresentNum(0);
         orderProduct.setOutStoreType("0");
-        orderProduct.setProps(product.getProps());
+//        orderProduct.setProps(product.getProps());
         orderProduct.setProductNo(product.getProductCode());
         orderProduct.setPrice(newOrder.getFreight());
         orderProduct.setNormalPrice(newOrder.getFreight());
-        orderProduct.setPrice0(newOrder.getFreight());
-        orderProduct.setPrice1(newOrder.getFreight());
+//        orderProduct.setPrice0(newOrder.getFreight());
+//        orderProduct.setPrice1(newOrder.getFreight());
         orderProduct.setTotalAmount(newOrder.getFreight());
         orderProduct.setTotalFee(newOrder.getFreight());
         orderProduct.setShouldPayFee(newOrder.getFreight());

+ 39 - 38
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -570,8 +570,9 @@ public class NewOrderController extends BaseController {
             for (NewOrderProduct op : orderProduct) {
                 String isActProduct = op.getIsActProduct();
                 Integer svipPriceFlag = op.getSvipPriceFlag();
+                Integer ladderPriceFlag = op.getLadderPriceFlag();
                 //活动商品和阶梯商品和超级会员价不写入价格库
-                if (StringUtil.equals("0", isActProduct) && 0 == svipPriceFlag) {
+                if (StringUtil.equals("0", isActProduct) && 0 == svipPriceFlag && 0==ladderPriceFlag) {
                     String buyAgainFlag = op.getBuyAgainFlag();
                     //对于可以复购的商品添加买家商品价格,提供再次购买商品使用(如果不存在没有改买家商品价格则不能购买该商品)
                     if (StringUtils.isNotEmpty(buyAgainFlag) && StringUtils.equals("1", buyAgainFlag)) {
@@ -580,43 +581,43 @@ public class NewOrderController extends BaseController {
                             String costPrice = product.getCostPrice();//成本价
                             //version 4.6.0 写入复购价格库
                             Double buyPrice = op.getDiscountPrice(); //该商品的购买价
-                            Date now = new Date();
-                            Date begin = product.getBeginTime();
-                            Date end = product.getEndTime();
+//                            Date now = new Date();
+////                            Date begin = product.getBeginTime();
+////                            Date end = product.getEndTime();
                             CmUser u = cmUserService.get(userID + "");
-                            if ("1".equals(product.getLadderPriceFlag()) ||
-                                    ("1".equals(product.getActFlag()) &&
-                                            "1001".equals(product.getActType()) &&
-                                            new Date().after(begin) && now.before(end))) {
-                                //如果商品启用了阶梯价格或者团购活动,那么不使用购买价格而是用用户对应身份的非活动价格参与复购价格库计算
-                                //确认用户类型
-                                Integer userType = 1;//查看价格用户类型(1:游客,2:普通用户,3:会员)
-                                if ("10".equals(u.getRegisterUserTypeID())) {//普通用户或者游客
-                                    boolean isVisitor = newOrderService.isVisitor(userID.toString());//是否是游客
-                                    if (isVisitor) {
-                                        userType = 1;
-                                        buyPrice = product.getPrice8().doubleValue();
-                                    } else {
-                                        userType = 2;
-                                        buyPrice = product.getPrice0().doubleValue();
-                                    }
-                                } else {
-                                    //未冻结 上线会所 上线创客查看会员价
-                                    if (AppKeys.FLAG_YES.equals(u.getValidFlag()) &&
-                                            (UserType.isClub(u.getRegisterUserTypeID())
-                                                    && (StringUtils.isNotEmpty(u.getClubStatus()) &&
-                                                    ("40".equals(u.getClubStatus()) || "90".equals(u.getClubStatus())))
-                                            )) {
-                                        userType = 3;
-                                        buyPrice = product.getPrice1().doubleValue();
-                                    }
-                                    //普通用户 非上线创客会所 供应商 已冻结用户 展示普通价
-                                    else {
-                                        userType = 2;
-                                        buyPrice = product.getPrice0().doubleValue();
-                                    }
-                                }
-                            }
+//                            if ("1".equals(product.getLadderPriceFlag()) ||
+//                                    ("1".equals(product.getActFlag()) &&
+//                                            "1001".equals(product.getActType()) /*&&
+//                                            new Date().after(begin) && now.before(end)*/)) {
+//                                //如果商品启用了阶梯价格或者团购活动,那么不使用购买价格而是用用户对应身份的非活动价格参与复购价格库计算
+//                                //确认用户类型
+//                                Integer userType = 1;//查看价格用户类型(1:游客,2:普通用户,3:会员)
+//                                if ("10".equals(u.getRegisterUserTypeID())) {//普通用户或者游客
+//                                    boolean isVisitor = newOrderService.isVisitor(userID.toString());//是否是游客
+//                                    if (isVisitor) {
+//                                        userType = 1;
+//                                        buyPrice = product.getPrice().doubleValue();
+//                                    } else {
+//                                        userType = 2;
+//                                        buyPrice = product.getPrice().doubleValue();
+//                                    }
+//                                } else {
+//                                    //未冻结 上线会所 上线创客查看会员价
+//                                    if (AppKeys.FLAG_YES.equals(u.getValidFlag()) &&
+//                                            (UserType.isClub(u.getRegisterUserTypeID())
+//                                                    && (StringUtils.isNotEmpty(u.getClubStatus()) &&
+//                                                    ("40".equals(u.getClubStatus()) || "90".equals(u.getClubStatus())))
+//                                            )) {
+//                                        userType = 3;
+//                                        buyPrice = product.getPrice1().doubleValue();
+//                                    }
+//                                    //普通用户 非上线创客会所 供应商 已冻结用户 展示普通价
+//                                    else {
+//                                        userType = 2;
+//                                        buyPrice = product.getPrice0().doubleValue();
+//                                    }
+//                                }
+//                            }
                             Integer clubID = null;
                             Integer uID = null;
                             if (UserType.isClub(u.getRegisterUserTypeID())) {
@@ -627,7 +628,7 @@ public class NewOrderController extends BaseController {
                             // 当前购买价格与成本价比较
                             String costCheckFlag = product.getCostCheckFlag();//成本价选中标志:1固定成本 2比例成本
                             if ("2".equals(costCheckFlag)) {
-                                costPrice = MathUtil.div(MathUtil.mul(product.getPrice1().doubleValue(), product.getCostProportional()), 100).toString();
+                                costPrice = MathUtil.div(MathUtil.mul(product.getPrice(), product.getCostProportional()), 100).toString();
                                 if ("0".equals(costPrice)) costPrice = op.getCostPrice().toString();
                             }
                             //购买价大于成本价,采美赚钱 就写入复购价格库

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

@@ -77,7 +77,7 @@ public interface ProductDao extends CrudDao<Product> {
 
     public int insertProductPriceRecord(ProductPriceRecord productPriceRecord);
 
-    public int updateCRMFlag(String enabledStatus, String[] ids);
+/*    public int updateCRMFlag(String enabledStatus, String[] ids);*/
 
     public int updatePostFlag(String enabledStatus, String[] ids);
 

+ 5 - 5
src/main/java/com/caimei/modules/product/entity/CmSecondHandDetail.java

@@ -54,7 +54,7 @@ public class CmSecondHandDetail extends DataEntity<CmSecondHandDetail> {
     private String productCategory;// 商品的类别:1正常商品(默认),2二手商品
     private String name;//商品名称
     private String normalPrice;//市场价
-    private Double price1;//机构价、交易价
+    private Double price;//机构价、交易价
     /**
      * 成本价选中标志:1固定成本 2比例成
      */
@@ -368,12 +368,12 @@ public class CmSecondHandDetail extends DataEntity<CmSecondHandDetail> {
         this.normalPrice = normalPrice;
     }
 
-    public Double getPrice1() {
-        return price1;
+    public Double getPrice() {
+        return price;
     }
 
-    public void setPrice1(Double price1) {
-        this.price1 = price1;
+    public void setPrice(Double price) {
+        this.price = price;
     }
 
     public Integer getStock() {

文件差异内容过多而无法显示
+ 500 - 562
src/main/java/com/caimei/modules/product/entity/Product.java


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

@@ -143,10 +143,10 @@ public class ProductService extends CrudService<ProductDao, Product> {
         return productDao.insertProductPriceRecord(productPriceRecord);
     }
 
-    @Transactional(readOnly = false)
-    public void updateCRMFlag(String status, String[] ids) {
-        productDao.updateCRMFlag(status, ids);
-    }
+//    @Transactional(readOnly = false)
+//    public void updateCRMFlag(String status, String[] ids) {
+//        productDao.updateCRMFlag(status, ids);
+//    }
 
     @Transactional(readOnly = false)
     public void updatePostFlag(String status, String[] ids) {

+ 1 - 1
src/main/java/com/caimei/modules/product/web/CmPromotionController.java

@@ -292,7 +292,7 @@ public class CmPromotionController extends BaseController {
             cmPromotion.setPromotionShops(promotionShops);
             model.addAttribute("cmPromotion", cmPromotion);
             if (cmPromotion.getPromotionProducts().size() > 0) {
-                model.addAttribute("price1", cmPromotion.getPromotionProducts().get(0).getPrice1());
+                model.addAttribute("price1", cmPromotion.getPromotionProducts().get(0).getPrice());
             } else {
                 model.addAttribute("price1", 0);
             }

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

@@ -216,9 +216,9 @@ public class CmSecondHandDetailController extends BaseController {
         product.setVisibility(cmSecondHandDetail.getVisibility());
         String normalPrice = cmSecondHandDetail.getNormalPrice();
         if (StringUtils.isNotEmpty(normalPrice)) {
-            product.setNormalPrice(Float.parseFloat(normalPrice));
+            product.setNormalPrice(Double.parseDouble(normalPrice));
         }
-        product.setPrice1(BigDecimal.valueOf(cmSecondHandDetail.getPrice1()));
+        product.setPrice(cmSecondHandDetail.getPrice());
         product.setCostCheckFlag(cmSecondHandDetail.getCostCheckFlag());
         if ("1".equals(product.getCostCheckFlag())) {
             product.setCostPrice(String.valueOf(cmSecondHandDetail.getCostPrice()));

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

@@ -63,25 +63,25 @@ public class ProductActController extends BaseController {
         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");
-                    }
-                }
+//                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()));
@@ -125,10 +125,10 @@ public class ProductActController extends BaseController {
             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());
+//            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) {

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

@@ -102,9 +102,9 @@ public class ProductController extends BaseController{
     public String productPageMulti(Product product,String type,HttpServletRequest request, HttpServletResponse response, Model model) {
         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) ");
-        }else if(StringUtils.equals(type, "smallType")){
+        }/*else if(StringUtils.equals(type, "smallType")){
             model.addAttribute("crmSmallTypeId", product.getCrmSmallTypeId());
-        }
+        }*/
         Page<Product> page = productService.findPage(new Page<Product>(request, response), product);
         model.addAttribute("type", type);
         model.addAttribute("page", page);
@@ -119,24 +119,24 @@ public class ProductController extends BaseController{
         if(CollectionUtils.isNotEmpty(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");
-                    }
-                }
+//                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, ""));
                 //自定义分类
                 List<ProductCustomClassification> typeList = productCustomClassificationService.findCustomClassification(Integer.valueOf(p.getId()));
@@ -741,15 +741,15 @@ public class ProductController extends BaseController{
     @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);
-        }
+//        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";
@@ -985,335 +985,335 @@ public class ProductController extends BaseController{
     }
 
 
-    /**
-     * 参加{买赠,买送,满减}活动
-     * @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;
-    }
+//    /**
+//     * 参加{买赠,买送,满减}活动
+//     * @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;
+//    }
 
 
     /**

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

@@ -1,300 +1,301 @@
-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();
-    }
-}
+//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";
+//    }
+//}

+ 1 - 1
src/main/java/com/caimei/modules/weisha/web/CmOrganizePromotionController.java

@@ -291,7 +291,7 @@ public class CmOrganizePromotionController extends BaseController {
             cmOrganizePromotion.setPromotionShops(promotionShops);
             model.addAttribute("cmOrganizePromotion", cmOrganizePromotion);
             if (cmOrganizePromotion.getPromotionProducts().size() > 0) {
-                model.addAttribute("price1", cmOrganizePromotion.getPromotionProducts().get(0).getPrice1());
+                model.addAttribute("price1", cmOrganizePromotion.getPromotionProducts().get(0).getPrice());
             } else {
                 model.addAttribute("price1", 0);
             }

+ 5 - 5
src/main/java/com/cmme/modules/product/entity/CmmeProduct.java

@@ -32,7 +32,7 @@ public class CmmeProduct extends DataEntity<CmmeProduct> {
 	private String price0TextFlag;		// 普通用户文字展示标志 0 否 价格 1 是 文字
 	private Double price1;		// 普通会员价
 	private String price1Text;		// 会员用户价格文字
-	private String price1TextFlag;		// 会员用户文字展示标志 0 否 价格 1 是 文字
+	private String priceFlag;		// 会员用户文字展示标志 0 否 价格 1 是 文字
 	private Integer stock;		// 库存
 	private String mainImage;		// 主图
 	private String addTime;		// 添加时间
@@ -199,12 +199,12 @@ public class CmmeProduct extends DataEntity<CmmeProduct> {
 	}
 	
 	@Length(min=0, max=1, message="会员用户文字展示标志 0 否 价格 1 是 文字长度必须介于 0 和 1 之间")
-	public String getPrice1TextFlag() {
-		return price1TextFlag;
+	public String getPriceFlag() {
+		return priceFlag;
 	}
 
-	public void setPrice1TextFlag(String price1TextFlag) {
-		this.price1TextFlag = price1TextFlag;
+	public void setPriceFlag(String priceFlag) {
+		this.priceFlag = priceFlag;
 	}
 	
 	public Integer getStock() {

+ 1 - 1
src/main/resources/mappings/modules/bulkpurchase/PurchaseProductMapper.xml

@@ -44,7 +44,7 @@
 	<select id="findList" resultType="PurchaseProduct" >
 		SELECT b.name shopName ,b.`shopID` shopId,a.name purchaseProductName,
 		a.`price1` price,a.`productID` productId,a.productCode productNo,a.mainImage image
-		,a.costCheckFlag costCheckFlag,a.costPrice costPrice,a.costProportional costProportional, a.price0 AS normalPrice
+		,a.costCheckFlag costCheckFlag,a.costPrice costPrice,a.costProportional costProportional, a.normalPrice AS normalPrice
 		,a.ladderPriceFlag as ladderPriceFlag
 		,a.includedTax AS includedTax, a.invoiceType AS invoiceType, a.taxPoint AS taxRate, a.supplierTaxPoint AS supplierTaxRate,
 		a.minBuyNumber AS num, a.commodityType,

+ 5 - 5
src/main/resources/mappings/modules/cmme/product/CmmeProductMapper.xml

@@ -19,7 +19,7 @@
 		a.price0TextFlag AS "price0TextFlag",
 		a.price1 AS "price1",
 		a.price1Text AS "price1Text",
-		a.price1TextFlag AS "price1TextFlag",
+		a.priceFlag AS "priceFlag",
 		a.stock AS "stock",
 		a.mainImage AS "mainImage",
 		a.addTime AS "addTime",
@@ -140,7 +140,7 @@
 			price0TextFlag,
 			price1,
 			price1Text,
-			price1TextFlag,
+			priceFlag,
 			stock,
 			mainImage,
 			addTime,
@@ -177,7 +177,7 @@
 			#{price0TextFlag},
 			#{price1},
 			#{price1Text},
-			#{price1TextFlag},
+			#{priceFlag},
 			#{stock},
 			#{mainImage},
 			#{addTime},
@@ -246,8 +246,8 @@
 		<if test="price1Text != null and price1Text != ''">
 			price1Text = #{price1Text},
 		</if>
-		<if test="price1TextFlag != null and price1TextFlag != ''">
-			price1TextFlag = #{price1TextFlag},
+		<if test="priceFlag != null and priceFlag != ''">
+			priceFlag = #{priceFlag},
 		</if>
 		<if test="stock != null and stock != ''">
 			stock = #{stock},

+ 1 - 1
src/main/resources/mappings/modules/product/CmPromotionMapper.xml

@@ -158,7 +158,7 @@
         <where>
             p.productCategory = 1
             and p.validFlag = 2
-            and p.price1TextFlag != 1
+            and p.priceFlag != 1
             and p.stock <![CDATA[   >  ]]> 0
             <if test="productID != null">
                 AND p.productID = #{productID}

+ 1 - 1
src/main/resources/mappings/modules/product/CmSecondHandDetailMapper.xml

@@ -44,7 +44,7 @@
 		p.productCategory AS "productCategory",
 		p.name AS "name",
 		p.normalPrice AS "normalPrice",
-		p.price1 AS "price1",
+		p.price AS "price",
 		p.stock AS "stock",
 		p.brandID AS "brandID",
 		p.costPrice as "costPrice",

+ 29 - 568
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -23,26 +23,9 @@
 		a.productRemarks AS "productRemarks",
 		a.normalPrice AS "normalPrice",
 		a.price AS "price",
-		a.highestUserLevelPrice AS "highestUserLevelPrice",
-		a.lowestUserLevelPrice AS "lowestUserLevelPrice",
-		a.lowestUserLevelID AS "lowestUserLevelID",
-		a.price0 AS "price0",
-		a.price0Text AS "price0Text",
-		a.price0TextFlag AS "price0TextFlag",
-		a.price1 AS "price1",
-		a.price1Text AS "price1Text",
-		a.price1TextFlag AS "price1TextFlag",
-		a.price8 AS "price8",
-		a.price8Text AS "price8Text",
-		a.price8TextFlag AS "price8TextFlag",
+		a.priceFlag AS "priceFlag",
+		a.beautyActFlag AS "beautyActFlag",
 		a.ladderPriceFlag AS "ladderPriceFlag",
-		a.price2 AS "price2",
-		a.price3 AS "price3",
-		a.price4 AS "price4",
-		a.price5 AS "price5",
-		a.price6 AS "price6",
-		a.price7 AS "price7",
-		a.fee AS "fee",
 		a.stock AS "stock",
 		a.hasSkuFlag AS "hasSkuFlag",
 		a.mainImage AS "mainImage",
@@ -62,15 +45,12 @@
 		a.featuredFlag AS "featuredFlag",
 		a.featuredSortIndex AS "featuredSortIndex",
 		a.productCode AS "productCode",
-		a.rate1 AS "rate1",
-		a.rate2 AS "rate2",
 		a.unit AS "unit",
 		a.synToERPFlag AS "synToERPFlag",
 		a.allAreaFlag AS "allAreaFlag",
 		a.provinceIDs AS "provinceIDs",
 		a.serviceNumber AS "serviceNumber",
 		a.maxBuyNumber AS "maxBuyNumber",
-		a.virtualFlag AS "virtualFlag",
 		a.minBuyNumber AS "minBuyNumber",
 		a.packageCount AS "packageCount",
 		a.byFlag AS "byFlag",
@@ -79,67 +59,26 @@
 		a.promotionProductFlag AS "promotionProductFlag",
 		a.groupBuyProductFlag AS "groupBuyProductFlag",
 		a.step AS "step",
-		a.speCommisionFlag AS "speCommisionFlag",
-		a.speCommision AS "speCommision",
-		a.videourl AS "videourl",
-		a.props AS "props",
-		a.providers AS "providers",
-		a.serviceCommissionRatio AS "serviceCommissionRatio",
-		a.reCommissionRatio AS "reCommissionRatio",
-		a.pushToERPName AS "pushToERPName",
-		a.prodBeans AS "prodBeans",
-		a.useBeansFlag AS "useBeansFlag",
-		a.privateFlag AS "privateFlag",
-		a.invisibleServiceProviderIDs AS "invisibleServiceProviderIDs",
-		a.displayOnCRMFlag AS "displayOnCRMFlag",
-		a.needServiceFlag AS "needServiceFlag",
 		a.actStatus AS "actStatus",
-		a.actPrice0 AS "actPrice0",
-		a.actPrice1 AS "actPrice1",
-		a.actPrice2 AS "actPrice2",
-		a.actPrice3 AS "actPrice3",
-		a.actPrice4 AS "actPrice4",
-		a.actPrice5 AS "actPrice5",
-		a.actPrice6 AS "actPrice6",
-		a.actPrice7 AS "actPrice7",
-		a.beginTime AS "beginTime",
-		a.endTime AS "endTime",
 		a.actFlag AS "actFlag",
 		a.actType AS "actType",
-		a.actFullReduceAmount AS "actFullReduceAmount",
-		a.actReduceAmount AS "actReduceAmount",
-		a.actFullGiftAmount AS "actFullGiftAmount",
-		a.actBuyGiftNum AS "actBuyGiftNum",
 		a.onlineTime AS "onlineTime",
 		a.downlineTime AS "downlineTime",
-		a.shopIndexModuleID AS "shopIndexModuleID",
 		a.freePostFlag AS "freePostFlag",
-		a.crmBigTypeId AS "crmBigTypeId",
-		a.crmSmallTypeId AS "crmSmallTypeId",
 		a.costPrice AS "costPrice",
 		a.costProportional AS "costProportional",
 		a.costCheckFlag AS "costCheckFlag",
 		a.precisehKey AS "precisehKey",
-		a.docBoost AS "docBoost",
-		a.cmbeanFlag AS "cmbeanFlag",
-		a.cmbeanPrice AS "cmbeanPrice",
-		a.cmbeanSort AS "cmbeanSort",
 		s.name AS "shopName",
 		a.actSort AS "actSort",
-		a.actCreateTime AS "actCreateTime",
 		a.recommendType AS "recommendType",
 		a.aliasName as "aliasName",
-		a.price0Grade as "price0Grade",
-		a.price1Grade as "price1Grade",
-		a.price8Grade as "price8Grade",
 		a.visibility as "visibility",
-		a.surplusTime as "surplusTime",
 		a.productType as "productType",
 		a.qualificationImg as "qualificationImg",
 		a.includedTax as "includedTax",
 		a.invoiceType as "invoiceType",
 		a.taxPoint as "taxPoint",
-		a.priceType as "priceType",
 		a.tags as "tags",
 		a.machineType as "machineType",
 		a.trainingMethod as "trainingMethod",
@@ -402,26 +341,9 @@
 		searchKey,
 		normalPrice,
 		price,
-		highestUserLevelPrice,
-		lowestUserLevelPrice,
-		lowestUserLevelID,
-		price0,
-		price0Text,
-		price0TextFlag,
-		price1,
-		price1Text,
-		price1TextFlag,
-		price8,
-		price8Text,
-		price8TextFlag,
+		priceFlag,
+		beautyActFlag,
 		ladderPriceFlag,
-		price2,
-		price3,
-		price4,
-		price5,
-		price6,
-		price7,
-		fee,
 		stock,
 		hasSkuFlag,
 		mainImage,
@@ -440,15 +362,12 @@
 		featuredFlag,
 		featuredSortIndex,
 		productCode,
-		rate1,
-		rate2,
 		unit,
 		synToERPFlag,
 		allAreaFlag,
 		provinceIDs,
 		serviceNumber,
 		maxBuyNumber,
-		virtualFlag,
 		minBuyNumber,
 		packageCount,
 		byFlag,
@@ -457,50 +376,15 @@
 		promotionProductFlag,
 		groupBuyProductFlag,
 		step,
-		speCommisionFlag,
-		speCommision,
-		videourl,
-		props,
-		providers,
-		serviceCommissionRatio,
-		reCommissionRatio,
-		pushToERPName,
-		prodBeans,
-		useBeansFlag,
-		privateFlag,
-		invisibleServiceProviderIDs,
-		displayOnCRMFlag,
-		needServiceFlag,
-		actPrice0,
-		actPrice1,
-		actPrice2,
-		actPrice3,
-		actPrice4,
-		actPrice5,
-		actPrice6,
-		actPrice7,
-		beginTime,
-		endTime,
 		actFlag,
 		actType,
-		actFullReduceAmount,
-		actReduceAmount,
-		actFullGiftAmount,
-		actBuyGiftNum,
 		onlineTime,
 		downlineTime,
-		shopIndexModuleID,
 		freePostFlag,
-		crmBigTypeId,
-		crmSmallTypeId,
 		costPrice,
 		costProportional,
 		costCheckFlag,
-		precisehKey,
-		docBoost,
-		cmbeanFlag,
-		cmbeanPrice,
-		cmbeanSort
+		precisehKey
 		) VALUES (
 		#{id},
 		#{brandID},
@@ -513,26 +397,9 @@
 		#{searchKey},
 		#{normalPrice},
 		#{price},
-		#{highestUserLevelPrice},
-		#{lowestUserLevelPrice},
-		#{lowestUserLevelID},
-		#{price0},
-		#{price0Text},
-		#{price0TextFlag},
-		#{price1},
-		#{price1Text},
-		#{price1TextFlag},
-		#{price8},
-		#{price8Text},
-		#{price8TextFlag},
+		#{priceFlag},
+		#{beautyActFlag},
 		#{ladderPriceFlag},
-		#{price2},
-		#{price3},
-		#{price4},
-		#{price5},
-		#{price6},
-		#{price7},
-		#{fee},
 		#{stock},
 		#{hasSkuFlag},
 		#{mainImage},
@@ -551,15 +418,12 @@
 		#{featuredFlag},
 		#{featuredSortIndex},
 		#{productCode},
-		#{rate1},
-		#{rate2},
 		#{unit},
 		#{synToERPFlag},
 		#{allAreaFlag},
 		#{provinceIDs},
 		#{serviceNumber},
 		#{maxBuyNumber},
-		#{virtualFlag},
 		#{minBuyNumber},
 		#{packageCount},
 		#{byFlag},
@@ -568,50 +432,15 @@
 		#{promotionProductFlag},
 		#{groupBuyProductFlag},
 		#{step},
-		#{speCommisionFlag},
-		#{speCommision},
-		#{videourl},
-		#{props},
-		#{providers},
-		#{serviceCommissionRatio},
-		#{reCommissionRatio},
-		#{pushToERPName},
-		#{prodBeans},
-		#{useBeansFlag},
-		#{privateFlag},
-		#{invisibleServiceProviderIDs},
-		#{displayOnCRMFlag},
-		#{needServiceFlag},
-		#{actPrice0},
-		#{actPrice1},
-		#{actPrice2},
-		#{actPrice3},
-		#{actPrice4},
-		#{actPrice5},
-		#{actPrice6},
-		#{actPrice7},
-		#{beginTime},
-		#{endTime},
 		#{actFlag},
 		#{actType},
-		#{actFullReduceAmount},
-		#{actReduceAmount},
-		#{actFullGiftAmount},
-		#{actBuyGiftNum},
 		#{onlineTime},
 		#{downlineTime},
-		#{shopIndexModuleID},
 		#{freePostFlag},
-		#{crmBigTypeId},
-		#{crmSmallTypeId},
 		#{costPrice},
 		#{costProportional},
 		#{costCheckFlag},
-		#{precisehKey},
-		#{docBoost},
-		#{cmbeanFlag},
-		#{cmbeanPrice},
-		#{cmbeanSort}
+		#{precisehKey}
 		)
 	</insert>
 
@@ -626,26 +455,9 @@
 		searchKey = #{searchKey},
 		normalPrice = #{normalPrice},
 		price = #{price},
-		highestUserLevelPrice = #{highestUserLevelPrice},
-		lowestUserLevelPrice = #{lowestUserLevelPrice},
-		lowestUserLevelID = #{lowestUserLevelID},
-		price0 = #{price0},
-		price0Text = #{price0Text},
-		price0TextFlag = #{price0TextFlag},
-		price1 = #{price1},
-		price1Text = #{price1Text},
-		price1TextFlag = #{price1TextFlag},
-		price8 = #{price8},
-		price8Text = #{price8Text},
-		price8TextFlag = #{price8TextFlag},
+		priceFlag = #{priceFlag},
+		beautyActFlag = #{beautyActFlag},
 		ladderPriceFlag = #{ladderPriceFlag},
-		price2 = #{price2},
-		price3 = #{price3},
-		price4 = #{price4},
-		price5 = #{price5},
-		price6 = #{price6},
-		price7 = #{price7},
-		fee = #{fee},
 		stock = #{stock},
 		hasSkuFlag = #{hasSkuFlag},
 		mainImage = #{mainImage},
@@ -665,15 +477,12 @@
 		featuredFlag = #{featuredFlag},
 		featuredSortIndex = #{featuredSortIndex},
 		productCode = #{productCode},
-		rate1 = #{rate1},
-		rate2 = #{rate2},
 		unit = #{unit},
 		synToERPFlag = #{synToERPFlag},
 		allAreaFlag = #{allAreaFlag},
 		provinceIDs = #{provinceIDs},
 		serviceNumber = #{serviceNumber},
 		maxBuyNumber = #{maxBuyNumber},
-		virtualFlag = #{virtualFlag},
 		minBuyNumber = #{minBuyNumber},
 		packageCount = #{packageCount},
 		byFlag = #{byFlag},
@@ -682,52 +491,16 @@
 		promotionProductFlag = #{promotionProductFlag},
 		groupBuyProductFlag = #{groupBuyProductFlag},
 		step = #{step},
-		speCommisionFlag = #{speCommisionFlag},
-		speCommision = #{speCommision},
-		videourl = #{videourl},
-		props = #{props},
-		providers = #{providers},
-		serviceCommissionRatio = #{serviceCommissionRatio},
-		reCommissionRatio = #{reCommissionRatio},
-		pushToERPName = #{pushToERPName},
-		prodBeans = #{prodBeans},
-		useBeansFlag = #{useBeansFlag},
-		privateFlag = #{privateFlag},
-		invisibleServiceProviderIDs = #{invisibleServiceProviderIDs},
-		displayOnCRMFlag = #{displayOnCRMFlag},
-		needServiceFlag = #{needServiceFlag},
-		actPrice0 = #{actPrice0},
-		actPrice1 = #{actPrice1},
-		actPrice2 = #{actPrice2},
-		actPrice3 = #{actPrice3},
-		actPrice4 = #{actPrice4},
-		actPrice5 = #{actPrice5},
-		actPrice6 = #{actPrice6},
-		actPrice7 = #{actPrice7},
-		beginTime = #{beginTime},
-		endTime = #{endTime},
 		actFlag = #{actFlag},
 		actType = #{actType},
-		actFullReduceAmount = #{actFullReduceAmount},
-		actReduceAmount = #{actReduceAmount},
-		actFullGiftAmount = #{actFullGiftAmount},
-		actBuyGiftNum = #{actBuyGiftNum},
 		onlineTime = #{onlineTime},
 		downlineTime = #{downlineTime},
-		shopIndexModuleID = #{shopIndexModuleID},
 		freePostFlag = #{freePostFlag},
-		crmBigTypeId = #{crmBigTypeId},
-		crmSmallTypeId = #{crmSmallTypeId},
 		costPrice = #{costPrice},
 		costProportional = #{costProportional},
 		costCheckFlag = #{costCheckFlag},
 		precisehKey = #{precisehKey},
-		docBoost = #{docBoost},
-		cmbeanFlag = #{cmbeanFlag},
-		cmbeanPrice = #{cmbeanPrice},
-		cmbeanSort = #{cmbeanSort},
-		actSort = #{actSort},
-		actCreateTime = #{actCreateTime}
+		actSort = #{actSort}
 		WHERE productID = #{id}
 	</update>
 
@@ -932,13 +705,13 @@
 		)
 	</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="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 product a SET a.actFlag = 0
@@ -1053,7 +826,6 @@
     	INSERT INTO `product` (
 			  `brandID`,
 			  `tinyTypeID`,
-			  `classifyId`,
 			  <if test="productCategory != null and  productCategory != '' ">
 			  `productCategory`,
 			  </if>
@@ -1066,36 +838,15 @@
 			  `productRemarks`,
 			  `normalPrice`,
 			  `price`,
-			  `highestUserLevelPrice`,
-			  `lowestUserLevelPrice`,
-			  `lowestUserLevelID`,
-			  `price0`,
-			  `price0Grade`,
-			  `price0Text`,
-			  `price0TextFlag`,
-			  `price1`,
-			  `price1Grade`,
-			  `price1Text`,
-			  `price1TextFlag`,
-			  `price8`,
-			  `price8Grade`,
-			  `price8Text`,
-			  `price8TextFlag`,
+			  `priceFlag`,
+			  `beautyActFlag`,
 			  `ladderPriceFlag`,
-			  `price2`,
-			  `price3`,
-			  `price4`,
-			  `price5`,
-			  `price6`,
-			  `price7`,
-			  `fee`,
 			  `stock`,
 			  `hasSkuFlag`,
 			  `mainImage`,
 			  `propertiesInfo`,
 			  `addTime`,
 			  `updateTime`,
-			  `classifyAddTime`,
 			  `weekSellNumber`,
 			  `beforeValidFlag`,
 			  `validFlag`,
@@ -1108,15 +859,12 @@
 			  `featuredFlag`,
 			  `featuredSortIndex`,
 			  `productCode`,
-			  `rate1`,
-			  `rate2`,
 			  `unit`,
 			  `synToERPFlag`,
 			  `allAreaFlag`,
 			  `provinceIDs`,
 			  `serviceNumber`,
 			  `maxBuyNumber`,
-			  `virtualFlag`,
 			  `minBuyNumber`,
 			  `packageCount`,
 			  `byFlag`,
@@ -1125,56 +873,19 @@
 			  `promotionProductFlag`,
 			  `groupBuyProductFlag`,
 			  `step`,
-			  `speCommisionFlag`,
-			  `speCommision`,
-			  `videourl`,
-			  `props`,
-			  `providers`,
-			  `serviceCommissionRatio`,
-			  `reCommissionRatio`,
-			  `pushToERPName`,
-			  `prodBeans`,
-			  `useBeansFlag`,
-			  `privateFlag`,
-			  `invisibleServiceProviderIDs`,
-			  `displayOnCRMFlag`,
-			  `needServiceFlag`,
 			  `actFlag`,
 			  `actStatus`,
 			  `actSort`,
-			  `actPrice0`,
-			  `actPrice1`,
-			  `actPrice2`,
-			  `actPrice3`,
-			  `actPrice4`,
-			  `actPrice5`,
-			  `actPrice6`,
-			  `actPrice7`,
 			  `actType`,
-			  `actCreateTime`,
-			  `actFullReduceAmount`,
-			  `actReduceAmount`,
 			  `visibility`,
-			  `actFullGiftAmount`,
-			  `actBuyGiftNum`,
-			  `beginTime`,
-			  `endTime`,
-			  `shopIndexModuleID`,
 			  `onlineTime`,
 			  `downlineTime`,
 			  `freePostFlag`,
-			  `crmBigTypeId`,
-			  `crmSmallTypeId`,
 			  `costPrice`,
 			  `costProportional`,
 			  `costCheckFlag`,
 			  `precisehKey`,
-			  `docBoost`,
-			  `cmbeanFlag`,
-			  `cmbeanPrice`,
-			  `cmbeanSort`,
 			  `tags`,
-			  `surplusTime`,
 			  `productType`,
 			  `machineType`,
 			  `qualificationImg`,
@@ -1182,7 +893,6 @@
 			  `taxPoint`,
 			  `invoiceType`,
 			  `recommendType`,
-			  `priceType`,
 			  `combinationID`,
 			  `combinationSort`
 			)
@@ -1190,7 +900,6 @@
 			  (
 				#{brandID},
 				#{tinyTypeID},
-				#{classifyId},
 				<if test="productCategory != null and  productCategory != '' ">
 				#{productCategory},
 				</if>
@@ -1203,36 +912,15 @@
 				#{productRemarks},
 				#{normalPrice},
 				#{price},
-				#{highestUserLevelPrice},
-				#{lowestUserLevelPrice},
-				#{lowestUserLevelID},
-				#{price0},
-				#{price0Grade},
-				#{price0Text},
-				#{price0TextFlag},
-				#{price1},
-				#{price1Grade},
-				#{price1Text},
-				#{price1TextFlag},
-				#{price8},
-				#{price8Grade},
-				#{price8Text},
-				#{price8TextFlag},
+				#{priceFlag},
+				#{beautyActFlag},
 				#{ladderPriceFlag},
-				#{price2},
-				#{price3},
-				#{price4},
-				#{price5},
-				#{price6},
-				#{price7},
-				#{fee},
 				#{stock},
 				#{hasSkuFlag},
 				#{mainImage},
 				#{propertiesInfo},
 				#{addTime},
 				#{updateTime},
-				#{classifyAddTime},
 				#{weekSellNumber},
 				#{beforeValidFlag},
 				#{validFlag},
@@ -1245,15 +933,12 @@
 				#{featuredFlag},
 				#{featuredSortIndex},
 				#{productCode},
-				#{rate1},
-				#{rate2},
 				#{unit},
 				#{synToERPFlag},
 				#{allAreaFlag},
 				#{provinceIDs},
 				#{serviceNumber},
 				#{maxBuyNumber},
-				#{virtualFlag},
 				#{minBuyNumber},
 				#{packageCount},
 				#{byFlag},
@@ -1262,56 +947,19 @@
 				#{promotionProductFlag},
 				#{groupBuyProductFlag},
 				#{step},
-				#{speCommisionFlag},
-				#{speCommision},
-				#{videourl},
-				#{props},
-				#{providers},
-				#{serviceCommissionRatio},
-				#{reCommissionRatio},
-				#{pushToERPName},
-				#{prodBeans},
-				#{useBeansFlag},
-				#{privateFlag},
-				#{invisibleServiceProviderIDs},
-				#{displayOnCRMFlag},
-				#{needServiceFlag},
 				#{actFlag},
 				#{actStatus},
 				#{actSort},
-				#{actPrice0},
-				#{actPrice1},
-				#{actPrice2},
-				#{actPrice3},
-				#{actPrice4},
-				#{actPrice5},
-				#{actPrice6},
-				#{actPrice7},
 				#{actType},
-				#{actCreateTime},
-				#{actFullReduceAmount},
-				#{actReduceAmount},
 				#{visibility},
-				#{actFullGiftAmount},
-				#{actBuyGiftNum},
-				#{beginTime},
-				#{endTime},
-				#{shopIndexModuleID},
 				#{onlineTime},
 				#{downlineTime},
 				#{freePostFlag},
-				#{crmBigTypeId},
-				#{crmSmallTypeId},
 				#{costPrice},
 				#{costProportional},
 				#{costCheckFlag},
 				#{precisehKey},
-				#{docBoost},
-				#{cmbeanFlag},
-				#{cmbeanPrice},
-				#{cmbeanSort},
 				#{tags},
-				#{surplusTime},
 				#{productType},
 				#{machineType},
 				#{qualificationImg},
@@ -1319,7 +967,6 @@
 				#{taxPoint},
 				#{invoiceType},
 				#{recommendType},
-				#{priceType},
 				#{combinationID},
 				#{combinationSort}
 			  )
@@ -1725,7 +1372,7 @@
 	</update>
 
 	<update id="updateBrnadId">
-		UPDATE product_new
+		UPDATE product
 		set brandID = #{brandID}
 		WHERE productID = #{productID}
 	</update>
@@ -1738,7 +1385,7 @@
 
 
 	<update id="updateTinyType">
-		UPDATE product_new
+		UPDATE product
 		set tinyTypeID = #{tinyTypeID}
 		WHERE productID = #{productID}
 	</update>
@@ -1756,9 +1403,6 @@
       <if test="preferredFlag != null and preferredFlag !=''">
         preferredFlag = #{preferredFlag},
       </if>
-      <if test="selfTypeID != null and selfTypeID !=''">
-        selfTypeID = #{selfTypeID},
-      </if>
       <if test="shopID != null and shopID !=''">
         shopID = #{shopID},
       </if>
@@ -1783,75 +1427,15 @@
       <if test="price != null and price !=''">
         price = #{price},
       </if>
-      <if test="highestUserLevelPrice != null and highestUserLevelPrice !=''">
-        highestUserLevelPrice = #{highestUserLevelPrice},
-      </if>
-      <if test="lowestUserLevelPrice != null and lowestUserLevelPrice !=''">
-        lowestUserLevelPrice = #{lowestUserLevelPrice},
-      </if>
-      <if test="lowestUserLevelID != null and lowestUserLevelID !=''">
-        lowestUserLevelID = #{lowestUserLevelID},
-      </if>
-      <if test="price0 != null and price0 !=''">
-        price0 = #{price0},
-      </if>
-      <if test="price0Grade != null and price0Grade !=''">
-        price0Grade = #{price0Grade},
-      </if>
-      <if test="price0Text != null and price0Text !=''">
-        price0Text = #{price0Text},
-      </if>
-      <if test="price0TextFlag != null and price0TextFlag !=''">
-        price0TextFlag = #{price0TextFlag},
+      <if test="priceFlag != null and priceFlag !=''">
+        priceFlag = #{priceFlag},
       </if>
-      <if test="price1 != null and price1 !=''">
-        price1 = #{price1},
-      </if>
-      <if test="price1Grade != null and price1Grade !=''">
-        price1Grade = #{price1Grade},
-      </if>
-      <if test="price1Text != null and price1Text !=''">
-        price1Text = #{price1Text},
-      </if>
-      <if test="price1TextFlag != null and price1TextFlag !=''">
-        price1TextFlag = #{price1TextFlag},
-      </if>
-      <if test="price8 != null and price8 !=''">
-        price8 = #{price8},
-      </if>
-      <if test="price8Grade != null and price8Grade !=''">
-        price8Grade = #{price8Grade},
-      </if>
-      <if test="price8Text != null and price8Text !=''">
-        price8Text = #{price8Text},
-      </if>
-      <if test="price8TextFlag != null and price8TextFlag !=''">
-        price8TextFlag = #{price8TextFlag},
+      <if test="beautyActFlag != null and beautyActFlag !=''">
+        beautyActFlag = #{beautyActFlag},
       </if>
       <if test="ladderPriceFlag != null and ladderPriceFlag !=''">
         ladderPriceFlag = #{ladderPriceFlag},
       </if>
-      <if test="price2 != null and price2 !=''">
-        price2 = #{price2},
-      </if>
-      <if test="price3 != null and price3 !=''">
-        price3 = #{price3},
-      </if>
-      <if test="price4 != null and price4 !=''">
-        price4 = #{price4},
-      </if>
-      <if test="price5 != null and price5 !=''">
-        price5 = #{price5},
-      </if>
-      <if test="price6 != null and price6 !=''">
-        price6 = #{price6},
-      </if>
-      <if test="price7 != null and price7 !=''">
-        price7 = #{price7},
-      </if>
-      <if test="fee != null and fee !=''">
-        fee = #{fee},
-      </if>
       <if test="stock != null and stock !=''">
         stock = #{stock},
       </if>
@@ -1906,12 +1490,6 @@
       <if test="productCode != null and productCode !=''">
         productCode = #{productCode},
       </if>
-      <if test="rate1 != null and rate1 !=''">
-        rate1 = #{rate1},
-      </if>
-      <if test="rate2 != null and rate2 !=''">
-        rate2 = #{rate2},
-      </if>
       <if test="unit != null and unit !=''">
         unit = #{unit},
       </if>
@@ -1930,9 +1508,6 @@
       <if test="maxBuyNumber != null and maxBuyNumber !=''">
         maxBuyNumber = #{maxBuyNumber},
       </if>
-      <if test="virtualFlag != null and virtualFlag !=''">
-        virtualFlag = #{virtualFlag},
-      </if>
       <if test="minBuyNumber != null and minBuyNumber !=''">
         minBuyNumber = #{minBuyNumber},
       </if>
@@ -1957,93 +1532,15 @@
       <if test="step != null and step !=''">
         step = #{step},
       </if>
-      <if test="speCommisionFlag != null and speCommisionFlag !=''">
-        speCommisionFlag = #{speCommisionFlag},
-      </if>
-      <if test="speCommision != null and speCommision !=''">
-        speCommision = #{speCommision},
-      </if>
-      <if test="videourl != null and videourl !=''">
-        videourl = #{videourl},
-      </if>
-      <if test="props != null and props !=''">
-        props = #{props},
-      </if>
-      <if test="providers != null and providers !=''">
-        providers = #{providers},
-      </if>
-      <if test="serviceCommissionRatio != null and serviceCommissionRatio !=''">
-        serviceCommissionRatio = #{serviceCommissionRatio},
-      </if>
-      <if test="reCommissionRatio != null and reCommissionRatio !=''">
-        reCommissionRatio = #{reCommissionRatio},
-      </if>
-      <if test="pushToERPName != null and pushToERPName !=''">
-        pushToERPName = #{pushToERPName},
-      </if>
-      <if test="prodBeans != null and prodBeans !=''">
-        prodBeans = #{prodBeans},
-      </if>
-      <if test="useBeansFlag != null and useBeansFlag !=''">
-        useBeansFlag = #{useBeansFlag},
-      </if>
-      <if test="privateFlag != null and privateFlag !=''">
-        privateFlag = #{privateFlag},
-      </if>
-      <if test="invisibleServiceProviderIDs != null and invisibleServiceProviderIDs !=''">
-        invisibleServiceProviderIDs = #{invisibleServiceProviderIDs},
-      </if>
-      <if test="displayOnCRMFlag != null and displayOnCRMFlag !=''">
-        displayOnCRMFlag = #{displayOnCRMFlag},
-      </if>
-      <if test="needServiceFlag != null and needServiceFlag !=''">
-        needServiceFlag = #{needServiceFlag},
-      </if>
       <if test="actFlag != null and actFlag !=''">
         actFlag = #{actFlag},
       </if>
       <if test="actSort != null and actSort !=''">
         actSort = #{actSort},
       </if>
-      <if test="actPrice0 != null and actPrice0 !=''">
-        actPrice0 = #{actPrice0},
-      </if>
-      <if test="actPrice1 != null and actPrice1 !=''">
-        actPrice1 = #{actPrice1},
-      </if>
-      <if test="actPrice2 != null and actPrice2 !=''">
-        actPrice2 = #{actPrice2},
-      </if>
-      <if test="actPrice3 != null and actPrice3 !=''">
-        actPrice3 = #{actPrice3},
-      </if>
-      <if test="actPrice4 != null and actPrice4 !=''">
-        actPrice4 = #{actPrice4},
-      </if>
-      <if test="actPrice5 != null and actPrice5 !=''">
-        actPrice5 = #{actPrice5},
-      </if>
-      <if test="actPrice6 != null and actPrice6 !=''">
-        actPrice6 = #{actPrice6},
-      </if>
-      <if test="actPrice7 != null and actPrice7 !=''">
-        actPrice7 = #{actPrice7},
-      </if>
       <if test="actType != null and actType !=''">
         actType = #{actType},
       </if>
-      <if test="actCreateTime != null and actCreateTime !=''">
-        actCreateTime = #{actCreateTime},
-      </if>
-      <if test="beginTime != null and beginTime !=''">
-        beginTime = #{beginTime},
-      </if>
-      <if test="endTime != null and endTime !=''">
-        endTime = #{endTime},
-      </if>
-      <if test="shopIndexModuleID != null and shopIndexModuleID !=''">
-        shopIndexModuleID = #{shopIndexModuleID},
-      </if>
       <if test="onlineTime != null and onlineTime !=''">
         onlineTime = #{onlineTime},
       </if>
@@ -2053,12 +1550,6 @@
       <if test="freePostFlag != null and freePostFlag !=''">
         freePostFlag = #{freePostFlag},
       </if>
-      <if test="crmBigTypeId != null and crmBigTypeId !=''">
-        crmBigTypeId = #{crmBigTypeId},
-      </if>
-      <if test="crmSmallTypeId != null and crmSmallTypeId !=''">
-        crmSmallTypeId = #{crmSmallTypeId},
-      </if>
       <if test="costPrice != null and costPrice != ''">
         costPrice = #{costPrice},
       </if>
@@ -2071,36 +1562,9 @@
       <if test="precisehKey != null and precisehKey !=''">
         precisehKey = #{precisehKey},
       </if>
-      <if test="docBoost != null and docBoost !=''">
-        docBoost = #{docBoost},
-      </if>
-      <if test="cmbeanFlag != null and cmbeanFlag !=''">
-        cmbeanFlag = #{cmbeanFlag},
-      </if>
-      <if test="cmbeanPrice != null and cmbeanPrice !=''">
-        cmbeanPrice = #{cmbeanPrice},
-      </if>
-      <if test="cmbeanSort != null and cmbeanSort !=''">
-        cmbeanSort = #{cmbeanSort},
-      </if>
-      <if test="actBuyGiftNum != null and actBuyGiftNum !=''">
-        actBuyGiftNum = #{actBuyGiftNum},
-      </if>
-      <if test="actFullGiftAmount != null and actFullGiftAmount !=''">
-        actFullGiftAmount = #{actFullGiftAmount},
-      </if>
-      <if test="actFullReduceAmount != null and actFullReduceAmount !=''">
-        actFullReduceAmount = #{actFullReduceAmount},
-      </if>
-      <if test="actReduceAmount != null and actReduceAmount !=''">
-        actReduceAmount = #{actReduceAmount},
-      </if>
       <if test="visibility != null and visibility !=''">
         visibility = #{visibility},
       </if>
-      <if test="surplusTime != null and surplusTime !=''">
-        surplusTime = #{surplusTime},
-      </if>
       <if test="productType != null and productType !=''">
         productType = #{productType},
       </if>
@@ -2122,9 +1586,6 @@
       <if test="endTimeStr != null and endTimeStr !=''">
         endTimeStr = #{endTimeStr},
       </if>
-      <if test="priceType != null and priceType !=''">
-        priceType = #{priceType},
-      </if>
       <if test="tags != null and tags !=''">
         tags = #{tags},
       </if>
@@ -2203,7 +1664,7 @@
 	<select id="getProductByTypeName" resultType="com.caimei.modules.brand.entity.BrandAndProductType">
 		select
 		b.name AS "bigTypeName",b.bigTypeID,s.`name` AS "smallTypeName",s.smalltypeID,t.name AS "tinyTypeName" ,t.tinytypeID
-		from tinytype_new  t LEFT JOIN smalltype_new  s on  t.smallTypeID = s.smallTypeID  LEFT JOIN bigtype_new b ON b.bigTypeID = s.bigTypeID
+		from tinytype  t LEFT JOIN smalltype  s on  t.smallTypeID = s.smallTypeID  LEFT JOIN bigtype b ON b.bigTypeID = s.bigTypeID
 		where  b.`name` = #{name} AND s.`name` = #{name1} AND t.name = #{name2}
 	</select>
 

+ 103 - 528
src/main/resources/mappings/modules/product/ProductNewMapper.xml

@@ -7,158 +7,97 @@
     </resultMap>
     <sql id="productColumns">
         a.productID AS "id",
-		a.productID AS "productID",
-		a.brandID AS "brandID",
+        a.productID AS "productID",
+        a.brandID AS "brandID",
         ifnull(a.bigTypeID,0) AS "bigTypeID",
-		ifnull(a.smallTypeID,0)  AS "smallTypeID",
-		ifnull(a.tinyTypeID,0) AS "tinyTypeID",
-		a.productCategory AS "productCategory",
-		a.selfTypeID AS "selfTypeID",
-		a.preferredFlag AS "preferredFlag",
-		a.shopID AS "shopID",
-		a.name AS "name",
-		a.searchKey AS "searchKey",
-		a.combinationID AS "combinationID",
-		a.productRemarks AS "productRemarks",
-		a.normalPrice AS "normalPrice",
-		a.price AS "price",
-		a.highestUserLevelPrice AS "highestUserLevelPrice",
-		a.lowestUserLevelPrice AS "lowestUserLevelPrice",
-		a.lowestUserLevelID AS "lowestUserLevelID",
-		a.price0 AS "price0",
-		a.price0Text AS "price0Text",
-		a.price0TextFlag AS "price0TextFlag",
-		a.price1 AS "price1",
-		a.price1Text AS "price1Text",
-		a.price1TextFlag AS "price1TextFlag",
-		a.price8 AS "price8",
-		a.price8Text AS "price8Text",
-		a.price8TextFlag AS "price8TextFlag",
-		a.ladderPriceFlag AS "ladderPriceFlag",
-		a.price2 AS "price2",
-		a.price3 AS "price3",
-		a.price4 AS "price4",
-		a.price5 AS "price5",
-		a.price6 AS "price6",
-		a.price7 AS "price7",
-		a.fee AS "fee",
-		a.stock AS "stock",
-		a.hasSkuFlag AS "hasSkuFlag",
-		a.mainImage AS "mainImage",
-		a.propertiesInfo AS "propertiesInfo",
-		a.addTime AS "addTime",
-		a.updateTime AS "updateTime",
-		a.sellNumber AS "sellNumber",
-		a.weekSellNumber AS "weekSellNumber",
-		a.beforeValidFlag AS "beforeValidFlag",
-		a.validFlag AS "validFlag",
-		a.favoriteTimes AS "favoriteTimes",
-		a.commentScore AS "commentScore",
-		a.commentTimes AS "commentTimes",
-		a.selfRecommendFlag AS "selfRecommendFlag",
-		a.sysRecommendFlag AS "sysRecommendFlag",
-		a.sortIndex AS "sortIndex",
-		a.featuredFlag AS "featuredFlag",
-		a.featuredSortIndex AS "featuredSortIndex",
-		a.productCode AS "productCode",
-		a.rate1 AS "rate1",
-		a.rate2 AS "rate2",
-		a.unit AS "unit",
-		a.synToERPFlag AS "synToERPFlag",
-		a.allAreaFlag AS "allAreaFlag",
-		a.provinceIDs AS "provinceIDs",
-		a.serviceNumber AS "serviceNumber",
-		a.maxBuyNumber AS "maxBuyNumber",
-		a.virtualFlag AS "virtualFlag",
-		a.minBuyNumber AS "minBuyNumber",
-		a.packageCount AS "packageCount",
-		a.byFlag AS "byFlag",
-		a.normalProductFlag AS "normalProductFlag",
-		a.wholeSaleProductFlag AS "wholeSaleProductFlag",
-		a.promotionProductFlag AS "promotionProductFlag",
-		a.groupBuyProductFlag AS "groupBuyProductFlag",
-		a.step AS "step",
-		a.speCommisionFlag AS "speCommisionFlag",
-		a.speCommision AS "speCommision",
-		a.videourl AS "videourl",
-		a.props AS "props",
-		a.providers AS "providers",
-		a.serviceCommissionRatio AS "serviceCommissionRatio",
-		a.reCommissionRatio AS "reCommissionRatio",
-		a.pushToERPName AS "pushToERPName",
-		a.prodBeans AS "prodBeans",
-		a.useBeansFlag AS "useBeansFlag",
-		a.privateFlag AS "privateFlag",
-		a.invisibleServiceProviderIDs AS "invisibleServiceProviderIDs",
-		a.displayOnCRMFlag AS "displayOnCRMFlag",
-		a.needServiceFlag AS "needServiceFlag",
-		a.actStatus AS "actStatus",
-		a.actPrice0 AS "actPrice0",
-		a.actPrice1 AS "actPrice1",
-		a.actPrice2 AS "actPrice2",
-		a.actPrice3 AS "actPrice3",
-		a.actPrice4 AS "actPrice4",
-		a.actPrice5 AS "actPrice5",
-		a.actPrice6 AS "actPrice6",
-		a.actPrice7 AS "actPrice7",
-		a.beginTime AS "beginTime",
-		a.endTime AS "endTime",
-		a.actFlag AS "actFlag",
-		a.actType AS "actType",
-		a.actFullReduceAmount AS "actFullReduceAmount",
-		a.actReduceAmount AS "actReduceAmount",
-		a.actFullGiftAmount AS "actFullGiftAmount",
-		a.actBuyGiftNum AS "actBuyGiftNum",
-		a.onlineTime AS "onlineTime",
-		a.downlineTime AS "downlineTime",
-		a.shopIndexModuleID AS "shopIndexModuleID",
-		a.freePostFlag AS "freePostFlag",
-		a.crmBigTypeId AS "crmBigTypeId",
-		a.crmSmallTypeId AS "crmSmallTypeId",
-		a.costPrice AS "costPrice",
-		a.costProportional AS "costProportional",
-		a.costCheckFlag AS "costCheckFlag",
-		a.precisehKey AS "precisehKey",
-		a.docBoost AS "docBoost",
-		a.cmbeanFlag AS "cmbeanFlag",
-		a.cmbeanPrice AS "cmbeanPrice",
-		a.cmbeanSort AS "cmbeanSort",
-		s.name AS "shopName",
-		a.actSort AS "actSort",
-		a.actCreateTime AS "actCreateTime",
-		a.recommendType AS "recommendType",
-		a.aliasName as "aliasName",
-		a.price0Grade as "price0Grade",
-		a.price1Grade as "price1Grade",
-		a.price8Grade as "price8Grade",
-		a.visibility as "visibility",
-		a.surplusTime as "surplusTime",
-		a.productType as "productType",
-		a.qualificationImg as "qualificationImg",
-		a.includedTax as "includedTax",
-		a.invoiceType as "invoiceType",
-		a.taxPoint as "taxPoint",
-		a.supplierTaxPoint as "supplierTaxPoint",
-		a.priceType as "priceType",
-		a.tags as "tags",
-		a.machineType as "machineType",
-		a.commodityType as "commodityType",
-		a.trainingMethod as "trainingMethod",
-		a.trainingType as "trainingType",
-		a.trainingFee as "trainingFee",
-		cshd.secondHandType as "secondHandType",
-		cshd.instrumentType as "instrumentType",
-		cshd.sold as "sold",
-	    cshd.payStatus as "payStatus",
-	    cshd.contactName as "contactName",
-	    cshd.originalPrice as "originalPrice",
-	    cshd.submitDate AS "submitDate",
-		cshd.reviewedDate AS "reviewedDate",
-		cshd.onLineDate AS "onLineDate",
-		cshd.brandName AS "otherBrandName",
-		cshd.publisher AS "publisher",
-		cshd.source AS "source",
-		cshd.dockingPeopleName AS "dockingPeopleName",
+        ifnull(a.smallTypeID,0)  AS "smallTypeID",
+        ifnull(a.tinyTypeID,0) AS "tinyTypeID",
+        a.productCategory AS "productCategory",
+        a.selfTypeID AS "selfTypeID",
+        a.preferredFlag AS "preferredFlag",
+        a.shopID AS "shopID",
+        a.name AS "name",
+        a.searchKey AS "searchKey",
+        a.combinationID AS "combinationID",
+        a.productRemarks AS "productRemarks",
+        a.normalPrice AS "normalPrice",
+        a.price AS "price",
+        a.priceFlag AS "priceFlag",
+        a.beautyActFlag AS "beautyActFlag",
+        a.ladderPriceFlag AS "ladderPriceFlag",
+        a.stock AS "stock",
+        a.hasSkuFlag AS "hasSkuFlag",
+        a.mainImage AS "mainImage",
+        a.propertiesInfo AS "propertiesInfo",
+        a.addTime AS "addTime",
+        a.updateTime AS "updateTime",
+        a.sellNumber AS "sellNumber",
+        a.weekSellNumber AS "weekSellNumber",
+        a.beforeValidFlag AS "beforeValidFlag",
+        a.validFlag AS "validFlag",
+        a.favoriteTimes AS "favoriteTimes",
+        a.commentScore AS "commentScore",
+        a.commentTimes AS "commentTimes",
+        a.selfRecommendFlag AS "selfRecommendFlag",
+        a.sysRecommendFlag AS "sysRecommendFlag",
+        a.sortIndex AS "sortIndex",
+        a.featuredFlag AS "featuredFlag",
+        a.featuredSortIndex AS "featuredSortIndex",
+        a.productCode AS "productCode",
+        a.unit AS "unit",
+        a.synToERPFlag AS "synToERPFlag",
+        a.allAreaFlag AS "allAreaFlag",
+        a.provinceIDs AS "provinceIDs",
+        a.serviceNumber AS "serviceNumber",
+        a.maxBuyNumber AS "maxBuyNumber",
+        a.minBuyNumber AS "minBuyNumber",
+        a.packageCount AS "packageCount",
+        a.byFlag AS "byFlag",
+        a.normalProductFlag AS "normalProductFlag",
+        a.wholeSaleProductFlag AS "wholeSaleProductFlag",
+        a.promotionProductFlag AS "promotionProductFlag",
+        a.groupBuyProductFlag AS "groupBuyProductFlag",
+        a.step AS "step",
+        a.actStatus AS "actStatus",
+        a.actFlag AS "actFlag",
+        a.actType AS "actType",
+        a.onlineTime AS "onlineTime",
+        a.downlineTime AS "downlineTime",
+        a.freePostFlag AS "freePostFlag",
+        a.costPrice AS "costPrice",
+        a.costProportional AS "costProportional",
+        a.costCheckFlag AS "costCheckFlag",
+        a.precisehKey AS "precisehKey",
+        s.name AS "shopName",
+        a.actSort AS "actSort",
+        a.recommendType AS "recommendType",
+        a.aliasName as "aliasName",
+        a.visibility as "visibility",
+        a.productType as "productType",
+        a.qualificationImg as "qualificationImg",
+        a.includedTax as "includedTax",
+        a.invoiceType as "invoiceType",
+        a.taxPoint as "taxPoint",
+        a.supplierTaxPoint as "supplierTaxPoint",
+        a.tags as "tags",
+        a.machineType as "machineType",
+        a.commodityType as "commodityType",
+        a.trainingMethod as "trainingMethod",
+        a.trainingType as "trainingType",
+        a.trainingFee as "trainingFee",
+        cshd.secondHandType as "secondHandType",
+        cshd.instrumentType as "instrumentType",
+        cshd.sold as "sold",
+        cshd.payStatus as "payStatus",
+        cshd.contactName as "contactName",
+        cshd.originalPrice as "originalPrice",
+        cshd.submitDate AS "submitDate",
+        cshd.reviewedDate AS "reviewedDate",
+        cshd.onLineDate AS "onLineDate",
+        cshd.brandName AS "otherBrandName",
+        cshd.publisher AS "publisher",
+        cshd.source AS "source",
+        cshd.dockingPeopleName AS "dockingPeopleName",
         cb.name as "brandName",
         if(csp.id is not null,1,0) as "svipFlag"
     </sql>
@@ -250,9 +189,6 @@
                 <if test="dbName == 'mssql'">'%'+#{shopName}+'%'</if>
                 <if test="dbName == 'mysql'">concat('%',#{shopName},'%')</if>
             </if>
-            <if test="cmbeanFlag != null and cmbeanFlag != ''">
-                AND a.cmbeanFlag = #{cmbeanFlag}
-            </if>
             <if test="validFlag !=null and validFlag !=''">
                 AND a.validFlag=#{validFlag}
             </if>
@@ -262,18 +198,6 @@
             <if test="actType !=null and actType !=''">
                 AND a.actType=#{actType}
             </if>
-            <if test="speCommisionFlag !=null and speCommisionFlag !=''">
-                AND a.speCommisionFlag=#{speCommisionFlag}
-            </if>
-            <if test="displayOnCRMFlag !=null and displayOnCRMFlag !=''">
-                AND a.displayOnCRMFlag=#{displayOnCRMFlag}
-            </if>
-            <if test="crmBigTypeId !=null and crmBigTypeId !=''">
-                AND a.crmBigTypeId=#{crmBigTypeId}
-            </if>
-             <if test="crmSmallTypeId !=null and crmSmallTypeId !=''">
-                AND a.crmSmallTypeId=#{crmSmallTypeId}
-            </if>
             <if test="secondHandType !=null and secondHandType !=''">
                 AND cshd.secondHandType=#{secondHandType}
             </if>
@@ -353,26 +277,9 @@
                             searchKey,
                             normalPrice,
                             price,
-                            highestUserLevelPrice,
-                            lowestUserLevelPrice,
-                            lowestUserLevelID,
-                            price0,
-                            price0Text,
-                            price0TextFlag,
-                            price1,
-                            price1Text,
-                            price1TextFlag,
-                            price8,
-                            price8Text,
-                            price8TextFlag,
+                            priceFlag,
+                            beautyActFlag,
                             ladderPriceFlag,
-                            price2,
-                            price3,
-                            price4,
-                            price5,
-                            price6,
-                            price7,
-                            fee,
                             stock,
                             hasSkuFlag,
                             mainImage,
@@ -392,15 +299,12 @@
                             featuredFlag,
                             featuredSortIndex,
                             productCode,
-                            rate1,
-                            rate2,
                             unit,
                             synToERPFlag,
                             allAreaFlag,
                             provinceIDs,
                             serviceNumber,
                             maxBuyNumber,
-                            virtualFlag,
                             minBuyNumber,
                             packageCount,
                             byFlag,
@@ -409,50 +313,15 @@
                             promotionProductFlag,
                             groupBuyProductFlag,
                             step,
-                            speCommisionFlag,
-                            speCommision,
-                            videourl,
-                            props,
-                            providers,
-                            serviceCommissionRatio,
-                            reCommissionRatio,
-                            pushToERPName,
-                            prodBeans,
-                            useBeansFlag,
-                            privateFlag,
-                            invisibleServiceProviderIDs,
-                            displayOnCRMFlag,
-                            needServiceFlag,
-                            actPrice0,
-                            actPrice1,
-                            actPrice2,
-                            actPrice3,
-                            actPrice4,
-                            actPrice5,
-                            actPrice6,
-                            actPrice7,
-                            beginTime,
-                            endTime,
                             actFlag,
                             actType,
-                            actFullReduceAmount,
-                            actReduceAmount,
-                            actFullGiftAmount,
-                            actBuyGiftNum,
                             onlineTime,
                             downlineTime,
-                            shopIndexModuleID,
                             freePostFlag,
-                            crmBigTypeId,
-                            crmSmallTypeId,
                             costPrice,
                             costProportional,
                             costCheckFlag,
-                            precisehKey,
-                            docBoost,
-                            cmbeanFlag,
-                            cmbeanPrice,
-                            cmbeanSort)
+                            precisehKey)
         VALUES (#{id},
                 #{brandID},
                 #{tinyTypeID},
@@ -463,26 +332,9 @@
                 #{searchKey},
                 #{normalPrice},
                 #{price},
-                #{highestUserLevelPrice},
-                #{lowestUserLevelPrice},
-                #{lowestUserLevelID},
-                #{price0},
-                #{price0Text},
-                #{price0TextFlag},
-                #{price1},
-                #{price1Text},
-                #{price1TextFlag},
-                #{price8},
-                #{price8Text},
-                #{price8TextFlag},
+                #{priceFlag},
+                #{beautyActFlag},
                 #{ladderPriceFlag},
-                #{price2},
-                #{price3},
-                #{price4},
-                #{price5},
-                #{price6},
-                #{price7},
-                #{fee},
                 #{stock},
                 #{hasSkuFlag},
                 #{mainImage},
@@ -502,15 +354,12 @@
                 #{featuredFlag},
                 #{featuredSortIndex},
                 #{productCode},
-                #{rate1},
-                #{rate2},
                 #{unit},
                 #{synToERPFlag},
                 #{allAreaFlag},
                 #{provinceIDs},
                 #{serviceNumber},
                 #{maxBuyNumber},
-                #{virtualFlag},
                 #{minBuyNumber},
                 #{packageCount},
                 #{byFlag},
@@ -519,50 +368,15 @@
                 #{promotionProductFlag},
                 #{groupBuyProductFlag},
                 #{step},
-                #{speCommisionFlag},
-                #{speCommision},
-                #{videourl},
-                #{props},
-                #{providers},
-                #{serviceCommissionRatio},
-                #{reCommissionRatio},
-                #{pushToERPName},
-                #{prodBeans},
-                #{useBeansFlag},
-                #{privateFlag},
-                #{invisibleServiceProviderIDs},
-                #{displayOnCRMFlag},
-                #{needServiceFlag},
-                #{actPrice0},
-                #{actPrice1},
-                #{actPrice2},
-                #{actPrice3},
-                #{actPrice4},
-                #{actPrice5},
-                #{actPrice6},
-                #{actPrice7},
-                #{beginTime},
-                #{endTime},
                 #{actFlag},
                 #{actType},
-                #{actFullReduceAmount},
-                #{actReduceAmount},
-                #{actFullGiftAmount},
-                #{actBuyGiftNum},
                 #{onlineTime},
                 #{downlineTime},
-                #{shopIndexModuleID},
                 #{freePostFlag},
-                #{crmBigTypeId},
-                #{crmSmallTypeId},
                 #{costPrice},
                 #{costProportional},
                 #{costCheckFlag},
-                #{precisehKey},
-                #{docBoost},
-                #{cmbeanFlag},
-                #{cmbeanPrice},
-                #{cmbeanSort})
+                #{precisehKey})
     </insert>
     <update id="update">
         UPDATE product
@@ -576,26 +390,9 @@
             searchKey                   = #{searchKey},
             normalPrice                 = #{normalPrice},
             price                       = #{price},
-            highestUserLevelPrice       = #{highestUserLevelPrice},
-            lowestUserLevelPrice        = #{lowestUserLevelPrice},
-            lowestUserLevelID           = #{lowestUserLevelID},
-            price0                      = #{price0},
-            price0Text                  = #{price0Text},
-            price0TextFlag              = #{price0TextFlag},
-            price1                      = #{price1},
-            price1Text                  = #{price1Text},
-            price1TextFlag              = #{price1TextFlag},
-            price8                      = #{price8},
-            price8Text                  = #{price8Text},
-            price8TextFlag              = #{price8TextFlag},
+            priceFlag                   = #{priceFlag},
+            beautyActFlag               = #{beautyActFlag},
             ladderPriceFlag             = #{ladderPriceFlag},
-            price2                      = #{price2},
-            price3                      = #{price3},
-            price4                      = #{price4},
-            price5                      = #{price5},
-            price6                      = #{price6},
-            price7                      = #{price7},
-            fee                         = #{fee},
             stock                       = #{stock},
             hasSkuFlag                  = #{hasSkuFlag},
             mainImage                   = #{mainImage},
@@ -615,15 +412,12 @@
             featuredFlag                = #{featuredFlag},
             featuredSortIndex           = #{featuredSortIndex},
             productCode                 = #{productCode},
-            rate1                       = #{rate1},
-            rate2                       = #{rate2},
             unit                        = #{unit},
             synToERPFlag                = #{synToERPFlag},
             allAreaFlag                 = #{allAreaFlag},
             provinceIDs                 = #{provinceIDs},
             serviceNumber               = #{serviceNumber},
             maxBuyNumber                = #{maxBuyNumber},
-            virtualFlag                 = #{virtualFlag},
             minBuyNumber                = #{minBuyNumber},
             packageCount                = #{packageCount},
             byFlag                      = #{byFlag},
@@ -632,58 +426,22 @@
             promotionProductFlag        = #{promotionProductFlag},
             groupBuyProductFlag         = #{groupBuyProductFlag},
             step                        = #{step},
-            speCommisionFlag            = #{speCommisionFlag},
-            speCommision                = #{speCommision},
-            videourl                    = #{videourl},
-            props                       = #{props},
-            providers                   = #{providers},
-            serviceCommissionRatio      = #{serviceCommissionRatio},
-            reCommissionRatio           = #{reCommissionRatio},
-            pushToERPName               = #{pushToERPName},
-            prodBeans                   = #{prodBeans},
-            useBeansFlag                = #{useBeansFlag},
-            privateFlag                 = #{privateFlag},
-            invisibleServiceProviderIDs = #{invisibleServiceProviderIDs},
-            displayOnCRMFlag            = #{displayOnCRMFlag},
-            needServiceFlag             = #{needServiceFlag},
-            actPrice0                   = #{actPrice0},
-            actPrice1                   = #{actPrice1},
-            actPrice2                   = #{actPrice2},
-            actPrice3                   = #{actPrice3},
-            actPrice4                   = #{actPrice4},
-            actPrice5                   = #{actPrice5},
-            actPrice6                   = #{actPrice6},
-            actPrice7                   = #{actPrice7},
-            beginTime                   = #{beginTime},
-            endTime                     = #{endTime},
             actFlag                     = #{actFlag},
             actType                     = #{actType},
-            actFullReduceAmount         = #{actFullReduceAmount},
-            actReduceAmount             = #{actReduceAmount},
-            actFullGiftAmount           = #{actFullGiftAmount},
-            actBuyGiftNum               = #{actBuyGiftNum},
             onlineTime                  = #{onlineTime},
             downlineTime                = #{downlineTime},
-            shopIndexModuleID           = #{shopIndexModuleID},
             freePostFlag                = #{freePostFlag},
-            crmBigTypeId                = #{crmBigTypeId},
-            crmSmallTypeId              = #{crmSmallTypeId},
             costPrice                   = #{costPrice},
             costProportional            = #{costProportional},
             costCheckFlag               = #{costCheckFlag},
             precisehKey                 = #{precisehKey},
-            docBoost                    = #{docBoost},
-            cmbeanFlag                  = #{cmbeanFlag},
-            cmbeanPrice                 = #{cmbeanPrice},
-            cmbeanSort                  = #{cmbeanSort},
             actSort                     = #{actSort},
             productType                 = #{productType},
             qualificationImg            = #{qualificationImg},
             includedTax                 = #{includedTax},
             invoiceType                 = #{invoiceType},
             taxPoint                    = #{taxPoint},
-            supplierTaxPoint            = #{supplierTaxPoint},
-            actCreateTime               = #{actCreateTime}
+            supplierTaxPoint            = #{supplierTaxPoint}
         WHERE productID = #{id}
     </update>
 
@@ -740,75 +498,15 @@
             <if test="price != null and price !=''">
                 price = #{price},
             </if>
-            <if test="highestUserLevelPrice != null and highestUserLevelPrice !=''">
-                highestUserLevelPrice = #{highestUserLevelPrice},
-            </if>
-            <if test="lowestUserLevelPrice != null and lowestUserLevelPrice !=''">
-                lowestUserLevelPrice = #{lowestUserLevelPrice},
-            </if>
-            <if test="lowestUserLevelID != null and lowestUserLevelID !=''">
-                lowestUserLevelID = #{lowestUserLevelID},
-            </if>
-            <if test="price0 != null and price0 !=''">
-                price0 = #{price0},
-            </if>
-            <if test="price0Grade != null and price0Grade !=''">
-                price0Grade = #{price0Grade},
-            </if>
-            <if test="price0Text != null and price0Text !=''">
-                price0Text = #{price0Text},
-            </if>
-            <if test="price0TextFlag != null and price0TextFlag !=''">
-                price0TextFlag = #{price0TextFlag},
-            </if>
-            <if test="price1 != null and price1 !=''">
-                price1 = #{price1},
-            </if>
-            <if test="price1Grade != null and price1Grade !=''">
-                price1Grade = #{price1Grade},
-            </if>
-            <if test="price1Text != null and price1Text !=''">
-                price1Text = #{price1Text},
-            </if>
-            <if test="price1TextFlag != null and price1TextFlag !=''">
-                price1TextFlag = #{price1TextFlag},
-            </if>
-            <if test="price8 != null and price8 !=''">
-                price8 = #{price8},
-            </if>
-            <if test="price8Grade != null and price8Grade !=''">
-                price8Grade = #{price8Grade},
+            <if test="priceFlag != null and priceFlag !=''">
+                priceFlag = #{priceFlag},
             </if>
-            <if test="price8Text != null and price8Text !=''">
-                price8Text = #{price8Text},
-            </if>
-            <if test="price8TextFlag != null and price8TextFlag !=''">
-                price8TextFlag = #{price8TextFlag},
+            <if test="beautyActFlag != null and beautyActFlag !=''">
+                beautyActFlag = #{beautyActFlag},
             </if>
             <if test="ladderPriceFlag != null and ladderPriceFlag !=''">
                 ladderPriceFlag = #{ladderPriceFlag},
             </if>
-            <if test="price2 != null and price2 !=''">
-                price2 = #{price2},
-            </if>
-            <if test="price3 != null and price3 !=''">
-                price3 = #{price3},
-            </if>
-            <if test="price4 != null and price4 !=''">
-                price4 = #{price4},
-            </if>
-            <if test="price5 != null and price5 !=''">
-                price5 = #{price5},
-            </if>
-            <if test="price6 != null and price6 !=''">
-                price6 = #{price6},
-            </if>
-            <if test="price7 != null and price7 !=''">
-                price7 = #{price7},
-            </if>
-            <if test="fee != null and fee !=''">
-                fee = #{fee},
-            </if>
             <if test="stock != null and stock !=''">
                 stock = #{stock},
             </if>
@@ -866,12 +564,6 @@
             <if test="productCode != null and productCode !=''">
                 productCode = #{productCode},
             </if>
-            <if test="rate1 != null and rate1 !=''">
-                rate1 = #{rate1},
-            </if>
-            <if test="rate2 != null and rate2 !=''">
-                rate2 = #{rate2},
-            </if>
             <if test="unit != null and unit !=''">
                 unit = #{unit},
             </if>
@@ -890,9 +582,6 @@
             <if test="maxBuyNumber != null and maxBuyNumber !=''">
                 maxBuyNumber = #{maxBuyNumber},
             </if>
-            <if test="virtualFlag != null and virtualFlag !=''">
-                virtualFlag = #{virtualFlag},
-            </if>
             <if test="minBuyNumber != null and minBuyNumber !=''">
                 minBuyNumber = #{minBuyNumber},
             </if>
@@ -917,93 +606,15 @@
             <if test="step != null and step !=''">
                 step = #{step},
             </if>
-            <if test="speCommisionFlag != null and speCommisionFlag !=''">
-                speCommisionFlag = #{speCommisionFlag},
-            </if>
-            <if test="speCommision != null and speCommision !=''">
-                speCommision = #{speCommision},
-            </if>
-            <if test="videourl != null and videourl !=''">
-                videourl = #{videourl},
-            </if>
-            <if test="props != null and props !=''">
-                props = #{props},
-            </if>
-            <if test="providers != null and providers !=''">
-                providers = #{providers},
-            </if>
-            <if test="serviceCommissionRatio != null and serviceCommissionRatio !=''">
-                serviceCommissionRatio = #{serviceCommissionRatio},
-            </if>
-            <if test="reCommissionRatio != null and reCommissionRatio !=''">
-                reCommissionRatio = #{reCommissionRatio},
-            </if>
-            <if test="pushToERPName != null and pushToERPName !=''">
-                pushToERPName = #{pushToERPName},
-            </if>
-            <if test="prodBeans != null and prodBeans !=''">
-                prodBeans = #{prodBeans},
-            </if>
-            <if test="useBeansFlag != null and useBeansFlag !=''">
-                useBeansFlag = #{useBeansFlag},
-            </if>
-            <if test="privateFlag != null and privateFlag !=''">
-                privateFlag = #{privateFlag},
-            </if>
-            <if test="invisibleServiceProviderIDs != null and invisibleServiceProviderIDs !=''">
-                invisibleServiceProviderIDs = #{invisibleServiceProviderIDs},
-            </if>
-            <if test="displayOnCRMFlag != null and displayOnCRMFlag !=''">
-                displayOnCRMFlag = #{displayOnCRMFlag},
-            </if>
-            <if test="needServiceFlag != null and needServiceFlag !=''">
-                needServiceFlag = #{needServiceFlag},
-            </if>
             <if test="actFlag != null and actFlag !=''">
                 actFlag = #{actFlag},
             </if>
             <if test="actSort != null and actSort !=''">
                 actSort = #{actSort},
             </if>
-            <if test="actPrice0 != null and actPrice0 !=''">
-                actPrice0 = #{actPrice0},
-            </if>
-            <if test="actPrice1 != null and actPrice1 !=''">
-                actPrice1 = #{actPrice1},
-            </if>
-            <if test="actPrice2 != null and actPrice2 !=''">
-                actPrice2 = #{actPrice2},
-            </if>
-            <if test="actPrice3 != null and actPrice3 !=''">
-                actPrice3 = #{actPrice3},
-            </if>
-            <if test="actPrice4 != null and actPrice4 !=''">
-                actPrice4 = #{actPrice4},
-            </if>
-            <if test="actPrice5 != null and actPrice5 !=''">
-                actPrice5 = #{actPrice5},
-            </if>
-            <if test="actPrice6 != null and actPrice6 !=''">
-                actPrice6 = #{actPrice6},
-            </if>
-            <if test="actPrice7 != null and actPrice7 !=''">
-                actPrice7 = #{actPrice7},
-            </if>
             <if test="actType != null and actType !=''">
                 actType = #{actType},
             </if>
-            <if test="actCreateTime != null and actCreateTime !=''">
-                actCreateTime = #{actCreateTime},
-            </if>
-            <if test="beginTime != null and beginTime !=''">
-                beginTime = #{beginTime},
-            </if>
-            <if test="endTime != null and endTime !=''">
-                endTime = #{endTime},
-            </if>
-            <if test="shopIndexModuleID != null and shopIndexModuleID !=''">
-                shopIndexModuleID = #{shopIndexModuleID},
-            </if>
             <if test="onlineTime != null and onlineTime !=''">
                 onlineTime = #{onlineTime},
             </if>
@@ -1013,12 +624,6 @@
             <if test="freePostFlag != null and freePostFlag !=''">
                 freePostFlag = #{freePostFlag},
             </if>
-            <if test="crmBigTypeId != null and crmBigTypeId !=''">
-                crmBigTypeId = #{crmBigTypeId},
-            </if>
-            <if test="crmSmallTypeId != null and crmSmallTypeId !=''">
-                crmSmallTypeId = #{crmSmallTypeId},
-            </if>
             <if test="costPrice != null and costPrice != ''">
                 costPrice = #{costPrice},
             </if>
@@ -1031,42 +636,12 @@
             <if test="precisehKey != null and precisehKey !=''">
                 precisehKey = #{precisehKey},
             </if>
-            <if test="docBoost != null and docBoost !=''">
-                docBoost = #{docBoost},
-            </if>
-            <if test="cmbeanFlag != null and cmbeanFlag !=''">
-                cmbeanFlag = #{cmbeanFlag},
-            </if>
-            <if test="cmbeanPrice != null and cmbeanPrice !=''">
-                cmbeanPrice = #{cmbeanPrice},
-            </if>
-            <if test="cmbeanSort != null and cmbeanSort !=''">
-                cmbeanSort = #{cmbeanSort},
-            </if>
-            <if test="actBuyGiftNum != null and actBuyGiftNum !=''">
-                actBuyGiftNum = #{actBuyGiftNum},
-            </if>
-            <if test="actFullGiftAmount != null and actFullGiftAmount !=''">
-                actFullGiftAmount = #{actFullGiftAmount},
-            </if>
-            <if test="actFullReduceAmount != null and actFullReduceAmount !=''">
-                actFullReduceAmount = #{actFullReduceAmount},
-            </if>
-            <if test="actReduceAmount != null and actReduceAmount !=''">
-                actReduceAmount = #{actReduceAmount},
-            </if>
             <if test="visibility != null and visibility !=''">
                 visibility = #{visibility},
             </if>
-            <if test="surplusTime != null and surplusTime !=''">
-                surplusTime = #{surplusTime},
-            </if>
             <if test="endTimeStr != null and endTimeStr !=''">
                 endTimeStr = #{endTimeStr},
             </if>
-            <if test="priceType != null and priceType !=''">
-                priceType = #{priceType},
-            </if>
             <if test="tags != null and tags !=''">
                 tags = #{tags},
             </if>

+ 1 - 1
src/main/resources/mappings/modules/svip/CmSvipProductMapper.xml

@@ -92,7 +92,7 @@
              and a.productID not in (
             select productId from cm_promotions_product cpp left join
             cm_promotions cp on cpp.promotionsId = cp.id where cp.delFlag != '2')
-            and a.ladderPriceFlag = '0' and price1TextFlag != '1'
+            and a.ladderPriceFlag = '0' and priceFlag != '1'
             <if test="productID != null">
                 AND a.productID = #{productID}
             </if>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/actList.jsp

@@ -101,7 +101,7 @@
 				<td>
 					${product.shopName}
 				</td>
-				<td style="white-space:nowrap;">${product.price1}</td>
+				<td style="white-space:nowrap;">${product.price}</td>
 				<td style="white-space:nowrap;">${product.actPrice1}</td>
 				<td style="white-space:nowrap;">
 					<fmt:formatDate value="${product.beginTime}" pattern="yyyy-MM-dd"/> --

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/actSelectProduct.jsp

@@ -55,7 +55,7 @@
                 <td><img src="${item.mainImage}" width="50px" height="50px"></td>
                 <td>${item.name}</td>
                 <td>${item.shopName}</td>
-                <td>${item.price1}</td>
+                <td>${item.price}</td>
             </tr>
         </c:forEach>
     </c:if>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/addActPage.jsp

@@ -62,7 +62,7 @@
             </tr>
             <tr>
                 <th><span class="red">*</span>机构价:</th>
-                <td colspan="3">${product.price1}</td>
+                <td colspan="3">${product.price}</td>
             </tr>
         </c:if>
         <tr>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/multiPromotionForm.jsp

@@ -309,7 +309,7 @@
                         <td><img src="${product.mainImage}" width="50px" height="50px"></td>
                         <td>${product.name}</td>
                         <td>${product.shopName}</td>
-                        <td>${product.price1}</td>
+                        <td>${product.price}</td>
                         <td>
                             <a href="javaScript:;"
                                onclick="deleteProduct('${product.productID}',${product.storeStatus},1)">删除</a>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/multiPromotionList.jsp

@@ -142,7 +142,7 @@
                             <img src="${promotionProduct.mainImage}" alt="图片" width="50px" height="50px">
                             <span style="position: absolute; left: 120px;width: 550px">商品名称:${promotionProduct.name}</span>
                             <span style="position: absolute; left: 670px;width: 430px">供应商:${promotionProduct.shopName}</span>
-                            <span style="position: absolute; left: 1100px">机构价:${promotionProduct.price1}</span>
+                            <span style="position: absolute; left: 1100px">机构价:${promotionProduct.price}</span>
                         </p>
                     </c:forEach>
                 </c:if>

+ 12 - 12
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -212,7 +212,7 @@
             <td colspan="3">
                 <div class="item">
                     <div id="normalPriceBox">
-                        <form:input path="price1" type="number" id="price1" maxlength="11" class="short computedPrice required" onkeyup="computedPriceLevel(this.value)" />
+                        <form:input path="price" type="number" id="price" maxlength="11" class="short computedPrice required" onkeyup="computedPriceLevel(this.value)" />
                         <b class="line">|</b>游客展示等级:<span>
                             <i class="priceIcon"></i>
                             <i class="priceIcon"></i>
@@ -303,7 +303,7 @@
         <tr>
             <th><span class="red">*</span>价格可见度:</th>
             <td>
-                <form:select path="price1TextFlag" class="input-small required hide" id="price1TextFlag">
+                <form:select path="priceFlag" class="input-small required hide" id="priceFlag">
                     <form:option value="1" label="所有机构都不可见"/>
                     <form:option value="2" label="仅会员机构可见"/>
                     <form:option value="0" label="所有机构都可见"/>
@@ -311,12 +311,12 @@
             </td>
             <td colspan="2">
                 <span id="textFlagNote" style="color:#ab1e1e;">
-                    ${product.price1TextFlag == "1" ?  "所有机构都不可见" : ""}
-                    ${product.price1TextFlag == "2" ?  "仅会员机构可见" : ""}
-                    ${product.price1TextFlag == "0" ? "所有机构都可见" : ""}
+                    ${product.priceFlag == "1" ?  "所有机构都不可见" : ""}
+                    ${product.priceFlag == "2" ?  "仅会员机构可见" : ""}
+                    ${product.priceFlag == "0" ? "所有机构都可见" : ""}
                 </span>
-                <%--<input type="radio" name="price1TextFlag" value="0" ${product.price1TextFlag == "0" ? "checked" : ""} />公开<b class="line">|</b>
-                <input type="radio" name="price1TextFlag" value="1" ${product.price1TextFlag == "1" ? "checked" : ""} />不公开--%>
+                <%--<input type="radio" name="priceFlag" value="0" ${product.priceFlag == "0" ? "checked" : ""} />公开<b class="line">|</b>
+                <input type="radio" name="priceFlag" value="1" ${product.priceFlag == "1" ? "checked" : ""} />不公开--%>
             </td>
         </tr>
         <tr>
@@ -545,8 +545,8 @@
     });*/
     // 价格可见度
     $(function() {
-        var initValue = ${(product.price1TextFlag eq 0) ? 2 : ((product.price1TextFlag eq 2) ? 1 : 0)}
-        var select = $("#price1TextFlag");
+        var initValue = ${(product.priceFlag eq 0) ? 2 : ((product.priceFlag eq 2) ? 1 : 0)}
+        var select = $("#priceFlag");
         var slider = $("<div id='slider'></div>").insertAfter(select).slider({
           min: 0,
           max: 2,
@@ -590,7 +590,7 @@
     var step = ${product.step};
     var areaFlag = ${product.allAreaFlag};
     var ladderPriceFlag = ${product.ladderPriceFlag};
-    var normalPrice = ${product.price1};
+    var normalPrice = ${product.price};
     $(document).ready(function() {
         step*1>1 ? $("#setpInput").show() : $("#setpInput").hide();
         areaFlag*1>0 ? $("#allAreaInput").hide() : $("#allAreaInput").show();
@@ -716,8 +716,8 @@
                 alertx("请输入小于前一个价格的值");
             }
         } else {
-            var price1 = $('#price1').val();
-            if(input.value*1 > price1){
+            var price = $('#price').val();
+            if(input.value*1 > price){
                 $(input).val('');
                 alertx("第一个阶梯价格不能大于机构价");
             }

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp

@@ -189,7 +189,7 @@
                         ${product.normalPrice}
                     </c:if>
 				</td>
-				<td>${product.price1}</td>
+				<td>${product.price}</td>
 				<td>
 					<c:if test="${product.visibility eq 1}">
 						仅会员机构可见
@@ -206,13 +206,13 @@
 				        ---
 					</c:if>
 					<c:if test="${product.productCategory ne 2}">
-					    <c:if test="${product.price1TextFlag eq 0}">
+					    <c:if test="${product.priceFlag eq 0}">
 						<font color="green">所有机构都可见</font>
                         </c:if>
-                        <c:if test="${product.price1TextFlag eq 1}">
+                        <c:if test="${product.priceFlag eq 1}">
                             <font color="red">所有机构都不可见</font>
                         </c:if>
-                        <c:if test="${product.price1TextFlag eq 2}">
+                        <c:if test="${product.priceFlag eq 2}">
                             <font color="darkorange">仅会员机构可见</font>
                         </c:if>
 					</c:if>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/promotionSelectProducts.jsp

@@ -77,7 +77,7 @@
                 <td><img src="${item.mainImage}" width="50px" height="50px"></td>
                 <td>${item.name}</td>
                 <td>${item.shopName}</td>
-                <td>${item.price1}</td>
+                <td>${item.price}</td>
             </tr>
         </c:forEach>
     </c:if>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/promotionSelectSingleProduct.jsp

@@ -77,7 +77,7 @@
                 <td><img src="${item.mainImage}" width="50px" height="50px"></td>
                 <td>${item.name}</td>
                 <td>${item.shopName}</td>
-                <td>${item.price1}</td>
+                <td>${item.price}</td>
             </tr>
         </c:forEach>
     </c:if>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/secondHand.jsp

@@ -189,7 +189,7 @@
                     ${product.normalPrice}
                 </c:if>
             </td>
-            <td>${product.price1}</td>
+            <td>${product.price}</td>
             <td>
                     <%--采购价为空不显示--%>
                 <c:if test="${empty product.originalPrice}">

+ 11 - 11
src/main/webapp/WEB-INF/views/modules/product-new/singlePromotionForm.jsp

@@ -38,9 +38,9 @@
                             isSubMitFlag = false;
                             return false;
                         }else {
-                            var price1 = $("#price1").val();
-                            if (parseFloat($("#touchPrice1").val()) >= parseFloat(price1)) {
-                                alertx('优惠价必须小于机构价'+price1);
+                            var price = $("#price").val();
+                            if (parseFloat($("#touchPrice1").val()) >= parseFloat(price)) {
+                                alertx('优惠价必须小于机构价'+price);
                                 isSubMitFlag = false;
                                 return false;
                             }
@@ -56,9 +56,9 @@
                             isSubMitFlag = false;
                             return false;
                         }else {
-                            var price1 = $("#price1").val();
-                            if (parseFloat($("#touchPrice2").val()) <parseFloat(price1)) {
-                                alertx('满减设定价需大于或等于商品机构价'+price1);
+                            var price = $("#price").val();
+                            if (parseFloat($("#touchPrice2").val()) <parseFloat(price)) {
+                                alertx('满减设定价需大于或等于商品机构价'+price);
                                 isSubMitFlag = false;
                                 return false;
                             }
@@ -87,9 +87,9 @@
                             isSubMitFlag = false;
                             return false;
                         }else {
-                            var price1 = $("#price1").val();
-                            if (parseFloat($("#touchPrice3").val()) < parseFloat(price1)) {
-                                alertx('满赠设定价需大于或等于商品机构价'+price1);
+                            var price = $("#price").val();
+                            if (parseFloat($("#touchPrice3").val()) < parseFloat(price)) {
+                                alertx('满赠设定价需大于或等于商品机构价'+price);
                                 isSubMitFlag = false;
                                 return false;
                             }
@@ -306,7 +306,7 @@
     <li><a href="${ctx}/product/cmPromotions/list?type=1">单品促销</a></li>
     <li class="active"><a href="${ctx}/product/cmPromotions/form?id=${cmPromotion.id}&type=1">${not empty cmPromotion.id?'编辑':'添加'}单品促销</a></li>
 </ul><br/>
-<input hidden="hidden" id="price1" value="${price1}">
+<input hidden="hidden" id="price" value="${price}">
 <form:form id="inputForm" modelAttribute="cmPromotion" action="${ctx}/product/cmPromotions/save" method="post" class="form-horizontal">
     <form:hidden path="id"/>
     <form:hidden path="type"/>
@@ -339,7 +339,7 @@
                         <td><img src="${product.mainImage}" width="50px" height="50px"></td>
                         <td>${product.name}</td>
                         <td>${product.shopName}</td>
-                        <td>${product.price1}</td>
+                        <td>${product.price}</td>
                         <td>
                             <a href="javaScript:;"
                                onclick="deleteProduct('${product.productID}',${product.storeStatus},1)">删除</a>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/product-new/singlePromotionList.jsp

@@ -141,7 +141,7 @@
                             <img src="${promotionProduct.mainImage}" alt="图片" width="50px" height="50px">
                             <span style="position: absolute; left: 120px;width: 550px">商品名称:${promotionProduct.name}</span>
                             <span style="position: absolute; left: 670px;width: 430px">供应商:${promotionProduct.shopName}</span>
-                            <span style="position: absolute; left: 1100px">机构价:${promotionProduct.price1}</span>
+                            <span style="position: absolute; left: 1100px">机构价:${promotionProduct.price}</span>
                         </p>
                     </c:forEach>
                 </c:if>
@@ -163,7 +163,7 @@
                 <td><img src="${promotionProduct.mainImage}" alt="图片" width="50px" height="50px"></td>
                 <td>商品名称:${promotionProduct.name}</td>
                 <td>供应商:${promotionProduct.shopName}</td>
-                <td>机构价:${promotionProduct.price1}</td>
+                <td>机构价:${promotionProduct.price}</td>
             </tr>
         </c:forEach>--%>
         <c:forEach items="${page.list}" var="cmPromotion"></c:forEach>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp

@@ -44,8 +44,8 @@
 						}
 					}
 
-					var price1 = $("#price1").val();
-					if(0 == price1 ){
+					var price = $("#price").val();
+					if(0 == price ){
 							alertx('交易价不能为0');
 							return false;
 					}
@@ -396,7 +396,7 @@
 	<div class="control-group">
 		<label class="control-label"><font color="red">*</font>交易价:</label>
 		<div class="controls">
-			<form:input path="price1" htmlEscape="false" maxlength="11" onkeyup="num(this)"  class="input-xlarge required"/>
+			<form:input path="price" htmlEscape="false" maxlength="11" onkeyup="num(this)"  class="input-xlarge required"/>
 			<label>
 				<input id="detailTalkFlag"  name="detailTalkFlag" type="hidden" />
 				<input  style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px" id="detailTalk"  name="detailTalk" type="checkbox"  onclick="detailTalkFlagCheckd()" <c:if test="${cmSecondHandDetail.detailTalkFlag eq 2}">checked="checked"</c:if> /><font color="red">价格详聊</font>(勾选代表同意不显示交易价)

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/product/productForm.jsp

@@ -138,7 +138,7 @@
 		<div class="control-group">
 			<label class="control-label">会员用户价格展示标志 0 否 1 是:</label>
 			<div class="controls">
-				<form:input path="price1TextFlag" htmlEscape="false" maxlength="1" class="input-xlarge "/>
+				<form:input path="priceFlag" htmlEscape="false" maxlength="1" class="input-xlarge "/>
 			</div>
 		</div>
 		<div class="control-group">
@@ -150,13 +150,13 @@
 		<div class="control-group">
 			<label class="control-label">游客价格文字:</label>
 			<div class="controls">
-				<form:input path="price8Text" htmlEscape="false" maxlength="30" class="input-xlarge "/>
+				<form:input path="beautyActFlag" htmlEscape="false" maxlength="30" class="input-xlarge "/>
 			</div>
 		</div>
 		<div class="control-group">
 			<label class="control-label">游客文字展示标志 0 否 价格 1 是 文字:</label>
 			<div class="controls">
-				<form:input path="price8TextFlag" htmlEscape="false" maxlength="1" class="input-xlarge "/>
+				<form:input path="beautyActFlagFlag" htmlEscape="false" maxlength="1" class="input-xlarge "/>
 			</div>
 		</div>
 		<div class="control-group">

部分文件因为文件数量过多而无法显示