工业级运维app手机api
xufenglei
2017-10-27 717e69d5141c264a7333d121e3d8a3311c9b33fb
增加 空判断
1 files modified
10 ■■■■ changed files
src/main/java/com/moral/monitor/service/impl/ScreenServiceImpl.java 10 ●●●● patch | view | raw | blame | history
src/main/java/com/moral/monitor/service/impl/ScreenServiceImpl.java
@@ -16,6 +16,7 @@
import org.apache.commons.lang.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import com.alibaba.fastjson.JSON;
import com.moral.monitor.dao.AccountEntityMapper;
@@ -195,8 +196,13 @@
    }
    public void setOrgIdsByAccount(Map<String, Object> parameters) {
        AccountEntity account = accountMapper.selectByPrimaryKey((Integer.valueOf((String) parameters.get("accountId"))));
        if (null == account) {
        String accountId = ObjectUtils.nullSafeToString(parameters.get("accountId"));
        if (!StringUtils.isNumeric(accountId) ) {
            return;
        }
        AccountEntity account = accountMapper.selectByPrimaryKey((Integer.valueOf(accountId)));
        if (ObjectUtils.isEmpty(account)) {
            return;
        }
        String organization = account.getOrganization();