|
|
@ -294,28 +294,37 @@ public class CmsWebsiteController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
private void setWebsiteStatus(CmsWebsite website) { |
|
|
|
if (!website.getRunning().equals(1)) { |
|
|
|
// 空值检查,避免NullPointerException
|
|
|
|
Integer running = website.getRunning(); |
|
|
|
if (running == null) { |
|
|
|
// 默认状态:未开通
|
|
|
|
website.setStatusIcon("error"); |
|
|
|
website.setStatusText("状态未知"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!running.equals(1)) { |
|
|
|
// 未开通
|
|
|
|
if (website.getRunning().equals(0)) { |
|
|
|
if (running.equals(0)) { |
|
|
|
website.setStatusIcon("error"); |
|
|
|
website.setStatusText("该站点未开通"); |
|
|
|
} |
|
|
|
// 维护中
|
|
|
|
if (website.getRunning().equals(2)) { |
|
|
|
if (running.equals(2)) { |
|
|
|
website.setStatusIcon("warning"); |
|
|
|
} |
|
|
|
// 已关闭
|
|
|
|
if (website.getRunning().equals(3)) { |
|
|
|
if (running.equals(3)) { |
|
|
|
website.setStatusIcon("error"); |
|
|
|
website.setStatusText("已关闭"); |
|
|
|
} |
|
|
|
// 已欠费停机
|
|
|
|
if (website.getRunning().equals(4)) { |
|
|
|
if (running.equals(4)) { |
|
|
|
website.setStatusIcon("error"); |
|
|
|
website.setStatusText("已欠费停机"); |
|
|
|
} |
|
|
|
// 违规关停
|
|
|
|
if (website.getRunning().equals(5)) { |
|
|
|
if (running.equals(5)) { |
|
|
|
website.setStatusIcon("error"); |
|
|
|
website.setStatusText("违规关停"); |
|
|
|
} |
|
|
|