Commit 729c42f9 by Joneq

修复一些小问题

parent 685e2142
......@@ -75,6 +75,7 @@ func getOrderInfo(c *bm.Context) {
orderId,_ := c.Params.Get("order_id")
service.PhotoNum = 3
//查询数据库里面是否有该数据
orderAllInfo := service.SelectOrderInfoFromOrderId(c,orderId)
......@@ -191,6 +192,7 @@ func submitOrder(c *bm.Context) {
ordersn,_ := c.Params.Get("ordersn")
service.PhotoNum = 100
//查询数据库里面是否有该数据
orderAllInfo := service.SelectOrderInfoFromOrderId(c,ordersn)
......
......@@ -8,7 +8,9 @@ import (
)
var (
PhotoNum int64 = 3
)
//通过订单ID获取订单的信息
func SelectOrderInfoFromOrderId(c *bm.Context,orderId string)([]model.OrderAllInfo) {
......@@ -61,7 +63,7 @@ func GetOrderEntryImage(c *bm.Context,Issuebillid,Issueentryid string)([]model.O
}
var orderAllImage []model.OrderImage
imagerows,err := db.Query(c,"select issuebillid,issueentryid,image_src from lie_order_goods_img where issuebillid = ? and issueentryid = ? order by id desc limit 0,3",Issuebillid,Issueentryid)
imagerows,err := db.Query(c,"select issuebillid,issueentryid,image_src from lie_order_goods_img where issuebillid = ? and issueentryid = ? order by id desc limit 0,?",Issuebillid,Issueentryid,PhotoNum)
defer imagerows.Close()
for imagerows.Next() {
var orderCurrentImage model.OrderImage
......
package service
import (
"github.com/prometheus/common/log"
"strconv"
"strings"
bm "github.com/go-kratos/kratos/pkg/net/http/blademaster"
......@@ -12,6 +13,7 @@ func StoreErWeiMaGetData(c *bm.Context,erweima string) (num int64,materialno str
if len(paramArr) < 5 {
ErrorReturn(c,"二维码参数不正常")
}
log.Info(paramArr)
returnNum,_ :=strconv.ParseInt(paramArr[3], 10, 64)
return returnNum,paramArr[4]
}
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 sign in to comment