| | |
| | |
|
| | | @RequestMapping("findLostOrder")
|
| | | public void findLostOrder(AcceptData acceptData, LostOrder lostOrder, HttpServletRequest request, PrintWriter out) {
|
| | | Integer type = lostOrder.getType();
|
| | | if (type == null) {
|
| | | type = Constant.SOURCE_TYPE_TAOBAO;
|
| | | }
|
| | | |
| | | boolean orderNum = true;
|
| | |
|
| | | if (!NumberUtil.isNumeric(lostOrder.getOrderId())) {
|
| | | orderNum = false;
|
| | | } else if (lostOrder.getOrderId().length() < 12 || lostOrder.getOrderId().length() > 20) {
|
| | | orderNum = false;
|
| | | } else
|
| | | orderNum = Utils.isOrderNum(lostOrder.getOrderId());
|
| | | String orderId = lostOrder.getOrderId();
|
| | | if (type == Constant.SOURCE_TYPE_TAOBAO) {
|
| | | if (!NumberUtil.isNumeric(orderId) || (orderId.length() < 12 || orderId.length() > 20)) {
|
| | | orderNum = false;
|
| | | } else {
|
| | | orderNum = Utils.isOrderNum(orderId);
|
| | | }
|
| | | } else if (type == Constant.SOURCE_TYPE_JD) {
|
| | | if (!NumberUtil.isNumeric(orderId) || (orderId.length() < 6 || orderId.length() > 20)) {
|
| | | orderNum = false;
|
| | | }
|
| | | } else if (type == Constant.SOURCE_TYPE_PDD) {
|
| | | if (!orderId.contains("-")) {
|
| | | orderNum = false;
|
| | | } else {
|
| | | String[] split = orderId.split("-");
|
| | | if (split == null || split.length != 2) {
|
| | | orderNum = false;
|
| | | } else {
|
| | | if (!NumberUtil.isNumeric(split[0]) || !NumberUtil.isNumeric(split[1])) {
|
| | | orderNum = false;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (lostOrder.getUserInfo() == null || lostOrder.getUserInfo().getId() == null
|
| | | || lostOrder.getUserInfo().getId() <= 0) {
|