shenzekai před 1 rokem
rodič
revize
e008af69cd

+ 0 - 1
handler/SettleSecTask.go

@@ -45,7 +45,6 @@ func (c SettleSecTask) run() {
 		logrus.Info("SettleSecTask fail,req:%+v", c.req)
 		return
 	}
-	c.resp.Message = "成功添加发货信息"
 	c.resp.Data = res
 }
 

+ 2 - 0
model/gorm_model/selection_info.go

@@ -37,6 +37,8 @@ type YounggeeSelectionInfo struct {
 	PayAt            time.Time `gorm:"column:pay_at"`                   // 支付时间
 	FinishAt         time.Time `gorm:"column:finish_at"`                // 结案时间
 	IsRead           int       `gorm:"column:is_read"`                  // 是否已读
+	AutoTaskID       int        `gorm:"column:auto_task_id"`             // 定时任务id
+	AutoFailAt       *time.Time `gorm:"column:auto_fail_at"`             // 失效自动处理时间
 }
 
 func (m *YounggeeSelectionInfo) TableName() string {

+ 1 - 0
pack/selection_square.go

@@ -54,5 +54,6 @@ func GormSelectionToSelectionBriefInfo(selectionInfo *gorm_model.YounggeeSelecti
 		SampleMode:      selectionInfo.SampleMode,
 		TaskMode:        selectionInfo.TaskMode,
 		PhotoUrl:        photoUrl,
+		TaskReward:      conv.MustFloat64(selectionInfo.TaskReward, 64),
 	}
 }

+ 1 - 2
route/init.go

@@ -152,7 +152,6 @@ func InitRoute(r *gin.Engine) {
 		s.POST("/selection/task/logistics/create", handler.WrapCreateSecTaskLogisticsHandler) // 上传物流信息
 		s.POST("/selection/task/logistics/update", handler.WrapUpdateSecTaskLogisticsHandler) // 修改物流信息
 		s.POST("/selection/task/settle", handler.WrapSettleSecTaskHandler)                    // 结算
-
-		s.POST("/selection/getAllSelection", handler.WrapGetAllSelectionHandler) // 查询选品广场选品列表
+		s.POST("/selection/getAllSelection", handler.WrapGetAllSelectionHandler)              // 查询选品广场选品列表
 	}
 }

+ 1 - 0
service/selection_service/selection.go

@@ -303,5 +303,6 @@ func (s *selection) SelectionSquare(ctx context.Context, req http_model.GetAllSe
 	SelectionListData := new(http_model.SelectionBriefInfoPreview)
 	SelectionListData.SelectionBriefInfo = SelectionList
 	SelectionListData.Total = conv.MustString(total, "")
+	fmt.Printf("SelectionInfo %+v", SelectionListData)
 	return SelectionListData, nil
 }

+ 4 - 3
service/wechatPay.go

@@ -18,7 +18,7 @@ func NativeApiServicePrepay(tradeId string, amount int64) (codeUrl string, err e
 		mchCertificateSerialNumber string = "33DDFEC51BF5412F663B9B56510FD567B625FC68" // 商户证书序列号
 		mchAPIv3Key                string = "fvV2xDHuM8ch3QagCkLChEMsikUTSNiI"         // 商户APIv3密钥
 	)
-	fmt.Println("充值的金额为:",amount)
+	fmt.Println("充值的金额为:", amount)
 	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
 	mchPrivateKey, err := utils.LoadPrivateKeyWithPath("./apiclient_key.pem")
 	if err != nil {
@@ -70,7 +70,7 @@ func QueryOrderByOutTradeNo(tradeId string) (status string, err error) {
 	var (
 		mchID                      string = "1615933939"                               // 商户号
 		mchCertificateSerialNumber string = "33DDFEC51BF5412F663B9B56510FD567B625FC68" // 商户证书序列号
-		mchAPIv3Key                string = "fvV2xDHuM8ch3QagCkLChEMsikUTSNiI"         // 商户APIv3密钥
+		mchAPIv3Key                string = "V12345678910Younggee10987654321V"         // 商户APIv3密钥
 	)
 
 	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
@@ -96,7 +96,7 @@ func QueryOrderByOutTradeNo(tradeId string) (status string, err error) {
 			Mchid:      core.String("1615933939"),
 		},
 	)
-
+	fmt.Printf("支付 %+v\n", resp)
 	if err != nil {
 		// 处理错误
 		log.Printf("call QueryOrderByOutTradeNo err:%s", err)
@@ -105,5 +105,6 @@ func QueryOrderByOutTradeNo(tradeId string) (status string, err error) {
 		// 处理返回结果
 		log.Printf("status=%d resp=%s", result.Response.StatusCode, resp)
 	}
+	fmt.Printf("支付状态 %+v\n", *resp.TradeState)
 	return *resp.TradeState, nil
 }