|
|
|
@ -77,6 +77,18 @@ func GetOrderResult(c *gin.Context) (result.Data, error) {
|
|
|
|
|
return result.Data{"orderResult": orderResult}, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GetOrderPayUrl(c *gin.Context) (result.Data, error) {
|
|
|
|
|
token := c.DefaultQuery("token", "")
|
|
|
|
|
if token == "" {
|
|
|
|
|
return nil, e.NewError("缺少参数")
|
|
|
|
|
}
|
|
|
|
|
order, err := service.OrderService.GetOrderByToken(token)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return result.Data{"payUrl": order.PayUrl, "status": order.Status}, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func PostToZking(c *gin.Context) (result.Data, error) {
|
|
|
|
|
orderSn := c.DefaultQuery("order_sn", "")
|
|
|
|
|
if orderSn == "" {
|
|
|
|
@ -121,6 +133,7 @@ func UploadSignFile(c *gin.Context) (result.Data, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
global.DB.Model(&model.Applicant{}).Where("order_sn", order.OrderSn).UpdateColumn("sign_url", signUrl)
|
|
|
|
|
global.DB.Model(&model.Order{}).Where("order_sn", order.OrderSn).UpdateColumns(model.Order{Status: "generated"})
|
|
|
|
|
|
|
|
|
|
return result.Data{}, nil
|
|
|
|
|
}
|
|
|
|
|