six_002
This commit is contained in:
@@ -17,7 +17,7 @@ class stock发送代金券功能(BaseModel):
|
||||
# demo_联合类型: Literal["xiao", "zizi"] = Field(..., description="描述")
|
||||
pass
|
||||
stock_id_代金券批次号: str = Field(..., description="发放代金券是创建的批次号")
|
||||
|
||||
|
||||
def send发券并返回前端需要的数据(self):
|
||||
"""前端请求:将这个字典对象返回给前端,前端调用小程序原生插件领取券"""
|
||||
pass
|
||||
@@ -29,13 +29,13 @@ class stock发送代金券功能(BaseModel):
|
||||
# 第二步: 创建好需要的数据并验名
|
||||
params每一张券需要验名的数据格式 = {
|
||||
"out_request_no0": out_request_no, # 商家侧的发券订单号
|
||||
"stock_id0": "22512292", # 代金券创建的批次号
|
||||
"stock_id0": self.stock_id_代金券批次号, # 代金券创建的批次号
|
||||
"send_coupon_merchant": mchid, # 发券的商家商户号
|
||||
# 如果是支付券,必须包含此项并参与签名;商家券则去掉
|
||||
"create_coupon_merchant0": mchid, # 发券的商家商户号
|
||||
"customize_send_time0": rfc3339, # 当前的领券的时间
|
||||
}
|
||||
|
||||
|
||||
# iteratee为0是按key iteratee是以value的值来排序 reverse=False(从小到大) reverse=True(从大到小)
|
||||
sorted_dict = dict(pydash.sort_by(collection=params每一张券需要验名的数据格式.items(), iteratee=0, reverse=False))
|
||||
print(sorted_dict)
|
||||
@@ -46,7 +46,7 @@ class stock发送代金券功能(BaseModel):
|
||||
# 3. 拼接参数串
|
||||
params = {
|
||||
"out_request_no": out_request_no,
|
||||
"stock_id": "22512292",
|
||||
"stock_id": self.stock_id_代金券批次号,
|
||||
"create_coupon_merchant": sixpay六果科技公司.mchid,
|
||||
"customize_send_time": rfc3339,
|
||||
"send_coupon_merchant": sixpay六果科技公司.mchid,
|
||||
|
||||
Reference in New Issue
Block a user