|
@@ -40,7 +40,7 @@ func AutomaticPaymentCollection() {
|
|
|
func AutomaticPayment() {
|
|
|
var ctx = context.Background()
|
|
|
log.Println("自动回款匹配。。。开始")
|
|
|
- query := `select * from transaction where ISRELATION = 0 and OTHNAM is not null and OTHNAM != "" order by id`
|
|
|
+ query := fmt.Sprintf(`select * from transaction where ISRELATION = 0 and OTHNAM is not null and OTHNAM != "" and BNKTIM > '%s' order by id`, time.Now().AddDate(0, -g.Cfg().MustGet(ctx, "automaticPaymentTime", 3).Int(), 0).Format("2006-01-02 15:04:05"))
|
|
|
data, _ := g.DB("cbs").Query(ctx, query)
|
|
|
if !data.IsEmpty() {
|
|
|
returnOrderMap := make(map[string]int)
|