修复 获取价格规则 默认 oemid=null
This commit is contained in:
1 parent
9f8e656fcf
commit
26ac4c60d5
1 file changed
+11
-3
@@ -68,13 +68,21 @@ namespace KJD_Web.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public IHttpActionResult GetUserMarkups( GetUserMarkupsRequest request)
|
public IHttpActionResult GetUserMarkups(GetUserMarkupsRequest request)
|
||||||
{
|
{
|
||||||
if (!ValidateSign(request)) return Ok(ApiResult.Fail("校验失败", 999));
|
if (!ValidateSign(request)) return Ok(ApiResult.Fail("校验失败", 999));
|
||||||
if (!ModelState.IsValid) return Ok(ApiResult.Fail("请求参数格式错误", ResultCode.ValidationError));
|
if (!ModelState.IsValid) return Ok(ApiResult.Fail("请求参数格式错误", ResultCode.ValidationError));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return Ok(ApiResult.Success(data: _userService.GetUserMarkups(request.UserName, request.PaymentType)));
|
var data = _userService.GetUserMarkups(request.UserName, request.PaymentType);
|
||||||
|
if (data.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in data)
|
||||||
|
{
|
||||||
|
item.OemId = item.OemId == "00000000" ? null : item.OemId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Ok(ApiResult.Success(data: data));
|
||||||
}
|
}
|
||||||
catch (ArgumentException ex)
|
catch (ArgumentException ex)
|
||||||
{
|
{
|
||||||
@@ -277,7 +285,7 @@ namespace KJD_Web.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IHttpActionResult GetUserImageAnalysisQuota(string token,string userName)
|
public IHttpActionResult GetUserImageAnalysisQuota(string token, string userName)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user