Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
T
tongmeng-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
林海冰
tongmeng-app
Commits
1403ae66
提交
1403ae66
authored
1月 17, 2019
作者:
林海冰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
一级分类列表,店铺列表,访问列表
上级
8cc3fd66
全部展开
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
1061 行增加
和
48 行删除
+1061
-48
CommonApiController.java
...ain/java/com/mall/controller/api/CommonApiController.java
+46
-0
StoreApiController.java
...main/java/com/mall/controller/api/StoreApiController.java
+93
-0
ViewStoreController.java
...ll/controller/tongmeng/viewstore/ViewStoreController.java
+209
-0
StoreManager.java
...in/java/com/mall/service/mengbeng/store/StoreManager.java
+3
-1
StoreService.java
...va/com/mall/service/mengbeng/store/impl/StoreService.java
+27
-3
ViewStoreManager.java
...com/mall/service/mengbeng/viewstore/ViewStoreManager.java
+70
-0
ViewStoreService.java
...all/service/mengbeng/viewstore/impl/ViewStoreService.java
+99
-0
OssUtil.java
src/main/java/com/mall/util/OssUtil.java
+1
-1
ResultOutDto.java
src/main/java/com/mall/util/ResultOutDto.java
+7
-0
StoreManager.xml
src/main/resources/mybatis1/tongmeng/StoreManager.xml
+45
-24
ViewStoreMapper.xml
src/main/resources/mybatis1/tongmeng/ViewStoreMapper.xml
+79
-0
oneclassfy_edit.jsp
...ebapp/WEB-INF/jsp/tongmeng/oneclassfy/oneclassfy_edit.jsp
+1
-10
oneclassfy_list.jsp
...ebapp/WEB-INF/jsp/tongmeng/oneclassfy/oneclassfy_list.jsp
+3
-3
store_list.jsp
src/main/webapp/WEB-INF/jsp/tongmeng/store/store_list.jsp
+5
-6
viewstore_list.jsp
.../webapp/WEB-INF/jsp/tongmeng/viewstore/viewstore_list.jsp
+373
-0
没有找到文件。
src/main/java/com/mall/controller/api/CommonApiController.java
0 → 100644
浏览文件 @
1403ae66
package
com
.
mall
.
controller
.
api
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.mall.util.OssUtil
;
import
com.mall.util.ResultOutDto
;
/**
* ClassName:CommonApiController <br/>
* Function: TODO ADD FUNCTION. <br/>
* Reason: TODO ADD REASON. <br/>
* Date: 2019年1月16日 下午3:59:02 <br/>
* @author 林海冰
* @version 广州抵奥云信息科技有限公司
* @since JDK 1.8
* @see
*/
@RestController
@RequestMapping
(
value
=
"/api/commont"
,
produces
=
"application/json;charset=UTF-8"
)
public
class
CommonApiController
{
/**
* 上传资料
* https://www.cnblogs.com/dengfukui/p/6252798.html
*/
@ResponseBody
@RequestMapping
(
value
=
"/photo"
)
public
ResultOutDto
singlePhoto
(
MultipartFile
photo
)
{
try
{
if
(
photo
==
null
||
photo
.
getSize
()<=
0
)
{
return
ResultOutDto
.
err
(
"facePhoto传递参数缺少。。。"
,
null
);
}
String
url
=
OssUtil
.
upload
(
photo
);
return
ResultOutDto
.
ok
(
url
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResultOutDto
.
err
(
"上传异常,请稍后重试"
,
null
);
}
}
}
src/main/java/com/mall/controller/api/StoreApiController.java
0 → 100644
浏览文件 @
1403ae66
package
com
.
mall
.
controller
.
api
;
import
javax.annotation.Resource
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.mall.service.mengbeng.store.StoreManager
;
import
com.mall.util.DateHelper
;
import
com.mall.util.DateUtil
;
import
com.mall.util.PageData
;
import
com.mall.util.ResultOutDto
;
import
com.mall.util.UuidUtil
;
/**
* ClassName:BannerApiController <br/>
* Function: TODO ADD FUNCTION. <br/>
* Reason: TODO ADD REASON. <br/>
* Date: 2018年12月14日 上午10:09:38 <br/>
* @author 林海冰
* @version 广州抵奥云信息科技有限公司
* @since JDK 1.8
* @see
*/
@RestController
@RequestMapping
(
value
=
"/api/store"
,
produces
=
"application/json;charset=UTF-8"
)
public
class
StoreApiController
{
@Resource
(
name
=
"storeService"
)
private
StoreManager
storeService
;
@RequestMapping
(
value
=
"/registerStore"
)
public
ResultOutDto
registerStore
(
String
name
,
String
telephone
,
String
phone
,
String
storeName
,
Integer
storeType
,
String
type
,
String
address
,
String
nickname
,
String
wxNumber
,
String
qqNumber
,
String
icomUrl
,
String
payType
){
if
(
StringUtils
.
isEmpty
(
name
)||
StringUtils
.
isEmpty
(
telephone
)||
StringUtils
.
isEmpty
(
storeType
)||
StringUtils
.
isEmpty
(
storeName
)||
StringUtils
.
isEmpty
(
storeType
)||
StringUtils
.
isEmpty
(
type
)||
StringUtils
.
isEmpty
(
icomUrl
)){
return
ResultOutDto
.
err
(
null
,
"注册失败!参数缺失!"
);
}
try
{
PageData
pd
=
new
PageData
();
pd
.
put
(
"store_id"
,
UuidUtil
.
get32UUID
());
pd
.
put
(
"real_name"
,
name
);
pd
.
put
(
"telephone"
,
telephone
);
pd
.
put
(
"mobile"
,
phone
);
pd
.
put
(
"store_name"
,
storeName
);
pd
.
put
(
"one_classfy_id"
,
storeType
);
// pd.put("type", type);
pd
.
put
(
"store_address"
,
address
);
pd
.
put
(
"nickname"
,
nickname
);
pd
.
put
(
"wx_muner"
,
wxNumber
);
pd
.
put
(
"qq_munber"
,
qqNumber
);
pd
.
put
(
"store_logo"
,
icomUrl
);
pd
.
put
(
"gender"
,
0
);
//性别
pd
.
put
(
"create_time"
,
DateUtil
.
getDay
());
//创建时间
pd
.
put
(
"end_valid_time"
,
0
);
//到期时间
//pd.put("payType", payType);
storeService
.
save
(
pd
);
return
ResultOutDto
.
ok
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResultOutDto
.
err
(
"注册异常!"
);
}
}
/**
* 访问店铺
* @author LHB
* @since JDK 1.8
*/
@RequestMapping
(
value
=
"/viewedStore"
)
public
ResultOutDto
viewedStore
(
String
view_store_id
,
String
viewed_store_id
){
if
(
StringUtils
.
isEmpty
(
view_store_id
)||
StringUtils
.
isEmpty
(
viewed_store_id
)){
return
ResultOutDto
.
err
(
null
,
"参数缺失!"
);
}
try
{
PageData
pd
=
new
PageData
();
pd
.
put
(
"view_store_id"
,
view_store_id
);
pd
.
put
(
"viewed_store_id"
,
viewed_store_id
);
pd
.
put
(
"view_time"
,
DateHelper
.
getCurrDateTime
());
storeService
.
viewStore
(
pd
);
return
ResultOutDto
.
ok
();
}
catch
(
Exception
e
)
{
return
ResultOutDto
.
err
(
"访问异常!"
);
}
}
}
src/main/java/com/mall/controller/tongmeng/viewstore/ViewStoreController.java
0 → 100644
浏览文件 @
1403ae66
package
com
.
mall
.
controller
.
tongmeng
.
viewstore
;
import
java.io.PrintWriter
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
org.springframework.beans.propertyeditors.CustomDateEditor
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.WebDataBinder
;
import
org.springframework.web.bind.annotation.InitBinder
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.mall.controller.base.BaseController
;
import
com.mall.entity.Page
;
import
com.mall.service.mengbeng.viewstore.ViewStoreManager
;
import
com.mall.util.AppUtil
;
import
com.mall.util.Jurisdiction
;
import
com.mall.util.ObjectExcelView
;
import
com.mall.util.PageData
;
/**
* 说明:访问记录
* 创建时间:2019-01-16
*/
@Controller
@RequestMapping
(
value
=
"/viewstore"
)
public
class
ViewStoreController
extends
BaseController
{
String
menuUrl
=
"viewstore/list.do"
;
//菜单地址(权限用)
@Resource
(
name
=
"viewstoreService"
)
private
ViewStoreManager
viewstoreService
;
/**保存
* @param
* @throws Exception
*/
@RequestMapping
(
value
=
"/save"
)
public
ModelAndView
save
()
throws
Exception
{
logBefore
(
logger
,
Jurisdiction
.
getUsername
()+
"新增ViewStore"
);
if
(!
Jurisdiction
.
buttonJurisdiction
(
menuUrl
,
"add"
)){
return
null
;}
//校验权限
ModelAndView
mv
=
this
.
getModelAndView
();
PageData
pd
=
new
PageData
();
pd
=
this
.
getPageData
();
viewstoreService
.
save
(
pd
);
mv
.
addObject
(
"msg"
,
"success"
);
mv
.
setViewName
(
"save_result"
);
return
mv
;
}
/**删除
* @param out
* @throws Exception
*/
@RequestMapping
(
value
=
"/delete"
)
public
void
delete
(
PrintWriter
out
)
throws
Exception
{
logBefore
(
logger
,
Jurisdiction
.
getUsername
()+
"删除ViewStore"
);
if
(!
Jurisdiction
.
buttonJurisdiction
(
menuUrl
,
"del"
)){
return
;}
//校验权限
PageData
pd
=
new
PageData
();
pd
=
this
.
getPageData
();
viewstoreService
.
delete
(
pd
);
out
.
write
(
"success"
);
out
.
close
();
}
/**修改
* @param
* @throws Exception
*/
@RequestMapping
(
value
=
"/edit"
)
public
ModelAndView
edit
()
throws
Exception
{
logBefore
(
logger
,
Jurisdiction
.
getUsername
()+
"修改ViewStore"
);
if
(!
Jurisdiction
.
buttonJurisdiction
(
menuUrl
,
"edit"
)){
return
null
;}
//校验权限
ModelAndView
mv
=
this
.
getModelAndView
();
PageData
pd
=
new
PageData
();
pd
=
this
.
getPageData
();
viewstoreService
.
edit
(
pd
);
mv
.
addObject
(
"msg"
,
"success"
);
mv
.
setViewName
(
"save_result"
);
return
mv
;
}
/**列表
* @param page
* @throws Exception
*/
@RequestMapping
(
value
=
"/list"
)
public
ModelAndView
list
(
Page
page
)
throws
Exception
{
logBefore
(
logger
,
Jurisdiction
.
getUsername
()+
"列表ViewStore"
);
//if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
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
=
viewstoreService
.
list
(
page
);
//列出ViewStore列表
mv
.
setViewName
(
"tongmeng/viewstore/viewstore_list"
);
mv
.
addObject
(
"varList"
,
varList
);
mv
.
addObject
(
"pd"
,
pd
);
mv
.
addObject
(
"QX"
,
Jurisdiction
.
getHC
());
//按钮权限
return
mv
;
}
/**去新增页面
* @param
* @throws Exception
*/
@RequestMapping
(
value
=
"/goAdd"
)
public
ModelAndView
goAdd
()
throws
Exception
{
ModelAndView
mv
=
this
.
getModelAndView
();
PageData
pd
=
new
PageData
();
pd
=
this
.
getPageData
();
mv
.
setViewName
(
"tongmeng/viewstore/viewstore_edit"
);
mv
.
addObject
(
"msg"
,
"save"
);
mv
.
addObject
(
"pd"
,
pd
);
return
mv
;
}
/**去修改页面
* @param
* @throws Exception
*/
@RequestMapping
(
value
=
"/goEdit"
)
public
ModelAndView
goEdit
()
throws
Exception
{
ModelAndView
mv
=
this
.
getModelAndView
();
PageData
pd
=
new
PageData
();
pd
=
this
.
getPageData
();
pd
=
viewstoreService
.
findById
(
pd
);
//根据ID读取
mv
.
setViewName
(
"tongmeng/viewstore/viewstore_edit"
);
mv
.
addObject
(
"msg"
,
"edit"
);
mv
.
addObject
(
"pd"
,
pd
);
return
mv
;
}
/**批量删除
* @param
* @throws Exception
*/
@RequestMapping
(
value
=
"/deleteAll"
)
@ResponseBody
public
Object
deleteAll
()
throws
Exception
{
logBefore
(
logger
,
Jurisdiction
.
getUsername
()+
"批量删除ViewStore"
);
if
(!
Jurisdiction
.
buttonJurisdiction
(
menuUrl
,
"del"
)){
return
null
;}
//校验权限
PageData
pd
=
new
PageData
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
pd
=
this
.
getPageData
();
List
<
PageData
>
pdList
=
new
ArrayList
<
PageData
>();
String
DATA_IDS
=
pd
.
getString
(
"DATA_IDS"
);
if
(
null
!=
DATA_IDS
&&
!
""
.
equals
(
DATA_IDS
)){
String
ArrayDATA_IDS
[]
=
DATA_IDS
.
split
(
","
);
viewstoreService
.
deleteAll
(
ArrayDATA_IDS
);
pd
.
put
(
"msg"
,
"ok"
);
}
else
{
pd
.
put
(
"msg"
,
"no"
);
}
pdList
.
add
(
pd
);
map
.
put
(
"list"
,
pdList
);
return
AppUtil
.
returnObject
(
pd
,
map
);
}
/**导出到excel
* @param
* @throws Exception
*/
@RequestMapping
(
value
=
"/excel"
)
public
ModelAndView
exportExcel
()
throws
Exception
{
logBefore
(
logger
,
Jurisdiction
.
getUsername
()+
"导出ViewStore到excel"
);
if
(!
Jurisdiction
.
buttonJurisdiction
(
menuUrl
,
"cha"
)){
return
null
;}
ModelAndView
mv
=
new
ModelAndView
();
PageData
pd
=
new
PageData
();
pd
=
this
.
getPageData
();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<
String
,
Object
>();
List
<
String
>
titles
=
new
ArrayList
<
String
>();
titles
.
add
(
"备注1"
);
//1
titles
.
add
(
"访店"
);
//2
titles
.
add
(
"被访"
);
//3
dataMap
.
put
(
"titles"
,
titles
);
List
<
PageData
>
varOList
=
viewstoreService
.
listAll
(
pd
);
List
<
PageData
>
varList
=
new
ArrayList
<
PageData
>();
for
(
int
i
=
0
;
i
<
varOList
.
size
();
i
++){
PageData
vpd
=
new
PageData
();
vpd
.
put
(
"var1"
,
varOList
.
get
(
i
).
get
(
"VIEW_STORE_ID"
).
toString
());
//1
vpd
.
put
(
"var2"
,
varOList
.
get
(
i
).
get
(
"VIEWED_STORE_ID"
).
toString
());
//2
vpd
.
put
(
"var3"
,
varOList
.
get
(
i
).
getString
(
"VIEW_TIME"
));
//3
varList
.
add
(
vpd
);
}
dataMap
.
put
(
"varList"
,
varList
);
ObjectExcelView
erv
=
new
ObjectExcelView
();
mv
=
new
ModelAndView
(
erv
,
dataMap
);
return
mv
;
}
@InitBinder
public
void
initBinder
(
WebDataBinder
binder
){
DateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
binder
.
registerCustomEditor
(
Date
.
class
,
new
CustomDateEditor
(
format
,
true
));
}
}
src/main/java/com/mall/service/mengbeng/store/StoreManager.java
浏览文件 @
1403ae66
...
@@ -17,7 +17,7 @@ public interface StoreManager{
...
@@ -17,7 +17,7 @@ public interface StoreManager{
* @param pd
* @param pd
* @throws Exception
* @throws Exception
*/
*/
public
int
save
(
PageData
pd
)
throws
Exception
;
public
void
save
(
PageData
pd
)
throws
Exception
;
/**删除
/**删除
* @param pd
* @param pd
...
@@ -61,6 +61,8 @@ public interface StoreManager{
...
@@ -61,6 +61,8 @@ public interface StoreManager{
*/
*/
public
int
findByPhone
(
PageData
pd
)
throws
Exception
;
public
int
findByPhone
(
PageData
pd
)
throws
Exception
;
public
void
viewStore
(
PageData
pd
)
throws
Exception
;
}
}
src/main/java/com/mall/service/mengbeng/store/impl/StoreService.java
浏览文件 @
1403ae66
...
@@ -6,10 +6,12 @@ import java.util.List;
...
@@ -6,10 +6,12 @@ import java.util.List;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.mall.dao.DaoSupport
;
import
com.mall.dao.DaoSupport
;
import
com.mall.entity.Page
;
import
com.mall.entity.Page
;
import
com.mall.service.mengbeng.store.StoreManager
;
import
com.mall.service.mengbeng.store.StoreManager
;
import
com.mall.service.mengbeng.viewstore.ViewStoreManager
;
import
com.mall.util.PageData
;
import
com.mall.util.PageData
;
/**
/**
...
@@ -19,7 +21,8 @@ import com.mall.util.PageData;
...
@@ -19,7 +21,8 @@ import com.mall.util.PageData;
*/
*/
@Service
(
"storeService"
)
@Service
(
"storeService"
)
public
class
StoreService
implements
StoreManager
{
public
class
StoreService
implements
StoreManager
{
@Resource
(
name
=
"viewstoreService"
)
private
ViewStoreManager
viewstoreService
;
@Resource
(
name
=
"daoSupport"
)
@Resource
(
name
=
"daoSupport"
)
private
DaoSupport
dao
;
private
DaoSupport
dao
;
...
@@ -27,8 +30,10 @@ public class StoreService implements StoreManager{
...
@@ -27,8 +30,10 @@ public class StoreService implements StoreManager{
* @param pd
* @param pd
* @throws Exception
* @throws Exception
*/
*/
public
int
save
(
PageData
pd
)
throws
Exception
{
@Transactional
return
(
int
)
dao
.
save
(
"StoreManager.save"
,
pd
);
public
void
save
(
PageData
pd
)
throws
Exception
{
dao
.
save
(
"StoreManager.save"
,
pd
);
dao
.
save
(
"StoreManager.saveDesc"
,
pd
);
}
}
/**删除
/**删除
...
@@ -91,5 +96,24 @@ public class StoreService implements StoreManager{
...
@@ -91,5 +96,24 @@ public class StoreService implements StoreManager{
return
(
int
)
dao
.
findForObject
(
"StoreManager.findByPhone"
,
pd
);
return
(
int
)
dao
.
findForObject
(
"StoreManager.findByPhone"
,
pd
);
}
}
@Override
@Transactional
public
void
viewStore
(
PageData
pd
)
throws
Exception
{
//保存访问记录
viewstoreService
.
save
(
pd
);
//自己看其他店铺
PageData
viewStore
=
new
PageData
();
viewStore
.
put
(
"store_id"
,
pd
.
get
(
"view_store_id"
));
viewStore
=
findById
(
pd
);
int
view_number
=(
int
)
viewStore
.
get
(
"view_number"
)+
1
;
viewStore
.
put
(
"view_number"
,
view_number
);
//别人看我的店铺
PageData
viewedStore
=
new
PageData
();
viewedStore
.
put
(
"store_id"
,
pd
.
get
(
"viewed_store_id"
));
viewedStore
=
findById
(
pd
);
int
store_view_number
=(
int
)
viewedStore
.
get
(
"store_view_number"
)+
1
;
viewedStore
.
put
(
"store_view_number"
,
store_view_number
);
}
}
}
src/main/java/com/mall/service/mengbeng/viewstore/ViewStoreManager.java
0 → 100644
浏览文件 @
1403ae66
package
com
.
mall
.
service
.
mengbeng
.
viewstore
;
import
java.util.List
;
import
com.mall.entity.Page
;
import
com.mall.util.PageData
;
/**
* 说明: 访问记录 接口
* 创建时间:2019-01-16
* @version
*/
public
interface
ViewStoreManager
{
/**新增
* @param pd
* @throws Exception
*/
public
void
save
(
PageData
pd
)
throws
Exception
;
/**删除
* @param pd
* @throws Exception
*/
public
void
delete
(
PageData
pd
)
throws
Exception
;
/**修改
* @param pd
* @throws Exception
*/
public
void
edit
(
PageData
pd
)
throws
Exception
;
/**列表
* @param page
* @throws Exception
*/
public
List
<
PageData
>
list
(
Page
page
)
throws
Exception
;
/**列表(全部)
* @param pd
* @throws Exception
*/
public
List
<
PageData
>
listAll
(
PageData
pd
)
throws
Exception
;
/**通过id获取数据
* @param pd
* @throws Exception
*/
public
PageData
findById
(
PageData
pd
)
throws
Exception
;
/**批量删除
* @param ArrayDATA_IDS
* @throws Exception
*/
public
void
deleteAll
(
String
[]
ArrayDATA_IDS
)
throws
Exception
;
/**
* 访问人总数
* @author LHB
* @since JDK 1.8
*/
public
PageData
viewStoreCount
(
PageData
pd
)
throws
Exception
;
/**
* 被访问人总数
* @author LHB
* @since JDK 1.8
*/
public
PageData
viewStoreedCount
(
PageData
pd
)
throws
Exception
;
}
src/main/java/com/mall/service/mengbeng/viewstore/impl/ViewStoreService.java
0 → 100644
浏览文件 @
1403ae66
package
com
.
mall
.
service
.
mengbeng
.
viewstore
.
impl
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
import
com.mall.dao.DaoSupport
;
import
com.mall.entity.Page
;
import
com.mall.service.mengbeng.viewstore.ViewStoreManager
;
import
com.mall.util.PageData
;
/**
* 说明: 访问记录
* 创建时间:2019-01-16
* @version
*/
@Service
(
"viewstoreService"
)
public
class
ViewStoreService
implements
ViewStoreManager
{
@Resource
(
name
=
"daoSupport"
)
private
DaoSupport
dao
;
/**新增
* @param pd
* @throws Exception
*/
public
void
save
(
PageData
pd
)
throws
Exception
{
dao
.
save
(
"ViewStoreMapper.save"
,
pd
);
}
/**删除
* @param pd
* @throws Exception
*/
public
void
delete
(
PageData
pd
)
throws
Exception
{
dao
.
delete
(
"ViewStoreMapper.delete"
,
pd
);
}
/**修改
* @param pd
* @throws Exception
*/
public
void
edit
(
PageData
pd
)
throws
Exception
{
dao
.
update
(
"ViewStoreMapper.edit"
,
pd
);
}
/**列表
* @param page
* @throws Exception
*/
@SuppressWarnings
(
"unchecked"
)
public
List
<
PageData
>
list
(
Page
page
)
throws
Exception
{
return
(
List
<
PageData
>)
dao
.
findForList
(
"ViewStoreMapper.datalistPage"
,
page
);
}
/**列表(全部)
* @param pd
* @throws Exception
*/
@SuppressWarnings
(
"unchecked"
)
public
List
<
PageData
>
listAll
(
PageData
pd
)
throws
Exception
{
return
(
List
<
PageData
>)
dao
.
findForList
(
"ViewStoreMapper.listAll"
,
pd
);
}
/**通过id获取数据
* @param pd
* @throws Exception
*/
public
PageData
findById
(
PageData
pd
)
throws
Exception
{
return
(
PageData
)
dao
.
findForObject
(
"ViewStoreMapper.findById"
,
pd
);
}
/**批量删除
* @param ArrayDATA_IDS
* @throws Exception
*/
public
void
deleteAll
(
String
[]
ArrayDATA_IDS
)
throws
Exception
{
dao
.
delete
(
"ViewStoreMapper.deleteAll"
,
ArrayDATA_IDS
);
}
/**
* 访问人总数
* @author LHB
* @since JDK 1.8
*/
public
PageData
viewStoreCount
(
PageData
pd
)
throws
Exception
{
return
(
PageData
)
dao
.
findForObject
(
"ViewStoreMapper.viewStoreCount"
,
pd
);
}
/**
* 被访问人总数
* @author LHB
* @since JDK 1.8
*/
public
PageData
viewStoreedCount
(
PageData
pd
)
throws
Exception
{
return
(
PageData
)
dao
.
findForObject
(
"ViewStoreMapper.viewStoreedCount"
,
pd
);
}
}
src/main/java/com/mall/util/OssUtil.java
浏览文件 @
1403ae66
...
@@ -27,7 +27,7 @@ public class OssUtil {
...
@@ -27,7 +27,7 @@ public class OssUtil {
//阿里云API的bucket名称
//阿里云API的bucket名称
private
static
final
String
BACKET_NAME
=
"diaosaas-prod"
;
private
static
final
String
BACKET_NAME
=
"diaosaas-prod"
;
//阿里云API的文件夹名称
//阿里云API的文件夹名称
private
static
final
String
FOLDER
=
"
vehicle
/"
;
private
static
final
String
FOLDER
=
"
tongmeng
/"
;
/**
/**
...
...
src/main/java/com/mall/util/ResultOutDto.java
浏览文件 @
1403ae66
...
@@ -49,4 +49,11 @@ public class ResultOutDto implements Serializable{
...
@@ -49,4 +49,11 @@ public class ResultOutDto implements Serializable{
resultOutDto
.
setErrmsg
(
err
);
resultOutDto
.
setErrmsg
(
err
);
return
resultOutDto
;
return
resultOutDto
;
}
}
public
static
ResultOutDto
err
(
String
err
){
ResultOutDto
resultOutDto
=
new
ResultOutDto
();
resultOutDto
.
setFlag
(
flag_fail
);
resultOutDto
.
setData
(
null
);
resultOutDto
.
setErrmsg
(
err
);
return
resultOutDto
;
}
}
}
src/main/resources/mybatis1/tongmeng/StoreManager.xml
浏览文件 @
1403ae66
...
@@ -49,6 +49,8 @@
...
@@ -49,6 +49,8 @@
<!-- 新增-->
<!-- 新增-->
<insert
id=
"save"
parameterType=
"pd"
>
<insert
id=
"save"
parameterType=
"pd"
>
insert into
insert into
c_store(
store_id,
gender,
gender,
mobile,
mobile,
real_name,
real_name,
...
@@ -59,10 +61,9 @@
...
@@ -59,10 +61,9 @@
end_valid_time,
end_valid_time,
wx_muner,
wx_muner,
qq_munber,
qq_munber,
one_classfy_id
one_classfy_id)
(
values (
<include
refid=
"Field"
></include>
#{store_id},
) values (
#{gender},
#{gender},
#{mobile},
#{mobile},
#{real_name},
#{real_name},
...
@@ -76,6 +77,26 @@
...
@@ -76,6 +77,26 @@
#{one_classfy_id}
#{one_classfy_id}
)
)
</insert>
</insert>
<insert
id=
"saveDesc"
parameterType=
"pd"
>
insert into
c_store_desc
(
store_address,
weeks_number,
works_date,
remarks,
store_id
)
values (
#{store_address},
#{weeks_number},
#{works_date},
#{remarks},
#{store_id}
)
</insert>
<!-- 删除-->
<!-- 删除-->
<delete
id=
"delete"
parameterType=
"pd"
>
<delete
id=
"delete"
parameterType=
"pd"
>
...
...
src/main/resources/mybatis1/tongmeng/ViewStoreMapper.xml
0 → 100644
浏览文件 @
1403ae66
<?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=
"ViewStoreMapper"
>
<!--表名 -->
<sql
id=
"tableName"
>
c_view_log
</sql>
<!-- 字段 -->
<sql
id=
"Field"
>
view_store_id,
view_time,
viewed_store_id
</sql>
<!-- 字段值 -->
<sql
id=
"FieldValue"
>
#{view_store_id},
#{viewed_store_id},
#{view_time}
</sql>
<!-- 新增-->
<insert
id=
"save"
parameterType=
"pd"
>
insert into
<include
refid=
"tableName"
></include>
(
<include
refid=
"Field"
></include>
) values (
<include
refid=
"FieldValue"
></include>
)
</insert>
<!-- 列表 -->
<select
id=
"datalistPage"
parameterType=
"page"
resultType=
"pd"
>
select
<include
refid=
"Field"
></include>
from
<include
refid=
"tableName"
></include>
where 1=1
<if
test=
"pd.keywords!= null and pd.keywords != ''"
>
<!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件
字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
-->
)
</if>
</select>
<!-- 列表(全部) -->
<select
id=
"listAll"
parameterType=
"pd"
resultType=
"pd"
>
select
<include
refid=
"Field"
></include>
from
<include
refid=
"tableName"
></include>
</select>
<!-- 访问人的总数 -->
<select
id=
"viewStoreCount"
parameterType=
"pd"
resultType=
"pd"
>
select
count(view_store_id)
from
<include
refid=
"tableName"
></include>
where view_store_id = #{view_store_id}
</select>
<!-- 被访问人的总数 -->
<select
id=
"viewStoreedCount"
parameterType=
"pd"
resultType=
"pd"
>
select
count(viewed_store_id)
from
<include
refid=
"tableName"
></include>
where viewed_store_id = #{viewed_store_id}
</select>
</mapper>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/tongmeng/oneclassfy/oneclassfy_edit.jsp
浏览文件 @
1403ae66
...
@@ -104,16 +104,7 @@
...
@@ -104,16 +104,7 @@
$
(
"#name"
).
focus
();
$
(
"#name"
).
focus
();
return
false
;
return
false
;
}
}
if
(
$
(
"#icom"
).
val
()
==
""
){
$
(
"#icom"
).
tips
({
side
:
3
,
msg
:
'请输入分类图标'
,
bg
:
'#AE81FF'
,
time
:
2
});
$
(
"#icom"
).
focus
();
return
false
;
}
$
(
"#Form"
).
submit
();
$
(
"#Form"
).
submit
();
$
(
"#zhongxin"
).
hide
();
$
(
"#zhongxin"
).
hide
();
$
(
"#zhongxin2"
).
show
();
$
(
"#zhongxin2"
).
show
();
...
...
src/main/webapp/WEB-INF/jsp/tongmeng/oneclassfy/oneclassfy_list.jsp
浏览文件 @
1403ae66
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<th
class=
"center"
>
一级分类ID
</th>
<th
class=
"center"
>
一级分类ID
</th>
<th
class=
"center"
>
名称
</th>
<th
class=
"center"
>
名称
</th>
<th
class=
"center"
>
分类图标
</th>
<th
class=
"center"
>
分类图标
</th>
<
th
class=
"center"
>
二级分类标识
</th
>
<
!-- <th class="center">二级分类标识</th> --
>
<th
class=
"center"
>
操作
</th>
<th
class=
"center"
>
操作
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -91,8 +91,8 @@
...
@@ -91,8 +91,8 @@
<td
class=
'center'
>
${var.classify_id}
</td>
<td
class=
'center'
>
${var.classify_id}
</td>
<td
class=
'center'
>
${var.name}
</td>
<td
class=
'center'
>
${var.name}
</td>
<td
class=
'center'
><img
src=
"${var.icom}"
width=
"50px"
height=
"50px"
/></td>
<td
class=
'center'
><img
src=
"${var.icom}"
width=
"50px"
height=
"50px"
/></td>
<td
class=
'center'
>
${var.one_classfy_tag=='3'?'二级分类':''}${var.one_classfy_tag=='2'?'车牌分类':''}
</td>
<%--
<td class='center'>${var.one_classfy_tag=='3'?'二级分类':''}${var.one_classfy_tag=='2'?'车牌分类':''}</td>
<td
class=
"center"
>
--%>
<td
class=
"center"
>
<c:if
test=
"
${
QX
.
edit
!=
1
&&
QX
.
del
!=
1
}
"
>
<c:if
test=
"
${
QX
.
edit
!=
1
&&
QX
.
del
!=
1
}
"
>
<span
class=
"label label-large label-grey arrowed-in-right arrowed-in"
><i
class=
"ace-icon fa fa-lock"
title=
"无权限"
></i></span>
<span
class=
"label label-large label-grey arrowed-in-right arrowed-in"
><i
class=
"ace-icon fa fa-lock"
title=
"无权限"
></i></span>
</c:if>
</c:if>
...
...
src/main/webapp/WEB-INF/jsp/tongmeng/store/store_list.jsp
浏览文件 @
1403ae66
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
<label
class=
"pos-rel"
><input
type=
'checkbox'
name=
'ids'
value=
"${var.openid}"
class=
"ace"
/><span
class=
"lbl"
></span></label>
<label
class=
"pos-rel"
><input
type=
'checkbox'
name=
'ids'
value=
"${var.openid}"
class=
"ace"
/><span
class=
"lbl"
></span></label>
</td>
</td>
<td
class=
'center'
style=
"width: 30px;"
>
${vs.index+1}
</td>
<td
class=
'center'
style=
"width: 30px;"
>
${vs.index+1}
</td>
<td
class=
'center'
><img
src=
"${var.
headportrait
}"
style=
"height:50px"
></td>
<td
class=
'center'
><img
src=
"${var.
store_logo
}"
style=
"height:50px"
></td>
<td
class=
'center'
>
${var.nickname}
</td>
<td
class=
'center'
>
${var.nickname}
</td>
<td
class=
'center'
>
<td
class=
'center'
>
<c:choose>
<c:choose>
...
@@ -113,11 +113,11 @@
...
@@ -113,11 +113,11 @@
</td>
</td>
<td
class=
'center'
>
${var.mobile}
</td>
<td
class=
'center'
>
${var.mobile}
</td>
<%-- <td class='center'>${var.openid}</td>--%>
<%-- <td class='center'>${var.openid}</td>--%>
<td
class=
'center'
>
${var.name}
</td>
<td
class=
'center'
>
${var.
real_
name}
</td>
<%--<td class='center'>${var.birthday}</td>--%>
<%--<td class='center'>${var.birthday}</td>--%>
<td
class=
'center'
>
${var.create_time}
</td>
<td
class=
'center'
><fmt:formatDate
value=
"
${
var
.
create_time
}
"
pattern=
"yyyy-MM-dd"
/>
</td>
<%--
<td class='center'><fmt:formatDate value="${var.create_time}" pattern="yyyy-MM-dd"/> </td>
<td
class=
"center"
>
--%>
<td
class=
"center"
>
<!--
<!--
<c:if
test=
"
${
QX
.
edit
!=
1
&&
QX
.
del
!=
1
}
"
>
<c:if
test=
"
${
QX
.
edit
!=
1
&&
QX
.
del
!=
1
}
"
>
<span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span>
<span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span>
...
@@ -166,7 +166,6 @@
...
@@ -166,7 +166,6 @@
</div>
</div>
</td>
</td>
</tr>
</tr>
</c:forEach>
</c:forEach>
</c:if>
</c:if>
<c:if
test=
"
${
QX
.
cha
==
0
}
"
>
<c:if
test=
"
${
QX
.
cha
==
0
}
"
>
...
...
src/main/webapp/WEB-INF/jsp/tongmeng/viewstore/viewstore_list.jsp
0 → 100644
浏览文件 @
1403ae66
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论