|
@@ -12,6 +12,7 @@ import com.fdkankan.openApi.service.system.IAccountService;
|
|
|
import com.fdkankan.openApi.service.system.IUserAuthInfoService;
|
|
|
import com.fdkankan.openApi.service.www.IUserService;
|
|
|
import com.fdkankan.openApi.util.TokenUtil;
|
|
|
+import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
|
import com.fdkankan.web.controller.BaseController;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -20,6 +21,9 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* @author Xiewj
|
|
|
* @date 2023/2/9
|
|
@@ -40,6 +44,8 @@ public class TestController extends BaseController {
|
|
|
private LocalOverCache localOverCache;
|
|
|
@Autowired
|
|
|
private IUserService userService;
|
|
|
+ @Autowired
|
|
|
+ private RabbitMqProducer rabbitMqProducer;
|
|
|
|
|
|
|
|
|
@GetMapping("/test")
|
|
@@ -59,4 +65,18 @@ public class TestController extends BaseController {
|
|
|
return ResultData.ok("ok");
|
|
|
}
|
|
|
|
|
|
+// @GetMapping("testMQPriority")
|
|
|
+// @SaIgnore
|
|
|
+// public ResultData testMQPriority() throws InterruptedException {
|
|
|
+//
|
|
|
+// for(int i = 1; i <= 10; i++){
|
|
|
+// Map<String, Integer> map = new HashMap<>();
|
|
|
+// map.put("val", i);
|
|
|
+// rabbitMqProducer.sendByWorkQueue("test_priority", map);
|
|
|
+// Thread.sleep(2000);
|
|
|
+// }
|
|
|
+//
|
|
|
+// return ResultData.ok("ok");
|
|
|
+// }
|
|
|
+
|
|
|
}
|