Commit 5e09d175 by huangchengyi

1.0

parent dc7e2018
Showing with 3 additions and 3 deletions
......@@ -121,7 +121,7 @@ func (a *ZyCronService) ZyDiscount(checkGoodsId string) {
//计算系数价格
OuterLoop2:
for _,info :=range slic{
fmt.Println(info)
//fmt.Println(info)
//不参与系数的商品
if info["goods_id"] != "" {
if php2go.Stripos(info["goods_id"],","+now_goods_id+",",0) > -1 {
......@@ -174,7 +174,7 @@ func (a *ZyCronService) ZyDiscount(checkGoodsId string) {
}
//处理清库存系数,几个系数符合,往下面算
var ratioPrice float64;
ratioPrice = math.Ceil(gconv.Float64(a["cost"]) * gconv.Float64(info["ratio"])*10000)/10000
ratioPrice = php2go.Round(gconv.Float64(a["cost"]) * gconv.Float64(info["ratio"])*10000)/10000
//查询立创数据
szlcPriceStr,_ := gredis.String(redisConn.Do("HGET","Self_szlc_price",now_goods_id)) //获取立创价格
......@@ -192,7 +192,7 @@ func (a *ZyCronService) ZyDiscount(checkGoodsId string) {
}
szlcPrice = szlcPrice*0.95 //立创95折
if ratioPrice > szlcPrice { //比立创的95折大
minPrice := math.Ceil(gconv.Float64(a["cost"]) * gconv.Float64(info["min_ratio"])*10000)/10000
minPrice := php2go.Round(gconv.Float64(a["cost"]) * gconv.Float64(info["min_ratio"])*10000)/10000
if szlcPrice < minPrice {
ratioPrice = minPrice
}else{
......
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