Commit a0410832 by 张新旗

前进前进,继续上代码

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