huangjiajun pirms 1 mēnesi
vecāks
revīzija
5d9cab5835
2 mainītis faili ar 5 papildinājumiem un 2 dzēšanām
  1. +1
    -1
      app/db/db_store.go
  2. +4
    -1
      app/svc/svc_store.go

+ 1
- 1
app/db/db_store.go Parādīt failu

@@ -22,7 +22,7 @@ func GetStore(eg *xorm.Engine, arg map[string]string) []map[string]string {
where += " and store_type=" + arg["store_type"]
}
if arg["city"] != "" {
where += " and city='" + arg["city"] + "'"
where += " and address like '%" + arg["city"] + "%'"
}
if arg["name"] != "" {
where += " and name like '%" + arg["name"] + "'"


+ 4
- 1
app/svc/svc_store.go Parādīt failu

@@ -25,12 +25,14 @@ func BankStore(c *gin.Context) {
}
storeList := make([]map[string]interface{}, 0)
for _, v := range store {
km := v["km"]
if utils.StrToFloat64(v["km"]) < 1 {
v["km"] = utils.IntToStr(int(utils.StrToFloat64(v["km"])*1000)) + "m"
} else {
v["km"] = GetCommissionPrec(c, v["km"], "2", "1")
v["km"] += "km"
}
if utils.StrToFloat64(v["km"]) <= 0 {
if utils.StrToFloat64(km) <= 0 {
v["km"] = "-"
}
tmp := map[string]interface{}{
@@ -73,6 +75,7 @@ func Store(c *gin.Context) {
if utils.StrToFloat64(v["km"]) < 1 {
v["km"] = utils.IntToStr(int(utils.StrToFloat64(v["km"])*1000)) + "m"
} else {
v["km"] = GetCommissionPrec(c, v["km"], "2", "1")
v["km"] += "km"
}
label := make([]string, 0)


Notiek ielāde…
Atcelt
Saglabāt