| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
| | | private AdActivityVersionControlService adActivityVersionControlService;
|
| | |
|
| | | @Override
|
| | | public AppPageNotification getAppPageNotificationByType(String type) {
|
| | | public AppPageNotification getAppPageNotificationByType(String type, SystemEnum system) {
|
| | |
|
| | | return appPageNotificationMapper.selectByType(type);
|
| | | return appPageNotificationMapper.selectByType(type,system);
|
| | | }
|
| | |
|
| | | @Cacheable(value = "configCache", key = "'getValidNotificationByTypeCache-'+#type+'-'+ #platform+'-'+#versionCode")
|
| | | @Cacheable(value = "configCache", key = "'getValidNotificationByTypeCache-'+#type+'-'+ #platform+'-'+#versionCode+'-'+#system")
|
| | | @Override
|
| | | public AppPageNotification getValidNotificationByTypeCache(String type, String platform, Integer versionCode) {
|
| | | List<AppPageNotification> recordList = appPageNotificationMapper.listValidByType(type);
|
| | | public AppPageNotification getValidNotificationByTypeCache(String type, String platform, Integer versionCode, SystemEnum system) {
|
| | | List<AppPageNotification> recordList = appPageNotificationMapper.listValidByType(type,system);
|
| | | if (recordList == null || recordList.size() == 0)
|
| | | return null;
|
| | |
|
| | | // 过滤版本
|
| | | AppVersionInfo app = appVersionService.getClientVersion(platform, versionCode);
|
| | | AppVersionInfo app = appVersionService.getClientVersion(platform, versionCode,system);
|
| | | if (app == null) {
|
| | | return null;
|
| | | }
|
| | |
| | | return;
|
| | | if (apn.getType() == null)
|
| | | throw new Exception("类型为空");
|
| | | AppPageNotification old = getAppPageNotificationByType(apn.getType().name());
|
| | | AppPageNotification old = getAppPageNotificationByType(apn.getType().name(),apn.getSystem());
|
| | |
|
| | | if (old != null)
|
| | | throw new Exception("已存在改类型");
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<AppPageNotification> listQuery(long start, int count, String key, Integer show, Integer canClose) {
|
| | | return appPageNotificationMapper.listQuery(start, count, key, show, canClose);
|
| | | public List<AppPageNotification> listQuery(long start, int count, String key, Integer show, Integer canClose, SystemEnum system) {
|
| | | return appPageNotificationMapper.listQuery(start, count, key, show, canClose,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Integer show, Integer canClose) {
|
| | | return appPageNotificationMapper.countQuery(key, show, canClose);
|
| | | public long countQuery(String key, Integer show, Integer canClose, SystemEnum system) {
|
| | | return appPageNotificationMapper.countQuery(key, show, canClose,system);
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|