Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MCMS
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
MCMS
Commits
2b1b6776
Commit
2b1b6776
authored
Apr 05, 2016
by
dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.5.6更新
parent
f680f668
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
118 additions
and
149 deletions
+118
-149
src/main/java/com/mingsoft/base/action/BaseAction.java
src/main/java/com/mingsoft/base/action/BaseAction.java
+1
-1
src/main/java/com/mingsoft/basic/dao/IAppDao.xml
src/main/java/com/mingsoft/basic/dao/IAppDao.xml
+75
-145
src/main/java/com/mingsoft/cms/parser/impl/ArticleHitParser.java
...n/java/com/mingsoft/cms/parser/impl/ArticleHitParser.java
+35
-0
src/main/java/com/mingsoft/parser/IGeneralParser.java
src/main/java/com/mingsoft/parser/IGeneralParser.java
+2
-1
src/main/java/com/mingsoft/people/action/PeopleUserAction.java
...ain/java/com/mingsoft/people/action/PeopleUserAction.java
+2
-1
src/main/java/com/mingsoft/people/dao/IPeopleUserDao.xml
src/main/java/com/mingsoft/people/dao/IPeopleUserDao.xml
+3
-1
No files found.
src/main/java/com/mingsoft/base/action/BaseAction.java
View file @
2b1b6776
...
@@ -455,7 +455,7 @@ public abstract class BaseAction {
...
@@ -455,7 +455,7 @@ public abstract class BaseAction {
* @param list 记录集合
* @param list 记录集合
*/
*/
protected
void
outJson
(
HttpServletResponse
response
,
List
list
)
{
protected
void
outJson
(
HttpServletResponse
response
,
List
list
)
{
JSONObject
.
toJSONString
(
list
);
this
.
outJson
(
response
,
JSONObject
.
toJSONString
(
list
)
);
}
}
...
...
src/main/java/com/mingsoft/basic/dao/IAppDao.xml
View file @
2b1b6776
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.mingsoft.basic.dao.IAppDao"
>
<mapper
namespace=
"com.mingsoft.basic.dao.IAppDao"
>
<cache
/>
<cache
/>
<!-- 字段绑定 开始 -->
<!-- 字段绑定 开始 -->
<resultMap
type=
"com.mingsoft.basic.entity.AppEntity"
id=
"resultMap"
>
<resultMap
type=
"com.mingsoft.basic.entity.AppEntity"
id=
"resultMap"
>
<id
column=
"APP_ID"
property=
"appId"
/>
<!-- 与website表绑定id -->
<id
column=
"APP_ID"
property=
"appId"
/>
<!-- 与website表绑定id -->
<result
column=
"APP_PAY_DATE"
property=
"appPayDate"
/>
<result
column=
"APP_PAY_DATE"
property=
"appPayDate"
/>
<result
column=
"APP_PAY"
property=
"appPay"
/>
<result
column=
"APP_PAY"
property=
"appPay"
/>
<result
column=
"APP_KEYWORD"
property=
"appKeyword"
/>
<!-- 与website表绑定keyword -->
<result
column=
"APP_KEYWORD"
property=
"appKeyword"
/>
<!-- 与website表绑定keyword -->
<result
column=
"APP_COPYRIGHT"
property=
"appCopyright"
/>
<!-- 与website表绑定copyright -->
<result
column=
"APP_COPYRIGHT"
property=
"appCopyright"
/>
<!-- 与website表绑定copyright -->
<result
column=
"APP_STYLE"
property=
"appStyle"
/>
<!-- 与website表绑定style -->
<result
column=
"APP_STYLE"
property=
"appStyle"
/>
<!-- 与website表绑定style -->
<result
column=
"APP_URL"
property=
"appUrl"
/>
<!-- 与website表绑定url -->
<result
column=
"APP_URL"
property=
"appUrl"
/>
<!-- 与website表绑定url -->
<result
column=
"APP_MANAGERID"
property=
"appManagerId"
/>
<!-- 与website表绑定管理员id -->
<result
column=
"APP_MANAGERID"
property=
"appManagerId"
/>
<!-- 与website表绑定管理员id -->
<result
column=
"APP_NAME"
property=
"appName"
/>
<result
column=
"APP_NAME"
property=
"appName"
/>
<result
column=
"APP_DESCRIPTION"
property=
"appDescription"
/>
<result
column=
"APP_DESCRIPTION"
property=
"appDescription"
/>
<result
column=
"APP_LOGO"
property=
"appLogo"
/>
<result
column=
"APP_LOGO"
property=
"appLogo"
/>
<result
column=
"APP_DATETIME"
property=
"appDatetime"
/>
<result
column=
"APP_DATETIME"
property=
"appDatetime"
/>
<result
column=
"APP_MOBILE_STYLE"
property=
"appMobileStyle"
/>
<result
column=
"APP_MOBILE_STYLE"
property=
"appMobileStyle"
/>
</resultMap>
</resultMap>
<!-- 字段绑定结束 -->
<!-- 字段绑定结束 -->
<!-- 添加website信息开始 -->
<!-- 更新website开始 -->
<insert
id=
"saveEntity"
parameterType=
"com.mingsoft.base.entity.BaseEntity"
flushCache=
"true"
>
<update
id=
"updateEntity"
parameterType=
"com.mingsoft.base.entity.BaseEntity"
insert into app
flushCache=
"true"
>
update app
<!-- 添加表字段 -->
<set>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"appName != null"
>
APP_NAME =#{appName},
</if>
<if
test=
"appName!= null"
>
APP_NAME,
</if>
<if
test=
"appDescription != null"
>
APP_DESCRIPTION =#{appDescription},
</if>
<if
test=
"appDescription!= null"
>
APP_DESCRIPTION,
</if>
<if
test=
"appLogo != null"
>
APP_LOGO =#{appLogo},
</if>
<if
test=
"appLogo!= null"
>
APP_LOGO,
</if>
<if
test=
"appDatetime != null"
>
APP_DATETIME =#{appDatetime},
</if>
<if
test=
"appDatetime!=null"
>
APP_DATETIME,
</if>
<if
test=
"appKeyword != null"
>
APP_keyword =#{appKeyword},
</if>
<if
test=
"appKeyword!= null"
>
APP_KEYWORD,
</if>
<!-- 添加关键字 -->
<if
test=
"appCopyright != null"
>
APP_copyright =#{appCopyright},
</if>
<if
test=
"appCopyright!= null"
>
APP_COPYRIGHT,
</if>
<!-- 添加版权信息 -->
<if
test=
"appStyle != null"
>
APP_style =#{appStyle},
</if>
<if
test=
"appStyle!= null"
>
APP_STYLE,
</if>
<!-- 添加模板风格 -->
<if
test=
"appUrl!= null"
>
APP_URL=#{appUrl},
</if>
<if
test=
"appUrl!= null"
>
APP_URL,
</if>
<!-- 添加域名 -->
<if
test=
"appManagerId >0 "
>
APP_managerId=#{appManagerId},
</if>
<if
test=
"appManagerId >0 "
>
APP_MANAGERID,
</if>
<!-- 添加管理员id -->
<if
test=
"appMobileStyle != null"
>
APP_MOBILE_STYLE=#{appMobileStyle},
</if>
<if
test=
"appMobileStyle != null"
>
APP_MOBILE_STYLE,
</if>
<!-- 添加手机端模版 -->
<if
test=
"appPayDate != null"
>
APP_PAY_DATE=#{appPayDate},
</if>
<if
test=
"appPayDate != null"
>
APP_PAY_DATE,
</if>
<!-- 应用续费时间 -->
<if
test=
"appPay != null"
>
APP_PAY=#{appPay},
</if>
<if
test=
"appPay != null"
>
APP_PAY,
</if>
<!-- 应用费用清单 -->
</set>
</trim>
where APP_Id = #{appId}
</update>
<!-- 注入控制层字段 -->
<!-- 更新website结束 -->
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"appName != null"
>
#{appName},
</if>
<!-- 根据ID查询开始 -->
<if
test=
"appDescription != null"
>
#{appDescription},
</if>
<select
id=
"getEntity"
resultMap=
"resultMap"
parameterType=
"int"
>
<if
test=
"appLogo != null"
>
#{appLogo},
</if>
select * from app
<if
test=
"appDatetime !=null"
>
#{appDatetime},
</if>
where APP_id = #{appId}
<if
test=
"appKeyword != null"
>
#{appKeyword},
</if>
<!-- 添加内容 -->
</select>
<if
test=
"appCopyright != null"
>
#{appCopyright},
</if>
<!-- 添加版权信息 -->
<if
test=
"appStyle != null"
>
#{appStyle},
</if>
<!-- 添加模板风格 -->
<!-- 根据域名查找站点实体 -->
<if
test=
"appUrl != null"
>
#{appUrl},
</if>
<!-- 添加域名 -->
<select
id=
"getByUrl"
resultMap=
"resultMap"
parameterType=
"String"
>
<if
test=
"appManagerId >0 "
>
#{appManagerId},
</if>
<!-- 添加管理员id -->
select *
<if
test=
"appMobileStyle != null"
>
#{appMobileStyle},
</if>
from app
<if
test=
"appPayDate != null"
>
#{appPayDate},
</if>
where APP_URL like CONCAT('%',#{appUrl},'%') limit 0,1
<if
test=
"appPay != null"
>
#{appPay},
</if>
</select>
</trim>
<!-- 根据ID查询结束 -->
</insert>
<!-- 添加website信息结束 -->
<!-- 根据域名查询 -->
<select
id=
"countByUrl"
resultType=
"int"
parameterType=
"String"
>
<!-- 删除website开始 -->
select
<delete
id=
"deleteEntity"
parameterType=
"int"
flushCache=
"true"
>
count(app_id)
delete from app
from app
where
where
APP_id = #{appId}
REPLACE(APP_URL,"/","") =
</delete>
REPLACE(#{appUrl},"/","")
<!-- 删除website结束 -->
</select>
<!-- 根据域名查询结束 -->
<!-- 更新website开始 -->
<update
id=
"updateEntity"
parameterType=
"com.mingsoft.base.entity.BaseEntity"
flushCache=
"true"
>
<!-- 根据站点管理员id查找 -->
update app
<select
id=
"getByManagerId"
resultMap=
"resultMap"
parameterType=
"int"
>
<set>
select * from app where APP_MANAGERID =
<if
test=
"appName != null"
>
APP_NAME =#{appName},
</if>
#{appManagerId}
<if
test=
"appDescription != null"
>
APP_DESCRIPTION =#{appDescription},
</if>
</select>
<if
test=
"appLogo != null"
>
APP_LOGO =#{appLogo},
</if>
<if
test=
"appDatetime != null"
>
APP_DATETIME =#{appDatetime},
</if>
<if
test=
"appKeyword != null"
>
APP_keyword =#{appKeyword},
</if>
<if
test=
"appCopyright != null"
>
APP_copyright =#{appCopyright},
</if>
<if
test=
"appStyle != null"
>
APP_style =#{appStyle},
</if>
<if
test=
"appUrl!= null"
>
APP_URL=#{appUrl},
</if>
<if
test=
"appManagerId >0 "
>
APP_managerId=#{appManagerId},
</if>
<if
test=
"appMobileStyle != null"
>
APP_MOBILE_STYLE=#{appMobileStyle},
</if>
<if
test=
"appPayDate != null"
>
APP_PAY_DATE=#{appPayDate},
</if>
<if
test=
"appPay != null"
>
APP_PAY=#{appPay},
</if>
</set>
where APP_Id = #{appId}
</update>
<!-- 更新website结束 -->
<!-- 查询所有website开始 -->
<select
id=
"queryAll"
resultMap=
"resultMap"
>
select * from app order by
app_id desc
</select>
<!-- 查询所有website结束 -->
<!-- 对website进行分页查询开始 -->
<select
id=
"queryByPage"
resultMap=
"resultMap"
>
<!--shiahbasic和 basic间进行连接查询 -->
select *
from app
order by app_id desc
limit ${pageNo*pageSize},#{pageSize}
</select>
<!-- 查询所有website结束 -->
<!-- 查询记录总数 开始 -->
<select
id=
"queryCount"
resultType=
"int"
>
select count(app_id) from app
</select>
<!-- 查询记录总数 结束 -->
<!-- 根据ID查询开始 -->
<select
id=
"getEntity"
resultMap=
"resultMap"
parameterType=
"int"
>
select * from app
where APP_id = #{appId}
</select>
<!-- 根据域名查找站点实体 -->
<select
id=
"getByUrl"
resultMap=
"resultMap"
parameterType=
"String"
>
select *
from app
where APP_URL like CONCAT('%',#{appUrl},'%') limit 0,1
</select>
<!-- 根据ID查询结束 -->
<!-- 根据域名查询 -->
<select
id=
"countByUrl"
resultType=
"int"
parameterType=
"String"
>
select
count(app_id)
from app
where
REPLACE(APP_URL,"/","") =
REPLACE(#{appUrl},"/","")
</select>
<!-- 根据域名查询结束 -->
<!-- 根据站点管理员id查找 -->
<select
id=
"getByManagerId"
resultMap=
"resultMap"
parameterType=
"int"
>
select * from app where APP_MANAGERID =
#{appManagerId}
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/java/com/mingsoft/cms/parser/impl/ArticleHitParser.java
0 → 100644
View file @
2b1b6776
package
com
.
mingsoft
.
cms
.
parser
.
impl
;
import
com.mingsoft.parser.IParser
;
/**
* 内容标题(单标签)
* 文章点击数标签
* {ms:field.hit/}
* 技术支持:景德镇铭飞科技
* 官网:www.ming-soft.com
*/
public
class
ArticleHitParser
extends
IParser
{
/**
* 文章标题标签
*/
private
final
static
String
ARTICLE_HIT_FIELD
=
"\\{ms:field.hit/\\}"
;
/**
* 构造标签的属性
* @param htmlContent原HTML代码
* @param newContent替换的内容
*/
public
ArticleHitParser
(
String
htmlContent
,
String
newContent
){
super
.
htmlCotent
=
htmlContent
;
super
.
newCotent
=
newContent
;
}
@Override
public
String
parse
()
{
// TODO Auto-generated method stub
return
super
.
replaceAll
(
ARTICLE_HIT_FIELD
);
}
}
src/main/java/com/mingsoft/parser/IGeneralParser.java
View file @
2b1b6776
...
@@ -114,7 +114,8 @@ public abstract class IGeneralParser extends IParser {
...
@@ -114,7 +114,8 @@ public abstract class IGeneralParser extends IParser {
htmlContent
=
new
GlobalNameParser
(
htmlContent
,
app
.
getAppName
()).
parse
();
htmlContent
=
new
GlobalNameParser
(
htmlContent
,
app
.
getAppName
()).
parse
();
// 替换模版链接地址标签:{ms: globalskin.url/}
// 替换模版链接地址标签:{ms: globalskin.url/}
String
tmpSkinUrl
=
app
.
getAppHostUrl
()
+
StringUtil
.
removeRepeatStr
(
File
.
separator
+
IParserRegexConstant
.
REGEX_SAVE_TEMPLATE
+
File
.
separator
+
app
.
getAppId
()
+
File
.
separator
+
app
.
getAppStyle
(),
File
.
separator
)+
File
.
separator
;
String
tmpSkinUrl
=
app
.
getAppHostUrl
()
+
File
.
separator
+
IParserRegexConstant
.
REGEX_SAVE_TEMPLATE
+
File
.
separator
+
app
.
getAppId
()
+
File
.
separator
+
app
.
getAppStyle
()+
File
.
separator
;
// 替换网站链接地址标签:{ms:global.url/}
// 替换网站链接地址标签:{ms:global.url/}
String
linkUrl
=
app
.
getAppHostUrl
()
+
File
.
separator
+
IParserRegexConstant
.
HTML_SAVE_PATH
+
File
.
separator
+
app
.
getAppId
()+
File
.
separator
;
String
linkUrl
=
app
.
getAppHostUrl
()
+
File
.
separator
+
IParserRegexConstant
.
HTML_SAVE_PATH
+
File
.
separator
+
app
.
getAppId
()+
File
.
separator
;
//如果论坛模板不为空,模板连接地址=原有地址+"/"+论坛模板
//如果论坛模板不为空,模板连接地址=原有地址+"/"+论坛模板
...
...
src/main/java/com/mingsoft/people/action/PeopleUserAction.java
View file @
2b1b6776
...
@@ -126,7 +126,8 @@ public class PeopleUserAction extends BaseAction{
...
@@ -126,7 +126,8 @@ public class PeopleUserAction extends BaseAction{
@RequestMapping
(
"/add"
)
@RequestMapping
(
"/add"
)
public
String
add
(
ModelMap
mode
,
HttpServletRequest
request
){
public
String
add
(
ModelMap
mode
,
HttpServletRequest
request
){
int
appId
=
this
.
getAppId
(
request
);
int
appId
=
this
.
getAppId
(
request
);
mode
.
addAttribute
(
"appId"
,
appId
);
mode
.
addAttribute
(
"appId"
,
appId
);
mode
.
addAttribute
(
"peopleUser"
,
new
PeopleUserEntity
());
return
"/manager/people/user/people_user"
;
return
"/manager/people/user/people_user"
;
}
}
...
...
src/main/java/com/mingsoft/people/dao/IPeopleUserDao.xml
View file @
2b1b6776
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<sql
id=
"column_people_list"
>
<sql
id=
"column_people_list"
>
PU.PU_PEOPLE_ID,PU.PU_REAL_NAME,PU.PU_ADDRESS,PU.PU_ICON,PU.PU_NICKNAME,PU.PU_SEX,PU.PU_BIRTHDAY,PU.PU_APP_ID,PU.PU_CARD,
PU.PU_PEOPLE_ID,PU.PU_REAL_NAME,PU.PU_ADDRESS,PU.PU_ICON,PU.PU_NICKNAME,PU.PU_SEX,PU.PU_BIRTHDAY,PU.PU_APP_ID,PU.PU_CARD,
P.PEOPLE_ID,P.PEOPLE_PHONE,P.PEOPLE_NAME,P.PEOPLE_PASSWORD,P.PEOPLE_DATETIME,P.PEOPLE_APP_ID,P.PEOPLE_MAIL
P.PEOPLE_ID,P.PEOPLE_PHONE,P.PEOPLE_NAME,P.PEOPLE_PASSWORD,P.PEOPLE_DATETIME,P.PEOPLE_APP_ID,P.PEOPLE_MAIL
,P.PEOPLE_PHONECHECK,P.PEOPLE_MAILLCHECK
</sql>
</sql>
<!-- 表字段结束 -->
<!-- 表字段结束 -->
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
<result
column=
"PEOPLE_DATETIME"
property=
"peopleDateTime"
/>
<!-- 将实体的peopleDateTime属性与表的peopleDateTime字段对接 -->
<result
column=
"PEOPLE_DATETIME"
property=
"peopleDateTime"
/>
<!-- 将实体的peopleDateTime属性与表的peopleDateTime字段对接 -->
<result
column=
"PEOPLE_APP_ID"
property=
"peopleAppId"
/>
<!-- 用户所属的应用ID -->
<result
column=
"PEOPLE_APP_ID"
property=
"peopleAppId"
/>
<!-- 用户所属的应用ID -->
<result
column=
"PEOPLE_MAIL"
property=
"peopleMail"
/>
<!-- 用户邮箱 -->
<result
column=
"PEOPLE_MAIL"
property=
"peopleMail"
/>
<!-- 用户邮箱 -->
<result
column=
"PEOPLE_MAILLCHECK"
property=
"peopleMailCheck"
/>
<!-- 用户邮箱 -->
<result
column=
"PEOPLE_PHONECHECK"
property=
"peoplePhoneCheck"
/>
<!-- 用户邮箱 -->
</resultMap>
</resultMap>
<!-- 将实体属性与表字段对接结束 -->
<!-- 将实体属性与表字段对接结束 -->
...
...
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