Commit 04d40641 authored by 吴春's avatar 吴春

1

parent a1727541
......@@ -120,10 +120,24 @@ namespace Edu.WebApi.Controllers.AI
string keyWord = base.ParmJObj.GetStringValue("KeyWord");
keyWord = StringHelper.UrlDecode(keyWord);
int supplierId = base.ParmJObj.GetInt("SupplierId", 0);
//int supplierId = base.ParmJObj.GetInt("SupplierId", 0);
int applicationId = base.ParmJObj.GetInt("ApplicationId", 0);
if (applicationId == 0)
{
return ApiResult.ParamIsNull();
}
var applocationModel = aiModule.GetAI_PresetsApplicationEntity(applicationId);
if ((applocationModel?.ID ?? 0) == 0 || applocationModel.Status == Common.Enum.DateStateEnum.Delete || applocationModel.Enable == 2)
{
return ApiResult.Failed("应用信息不存在");
}
if ((applocationModel?.SupplierId ?? 0) == 0)
{
return ApiResult.Failed("应用信息供应商不存在");
}
string grade = base.ParmJObj.GetStringValue("Grade");
int Type = base.ParmJObj.GetInt("Type", 0);//1-英语作文批改(图像识别),2-英语作文批改(文本输入),3-中文作文批改(图像识别),4-中文作文批改(文本输入)
var supplierModel = aiModule.GetAI_SupplierEntity(supplierId);
var supplierModel = aiModule.GetAI_SupplierEntity(applocationModel.SupplierId);
string imgUrl = base.ParmJObj.GetStringValue("ImgUrl");
RB_AI_UseLog_ViewModel userLogModel = new RB_AI_UseLog_ViewModel();
userLogModel.CreateBy = base.AppletUserInfo.Id;
......@@ -131,7 +145,7 @@ namespace Edu.WebApi.Controllers.AI
userLogModel.School_Id = base.AppletUserInfo.School_Id;
userLogModel.CreateTime = DateTime.Now;
userLogModel.StudentId = this.AppletUserInfo.AccountId;
userLogModel.SupplierId = supplierId;
userLogModel.SupplierId = applocationModel.SupplierId;
userLogModel.TokenNum = "";
userLogModel.Charging = "";
userLogModel.Status = Common.Enum.DateStateEnum.Normal;
......@@ -143,10 +157,6 @@ namespace Edu.WebApi.Controllers.AI
{
return ApiResult.Failed("当前应用供应商未启用");
}
if (supplierId == 0)
{
return ApiResult.Failed("请选择应用");
}
if (string.IsNullOrWhiteSpace(keyWord))
{
return ApiResult.Failed("请输入关键字");
......
......@@ -846,7 +846,7 @@ namespace Edu.WebApi.Controllers.APP
})?.FirstOrDefault();
if ((modelOpenId?.Id ?? 0) > 0)
{
return ApiResult.Failed("OpenId已绑定账户,快去登录吧");
return ApiResult.Failed("当前微信用户已注册,请直接登录");
}
}
var modelOld = accountModule.GetStudentExt(new RB_Account_ViewModel()
......@@ -856,7 +856,7 @@ namespace Edu.WebApi.Controllers.APP
})?.FirstOrDefault();
if ((modelOld?.Id ?? 0) > 0)
{
return ApiResult.Failed(message: "用户已存在", new { Error = -1 });
return ApiResult.Failed(message: "用户已存在,请直接登录", new { Error = -1 });
}
if (password != "Viitto!@#123")
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment