Commit 07948711 by suxiaochun

增加 网站路由前缀

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