| | |
| | | return R.ok().add(openService.queryStock()); |
| | | } |
| | | |
| | | private void auth(String appkey, Object obj, HttpServletRequest request) { |
| | | log.info("{}接口被访问;appkey:{};请求数据:{}", "open/sensorType/list/auth/v1", appkey, JSON.toJSONString(obj)); |
| | | request.setAttribute("cache", obj); |
| | | if (!auth) { |
| | | return; |
| | | private void auth(String appkey, Object obj, HttpServletRequest request) { |
| | | log.info("{}接口被访问;appkey:{};请求数据:{}", "open/sensorType/list/auth/v1", appkey, JSON.toJSONString(obj)); |
| | | request.setAttribute("cache", obj); |
| | | if (!auth) { |
| | | return; |
| | | } |
| | | if (Cools.isEmpty(appkey)) { |
| | | throw new CoolException("认证失败,请确认appkey无误!"); |
| | | } |
| | | if (!APP_KEY_LIST.contains(appkey)) { |
| | | throw new CoolException("认证失败,请确认appkey无误!"); |
| | | } |
| | | } |
| | | if (Cools.isEmpty(appkey)) { |
| | | throw new CoolException("认证失败,请确认appkey无误!"); |
| | | } |
| | | if (!APP_KEY_LIST.contains(appkey)) { |
| | | throw new CoolException("认证失败,请确认appkey无误!"); |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | // 1 |
| | |
| | | System.out.println(JSON.toJSONString(param1)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 库存统计 |
| | | */ |
| | | @RequestMapping("/agv/haikang/complete/v1") |
| | | public R agvHaiKang(@RequestHeader(required = false) String wrkNo, |
| | | HttpServletRequest request) { |
| | | // auth(wrkNo, null, request); |
| | | return R.ok().add(openService.agvHaiKang(wrkNo)); |
| | | } |
| | | |
| | | |
| | | } |