liujs vor 3 Jahren
Ursprung
Commit
938cfc0dea

+ 7 - 15
express-main/src/main/java/cn/haliaeetus/controller/deviceapi/GetAllExpController.java

@@ -70,21 +70,13 @@ public class GetAllExpController extends BaseController {
 
 		List<ExpressType> allExps = basicInfoService.getExpressByStoreId(user.getStoreId()).get(1);
 
-		/*//添加分拣中心快递类型
-		ExpressType fjExp = new ExpressType();
-		fjExp.setExpId(Integer.MAX_VALUE);
-		fjExp.setExpName("分拣中心");
-		allExps.add(0,fjExp);*/
-		Collections.sort(allExps, new Comparator<ExpressType>() {
-			@Override
-			public int compare(ExpressType o1, ExpressType o2) {
-				if(o1.getSort() > o2.getSort()){
-					return 1;
-				}else if(o1.getSort() < o2.getSort()){
-					return -1;
-				}else {
-					return 0;
-				}
+		Collections.sort(allExps, (o1, o2) -> {
+			if(o1.getSort() > o2.getSort()){
+				return 1;
+			}else if(o1.getSort() < o2.getSort()){
+				return -1;
+			}else {
+				return 0;
 			}
 		});
 		JsonObject object = new JsonObject();

+ 4 - 1
express-main/src/main/java/cn/haliaeetus/service/impl/BasicInfoServiceImpl.java

@@ -583,7 +583,10 @@ public class BasicInfoServiceImpl implements BasicInfoService {
 		 */
 
 		CacheTool cacheTool = CacheTool.initStore();
-		Store store = (Store) cacheTool.getBean(storeId + "");
+		Store store = null;
+		if(storeId != 0){
+			store = (Store) cacheTool.getBean(storeId + "");
+		}
 		if (store != null) {
 			//LOG.record("从memcached获取门店信息:" + storeId);
 			return store;