|
@@ -271,6 +271,9 @@ func (this *ApplyRecordController) UserApplyList() {
|
|
|
|
|
|
pageSize, _ := this.GetInt("PageSize")
|
|
|
currentIndex, _ := this.GetInt("CurrentIndex")
|
|
|
+ markGroup := this.GetString("MarkGroup")
|
|
|
+ startDate := this.GetString("StartDate")
|
|
|
+ endDate := this.GetString("EndDate")
|
|
|
var startSize int
|
|
|
if pageSize <= 0 {
|
|
|
pageSize = utils.PageSize20
|
|
@@ -314,6 +317,17 @@ func (this *ApplyRecordController) UserApplyList() {
|
|
|
condition += " AND (a.real_name LIKE ? OR a.mobile LIKE ? OR a.email LIKE ? OR (a.company_id > 1 AND b.company_name LIKE ?) OR (a.company_id = 1 AND a.note LIKE ?))"
|
|
|
pars = append(pars, reqKeyword, reqKeyword, reqKeyword, reqKeyword, reqKeyword)
|
|
|
}
|
|
|
+ if markGroup != "" {
|
|
|
+ condition += `AND y.mark_group = `+"'"+markGroup+"'"
|
|
|
+ }
|
|
|
+ if startDate != "" {
|
|
|
+ startDate += " 00:00:00"
|
|
|
+ condition += ` AND a.report_last_view_time >= '` + startDate + `' `
|
|
|
+ }
|
|
|
+ if endDate != "" {
|
|
|
+ endDate += " 23:59:59"
|
|
|
+ condition += ` AND a.report_last_view_time <= '` + endDate + `' `
|
|
|
+ }
|
|
|
|
|
|
reqApplyStatus := this.GetString("ApplyStatus")
|
|
|
if reqApplyStatus != "" {
|
|
@@ -912,3 +926,50 @@ func (this *ApplyRecordController) DelPotentialUser() {
|
|
|
br.IsAddLog = true
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// MarkGroup
|
|
|
+// @Title 标记分组
|
|
|
+// @Description 标记分组
|
|
|
+// @Param request body request.ApplyMarkReq true "type json string"
|
|
|
+// @Success 200 {object} 标记处理成功
|
|
|
+// @router /apply_record/mark_group [post]
|
|
|
+func (this *ApplyRecordController) MarkGroup() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ sysUser := this.SysUser
|
|
|
+ if sysUser == nil {
|
|
|
+ br.Msg = "请登录"
|
|
|
+ br.ErrMsg = "请登录,SysUser is Empty"
|
|
|
+ br.Ret = 408
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ var req request.ApplyMarkGroupReq
|
|
|
+ err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "参数解析异常"
|
|
|
+ br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if req.ApplyRecordId <= 0 && req.GroupName != "" && req.UserId != 0 {
|
|
|
+ br.Msg = "申请记录ID或者分组名异常"
|
|
|
+ br.ErrMsg = "申请记录ID或者分组名异常"
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 标记处理
|
|
|
+ err = ybService.MarkGroupApplyRecord(req.ApplyRecordId, this.SysUser.AdminId, req.UserId, req.GroupName)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "标记处理失败! "
|
|
|
+ br.ErrMsg = "标记处理失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "标记处理成功"
|
|
|
+}
|