Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
T
tongmeng-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
林海冰
tongmeng-app
Commits
8cc3fd66
提交
8cc3fd66
authored
1月 16, 2019
作者:
Mangostiffy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增分享日志
上级
4054514d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
409 行增加
和
4 行删除
+409
-4
Sharecontroller.java
...a/com/mall/controller/tongmeng/share/Sharecontroller.java
+45
-0
ShareManager.java
...in/java/com/mall/service/mengbeng/share/ShareManager.java
+11
-0
ShareService.java
...va/com/mall/service/mengbeng/share/impl/ShareService.java
+12
-3
ShareMapper.xml
src/main/resources/mybatis1/tongmeng/ShareMapper.xml
+20
-1
share_list.jsp
src/main/webapp/WEB-INF/jsp/tongmeng/share/share_list.jsp
+321
-0
没有找到文件。
src/main/java/com/mall/controller/tongmeng/share/Sharecontroller.java
0 → 100644
浏览文件 @
8cc3fd66
package
com
.
mall
.
controller
.
tongmeng
.
share
;
import
com.mall.controller.base.BaseController
;
import
com.mall.entity.Page
;
import
com.mall.service.mengbeng.share.ShareManager
;
import
com.mall.util.Jurisdiction
;
import
com.mall.util.PageData
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Controller
@RequestMapping
(
value
=
"/share"
)
public
class
Sharecontroller
extends
BaseController
{
String
menuUrl
=
"share/list.do"
;
//菜单地址(权限用)
@Resource
(
name
=
"shareService"
)
private
ShareManager
shareService
;
/**列表
* @param page
* @throws Exception
*/
@RequestMapping
(
value
=
"/list"
)
public
ModelAndView
list
(
Page
page
)
throws
Exception
{
logBefore
(
logger
,
Jurisdiction
.
getUsername
()+
"列表Foruminfo"
);
ModelAndView
mv
=
this
.
getModelAndView
();
PageData
pd
=
new
PageData
();
pd
=
this
.
getPageData
();
String
keywords
=
pd
.
getString
(
"keywords"
);
//关键词检索条件
if
(
null
!=
keywords
&&
!
""
.
equals
(
keywords
)){
pd
.
put
(
"keywords"
,
keywords
.
trim
());
}
page
.
setPd
(
pd
);
List
<
PageData
>
varList
=
shareService
.
list
(
page
);
mv
.
setViewName
(
"tongmeng/share/share_list"
);
mv
.
addObject
(
"varList"
,
varList
);
mv
.
addObject
(
"pd"
,
pd
);
mv
.
addObject
(
"QX"
,
Jurisdiction
.
getHC
());
//按钮权限
return
mv
;
}
}
src/main/java/com/mall/service/mengbeng/share/ShareManager.java
浏览文件 @
8cc3fd66
package
com
.
mall
.
service
.
mengbeng
.
share
;
import
com.mall.entity.Page
;
import
com.mall.util.PageData
;
import
java.util.List
;
public
interface
ShareManager
{
/**
* 分享
...
...
@@ -9,4 +12,12 @@ public interface ShareManager {
* @throws Exception
*/
public
void
saveShare
(
PageData
pd
)
throws
Exception
;
/**
* 列表
* @param page
* @return
* @throws Exception
*/
public
List
<
PageData
>
list
(
Page
page
)
throws
Exception
;
}
src/main/java/com/mall/service/mengbeng/share/impl/ShareService.java
浏览文件 @
8cc3fd66
package
com
.
mall
.
service
.
mengbeng
.
share
.
impl
;
import
com.mall.dao.DaoSupport
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
com.mall.service.mengbeng.share.ShareManager
;
import
com.mall.util.PageData
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
com.mall.dao.DaoSupport
;
import
com.mall.entity.Page
;
import
com.mall.util.PageData
;
@Service
(
"shareService"
)
public
class
ShareService
implements
ShareManager
{
...
...
@@ -21,4 +25,9 @@ public class ShareService implements ShareManager {
public
void
saveShare
(
PageData
pd
)
throws
Exception
{
dao
.
save
(
"ShareMapper.saveShare"
,
pd
);
}
@Override
public
List
<
PageData
>
list
(
Page
page
)
throws
Exception
{
return
(
List
<
PageData
>)
dao
.
findForList
(
"ShareMapper.DatalistPage"
,
page
);
}
}
src/main/resources/mybatis1/tongmeng/ShareMapper.xml
浏览文件 @
8cc3fd66
...
...
@@ -2,10 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"ShareMapper"
>
<sql
id=
"tableName"
>
c_share_store
</sql>
<!--分享-->
<insert
id=
"saveShare"
parameterType=
"pd"
>
insert into
c_share_store
<include
refid=
"tableName"
></include>
(
share_store,
shareed_store,
...
...
@@ -19,4 +23,19 @@
)
</insert>
<!--列表-->
<select
id=
"DatalistPage"
parameterType=
"page"
resultType=
"pd"
>
select
share_store,
share.store_name as share_store_name,
shareed_store,
shared.store_name as shared_store_name,
share_time
from
<include
refid=
"tableName"
></include>
inner join c_store as share on share.store_id=
<include
refid=
"tableName"
></include>
.share_store
inner join c_store as shared on shared.store_id=
<include
refid=
"tableName"
></include>
.shareed_store
order by share_time desc
</select>
</mapper>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/tongmeng/share/share_list.jsp
0 → 100644
浏览文件 @
8cc3fd66
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论