| | |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.enums.CommandStatusType; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.command.CommandPackage; |
| | |
| | | return R.error("指令不存在"); |
| | | } |
| | | |
| | | commandInfo.setCommandStatus(2);//执行状态 |
| | | commandInfo.setCommandStatus(CommandStatusType.EXECUTE.id);//执行状态 |
| | | commandInfo.setExecuteTime(new Date()); |
| | | if (commandInfoService.updateById(commandInfo)) { |
| | | //将指令进行投递 |
| | |
| | | return R.error("指令不存在"); |
| | | } |
| | | |
| | | commandInfo.setCommandStatus(3);//完成状态 |
| | | commandInfo.setCommandStatus(CommandStatusType.COMPLETE.id);//完成状态 |
| | | commandInfo.setCompleteTime(new Date()); |
| | | commandInfoService.updateById(commandInfo); |
| | | return R.ok(); |