ziwen 1 year ago
parent
commit
798d19b752
2 changed files with 8 additions and 5 deletions
  1. 3 0
      controllers/yb/apply_record.go
  2. 5 5
      services/yb/apply_record.go

+ 3 - 0
controllers/yb/apply_record.go

@@ -506,6 +506,9 @@ func (this *ApplyRecordController) UserApplyList() {
 		if v.CompanyId == 1 && list[k].Status == "潜在用户" {
 			list[k].DelBtn = true
 		}
+		if v.OpStatus == 1 && v.MarkGroup == "" {
+			list[k].OpStatus = 0
+		}
 	}
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp := ybResp.ApplyRecordListV2Resp{

+ 5 - 5
services/yb/apply_record.go

@@ -284,10 +284,10 @@ func MarkGroupApplyRecord(applyRecordId, adminId, userId int, groupName string)
 			}
 			return
 		}
-		if applyRecord.OpStatus != 0 {
-			err = errors.New(fmt.Sprint("申请记录处理状态有误:", err))
-			return
-		}
+		//if applyRecord.OpStatus != 0 {
+		//	err = errors.New(fmt.Sprint("申请记录处理状态有误:", err))
+		//	return
+		//}
 		if userId > 0 && userId != applyRecord.UserId {
 			err = errors.New(fmt.Sprint("申请记录ID与用户ID不匹配:", err))
 			return
@@ -317,7 +317,7 @@ func MarkGroupApplyRecord(applyRecordId, adminId, userId int, groupName string)
 		return
 	}
 	// 未处理过则进行标记
-	if wxUser.IsDeal == 0 {
+	if wxUser.IsDeal == 0 || wxUser.MarkGroup == "" {
 		wxUser.IsDeal = 1
 		wxUser.MarkGroup = groupName
 		wxUser.LastUpdatedTime = time.Now()