Commit 91dbc6e9 by weijiguang

添加错误日志

parent ab698c61
...@@ -234,6 +234,15 @@ public class SysBannerServiceImpl implements ISysBannerService { ...@@ -234,6 +234,15 @@ public class SysBannerServiceImpl implements ISysBannerService {
@Override @Override
public Boolean updateState(Long bannerId, Integer state) { public Boolean updateState(Long bannerId, Integer state) {
try {
SysBanner sysBanner = sysBannerMapper.getBannerById(bannerId);
if (sysBanner.getType() == 2) {
pushBannerChanged();
}
} catch (Exception e) {
e.printStackTrace();
}
SysBanner banner = new SysBanner(); SysBanner banner = new SysBanner();
banner.setId(bannerId); banner.setId(bannerId);
banner.setState(state); banner.setState(state);
...@@ -247,21 +256,11 @@ public class SysBannerServiceImpl implements ISysBannerService { ...@@ -247,21 +256,11 @@ public class SysBannerServiceImpl implements ISysBannerService {
} }
long i = sysBannerMapper.updateState(banner); long i = sysBannerMapper.updateState(banner);
try {
SysBanner sysBanner = sysBannerMapper.getBannerById(bannerId);
if (sysBanner.getType() == 2) {
pushBannerChanged();
}
} catch (Exception e) {
e.printStackTrace();
}
return i > 0 ? true : false; return i > 0 ? true : false;
} }
@Override @Override
public Boolean delete(Long bannerId) { public Boolean delete(Long bannerId) {
long i = sysBannerMapper.delete(bannerId);
try { try {
SysBanner sysBanner = sysBannerMapper.getBannerById(bannerId); SysBanner sysBanner = sysBannerMapper.getBannerById(bannerId);
if (sysBanner.getType() == 2) { if (sysBanner.getType() == 2) {
...@@ -270,6 +269,7 @@ public class SysBannerServiceImpl implements ISysBannerService { ...@@ -270,6 +269,7 @@ public class SysBannerServiceImpl implements ISysBannerService {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
long i = sysBannerMapper.delete(bannerId);
return i > 0 ? true : false; return i > 0 ? true : false;
} }
......
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