|
@@ -8,6 +8,7 @@ import com.aliyuncs.IAcsClient;
|
|
|
import com.aliyuncs.http.MethodType;
|
|
|
import com.aliyuncs.profile.DefaultProfile;
|
|
|
import com.travel.jwt.JWTUtil;
|
|
|
+import com.travel.model.ConfirmOrdering;
|
|
|
import com.travel.model.Supplier;
|
|
|
import com.travel.service.SupplierService;
|
|
|
import com.travel.util.ParsingToken;
|
|
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
@@ -200,4 +202,28 @@ public class SupplierController {
|
|
|
}
|
|
|
return map;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询该用户跟指定供应商的目的地
|
|
|
+ * @param confirmOrdering 参数
|
|
|
+ * @return 返回结果
|
|
|
+ */
|
|
|
+ @GetMapping("getSupplierDestination")
|
|
|
+ @ResponseBody
|
|
|
+ public Map<String, Object> getSupplierDestination(ConfirmOrdering confirmOrdering, HttpServletRequest request){
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ try{
|
|
|
+ Map<String, Object> userMap = ParsingToken.tokenParsing(request);
|
|
|
+ confirmOrdering.setCode((String) userMap.get("code"));
|
|
|
+
|
|
|
+ List<ConfirmOrdering> list = supplierService.getSupplierDestination(confirmOrdering);
|
|
|
+ map.put("data", list);
|
|
|
+ map.put("msg", "200");
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ map.put("msg", "500");
|
|
|
+ map.put("errMsg", "服务器请求异常,请稍后再试");
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
}
|