浏览代码

no message

xingzai 1 年之前
父节点
当前提交
c444537878
共有 2 个文件被更改,包括 7 次插入11 次删除
  1. 3 2
      services/company_approval_message.go
  2. 4 9
      services/cygx/contract_allocation.go

+ 3 - 2
services/company_approval_message.go

@@ -11,6 +11,7 @@ import (
 	"hongze/hongze_mobile_admin/models/tables/cygx_config"
 	"hongze/hongze_mobile_admin/services/alarm_msg"
 	"hongze/hongze_mobile_admin/utils"
+	"strings"
 	"time"
 )
 
@@ -188,10 +189,10 @@ func AddCompanyApprovalMessageWangYang(companyId, companyContractId int, applyRe
 	var mobiles []string
 	cnf, e := cygx_config.GetConfigByCode(utils.TPL_MSG_YANXAUN_APPROVAL)
 	if e != nil {
-		err = errors.New("GetCygxConfigDetailByCode, Err: " + e.Error())
+		err = errors.New("GetConfigByCode, Err: " + e.Error())
 		return
 	}
-	mobiles = append(mobiles, cnf.ConfigValue)
+	mobiles = strings.Split(cnf.ConfigValue, ",")
 	openIdList, e := models.GetUserRecordListByMobileArr(mobiles)
 	if e != nil && e.Error() != utils.ErrNoRow() {
 		err = errors.New("GetUserRecordListByMobileArr, Err: " + e.Error())

+ 4 - 9
services/cygx/contract_allocation.go

@@ -1,15 +1,15 @@
 package cygxService
 
 import (
-	"fmt"
 	"errors"
+	"fmt"
 	"hongze/hongze_mobile_admin/models/tables/chart_permission"
+	"hongze/hongze_mobile_admin/models/tables/company_contract"
 	"hongze/hongze_mobile_admin/models/tables/company_contract_permission"
 	"hongze/hongze_mobile_admin/models/tables/cygx_allocation_company_contract"
 	"hongze/hongze_mobile_admin/services/alarm_msg"
 	"hongze/hongze_mobile_admin/utils"
 	"time"
-	"hongze/hongze_mobile_admin/models/tables/company_contract"
 )
 
 // 如果合同只有研选的时候,自动处理派点
@@ -30,10 +30,6 @@ func HandleAllocationCompanyContractByYanXuan(companyContractId int) (err error)
 		err = errors.New("GetCompanyContractPermissionList, Err: " + e.Error())
 		return
 	}
-	if e != nil && e.Error() != utils.ErrNoRow() {
-		err = errors.New("GetCygxAllocationCompanyContractPermissionListById, Err: " + e.Error())
-		return
-	}
 
 	if len(companyContractPermissionList) > 1 {
 		return
@@ -48,7 +44,7 @@ func HandleAllocationCompanyContractByYanXuan(companyContractId int) (err error)
 			expensiveYxmoney = 5
 		} else if v.ExpensiveYx == 2 {
 			expensiveYxmoney = 10
-		} else{
+		} else {
 			expensiveYxmoney = 3
 		}
 	}
@@ -90,7 +86,6 @@ func HandleAllocationCompanyContractByYanXuan(companyContractId int) (err error)
 
 }
 
-
 // HandleCompanyContractPackageDifference 更新与上一份合同的金额的对比 '增加套餐','减少套餐','维持套餐'
 func HandleCompanyContractPackageDifference(companyContractId int) (err error) {
 	defer func() {
@@ -223,4 +218,4 @@ func HandleCompanyContractPermissionContractType(companyContractId int) (err err
 		return
 	}
 	return
-}
+}