|
|
@@ -11,6 +11,7 @@ import com.goafanti.common.model.TOrderNew;
|
|
|
import com.goafanti.common.model.TOrderNewWithBLOBs;
|
|
|
import com.goafanti.common.model.TOrderRefundWithBLOBs;
|
|
|
import com.goafanti.common.utils.DateUtils;
|
|
|
+import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.common.utils.excel.NewExcelUtil;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.order.bo.*;
|
|
|
@@ -19,7 +20,6 @@ import com.goafanti.order.enums.OrderNewState;
|
|
|
import com.goafanti.order.enums.SalesTypes;
|
|
|
import com.goafanti.order.service.OrderAssistService;
|
|
|
import com.goafanti.order.service.OrderNewService;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
@@ -213,6 +213,15 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
if (StringUtils.isBlank(t.getContacts())||StringUtils.isBlank(t.getContactMobile())){
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "联系人与电话"));
|
|
|
return res;
|
|
|
+ }else {
|
|
|
+ if (!StringUtils.isContainChinese(t.getContacts())){
|
|
|
+ res.getError().add(buildError("联系人名称必须是中文。"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ if (!StringUtils.isContactMobile(t.getContactMobile())){
|
|
|
+ res.getError().add(buildError(ErrorConstants.MOBILE_PATTERN_ERROR));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
}
|
|
|
if (orderNewService.checkORderTask(t.getOrderNo())) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "主项目"));
|