Commit a0410832 by 张新旗

前进前进,继续上代码

parent 62c4ae79
...@@ -554,9 +554,9 @@ public class WeixinServiceImpl { ...@@ -554,9 +554,9 @@ public class WeixinServiceImpl {
} }
public List<JSONObject> getArea(String lng,String lat) { public List<JSONObject> getArea(String lng,String lat) {
String provinceString ="[value ='%s'][0].name"; String provinceString ="[value ='%s'][0].label";
String cityString ="[value='%s'][0].children[value='%s'][0].name"; String cityString ="[value='%s'][0].children[value='%s'][0].label";
String zoneString = "[value='%s'][0].children[value='%s'][0].children[value='%s'][0].name"; String zoneString = "[value='%s'][0].children[value='%s'][0].children[value='%s'][0].label";
Shop shop = new Shop(); Shop shop = new Shop();
List<Shop> shops = shopMapper.selectShopList(shop); List<Shop> shops = shopMapper.selectShopList(shop);
......
...@@ -57,16 +57,16 @@ public class AppServiceImpl { ...@@ -57,16 +57,16 @@ public class AppServiceImpl {
if(s>1000&&s<10000){ if(s>1000&&s<10000){
DecimalFormat df = new DecimalFormat("######0.0"); DecimalFormat df = new DecimalFormat("######0.0");
distance = df.format(s/1000); distance = df.format(s/1000);
return distance+"公里"; return distance+"km";
}else if (s>=10000){ }else if (s>=10000){
Double aDouble = s/10000; Double aDouble = s/10000;
return aDouble.intValue()+"公里"; return aDouble.intValue()+"km";
}else{ }else{
Double aDouble =s; Double aDouble =s;
return aDouble.intValue()+""; return aDouble.intValue()+"m";
} }
} }
......
...@@ -144,7 +144,7 @@ public class SpecServiceImpl implements ISpecService ...@@ -144,7 +144,7 @@ public class SpecServiceImpl implements ISpecService
String query ="\"specId\":"+spec.getId(); String query ="\"specId\":"+spec.getId();
List<Goods> goods = goodsMapper.selectSpec(query); List<Goods> goods = goodsMapper.selectSpec(query);
if(!goods.isEmpty()){ if(!goods.isEmpty()){
throw new ServiceException("当前还有商品使用,请先删除商品"); throw new ServiceException("当前还有商品使用,请先下架商品");
} }
spec.setIsDeleted(0); spec.setIsDeleted(0);
spec.setUpdatedAt(new Date()); spec.setUpdatedAt(new Date());
...@@ -209,7 +209,7 @@ public class SpecServiceImpl implements ISpecService ...@@ -209,7 +209,7 @@ public class SpecServiceImpl implements ISpecService
String query ="\"specId\":"+id; String query ="\"specId\":"+id;
List<Goods> goods = goodsMapper.selectSpec(query); List<Goods> goods = goodsMapper.selectSpec(query);
if(!goods.isEmpty()){ if(!goods.isEmpty()){
throw new ServiceException("当前还有商品使用,请先删除商品"); throw new ServiceException("当前还有商品使用,请先下架商品");
} }
long specId = Long.parseLong(id); long specId = Long.parseLong(id);
specRuleMapper.deleteSpecRuleBySpecId(specId); specRuleMapper.deleteSpecRuleBySpecId(specId);
......
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 to comment