浏览代码

Merge branch 'master' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

xingzai 1 年之前
父节点
当前提交
db83c413f5

+ 1 - 1
controllers/cygx/morning_meeting_review.go

@@ -90,7 +90,7 @@ func (this *MorningMeetingController) List() {
 		return
 	}
 
-	condition += ` ORDER BY meeting_time DESC  `
+	condition += ` ORDER BY publish_time DESC  `
 	resp := new(cygx.CygxMorningMeetingReviewsList)
 	list, err := cygx.GetCygxMorningMeetingReviewsList(condition, pars, startSize, pageSize)
 	if err != nil {

+ 3 - 3
controllers/yb/apply_record.go

@@ -374,9 +374,6 @@ func (this *ApplyRecordController) UserApplyList() {
 		} else if v.Email != "" {
 			emailsSlice = append(emailsSlice, v.Email)
 		}
-		if v.MarkGroup == "" {
-			v.OpStatus = 0
-		}
 	}
 	//统计申请数
 	userApplyTotalMap := make(map[int]int)
@@ -412,6 +409,9 @@ func (this *ApplyRecordController) UserApplyList() {
 	}()
 	w2.Wait()
 	for k, v := range list {
+		if v.OpStatus == 1 && v.MarkGroup == "" {
+			list[k].OpStatus = 0
+		}
 		sourceStr := ""
 		if v.ApplyRecordId > 0 {
 			if v.SourceAgent == 3 {

+ 1 - 1
models/yb/apply_record.go

@@ -158,7 +158,7 @@ SELECT
 	y.is_move,
 	y.source,
 	y.from_page,
-	IF(y.mark_group = '' OR y.mark_group IS NULL, a.mark_group, y.mark_group) AS mark_group,
+	IF(y.mark_group = '' OR y.mark_group IS NULL OR y.apply_record_id = 0 OR y.apply_record_id IS NULL , a.mark_group, y.mark_group) AS mark_group,
     y.company_name as user_company_name
     #bp.seller_id,
 	#bp.seller_name

+ 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()