Browse Source

处理undefined请求

master
xyiege 3 years ago
parent
commit
6d043d8366
  1. 8
      src/main/java/cn/chjyj/szwh/controller/api/GoodsController.java

8
src/main/java/cn/chjyj/szwh/controller/api/GoodsController.java

@ -206,23 +206,23 @@ public class GoodsController extends BaseController {
} }
// 委托数据名称 // 委托数据名称
String entrustName = request.getString("entrust_name"); String entrustName = request.getString("entrust_name");
if (StringUtils.isNotBlank(entrustName)) { if (StringUtils.isNotBlank(entrustName) || !"undefined".equals(entrustName)) {
qmap.put("gd.goods_name", entrustName); qmap.put("gd.goods_name", entrustName);
} }
//数据类型 //数据类型
String recordType = request.getString("record_type"); String recordType = request.getString("record_type");
if (StringUtils.isNotBlank(recordType)) { if (StringUtils.isNotBlank(recordType) || !"undefined".equals(recordType)) {
qmap.put("gd.goods_type", recordType); qmap.put("gd.goods_type", recordType);
} }
//委托方 //委托方
String entrustUser = request.getString("entrust_user_name"); String entrustUser = request.getString("entrust_user_name");
if (StringUtils.isNotBlank(entrustUser)) { if (StringUtils.isNotBlank(entrustUser) || !"undefined".equals(entrustUser)) {
qmap.put("g.entrust_name", entrustUser); qmap.put("g.entrust_name", entrustUser);
} }
// 授权类型 // 授权类型
String authorization = request.getString("authorization"); String authorization = request.getString("authorization");
if (StringUtils.isNotBlank(authorization)) { if (StringUtils.isNotBlank(authorization) || !"undefined".equals(authorization)) {
Integer igoodsEntrust = Integer.valueOf(authorization); Integer igoodsEntrust = Integer.valueOf(authorization);
qmap.put("gd.goods_entrust", igoodsEntrust); qmap.put("gd.goods_entrust", igoodsEntrust);
} }

Loading…
Cancel
Save