Browse Source

Merge branch 'master' of http://git.iamberry.com/liuzhiwei/iamberry-common-tooth

# Conflicts:
#	tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/coupon/CouponItemDto.java
#	tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/integral/StayIntegral.java
H-SEN 7 years ago
parent
commit
ad26cddc68

+ 1 - 1
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/productInfoMapper.xml

@@ -82,7 +82,7 @@
         PC.COLOR_NAME
         FROM tb_iamberry_product_info PI
         LEFT JOIN tb_iamberry_product_color PC ON PC.color_product_id=PI.PRODUCT_ID
-        WHERE PC.color_id=#{colorId}
+        WHERE PC.color_id=#{colorId} AND color_status=1
     </select>
 	<!--查询正在使用的产品类型-->
 	<select id="listProductType" resultType="ProductType" >

+ 4 - 7
tooth-wechat-web/src/main/java/com/iamberry/wechat/handles/cart/ProductInfoHandler.java

@@ -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()) {
 			//获取产品详情

+ 2 - 1
tooth-wechat-web/src/main/java/com/iamberry/wechat/handles/integral/UseIntegralHandler.java

@@ -2,6 +2,7 @@ package com.iamberry.wechat.handles.integral;
 
 
 
+import com.github.pagehelper.PageHelper;
 import com.iamberry.wechat.core.entity.PageBean;
 import com.iamberry.wechat.core.entity.ResultMsg;
 import com.iamberry.wechat.core.entity.WechatUtils;
@@ -14,6 +15,7 @@ import com.iamberry.wechat.face.member.MemberService;
 import com.iamberry.wechat.face.order.AdminOrderService;
 import com.iamberry.wechat.tools.NameUtils;
 import com.iamberry.wechat.tools.ResultInfo;
+import org.apache.poi.ss.formula.functions.Rank;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -224,7 +226,6 @@ public class UseIntegralHandler {
                 break;
             }
         }
-
         /**************未发货数量*****************/
         Integer notSendCount=adminOrderService.getNotSendCount(openid);