Commit 139a89e6 authored by 赵啸非's avatar 赵啸非

添加开启与关闭消费队列

parent 578418f9
......@@ -182,7 +182,7 @@ public class DeviceApiController {
deviceResp.setContent(content);
deviceEntity.setOnlineTime(new Date());
deviceEntity.setDeviceStatus(DeviceStatusEnum.在线.getValue());
deviceService.update(deviceEntity);
deviceService.getDeviceDao().update(deviceEntity);
rsp.setData(deviceResp);
deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ONLINE);
} catch (AppException e) {
......
......@@ -43,7 +43,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
userPdu.setSize(-1);
Rest<RespData<List<UserPdu>>> list = userFeign.list(userPdu);
log.info("syncUserResp:{}", JSON.toJSONString(list));
log.debug("syncUserResp:{}", JSON.toJSONString(list));
// return;
// UserPdu userPdu = new UserPdu();
......
......@@ -17,10 +17,7 @@ import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.busiz.rsp.ApiResp;
import com.mortals.xhx.common.code.ApiRespCodeEnum;
import com.mortals.xhx.common.code.DeviceSourceEnum;
import com.mortals.xhx.common.code.DeviceStatusEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.model.DefaultTbQueueMsgHeaders;
import com.mortals.xhx.common.model.MessageHeader;
......@@ -182,11 +179,11 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
public String deviceEnable(@RequestBody DeviceEntity deviceEntity) {
JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>();
String busiDesc = this.getModuleDesc() + "设备启用停用";
String busiDesc = this.getModuleDesc() + "设备";
try {
this.service.deviceEnabled(deviceEntity.getId(), deviceEntity.getEnabled(), getContext());
//this.init(request, response, null, model, getContext());
recordSysLog(request, busiDesc + " 【成功】");
recordSysLog(request, busiDesc+ EnabledEnum.getByValue(deviceEntity.getEnabled()).getDesc() + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
} catch (Exception e) {
......@@ -206,10 +203,10 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
public String stopOrStartComsumeQueue(@RequestBody DeviceEntity deviceEntity) {
JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>();
String busiDesc = this.getModuleDesc() + "设备消费队列启用停用";
String busiDesc = this.getModuleDesc() + "设备消费队列";
try {
this.service.stopOrStartComsumeQueue(deviceEntity.getId(), deviceEntity.getEnabled(), getContext());
recordSysLog(request, busiDesc + " 【成功】");
recordSysLog(request, busiDesc+EnabledEnum.getByValue(deviceEntity.getEnabled()).getDesc() + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
} catch (Exception e) {
......
spring:
main:
allow-bean-definition-overriding: true
application:
log:
level:@profiles.log.level@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment