فهرست منبع

1.修改商品列表不用登录信息

qmj 3 روز پیش
والد
کامیت
e4f43d0d08

+ 2 - 5
ruoyi-admin/src/main/java/com/ruoyi/app/mendian/PosFoodController.java

@@ -143,7 +143,6 @@ public class PosFoodController extends BaseController {
      * 通过分类查询商品列表
      * 通过分类查询商品列表
      */
      */
     @Anonymous
     @Anonymous
-    @Auth
     @GetMapping("/getidlist")
     @GetMapping("/getidlist")
     public AjaxResult getidlist(@RequestHeader String token, @RequestParam Integer id, @RequestParam(defaultValue = "") String language, @RequestParam(required = false) String stackingUp, @RequestParam(required = false) String name) {
     public AjaxResult getidlist(@RequestHeader String token, @RequestParam Integer id, @RequestParam(defaultValue = "") String language, @RequestParam(required = false) String stackingUp, @RequestParam(required = false) String name) {
         JwtUtil jwtUtil = new JwtUtil();
         JwtUtil jwtUtil = new JwtUtil();
@@ -151,13 +150,11 @@ public class PosFoodController extends BaseController {
         InfoUser user = infoUserService.getById(ids);
         InfoUser user = infoUserService.getById(ids);
         QueryWrapper<PosFood> queryWrapper = new QueryWrapper<>();
         QueryWrapper<PosFood> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("fl_id", id);
         queryWrapper.eq("fl_id", id);
-        if (!user.getUserType().equals("1")) {
-            queryWrapper.eq("to_examine", "1");
-        }
+        queryWrapper.eq("to_examine", "1");
         if (stackingUp != null && !"".equals(stackingUp)) {
         if (stackingUp != null && !"".equals(stackingUp)) {
             queryWrapper.eq("stacking_up", stackingUp);
             queryWrapper.eq("stacking_up", stackingUp);
         }
         }
-        String lang = "0";
+        String lang = "3";
         if (!"".equals(language)) {
         if (!"".equals(language)) {
             lang = language;
             lang = language;
         }
         }

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/app/order/PosOrderController.java

@@ -1761,7 +1761,7 @@ public class PosOrderController extends BaseController {
     @RequestMapping(value = "/testPushMessage", method = {RequestMethod.GET})
     @RequestMapping(value = "/testPushMessage", method = {RequestMethod.GET})
     public AjaxResult testPushMessage(String cid, String title, String content, String body) {
     public AjaxResult testPushMessage(String cid, String title, String content, String body) {
         PayPush push = new PayPush();
         PayPush push = new PayPush();
-        push.apppush(cid, title, content, body);
+        push.qspush(cid, title, content, body);
         return AjaxResult.success();
         return AjaxResult.success();
     }
     }
 
 

+ 22 - 0
ruoyi-admin/src/main/java/com/ruoyi/app/utils/PayPush.java

@@ -49,6 +49,28 @@ public class PayPush {
         JSONObject jsonObject =  JSON.parseObject(res);
         JSONObject jsonObject =  JSON.parseObject(res);
         System.out.println("=========================用户推送"+res);
         System.out.println("=========================用户推送"+res);
     }
     }
+
+    //用户端批量推送
+    public void qsPushBatch(List<String> cid, String title, String content, String body){
+        String url = "https://fc-mp-20ccbe79-10f8-41d7-a06c-c42581f351c1.next.bspapp.com/msdrider";
+
+        JSONObject json = new JSONObject();
+        // cid 是数组/列表,不能直接字符串拼接,否则会得到 [Ljava.lang.String;@xxxx
+        json.put("cid", cid);
+        json.put("title", title);
+        json.put("content", content);
+        // payload 建议作为 JSON 对象传递,避免双引号转义问题
+        json.put("payload", body == null ? null : JSON.parse(body));
+
+        String jsonBody = json.toJSONString();
+        String res = HttpRequest.post(url)
+                .header("Content-Type", "application/json")
+                .body(jsonBody)
+                .execute()
+                .body();
+        System.out.println("-------用户批量推送");
+    }
+
     //商家端推送
     //商家端推送
     public void shpush(String cid,String title, String content, String body){
     public void shpush(String cid,String title, String content, String body){
         System.out.println("商家cid:"+cid);
         System.out.println("商家cid:"+cid);