|
|
@@ -89,14 +89,22 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Traffic
|
|
89
|
89
|
public async Task<IActionResult> Add(MobileDataInput input)
|
|
90
|
90
|
{
|
|
91
|
91
|
#region 验证
|
|
92
|
|
- if (string.IsNullOrWhiteSpace(input.mobilenum))
|
|
|
92
|
+ if (string.IsNullOrEmpty(input.mobilenum))
|
|
93
|
93
|
{
|
|
94
|
94
|
return Error("号段不能为空");
|
|
95
|
95
|
}
|
|
96
|
|
- if (string.IsNullOrWhiteSpace(input.zipcode))
|
|
|
96
|
+ if (string.IsNullOrEmpty(input.zipcode))
|
|
97
|
97
|
{
|
|
98
|
98
|
return Error("区号不能为空");
|
|
99
|
99
|
}
|
|
|
100
|
+ if (string.IsNullOrEmpty(input.citydes))
|
|
|
101
|
+ {
|
|
|
102
|
+ return Error("城市不能为空");
|
|
|
103
|
+ }
|
|
|
104
|
+ if (string.IsNullOrEmpty(input.carddes))
|
|
|
105
|
+ {
|
|
|
106
|
+ return Error("卡类型不能为空");
|
|
|
107
|
+ }
|
|
100
|
108
|
if (await GetExistByCodeAsync(input.mobilenum, 0))
|
|
101
|
109
|
return Error("已存在此号段的记录,请重新输入!");
|
|
102
|
110
|
#endregion
|
|
|
@@ -128,14 +136,22 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Traffic
|
|
128
|
136
|
#region
|
|
129
|
137
|
if (input.id <= 0)
|
|
130
|
138
|
return Error("请选择要编辑的数据");
|
|
131
|
|
- if (string.IsNullOrWhiteSpace(input.mobilenum))
|
|
|
139
|
+ if (string.IsNullOrEmpty(input.mobilenum))
|
|
132
|
140
|
{
|
|
133
|
141
|
return Error("号段不能为空");
|
|
134
|
142
|
}
|
|
135
|
|
- if (string.IsNullOrWhiteSpace(input.zipcode))
|
|
|
143
|
+ if (string.IsNullOrEmpty (input.zipcode))
|
|
136
|
144
|
{
|
|
137
|
145
|
return Error("区号不能为空");
|
|
138
|
146
|
}
|
|
|
147
|
+ if (string.IsNullOrEmpty(input.citydes))
|
|
|
148
|
+ {
|
|
|
149
|
+ return Error("城市不能为空");
|
|
|
150
|
+ }
|
|
|
151
|
+ if (string.IsNullOrEmpty(input.carddes))
|
|
|
152
|
+ {
|
|
|
153
|
+ return Error("卡类型不能为空");
|
|
|
154
|
+ }
|
|
139
|
155
|
if (await GetExistByCodeAsync(input.mobilenum, input.id))
|
|
140
|
156
|
return Error("已存在此号段的记录,请重新输入!");
|
|
141
|
157
|
#endregion
|