Merge branch 'version_20210122_task' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_20210122_task

This commit is contained in:
DirectionOfMind 2021-01-27 09:28:09 +08:00
commit a9477b6626

View File

@ -64,10 +64,15 @@ public class ThirdTaskController {
commandDto = JSONObject.parseObject(a, CommandDto.class);
String[] tokens = TaskCommand.parse(commandDto.getCommand());
log.info("parse data :" + Arrays.toString(tokens));
Object object = SpringContextUtils.getBean(tokens[0]);
Object object = null;
try {
object = SpringContextUtils.getBean(tokens[0]);
if (object == null) {
return R.error("命令不存在。");
}
} catch (Exception e) {
return R.error("命令不存在。");
}
ICommand iCommand = (ICommand) object;
iCommand.init(user, tokens);
TwoTuple<Boolean, String> check = iCommand.check().getData();