|
@@ -10,6 +10,9 @@ import javax.servlet.ServletException;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
+import com.iamberry.redis.RedisUtils;
|
|
|
|
+import com.iamberry.wechat.core.entity.product.*;
|
|
|
|
+import com.iamberry.wechat.face.porduct.IndexProductService;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -24,10 +27,6 @@ import com.iamberry.wechat.core.entity.cart.ShopSalesOrderDto;
|
|
import com.iamberry.wechat.core.entity.cart.UserGiftDto;
|
|
import com.iamberry.wechat.core.entity.cart.UserGiftDto;
|
|
import com.iamberry.wechat.core.entity.drp.PlaceInfo;
|
|
import com.iamberry.wechat.core.entity.drp.PlaceInfo;
|
|
import com.iamberry.wechat.core.entity.member.Member;
|
|
import com.iamberry.wechat.core.entity.member.Member;
|
|
-import com.iamberry.wechat.core.entity.product.Product;
|
|
|
|
-import com.iamberry.wechat.core.entity.product.ProductColor;
|
|
|
|
-import com.iamberry.wechat.core.entity.product.ProductImageText;
|
|
|
|
-import com.iamberry.wechat.core.entity.product.ProductPicture;
|
|
|
|
import com.iamberry.wechat.face.admin.SystemService;
|
|
import com.iamberry.wechat.face.admin.SystemService;
|
|
import com.iamberry.wechat.face.cart.CartService;
|
|
import com.iamberry.wechat.face.cart.CartService;
|
|
import com.iamberry.wechat.face.cart.ProductInfoService;
|
|
import com.iamberry.wechat.face.cart.ProductInfoService;
|
|
@@ -60,10 +59,13 @@ public class ProductInfoHandler {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private CartService cartService;
|
|
private CartService cartService;
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
private ProductColorService productColorService;
|
|
private ProductColorService productColorService;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private IndexProductService indexProductService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 首页进入商城
|
|
* 首页进入商城
|
|
* @param request
|
|
* @param request
|
|
@@ -160,6 +162,29 @@ public class ProductInfoHandler {
|
|
remsg.setData(map);
|
|
remsg.setData(map);
|
|
return remsg;
|
|
return remsg;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 微商城首页-热销产品
|
|
|
|
+ * @param request
|
|
|
|
+ * @return list
|
|
|
|
+ * @throws Exception
|
|
|
|
+ */
|
|
|
|
+ @ResponseBody
|
|
|
|
+ @RequestMapping(value = "/productIndexSellWell",method = RequestMethod.POST)
|
|
|
|
+ public ResultMsg productIndexSellWell(HttpServletRequest request) throws Exception {
|
|
|
|
+ ResultMsg remsg= new ResultMsg();
|
|
|
|
+
|
|
|
|
+ IndexProduct indexProduct = new IndexProduct();
|
|
|
|
+ indexProduct.setIndeProdStatus(1);
|
|
|
|
+ List<IndexProduct> indexProductList = indexProductService.getIndexProductList(indexProduct);
|
|
|
|
+
|
|
|
|
+ remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
|
|
|
|
+ remsg.setResultCode(ResultInfo.SUCCESSCODE);
|
|
|
|
+ remsg.setStatus(true);
|
|
|
|
+ remsg.setData(indexProductList);
|
|
|
|
+ return remsg;
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 进入产品详细信息页面
|
|
* 进入产品详细信息页面
|
|
@@ -248,6 +273,12 @@ public class ProductInfoHandler {
|
|
}
|
|
}
|
|
List<ProductPicture> pictureList = productPictureService.getProductPictureByproductId(Integer.parseInt(productId));
|
|
List<ProductPicture> pictureList = productPictureService.getProductPictureByproductId(Integer.parseInt(productId));
|
|
product.setPictureList(pictureList);
|
|
product.setPictureList(pictureList);
|
|
|
|
+
|
|
|
|
+ ProductColor productColor = new ProductColor();
|
|
|
|
+ productColor.setColorStatus(1);
|
|
|
|
+ productColor.setColorProductId(product.getProductId());
|
|
|
|
+ List<ProductColor> colorList = productColorService.selectProductColorList(productColor);
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* 组装数据
|
|
* 组装数据
|
|
*/
|
|
*/
|
|
@@ -257,6 +288,7 @@ public class ProductInfoHandler {
|
|
map.put("cart_url", ResultInfo.CART_URL);
|
|
map.put("cart_url", ResultInfo.CART_URL);
|
|
map.put("product", product);
|
|
map.put("product", product);
|
|
map.put("shareOpenid", member.getUserOpenid());
|
|
map.put("shareOpenid", member.getUserOpenid());
|
|
|
|
+ map.put("colorList", colorList);
|
|
remsg.setData(map);
|
|
remsg.setData(map);
|
|
remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
|
|
remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
|
|
remsg.setResultCode(ResultInfo.SUCCESSCODE);
|
|
remsg.setResultCode(ResultInfo.SUCCESSCODE);
|