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
ef6aa587
Commit
ef6aa587
authored
Dec 23, 2019
by
zhongyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加浏览记录文件
parent
e9aeeeca
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
301 additions
and
0 deletions
+301
-0
IHistoryLogBiz.java
src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java
+15
-0
HistoryLogBizImpl.java
...ain/java/net/mingsoft/cms/biz/impl/HistoryLogBizImpl.java
+53
-0
IHistoryLogDao.java
src/main/java/net/mingsoft/cms/dao/IHistoryLogDao.java
+15
-0
IHistoryLogDao.xml
src/main/java/net/mingsoft/cms/dao/IHistoryLogDao.xml
+122
-0
HistoryLogEntity.java
src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java
+89
-0
resources.properties
...main/java/net/mingsoft/cms/resources/resources.properties
+7
-0
No files found.
src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java
0 → 100644
View file @
ef6aa587
package
net
.
mingsoft
.
cms
.
biz
;
import
net.mingsoft.base.biz.IBaseBiz
;
/**
* 文章浏览记录业务
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
public
interface
IHistoryLogBiz
extends
IBaseBiz
{
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/biz/impl/HistoryLogBizImpl.java
0 → 100644
View file @
ef6aa587
/**
The MIT License (MIT) * Copyright (c) 2019 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package
net
.
mingsoft
.
cms
.
biz
.
impl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
net.mingsoft.base.biz.impl.BaseBizImpl
;
import
net.mingsoft.base.dao.IBaseDao
;
import
java.util.*
;
import
net.mingsoft.cms.entity.HistoryLogEntity
;
import
net.mingsoft.cms.biz.IHistoryLogBiz
;
import
net.mingsoft.cms.dao.IHistoryLogDao
;
/**
* 文章浏览记录管理持久化层
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
@Service
(
"cmshistoryLogBizImpl"
)
public
class
HistoryLogBizImpl
extends
BaseBizImpl
implements
IHistoryLogBiz
{
@Autowired
private
IHistoryLogDao
historyLogDao
;
@Override
protected
IBaseDao
getDao
()
{
// TODO Auto-generated method stub
return
historyLogDao
;
}
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/dao/IHistoryLogDao.java
0 → 100644
View file @
ef6aa587
package
net
.
mingsoft
.
cms
.
dao
;
import
net.mingsoft.base.dao.IBaseDao
;
import
java.util.*
;
import
net.mingsoft.cms.entity.HistoryLogEntity
;
/**
* 文章浏览记录持久层
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
public
interface
IHistoryLogDao
extends
IBaseDao
{
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/dao/IHistoryLogDao.xml
0 → 100644
View file @
ef6aa587
<?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" >
<mapper
namespace=
"net.mingsoft.cms.dao.IHistoryLogDao"
>
<resultMap
id=
"resultMap"
type=
"net.mingsoft.cms.entity.HistoryLogEntity"
>
<id
column=
"id"
property=
"id"
/>
<!--编号 -->
<result
column=
"content_id"
property=
"contentId"
/>
<!--文章编号 -->
<result
column=
"hl_ip"
property=
"hlIp"
/>
<!--浏览ip -->
<result
column=
"hl_people_id"
property=
"hlPeopleId"
/>
<!--用户id -->
<result
column=
"hl_is_mobile"
property=
"hlIsMobile"
/>
<!--是否为移动端 -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
<result
column=
"create_date"
property=
"createDate"
/>
<!--创建时间 -->
<result
column=
"update_by"
property=
"updateBy"
/>
<!--修改人 -->
<result
column=
"update_date"
property=
"updateDate"
/>
<!--修改时间 -->
<result
column=
"del"
property=
"del"
/>
<!--删除标记 -->
</resultMap>
<!--保存-->
<insert
id=
"saveEntity"
useGeneratedKeys=
"true"
keyProperty=
"id"
parameterType=
"net.mingsoft.cms.entity.HistoryLogEntity"
>
insert into cms_history_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contentId != null and contentId != ''"
>
content_id,
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
hl_ip,
</if>
<if
test=
"hlPeopleId != null and hlPeopleId != ''"
>
hl_people_id,
</if>
<if
test=
"hlIsMobile != null"
>
hl_is_mobile,
</if>
<if
test=
"createBy > 0"
>
create_by,
</if>
<if
test=
"createDate != null"
>
create_date,
</if>
<if
test=
"updateBy > 0"
>
update_by,
</if>
<if
test=
"updateDate != null"
>
update_date,
</if>
<if
test=
"del != null"
>
del,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contentId != null and contentId != ''"
>
#{contentId},
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
#{hlIp},
</if>
<if
test=
"hlPeopleId != null and hlPeopleId != ''"
>
#{hlPeopleId},
</if>
<if
test=
"hlIsMobile != null"
>
#{hlIsMobile},
</if>
<if
test=
"createBy > 0"
>
#{createBy},
</if>
<if
test=
"createDate != null"
>
#{createDate},
</if>
<if
test=
"updateBy > 0"
>
#{updateBy},
</if>
<if
test=
"updateDate != null"
>
#{updateDate},
</if>
<if
test=
"del != null"
>
#{del},
</if>
</trim>
</insert>
<!--更新-->
<update
id=
"updateEntity"
parameterType=
"net.mingsoft.cms.entity.HistoryLogEntity"
>
update cms_history_log
<set>
<if
test=
"contentId != null and contentId != ''"
>
content_id=#{contentId},
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
hl_ip=#{hlIp},
</if>
<if
test=
"hlPeopleId != null and hlPeopleId != ''"
>
hl_people_id=#{hlPeopleId},
</if>
<if
test=
"hlIsMobile != null"
>
hl_is_mobile=#{hlIsMobile},
</if>
<if
test=
"createBy > 0"
>
create_by=#{createBy},
</if>
<if
test=
"createDate != null"
>
create_date=#{createDate},
</if>
<if
test=
"updateBy > 0"
>
update_by=#{updateBy},
</if>
<if
test=
"updateDate != null"
>
update_date=#{updateDate},
</if>
<if
test=
"del != null"
>
del=#{del},
</if>
</set>
where id = #{id}
</update>
<!--根据id获取-->
<select
id=
"getEntity"
resultMap=
"resultMap"
parameterType=
"int"
>
select * from cms_history_log where id=#{id}
</select>
<!--根据实体获取-->
<select
id=
"getByEntity"
resultMap=
"resultMap"
parameterType=
"net.mingsoft.cms.entity.HistoryLogEntity"
>
select * from cms_history_log
<where>
<if
test=
"contentId != null and contentId != ''"
>
and content_id=#{contentId}
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
and hl_ip=#{hlIp}
</if>
<if
test=
"hlPeopleId != null and hlPeopleId != ''"
>
and hl_people_id=#{hlPeopleId}
</if>
<if
test=
"hlIsMobile != null"
>
and hl_is_mobile=#{hlIsMobile}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
<if
test=
"updateBy > 0"
>
and update_by=#{updateBy}
</if>
<if
test=
"updateDate != null"
>
and update_date=#{updateDate}
</if>
<if
test=
"del != null"
>
and del=#{del}
</if>
</where>
limit 0,1
</select>
<!--删除-->
<delete
id=
"deleteEntity"
parameterType=
"int"
>
delete from cms_history_log where id=#{id}
</delete>
<!--批量删除-->
<delete
id=
"delete"
>
delete from cms_history_log
<where>
id in
<foreach
collection=
"ids"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</where>
</delete>
<!--查询全部-->
<select
id=
"queryAll"
resultMap=
"resultMap"
>
select * from cms_history_log order by id desc
</select>
<!--条件查询-->
<select
id=
"query"
resultMap=
"resultMap"
>
select * from cms_history_log
<where>
<if
test=
"contentId != null and contentId != ''"
>
and content_id=#{contentId}
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
and hl_ip=#{hlIp}
</if>
<if
test=
"hlPeopleId != null and hlPeopleId != ''"
>
and hl_people_id=#{hlPeopleId}
</if>
<if
test=
"hlIsMobile != null"
>
and hl_is_mobile=#{hlIsMobile}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
<if
test=
"updateBy > 0"
>
and update_by=#{updateBy}
</if>
<if
test=
"updateDate != null"
>
and update_date=#{updateDate}
</if>
<if
test=
"del != null"
>
and del=#{del}
</if>
<include
refid=
"net.mingsoft.base.dao.IBaseDao.sqlWhere"
></include>
</where>
order by id desc
</select>
</mapper>
\ No newline at end of file
src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java
0 → 100644
View file @
ef6aa587
package
net
.
mingsoft
.
cms
.
entity
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
net.mingsoft.base.entity.BaseEntity
;
import
java.util.Date
;
/**
* 文章浏览记录实体
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
public
class
HistoryLogEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1577064243576L
;
/**
* 文章编号
*/
private
String
contentId
;
/**
* 浏览ip
*/
private
String
hlIp
;
/**
* 用户id
*/
private
String
hlPeopleId
;
/**
* 是否为移动端
*/
private
Boolean
hlIsMobile
;
/**
* 设置文章编号
*/
public
void
setContentId
(
String
contentId
)
{
this
.
contentId
=
contentId
;
}
/**
* 获取文章编号
*/
public
String
getContentId
()
{
return
this
.
contentId
;
}
/**
* 设置浏览ip
*/
public
void
setHlIp
(
String
hlIp
)
{
this
.
hlIp
=
hlIp
;
}
/**
* 获取浏览ip
*/
public
String
getHlIp
()
{
return
this
.
hlIp
;
}
/**
* 设置用户id
*/
public
void
setHlPeopleId
(
String
hlPeopleId
)
{
this
.
hlPeopleId
=
hlPeopleId
;
}
/**
* 获取用户id
*/
public
String
getHlPeopleId
()
{
return
this
.
hlPeopleId
;
}
/**
* 设置是否为移动端
*/
public
void
setHlIsMobile
(
Boolean
hlIsMobile
)
{
this
.
hlIsMobile
=
hlIsMobile
;
}
/**
* 获取是否为移动端
*/
public
Boolean
getHlIsMobile
()
{
return
this
.
hlIsMobile
;
}
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/resources/resources.properties
0 → 100644
View file @
ef6aa587
#
#Mon Dec 23 09:24:03 CST 2019
content.id
=
\u6587\u
7AE0
\u
7F16
\u
53F7
hl.ip
=
\u
6D4F
\u
89C8ip
hl.people.id
=
\u7528\u6237
id
hl.is.mobile
=
\u
662F
\u5426\u
4E3A
\u
79FB
\u
52A8
\u
7AEF
id
=
\u
7F16
\u
53F7
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