|
@@ -18,32 +18,39 @@ namespace Hotline.Api.Controllers
|
|
|
_mapper = mapper;
|
|
|
}
|
|
|
|
|
|
- #region 坐席常用意见
|
|
|
-
|
|
|
/// <summary>
|
|
|
- /// 获取坐席常用意见
|
|
|
+ /// 获取常用意见
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- [HttpGet("seat-common-list")]
|
|
|
- public async Task<IReadOnlyList<CommonOpinion>> GetSeatCommon()
|
|
|
+ [HttpGet("common-list")]
|
|
|
+ public async Task<IReadOnlyList<CommonOpinion>> GetCommon(string typecode)
|
|
|
{
|
|
|
- return await _commonOpinionDomainService.GetCommonOpinions(CommonOpinionTypeConsts.Seat);
|
|
|
+ return await _commonOpinionDomainService.GetCommonOpinions(typecode);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 新增坐席常用意见
|
|
|
+ /// 新增常用意见
|
|
|
/// </summary>
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
- [HttpPost("add-seat-common")]
|
|
|
- public async Task AddSeatCommon([FromBody]AddCommonDto dto)
|
|
|
+ [HttpPost("add-common")]
|
|
|
+ public async Task AddCommon([FromBody]AddCommonDto dto)
|
|
|
{
|
|
|
var entity = _mapper.Map<CommonOpinion>(dto);
|
|
|
- entity.TypeCode = CommonOpinionTypeConsts.Seat;
|
|
|
await _commonOpinionDomainService.AddCommonOpinion(entity,HttpContext.RequestAborted);
|
|
|
}
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// 批量删除常用意见
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="Ids"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("del-common")]
|
|
|
+ public async Task DelCommon([FromBody]DelCommonDto dto)
|
|
|
+ {
|
|
|
+ await _commonOpinionDomainService.DelCommonOpinion(dto.Ids, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
}
|