|
|
@@ -1,45 +1,45 @@
|
|
|
-package com.hfln.portal.application.controller;
|
|
|
-
|
|
|
-
|
|
|
-import cn.hfln.framework.catchlog.CatchAndLog;
|
|
|
-import cn.hfln.framework.dto.ApiResult;
|
|
|
-import cn.hfln.framework.mqtt.annotation.MqttSubscribe;
|
|
|
-import cn.hfln.framework.mqtt.template.MqttTemplate;
|
|
|
-import com.hfln.portal.infrastructure.service.UserService;
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
-@RestController
|
|
|
-@CatchAndLog
|
|
|
-@Slf4j
|
|
|
-public class TestController {
|
|
|
-
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private UserService userService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private MqttTemplate mqttPublisher;
|
|
|
-
|
|
|
- @GetMapping("/demo")
|
|
|
- public ApiResult<Boolean> get() {
|
|
|
-// UserInfo userInfo = new UserInfo();
|
|
|
-// userInfo.setPhone("13127529598");
|
|
|
-// userInfo.setPassword(PasswordUtil.encrypt("123456"));
|
|
|
-// userInfo.setGender(1);
|
|
|
-// userInfo.setOpenid("wasdasd2212sada");
|
|
|
-// userService.save(userInfo);
|
|
|
- mqttPublisher.send("test","asdasdsada");
|
|
|
-// if (-1<0){
|
|
|
-// throw new BizException(ErrorEnum.ERROR_BIZ_FAIL.getErrorCode(),ErrorEnum.ERROR_BIZ_FAIL.getErrorMessage());
|
|
|
-// }
|
|
|
- return ApiResult.success(userService.checkOpenId("123456"));
|
|
|
- }
|
|
|
-
|
|
|
- @MqttSubscribe(topic = "test")
|
|
|
- public void test(String topic , String payload){
|
|
|
- log.info("topic :{},message:{}",topic,payload);
|
|
|
- }
|
|
|
-}
|
|
|
+//package com.hfln.portal.application.controller;
|
|
|
+//
|
|
|
+//
|
|
|
+//import cn.hfln.framework.catchlog.CatchAndLog;
|
|
|
+//import cn.hfln.framework.dto.ApiResult;
|
|
|
+//import cn.hfln.framework.mqtt.annotation.MqttSubscribe;
|
|
|
+//import cn.hfln.framework.mqtt.template.MqttTemplate;
|
|
|
+//import com.hfln.portal.infrastructure.service.UserService;
|
|
|
+//import lombok.extern.slf4j.Slf4j;
|
|
|
+//import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+//import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+//import org.springframework.web.bind.annotation.RestController;
|
|
|
+//
|
|
|
+//@RestController
|
|
|
+//@CatchAndLog
|
|
|
+//@Slf4j
|
|
|
+//public class TestController {
|
|
|
+//
|
|
|
+//
|
|
|
+// @Autowired
|
|
|
+// private UserService userService;
|
|
|
+//
|
|
|
+// @Autowired
|
|
|
+// private MqttTemplate mqttPublisher;
|
|
|
+//
|
|
|
+// @GetMapping("/demo")
|
|
|
+// public ApiResult<Boolean> get() {
|
|
|
+//// UserInfo userInfo = new UserInfo();
|
|
|
+//// userInfo.setPhone("13127529598");
|
|
|
+//// userInfo.setPassword(PasswordUtil.encrypt("123456"));
|
|
|
+//// userInfo.setGender(1);
|
|
|
+//// userInfo.setOpenid("wasdasd2212sada");
|
|
|
+//// userService.save(userInfo);
|
|
|
+// mqttPublisher.send("test","asdasdsada");
|
|
|
+//// if (-1<0){
|
|
|
+//// throw new BizException(ErrorEnum.ERROR_BIZ_FAIL.getErrorCode(),ErrorEnum.ERROR_BIZ_FAIL.getErrorMessage());
|
|
|
+//// }
|
|
|
+// return ApiResult.success(userService.checkOpenId("123456"));
|
|
|
+// }
|
|
|
+//
|
|
|
+// @MqttSubscribe(topic = "test")
|
|
|
+// public void test(String topic , String payload){
|
|
|
+// log.info("topic :{},message:{}",topic,payload);
|
|
|
+// }
|
|
|
+//}
|