|
|
@@ -14,10 +14,13 @@ import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.alibaba.druid.sql.visitor.functions.If;
|
|
|
+import com.goafanti.common.bo.MyCollection;
|
|
|
import com.goafanti.common.dao.BannersMapper;
|
|
|
import com.goafanti.common.model.Banners;
|
|
|
import com.goafanti.common.utils.LoggerUtils;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
+import com.goafanti.core.mybatis.page.Pagination;
|
|
|
+import com.goafanti.core.shiro.token.TokenManager;
|
|
|
|
|
|
@Service
|
|
|
public class BannersService extends BaseMybatisDao<BannersMapper> {
|
|
|
@@ -39,7 +42,7 @@ public class BannersService extends BaseMybatisDao<BannersMapper> {
|
|
|
return bannersMapper.deleteByPrimaryKey(id);
|
|
|
}
|
|
|
|
|
|
- public List<Banners> findBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
|
|
|
+ public List<Banners> findAppBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
|
|
|
return portalBanners(apiUrl, client, pageNo, pageSize);
|
|
|
}
|
|
|
|
|
|
@@ -65,5 +68,15 @@ public class BannersService extends BaseMybatisDao<BannersMapper> {
|
|
|
public void cleanList(String key) {
|
|
|
LoggerUtils.debug(logger, "清除广告图列表缓存:[%s]", key);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
+ public Pagination<Banners> findBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
|
|
|
+ if(pageNo==null ||pageNo<1)pageNo=1;
|
|
|
+ if(pageSize== null ||pageSize<1)pageSize=10;
|
|
|
+ Map<String, Object> params=new HashMap<String,Object>();
|
|
|
+ if(StringUtils.isNotBlank(apiUrl)) params.put("apiUrl", apiUrl);
|
|
|
+ if(client != null) params.put("client", client);
|
|
|
+ return (Pagination<Banners>) findPage("findAdminBannersList", "findAdminBannersCount", params, pageNo, pageSize);
|
|
|
+ }
|
|
|
+
|
|
|
}
|