Przeglądaj źródła

进入校验修改

rgb 6 lat temu
rodzic
commit
ed3dd8b6c7

+ 3 - 1
diagbotman-service/src/main/java/com/diagbot/facade/OpenedProductsFacade.java

@@ -248,11 +248,13 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
     		throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该产品不存在,请刷新页面");
     	}
     	
+    	Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
     	if(openProductCheckVO.getOpenId()!=null){
     		OpenedProducts openedProducts = new OpenedProducts();
     		openedProducts.setId(openProductCheckVO.getOpenId());
+    		openedProducts.setUserId(userId);
     		openedProducts = this.getById(openedProducts);
-    		if(openedProducts==null||openedProducts.getProductId()!=openProductCheckVO.getProductId()){
+    		if(openedProducts==null||openedProducts.getProductId().longValue()!=openProductCheckVO.getProductId().longValue()){
     			throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "您的产品不存在,请刷新页面");
     		}
     		if(openedProducts.getIsDeleted().equals("Y")){