|
@@ -628,9 +628,11 @@ func (this *SpeechRecognitionController) SaveTag() {
|
|
|
// @Param FileName query string false "文件名称"
|
|
|
// @Param StartTime query string false "开始时间"
|
|
|
// @Param EndTime query string false "结束时间"
|
|
|
-// @Param CreateUserId query int false "创建人ID"
|
|
|
+// @Param CreateUserIds query string false "创建人ID"
|
|
|
// @Param TagId query int false "标签ID"
|
|
|
+// @Param TagIds query string false "标签ID"
|
|
|
// @Param MenuId query int false "目录ID"
|
|
|
+// @Param IsTagMenu query bool false "是否为标签目录"
|
|
|
// @Success 200 {object} speech_recognition.SpeechRecognitionListResp
|
|
|
// @router /list [get]
|
|
|
func (this *SpeechRecognitionController) List() {
|
|
@@ -683,9 +685,24 @@ func (this *SpeechRecognitionController) List() {
|
|
|
cond += fmt.Sprintf(` AND (%s BETWEEN ? AND ?)`, speech_recognition.SpeechRecognitionCols.CreateTime)
|
|
|
pars = append(pars, st, ed)
|
|
|
}
|
|
|
- if params.CreateUserId > 0 {
|
|
|
- cond += fmt.Sprintf(` AND %s = ?`, speech_recognition.SpeechRecognitionCols.SysUserId)
|
|
|
- pars = append(pars, params.CreateUserId)
|
|
|
+ if params.CreateUserId != "" {
|
|
|
+ userArr := strings.Split(strings.TrimSpace(params.CreateUserId), ",")
|
|
|
+ if len(userArr) > 0 {
|
|
|
+ userIds := make([]int, 0)
|
|
|
+ for _, v := range userArr {
|
|
|
+ t, _ := strconv.Atoi(v)
|
|
|
+ userIds = append(userIds, t)
|
|
|
+ }
|
|
|
+ if len(userIds) == 0 {
|
|
|
+ br.Data = dataResp
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ cond += fmt.Sprintf(` AND %s IN (%s)`, speech_recognition.SpeechRecognitionCols.SysUserId, utils.GetOrmInReplace(len(userIds)))
|
|
|
+ pars = append(pars, userIds)
|
|
|
+ }
|
|
|
}
|
|
|
// 语音识别目录-筛选子目录集合
|
|
|
if params.MenuId > 0 && !params.IsTagMenu {
|
|
@@ -919,7 +936,7 @@ func (this *SpeechRecognitionController) Detail() {
|
|
|
// @Description 导出内容
|
|
|
// @Param request body speech_recognition.SpeechRecognitionContentExportReq true "type json string"
|
|
|
// @Success 200 string "操作成功"
|
|
|
-// @router /export [post]
|
|
|
+// @router /export [get]
|
|
|
func (this *SpeechRecognitionController) Export() {
|
|
|
br := new(models.BaseResponse).Init()
|
|
|
defer func() {
|
|
@@ -937,7 +954,7 @@ func (this *SpeechRecognitionController) Export() {
|
|
|
return
|
|
|
}
|
|
|
var req speech_recognition.SpeechRecognitionContentExportReq
|
|
|
- if e := json.Unmarshal(this.Ctx.Input.RequestBody, &req); e != nil {
|
|
|
+ if e := this.ParseForm(req); e != nil {
|
|
|
br.Msg = "参数有误"
|
|
|
br.ErrMsg = "参数解析失败, Err: " + e.Error()
|
|
|
return
|