|
@@ -187,7 +187,7 @@ public class ProductInfoHandler {
|
|
|
@ResponseBody
|
|
|
@RequestMapping("/getProductByProductId")
|
|
|
public ResultMsg getProductByProductId(HttpServletRequest request,HttpServletResponse response,
|
|
|
- @RequestParam(value = "productId",defaultValue = "") String productId,
|
|
|
+// @RequestParam(value = "productId",defaultValue = "") String productId,
|
|
|
@RequestParam("colorId") Integer colorId
|
|
|
) throws Exception {
|
|
|
|
|
@@ -203,12 +203,9 @@ public class ProductInfoHandler {
|
|
|
remsg.setMessage(ResultInfo.loginOutError);
|
|
|
return remsg;
|
|
|
}
|
|
|
- if (productId == null) {
|
|
|
- remsg.setStatus(false);
|
|
|
- remsg.setResultCode(ResultInfo.ERRORCODE);
|
|
|
- remsg.setMessage(NameUtils.getConfig("ERRORINFO"));
|
|
|
- return remsg;
|
|
|
- }
|
|
|
+
|
|
|
+ Product productInfo=productInfoService.selectProductByColorId(colorId);
|
|
|
+ String productId=productInfo.getProductId().toString();
|
|
|
|
|
|
if (StaticInfo.pattern.matcher(productId).find()) {
|
|
|
//获取产品详情
|