Commit 07948711 by suxiaochun

增加 网站路由前缀

parent 823bd466
...@@ -13,8 +13,10 @@ import io.office.modules.manage.entity.WebsiteHitCountDetailEntity; ...@@ -13,8 +13,10 @@ import io.office.modules.manage.entity.WebsiteHitCountDetailEntity;
import io.office.modules.manage.form.WebsiteHitCountDetailForm; import io.office.modules.manage.form.WebsiteHitCountDetailForm;
import io.office.modules.manage.service.WebsiteHitCountDetailService; import io.office.modules.manage.service.WebsiteHitCountDetailService;
import io.office.modules.sys.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -23,8 +25,6 @@ import java.util.List; ...@@ -23,8 +25,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
@Service("websiteHitCountDetailService") @Service("websiteHitCountDetailService")
public class WebsiteHitCountDetailServiceImpl extends ServiceImpl<WebsiteHitCountDetailDao, WebsiteHitCountDetailEntity> implements WebsiteHitCountDetailService { public class WebsiteHitCountDetailServiceImpl extends ServiceImpl<WebsiteHitCountDetailDao, WebsiteHitCountDetailEntity> implements WebsiteHitCountDetailService {
...@@ -35,7 +35,7 @@ public class WebsiteHitCountDetailServiceImpl extends ServiceImpl<WebsiteHitCoun ...@@ -35,7 +35,7 @@ public class WebsiteHitCountDetailServiceImpl extends ServiceImpl<WebsiteHitCoun
public PageUtils queryPage(Map<String, Object> params) { public PageUtils queryPage(Map<String, Object> params) {
IPage<WebsiteHitCountDetailEntity> page = this.page( IPage<WebsiteHitCountDetailEntity> page = this.page(
new Query<WebsiteHitCountDetailEntity>().getPage(params), new Query<WebsiteHitCountDetailEntity>().getPage(params),
new QueryWrapper<WebsiteHitCountDetailEntity>().between(params.get("createStartTime")!=null&&params.get("createEndTime")!=null&& StringUtils.isNotBlank(params.get("createStartTime").toString())&& StringUtils.isNotBlank(params.get("createEndTime").toString()),"create_time",params.get("createStartTime").toString(),params.get("createEndTime").toString()) new QueryWrapper<WebsiteHitCountDetailEntity>().between(params.get("createStartTime") != null && params.get("createEndTime") != null && StringUtils.isNotBlank(params.get("createStartTime").toString()) && StringUtils.isNotBlank(params.get("createEndTime").toString()), "create_time", params.get("createStartTime").toString(), params.get("createEndTime").toString())
); );
return new PageUtils(page); return new PageUtils(page);
...@@ -50,10 +50,18 @@ public class WebsiteHitCountDetailServiceImpl extends ServiceImpl<WebsiteHitCoun ...@@ -50,10 +50,18 @@ public class WebsiteHitCountDetailServiceImpl extends ServiceImpl<WebsiteHitCoun
//baseMapper.updateById(websiteHitCountDetailEntity); //baseMapper.updateById(websiteHitCountDetailEntity);
} }
@Value("${ipStart}")
private String ipStart;
@Override @Override
public Page<WebsiteHitCountDetailForm> getListPage(WebsiteHitCountDetailForm websiteHitCountDetailForm, Page page) { public Page<WebsiteHitCountDetailForm> getListPage(WebsiteHitCountDetailForm websiteHitCountDetailForm, Page page) {
//page.setTotal(baseMapper.getListPageCount(websiteHitCountDetailForm)); //page.setTotal(baseMapper.getListPageCount(websiteHitCountDetailForm));
List<WebsiteHitCountDetailForm> newsList = baseMapper.getListPage(websiteHitCountDetailForm, page); List<WebsiteHitCountDetailForm> newsList = baseMapper.getListPage(websiteHitCountDetailForm, page);
if (CollectionUtils.isNotEmpty(newsList)) {
for (WebsiteHitCountDetailForm form : newsList) {
form.setRoute(ipStart + form.getRoute());
}
}
page.setRecords(newsList); page.setRecords(newsList);
return page; return page;
} }
......
...@@ -118,3 +118,6 @@ directory: ...@@ -118,3 +118,6 @@ directory:
"/Org/Intro.aspx": /Org/Intro "/Org/Intro.aspx": /Org/Intro
"News/PicNews.aspx": News/msg "News/PicNews.aspx": News/msg
"service/notice/article.aspx": News/NoticeArticle "service/notice/article.aspx": News/NoticeArticle
# 网站路由前缀
ipStart: http://192.168.0.77
\ No newline at end of file
...@@ -56,9 +56,9 @@ dynamic: ...@@ -56,9 +56,9 @@ dynamic:
password: wangtian password: wangtian
slave2: slave2:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://192.168.0.77:1433;DatabaseName=gs108 url: jdbc:sqlserver://192.168.0.85:1433;DatabaseName=center_outer
username: wangtian username: test2
password: wangtian password: test2
server: server:
port: 9091 port: 9091
# password: 123456 # password: 123456
...@@ -106,3 +106,5 @@ directory: ...@@ -106,3 +106,5 @@ directory:
service/notice/article.aspx: News/NoticeArticle service/notice/article.aspx: News/NoticeArticle
# 网站路由前缀
ipStart: http://192.168.0.77
\ No newline at end of file
...@@ -14,7 +14,7 @@ spring: ...@@ -14,7 +14,7 @@ spring:
name: GS1OfficeWebSit name: GS1OfficeWebSit
# 环境 dev|test|prod # 环境 dev|test|prod
profiles: profiles:
active: prod active: test
# jackson时间格式化 # jackson时间格式化
jackson: jackson:
time-zone: GMT+8 time-zone: GMT+8
...@@ -82,3 +82,5 @@ id.work.workerId: 0 ...@@ -82,3 +82,5 @@ id.work.workerId: 0
#机器的数据中心 0-31都可用,如果是分布式部署,需要定义不同的datacenterId #机器的数据中心 0-31都可用,如果是分布式部署,需要定义不同的datacenterId
id.work.datacenterId: 1 id.work.datacenterId: 1
# 网站路由前缀
ipStart: http://www.gs1cn.org
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