瀏覽代碼

feat:下次跟进时间配置项

zhangxinlei1996 1 年之前
父節點
當前提交
b15c04a3f3
共有 5 個文件被更改,包括 16 次插入7 次删除
  1. 1 1
      api/etc/crmapplication.yaml
  2. 6 5
      api/internal/config/config.go
  3. 3 0
      service/custom.go
  4. 3 1
      service/sale_chance.go
  5. 3 0
      service/sale_clue.go

+ 1 - 1
api/etc/crmapplication.yaml

@@ -23,4 +23,4 @@ BaseCenterRpc:
     Hosts:
     - 192.168.3.206:2379
     Key: basecenter.rpc
-TimeTaskSwitch: true
+NextFollowUpTime: 2

+ 6 - 5
api/internal/config/config.go

@@ -12,11 +12,12 @@ type Config struct {
 		ServerCode string
 		Etcd       []string
 	}
-	UserCenterRpc zrpc.RpcClientConf
-	FileCenterRpc zrpc.RpcClientConf
-	OssBucketName string
-	OssUrl        string
-	BaseCenterRpc zrpc.RpcClientConf
+	UserCenterRpc    zrpc.RpcClientConf
+	FileCenterRpc    zrpc.RpcClientConf
+	OssBucketName    string
+	OssUrl           string
+	BaseCenterRpc    zrpc.RpcClientConf
+	NextFollowUpTime int
 }
 
 type Db struct {

+ 3 - 0
service/custom.go

@@ -48,6 +48,9 @@ type CustomService struct {
 func (this *CustomService) Add(ctx context.Context) int64 {
 	nowtime := time.Now().Format(date.Date_Full_Layout)
 	nextFollowTime := time.Unix(this.NextfollowUpTime, 0).Format(date.Date_Full_Layout)
+	if this.NextfollowUpTime == 0 {
+		nextFollowTime = time.Now().AddDate(0, 0, cm.C.NextFollowUpTime).Format(date.Date_Full_Layout)
+	}
 	args := []interface{}{}
 	argsTask := []interface{}{}
 	argsTaskTeam := []interface{}{}

+ 3 - 1
service/sale_chance.go

@@ -50,7 +50,9 @@ func (this *SaleChanceService) Add(ctx context.Context) int64 {
 	expect_deal_time := time.Unix(this.ExpectedOrderTime, 0).Format(date.Date_Full_Layout)
 	//下次跟进时间
 	nextFollowTime := time.Unix(this.NextfollowUpTime, 0).Format(date.Date_Full_Layout)
-
+	if this.NextfollowUpTime == 0 {
+		nextFollowTime = time.Now().AddDate(0, 0, cm.C.NextFollowUpTime).Format(date.Date_Full_Layout)
+	}
 	baseUserIdArr := []int64{}
 	chanceId, taskId := int64(-1), int64(-1)
 	//判断处理方式

+ 3 - 0
service/sale_clue.go

@@ -40,6 +40,9 @@ type SaleClueService struct {
 func (this *SaleClueService) Add(ctx context.Context) int64 {
 	nowtime := time.Now().Format(date.Date_Full_Layout)
 	nextFollowTime := time.Unix(this.FollowUpTime, 0).Format(date.Date_Full_Layout)
+	if this.FollowUpTime == 0 {
+		nextFollowTime = time.Now().AddDate(0, 0, cm.C.NextFollowUpTime).Format(date.Date_Full_Layout)
+	}
 	args := []interface{}{}
 	argsTask := []interface{}{}
 	argsTaskTeam := []interface{}{}