Commit 9fc26197 by yexing

fix: open名称添加问题

parent ebd5d295
...@@ -243,7 +243,6 @@ const gqlCallback = async function (response) { ...@@ -243,7 +243,6 @@ const gqlCallback = async function (response) {
newJson.__route = "search_engine_marketing"; newJson.__route = "search_engine_marketing";
if (this.params.requestType === "OPEN_CYCLE") { if (this.params.requestType === "OPEN_CYCLE") {
newJson["payCycleStatus"] = "open"; newJson["payCycleStatus"] = "open";
this.names.showName += " open";
} }
newJson["walmartid"] = this.partnerId; newJson["walmartid"] = this.partnerId;
newJson["Starttime"] = fromDate; newJson["Starttime"] = fromDate;
...@@ -402,7 +401,8 @@ export async function createTasks(uri, fromDate, toDate) { ...@@ -402,7 +401,8 @@ export async function createTasks(uri, fromDate, toDate) {
const { settleDate, payCycleStatus: requestType } = period; const { settleDate, payCycleStatus: requestType } = period;
const reportDate = fmt3(settleDate); const reportDate = fmt3(settleDate);
Task.desc = `${fromDate}_${toDate}`; Task.desc = `${fromDate}_${toDate}`;
if (requestType !== "OPEN_CYCLE") { const isOpen = requestType === "OPEN_CYCLE";
if (!isOpen) {
tasks.push( tasks.push(
new Task( new Task(
{ {
...@@ -430,11 +430,12 @@ export async function createTasks(uri, fromDate, toDate) { ...@@ -430,11 +430,12 @@ export async function createTasks(uri, fromDate, toDate) {
) )
); );
} }
const showName = "Export This Page";
tasks.push( tasks.push(
new Task( new Task(
{ {
apiName: "auroraPaymentsSettlementService/payment/settlementDetails", apiName: "auroraPaymentsSettlementService/payment/settlementDetails",
showName: "Export This Page", showName: showName + (isOpen ? " open" : ""),
}, },
{ {
settleDate, settleDate,
......
from datetime import datetime
DATEFMT = "%Y-%m-%d"
def fmt1(d1: str, d2: str):
"""x月x-x号"""
dt1 = datetime.strptime(d1, DATEFMT)
dt2 = datetime.strptime(d2, DATEFMT)
return f"{dt1.month}月{dt1.day}-{dt2.day}日"
import logging
import sys
from datetime import datetime
from pathlib import Path
def create_logger(name: str):
today = datetime.now().strftime("%Y-%m-%d")
logger = logging.getLogger(name)
logger.setLevel(logging.INFO)
path = Path(__file__).parent.parent / 'log' / f"{today}_{name}.log"
fhdlr = logging.FileHandler(path, encoding='utf8')
shdlr = logging.StreamHandler(sys.stdout)
fmt = logging.Formatter('%(asctime)s | %(levelname)s | %(module)s:%(funcName)s:%(lineno)d - %(message)s')
fhdlr.setFormatter(fmt)
shdlr.setFormatter(fmt)
logger.addHandler(fhdlr)
logger.addHandler(shdlr)
return logger
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment