瀏覽代碼

修复查不到盘的BUG

zou.yingbin 4 年之前
父節點
當前提交
fb361decb0
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      mtpcache/goods.go

+ 3 - 3
mtpcache/goods.go

@@ -79,7 +79,7 @@ func (r *Goods) calc() {
 func (r *Goods) buildSql() string {
 	var sqlId utils.SQLVal = `
 select t.goodsid,
-        t.goodscode,
+        upper(t.goodscode) goodscode,
         t.goodsname,
         t.marketid,
         t.goodsgroupid,
@@ -130,10 +130,10 @@ func GetGoods(goodsCode string) (Goods, bool) {
 
 // GetGoodsDecimalplace 获取商品小数位
 func GetGoodsDecimalplace(goodsCode string) int {
-	if d, ok := GetGoods(goodsCode); ok {
+	if d, ok := GetGoods(strings.ToUpper(goodsCode)); ok {
 		return int(d.DECIMALPLACE)
 	}
-	if d, ok := GetGoods(strings.ToUpper(goodsCode)); ok {
+	if d, ok := GetGoods(goodsCode); ok {
 		return int(d.DECIMALPLACE)
 	}
 	return 0