k.zhang 3 سال پیش
والد
کامیت
d278861ba5
3فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 1 1
      conf/conf.ini
  2. 1 1
      models/mysql/order.go
  3. 2 2
      report/report.go

+ 1 - 1
conf/conf.ini

@@ -4,7 +4,7 @@ client_secret = 1d4d5dd30f665c0ed3b315275f81fe358c3da609
 api_http = https://gw-api.pinduoduo.com/api/router
 [mysql]
 mysql_host = 49.234.19.130
-mysql_name = duoduo-lhf
+mysql_name = duoduo-lhf_test
 mysql_password = Zhangkun0212a@
 mysql_port = 3306
 mysql_username = gogs

+ 1 - 1
models/mysql/order.go

@@ -353,7 +353,7 @@ func (o *Order) GetOrderInfoList() ([]Order, int, error) {
 
 	table := orm.Eloquent.Table(o.TableName())
 
-	table = table.Where("TO_DAYS( NOW( ) ) - TO_DAYS(update_time) >= 1  and order_status = 5")
+	table = table.Where("TO_DAYS( NOW( ) ) - TO_DAYS(update_time) = 1  and order_status = 5")
 
 	var count int
 	if err := table.Select("open_id,p_id,open_id_1,open_id_2").Group("open_id,p_id,open_id_1,open_id_2").Find(&doc).Error; err != nil {

+ 2 - 2
report/report.go

@@ -11,7 +11,7 @@ const (
 
 func SysCronStart() {
 	c := cron.New()
-	c.AddFunc(cronMinuteStart, OrderList)        //每分钟同步一下订单
-	c.AddFunc(cronMinuteStart2, AvailableAmount) //同步结算金额
+	c.AddFunc(cronMinuteStart, OrderList)          //每分钟同步一下订单
+	c.AddFunc(cronSettDateCutoff, AvailableAmount) //同步结算金额
 	c.Start()
 }