商品子页面完善
This commit is contained in:
@@ -31,7 +31,6 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[Permission($"{nameof(T)}:get")]
|
||||
[Route("{id}")]
|
||||
[HttpGet]
|
||||
public virtual async Task<Result> GetById([FromRoute]long id)
|
||||
|
||||
@@ -36,6 +36,13 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
return Result.Success().SetData(await _iSpuService.SelctPageList(eneity, page));
|
||||
}
|
||||
|
||||
[Route("{id}")]
|
||||
[HttpGet]
|
||||
public override async Task<Result> GetById([FromRoute] long id)
|
||||
{
|
||||
return Result.Success().SetData(await _repository._DbQueryable.Includes(u=>u.Skus).SingleAsync(u=>u.Id.Equals(id)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -122,7 +122,6 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
//[Authorize]
|
||||
public async Task<Result> GetUserAllInfo()
|
||||
{
|
||||
//通过鉴权jwt获取到用户的id
|
||||
|
||||
Binary file not shown.
@@ -6,6 +6,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Common.Models;
|
||||
|
||||
namespace Yi.Framework.WebCore.MiddlewareExtend
|
||||
@@ -69,8 +70,10 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
|
||||
{
|
||||
resp = Result.Error(msg);
|
||||
}
|
||||
resp.SetCode((ResultCodeEnum)statusCode);
|
||||
var result = JsonConvert.SerializeObject(resp);
|
||||
context.Response.ContentType = "application/json;charset=utf-8";
|
||||
|
||||
return context.Response.WriteAsync(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user