Showing
1 changed file
with
6 additions
and
1 deletions
@@ -38,6 +38,7 @@ import com.yohoufo.order.utils.AddressHelper; | @@ -38,6 +38,7 @@ import com.yohoufo.order.utils.AddressHelper; | ||
38 | import com.yohoufo.order.utils.LoggerUtils; | 38 | import com.yohoufo.order.utils.LoggerUtils; |
39 | import lombok.Builder; | 39 | import lombok.Builder; |
40 | import lombok.Data; | 40 | import lombok.Data; |
41 | +import org.apache.commons.lang3.StringUtils; | ||
41 | import org.slf4j.Logger; | 42 | import org.slf4j.Logger; |
42 | import org.springframework.beans.factory.annotation.Autowired; | 43 | import org.springframework.beans.factory.annotation.Autowired; |
43 | import org.springframework.stereotype.Service; | 44 | import org.springframework.stereotype.Service; |
@@ -182,8 +183,12 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements | @@ -182,8 +183,12 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements | ||
182 | throw new UfoServiceException(400, "商品ID错误"); | 183 | throw new UfoServiceException(400, "商品ID错误"); |
183 | } | 184 | } |
184 | final OrderAttributes orderAttributes = getOrderAttributes(); | 185 | final OrderAttributes orderAttributes = getOrderAttributes(); |
186 | + String addressIdstr=req.getAddressId(); | ||
187 | + if (StringUtils.isBlank(addressIdstr)){ | ||
188 | + throw new UfoServiceException(400, "请选择地址后提交"); | ||
189 | + } | ||
185 | 190 | ||
186 | - int addressId = AddressUtil.getDecryptStr(req.getAddressId()); | 191 | + int addressId = AddressUtil.getDecryptStr(addressIdstr); |
187 | if (addressId < 0){ | 192 | if (addressId < 0){ |
188 | logger.warn("submit appraise order addressId invalidate, uid {}, productId {}, addressId {}", | 193 | logger.warn("submit appraise order addressId invalidate, uid {}, productId {}, addressId {}", |
189 | uid, productId, req.getAddressId()); | 194 | uid, productId, req.getAddressId()); |
-
Please register or login to post a comment