Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
07730e63
Commit
07730e63
authored
Feb 28, 2019
by
他是超人他会飞
Committed by
铭飞
Feb 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
!140 SQL更新
Merge pull request !140 from 他是超人他会飞/4.7.0
parents
eaa1c4b3
f0ef7e53
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
65 additions
and
38 deletions
+65
-38
4.6.5-to-4.7.0-mysql.sql
doc/4.6.5-to-4.7.0-mysql.sql
+1
-1
4.6.5-to-4.7.0-sqlserver.sql
doc/4.6.5-to-4.7.0-sqlserver.sql
+2
-0
SQL文件版本说明.md
doc/SQL文件版本说明.md
+12
-0
db-mcms-mysql-4.7.0.sql
doc/db-mcms-mysql-4.7.0.sql
+0
-0
ColumnAction.java
src/main/java/net/mingsoft/cms/action/ColumnAction.java
+1
-1
SearchAction.java
src/main/java/net/mingsoft/cms/action/web/SearchAction.java
+4
-2
CmsParserUtil.java
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
+9
-3
application-dev.yml
src/main/resources/application-dev.yml
+1
-1
application-prod.yml
src/main/resources/application-prod.yml
+2
-1
application-test.yml
src/main/resources/application-test.yml
+2
-12
case-list.htm
src/main/webapp/templets/1/default/m/case-list.htm
+1
-11
indexa.htm
src/main/webapp/templets/1/default/m/indexa.htm
+0
-0
search.htm
src/main/webapp/templets/1/default/search.htm
+30
-6
No files found.
doc/4.6.5-to-4.7.0-mysql.sql
View file @
07730e63
ALTER
TABLE
`model`
ADD
COLUMN
`is_child`
varchar
(
255
)
COMMENT
'扩展业务标记'
AFTER
`model_parent_ids`
;
ALTER
TABLE
`mdiy_dict`
ADD
COLUMN
`is_child`
varchar
(
255
)
COMMENT
'扩展业务标记'
AFTER
`dict_description`
;
ALTER
TABLE
`role`
MODIFY
COLUMN
`app_id`
int
(
11
)
COMMENT
'应用编号'
AFTER
`role_managerid`
;
ALTER
TABLE
`mdiy_dict`
MODIFY
COLUMN
`dict_value`
varchar
(
100
)
COMMENT
'数据值'
AFTER
`app_id`
;
DROP
TABLE
IF
EXISTS
`file`
;
CREATE
TABLE
`file`
(
...
...
doc/4.6.5-to-4.7.0-sqlserver.sql
View file @
07730e63
ALTER
TABLE
[
dbo
].[
model
]
ADD
[
is_child
]
varchar
(
255
)
NULL
GO
ALTER
TABLE
[
dbo
].[
mdiy_dict
]
ALTER
COLUMN
[
dict_value
]
nvarchar
(
100
)
COLLATE
SQL_Latin1_General_CP1_CI_AS
NULL
EXEC
sp_addextendedproperty
'MS_Description'
,
N
'扩展业务标记'
,
'SCHEMA'
,
N
'dbo'
,
...
...
doc/SQL文件版本说明.md
0 → 100644
View file @
07730e63
# 温馨提示,请使用master分支
db-mcms-mysql-4.7.0 最低版本mysql 5.7
db-mcms-sqlserver-4.7.0 最低版本 SQLServer2012
如果使用低与要求版本数据库会出现如下错误
1、导入 mysql文件 datetime时间函数报错,请使用4.6.
2、SQLServer数据库版本 自定义标签 使用了SQLServer2012最新的分页函数 ,
请自行修改mdiy_tag_sql表中的分页函数
数据库类型切换 :修改application.yml中
database-id: mysql、sqlServer、oracle
\ No newline at end of file
doc/db-mcms-mysql-4.7.0.sql
View file @
07730e63
This diff is collapsed.
Click to expand it.
src/main/java/net/mingsoft/cms/action/ColumnAction.java
View file @
07730e63
...
...
@@ -125,7 +125,7 @@ public class ColumnAction extends BaseAction{
*/
private
void
columnPath
(
HttpServletRequest
request
,
ColumnEntity
column
){
StringBuffer
columnPath
=
new
StringBuffer
();
String
file
=
BasicUtil
.
getRealPath
(
""
)+
ParserUtil
.
HTML
+
File
.
separator
+
column
.
getAppId
();
String
file
=
BasicUtil
.
getRealPath
(
""
,
""
)+
ParserUtil
.
HTML
+
File
.
separator
+
column
.
getAppId
();
String
delFile
=
""
;
//修改栏目路径时,删除已存在的文件夹
column
=
(
ColumnEntity
)
columnBiz
.
getEntity
(
column
.
getCategoryId
());
...
...
src/main/java/net/mingsoft/cms/action/web/SearchAction.java
View file @
07730e63
...
...
@@ -114,7 +114,7 @@ public class SearchAction extends BaseAction {
if
(
ObjectUtil
.
isNull
(
search
))
{
this
.
outJson
(
response
,
false
);
}
Map
map
=
BasicUtil
.
assemblyRequestMap
();
Map
<
String
,
Object
>
map
=
BasicUtil
.
assemblyRequestMap
();
// 读取请求字段
Map
<
String
,
String
[]>
field
=
request
.
getParameterMap
();
Map
<
String
,
String
>
basicField
=
getMapByProperties
(
net
.
mingsoft
.
mdiy
.
constant
.
Const
.
BASIC_FIELD
);
...
...
@@ -158,15 +158,17 @@ public class SearchAction extends BaseAction {
map
.
put
(
ParserUtil
.
TOTAL
,
PageUtil
.
totalPage
(
count
,
size
));
//设置页面显示数量
map
.
put
(
ParserUtil
.
RCOUNT
,
size
);
map
.
put
(
ParserUtil
.
SIZE
,
size
);
//设置列表当前页
map
.
put
(
ParserUtil
.
PAGE_NO
,
BasicUtil
.
getInt
(
ParserUtil
.
PAGE_NO
,
1
));
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
Map
searchMap
=
new
HashMap
<>();
searchMap
.
put
(
BASIC_TITLE
,
BasicUtil
.
getString
(
BASIC_TITLE
));
searchMap
.
put
(
ParserUtil
.
PAGE_NO
,
BasicUtil
.
getInt
(
ParserUtil
.
PAGE_NO
,
1
));
map
.
put
(
SEARCH
,
searchMap
);
//动态解析
map
.
put
(
ParserUtil
.
IS_DO
,
tru
e
);
map
.
put
(
ParserUtil
.
IS_DO
,
fals
e
);
//设置动态请求的模块路径
map
.
put
(
ParserUtil
.
MODEL_NAME
,
"mcms"
);
//解析后的内容
...
...
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
07730e63
...
...
@@ -23,6 +23,7 @@ import net.mingsoft.base.constant.Const;
import
net.mingsoft.basic.entity.ColumnEntity
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.SpringUtil
;
import
net.mingsoft.basic.util.StringUtil
;
import
net.mingsoft.cms.bean.ColumnArticleIdBean
;
import
net.mingsoft.cms.constant.e.ColumnTypeEnum
;
import
net.mingsoft.mdiy.biz.IContentModelBiz
;
...
...
@@ -42,13 +43,18 @@ public class CmsParserUtil extends ParserUtil {
* @throws IOException
*/
public
static
void
generate
(
String
templatePath
,
String
targetPath
)
throws
IOException
{
Map
map
=
new
HashMap
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>
();
map
.
put
(
IS_DO
,
false
);
String
content
=
CmsParserUtil
.
generate
(
templatePath
,
map
,
false
);
boolean
mobileStyle
=
false
;
//判断是否有移动端
if
(!
StringUtil
.
isBlank
(
BasicUtil
.
getApp
().
getAppMobileStyle
()))
{
mobileStyle
=
true
;
}
String
content
=
CmsParserUtil
.
generate
(
templatePath
,
map
,
mobileStyle
);
FileUtil
.
writeString
(
content
,
ParserUtil
.
buildHtmlPath
(
targetPath
),
Const
.
UTF8
);
// 生成移动页面
if
(
ObjectUtil
.
isNotNull
(
BasicUtil
.
getApp
().
getAppMobileStyle
())
)
{
if
(
mobileStyle
)
{
// 手机端m
map
.
put
(
ParserUtil
.
MOBILE
,
BasicUtil
.
getApp
().
getAppMobileStyle
());
content
=
CmsParserUtil
.
generate
(
templatePath
,
map
,
true
);
...
...
src/main/resources/application-dev.yml
View file @
07730e63
spring
:
datasource
:
url
:
jdbc:mysql://localhost:3306/
tag?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=fals
e
url
:
jdbc:mysql://localhost:3306/
db-mcms?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=tru
e
username
:
root
password
:
root
filters
:
wall,mergeStat
...
...
src/main/resources/application-prod.yml
View file @
07730e63
spring
:
datasource
:
url
:
jdbc:mysql://localhost:3306/mcms?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false
driverClassName
:
com.microsoft.sqlserver.jdbc.SQLServerDriver
url
:
jdbc:sqlserver://localhost:1433;DatabaseName=db-mcms
username
:
root
password
:
root
filters
:
wall,mergeStat
...
...
src/main/resources/application-test.yml
View file @
07730e63
server
:
port
:
4000
servlet.context-path
:
/
spring
:
datasource
:
url
:
jdbc:mysql://172.17.0.4:3306/mcms-4.7.0?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false
username
:
root
password
:
root
filters
:
wall,mergeStat
type
:
com.alibaba.druid.pool.DruidDataSource
\ No newline at end of file
mcms4.7.0 Oracle数据库暂不支持
\ No newline at end of file
src/main/webapp/templets/1/default/m/case-list.htm
View file @
07730e63
...
...
@@ -13,38 +13,29 @@
<div
class=
"am-gallery-item ms-case-div"
>
<a
href=
'[field.source/]'
><img
class=
"ms-case-list-img"
src=
"{ms:global.host/}[field.litpic/]"
alt=
"[field.title/]"
/></a>
</div>
<span
class=
"am-hide ms-cur-{ms:page.cur/}-[field.index/]"
>
{ms:page.next/}
</span>
</li>
{/ms:arclist}
</ul>
<!-- <div id="ul{ms:page.cur/}"></div> -->
</div>
<
#
include
"
m
/
footer
.
htm
"
/>
</body>
</html>
<script>
/*
var time = 1;
var
time
=
1
;
$
(
window
).
scroll
(
function
()
{
var
scrollTop
=
$
(
this
).
scrollTop
();
var
scrollHeight
=
$
(
document
).
height
();
var
windowHeight
=
$
(
this
).
height
();
if
(
scrollTop
+
windowHeight
==
scrollHeight
)
{
var
time2
=
$
(
".ms-cur-"
+
time
+
"-1"
).
text
()
if(time == "{ms:page.total/}") {
return;
}
$
(
"#ul"
+
time
).
load
(
time2
+
" #ms-ui"
);
$
(
"#am-active-1"
).
append
(
"<div id=
\"
ul"
+
(
time
+
1
)
+
"
\"
></div>"
)
time
++
;
}
else
if
(
scrollTop
+
56
+
windowHeight
==
scrollHeight
){
var
time2
=
$
(
".ms-cur-"
+
time
+
"-1"
).
text
()
if(time == "{ms:page.total/}") {
return;
}
$
(
"#ul"
+
time
).
load
(
time2
+
" #ms-ui"
);
$
(
"#am-active-1"
).
append
(
"<div id=
\"
ul"
+
(
time
+
1
)
+
"
\"
></div>"
)
time
++
;
}
});
*/
</script>
\ No newline at end of file
src/main/webapp/templets/1/default/
index
.htm
→
src/main/webapp/templets/1/default/
m/indexa
.htm
View file @
07730e63
File moved
src/main/webapp/templets/1/default/search.htm
View file @
07730e63
...
...
@@ -8,7 +8,7 @@
<div
class=
"ms-banner"
>
<img
src=
"{ms:global.host/}/{ms:global.style/}/images/search.jpg"
>
</div>
<div
class=
"ms-content"
>
<div
class=
"ms-content"
id=
"body"
>
<div
class=
"ms-content-main-list"
id=
"ms-content-search"
>
<div
class=
"ms-content-main-div"
>
<div
class=
"ms-content-main-div-prompt"
>
您搜索的关键字
...
...
@@ -20,17 +20,17 @@
<li>
<a
href=
"{ms:global.url/}/[field.link/]"
>
[field.title/]
<span
class=
"ms-content-main-li-time"
>
[field.date?string("yyyy-
mm
-dd")/]
</span>
<span
class=
"ms-content-main-li-time"
>
[field.date?string("yyyy-
MM
-dd")/]
</span>
</a>
</li>
{/ms:arclist}
</ul>
</div>
<div
class=
"ms-content-main-page"
>
<a
class=
"ms-content-main-page-first"
href=
"{ms:page.index/}
"
>
首页
</a>
<a
class=
"ms-content-main-page-upper"
href=
"{ms:page.pre/}
"
>
上一页
</a>
<a
class=
"ms-content-main-page-next"
href=
"{ms:page.next/}
"
>
下一页
</a>
<a
class=
"ms-content-main-page-last"
href=
"{ms:page.last/}"
>
末
页
</a>
<a
href=
"jacascript::void(0)"
@
click=
"indexAndLast(1)
"
>
首页
</a>
<a
href=
"jacascript::void(0)"
@
click=
"search(false)
"
>
上一页
</a>
<a
href=
"jacascript::void(0)"
@
click=
"search(true)
"
>
下一页
</a>
<a
href=
"jacascript::void(0)"
@
click=
"indexAndLast({ms:page.total/})"
>
尾
页
</a>
</div>
</div>
</div>
...
...
@@ -38,6 +38,30 @@
</body>
</html>
<script>
new
Vue
({
el
:
"#body"
,
data
:
{
title
:
''
,
list
:
[],
},
methods
:
{
search
:
function
(
flag
){
var
pageNo
=
{
ms
:
search
.
pageNo
/
};
var
total
=
{
ms
:
page
.
total
/
};
if
(
flag
){
pageNo
=
pageNo
==
total
?
total
:
pageNo
+
1
;
}
else
{
pageNo
=
pageNo
-
1
==
0
?
1
:
pageNo
-
1
;
}
window
.
location
.
href
=
"{ms:global.host/}/cms/1/search.do?basic_title={ms:search.basic_title/}&pageNo="
+
pageNo
;
window
.
event
.
returnValue
=
false
;
},
indexAndLast
:
function
(
pageNo
){
window
.
location
.
href
=
"{ms:global.host/}/cms/1/search.do?basic_title={ms:search.basic_title/}&pageNo="
+
pageNo
;
window
.
event
.
returnValue
=
false
;
},
},
})
if
(
$
(
'.ms-content-main-ul li'
).
length
<=
0
)
{
$
(
'.ms-content-main-page'
).
remove
();
$
(
'.ms-content-main-ul'
).
before
(
"<div class='ms-content-main-div-nothing'>没找到相关记录</div>"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment