发送遥控地锁指令

This commit is contained in:
2023-08-02 13:30:54 +08:00
parent 9b2b2396bb
commit ad2901a19d
3 changed files with 409 additions and 354 deletions

View File

@@ -1,5 +1,6 @@
package com.jsowell.web.controller.pile;
import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
@@ -143,15 +144,16 @@ public class PileRemoteController extends BaseController {
*/
@PostMapping("remoteControlGroundLock")
public AjaxResult remoteControlGroundLock(@RequestBody RemoteControlGroundLockCommand command) {
logger.info("遥控地锁接口param:{}", JSON.toJSONString(command));
AjaxResult result;
try {
pileRemoteService.remoteControlGroundLock(command);
result = AjaxResult.success();
} catch (BusinessException e) {
logger.error("遥控地锁error", e);
logger.error("遥控地锁接口error", e);
result = AjaxResult.error(e.getMessage());
} catch (Exception e) {
logger.error("遥控地锁error", e);
logger.error("遥控地锁接口error", e);
result = AjaxResult.error(e.getMessage());
}
return result;