收货信息不能有+&
This commit is contained in:
@@ -250,6 +250,10 @@ public class BuyOrderController {
|
|||||||
buyOrder.setCity(vo.getCity());
|
buyOrder.setCity(vo.getCity());
|
||||||
buyOrder.setDistrict(vo.getCounty());
|
buyOrder.setDistrict(vo.getCounty());
|
||||||
buyOrder.setAddress(userAddress.getDetailAddress());
|
buyOrder.setAddress(userAddress.getDetailAddress());
|
||||||
|
String str = buyOrder.getShippingUser()+buyOrder.getAddress()+buyOrder.getRemark();
|
||||||
|
if (str.contains("+")||str.contains("&")) {
|
||||||
|
return R.error(500, "信息中不能含有“+”、“&”符号!");
|
||||||
|
}
|
||||||
buyOrderService.save(buyOrder);
|
buyOrderService.save(buyOrder);
|
||||||
|
|
||||||
//解决购物车相关问题
|
//解决购物车相关问题
|
||||||
@@ -602,6 +606,10 @@ public class BuyOrderController {
|
|||||||
buyOrder.setShippingUser(addressRequestVo.getConsigneeName());
|
buyOrder.setShippingUser(addressRequestVo.getConsigneeName());
|
||||||
buyOrder.setUserPhone(addressRequestVo.getConsigneeMobile());
|
buyOrder.setUserPhone(addressRequestVo.getConsigneeMobile());
|
||||||
buyOrder.setAddress(addressRequestVo.getAddress());
|
buyOrder.setAddress(addressRequestVo.getAddress());
|
||||||
|
String str = buyOrder.getShippingUser()+buyOrder.getAddress()+buyOrder.getRemark();
|
||||||
|
if (str.contains("+")||str.contains("&")) {
|
||||||
|
return R.error(500, "信息中不能含有“+”、“&”符号!");
|
||||||
|
}
|
||||||
buyOrderService.updateById(buyOrder);
|
buyOrderService.updateById(buyOrder);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ public class UserAddressController {
|
|||||||
if(userAddress.getRegionCode()==null||userAddress.getRegionCode().equals("")){
|
if(userAddress.getRegionCode()==null||userAddress.getRegionCode().equals("")){
|
||||||
return R.error("地址异常添加失败!");
|
return R.error("地址异常添加失败!");
|
||||||
}
|
}
|
||||||
|
String str = userAddress.getConsigneeName()+userAddress.getConsigneePhone()+userAddress.getDetailAddress();
|
||||||
|
if(str.contains("+")||str.contains("&")){
|
||||||
|
return R.error("信息中不能含有“+”、“&”符号!");
|
||||||
|
}
|
||||||
userAddressService.save(userAddress);
|
userAddressService.save(userAddress);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@@ -59,6 +63,10 @@ public class UserAddressController {
|
|||||||
if ((userAddressService.getUserDefaultAddressCount(userAddress.getUserId()) >= 1) && userAddress.getIsDefault() == 1) {
|
if ((userAddressService.getUserDefaultAddressCount(userAddress.getUserId()) >= 1) && userAddress.getIsDefault() == 1) {
|
||||||
return R.error("已经存在默认地址");
|
return R.error("已经存在默认地址");
|
||||||
}
|
}
|
||||||
|
String str = userAddress.getConsigneeName()+userAddress.getConsigneePhone()+userAddress.getDetailAddress();
|
||||||
|
if(str.contains("+")||str.contains("&")){
|
||||||
|
return R.error("信息中不能含有“+”、“&”符号!");
|
||||||
|
}
|
||||||
userAddressService.updateById(userAddress);
|
userAddressService.updateById(userAddress);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user