Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zsh
Project
Project
Details
Activity
Releases
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
wuwz
zsh
Commits
96865929
Commit
96865929
authored
Apr 06, 2019
by
wuwz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装修公司
parent
ec4f8270
Changes
32
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
2204 additions
and
4 deletions
+2204
-4
decorate_message.html
...h_cn/system/user/default/usercenter/decorate_message.html
+400
-0
decorate_work_list.html
...cn/system/user/default/usercenter/decorate_work_list.html
+141
-0
decorate_works_edit.html
...n/system/user/default/usercenter/decorate_works_edit.html
+354
-0
design_message.html
.../zh_cn/system/user/default/usercenter/design_message.html
+1
-0
seller_index.html
...es/zh_cn/system/user/default/usercenter/seller_index.html
+1
-0
web.xml
WebRoot/WEB-INF/web.xml
+8
-0
DecorateDAO.java
src/com/shopping/foundation/dao/DecorateDAO.java
+11
-0
DecorateStyleDAO.java
src/com/shopping/foundation/dao/DecorateStyleDAO.java
+11
-0
DecorateTypeDAO.java
src/com/shopping/foundation/dao/DecorateTypeDAO.java
+11
-0
DecorateWorkDAO.java
src/com/shopping/foundation/dao/DecorateWorkDAO.java
+11
-0
Accessory.java
src/com/shopping/foundation/domain/Accessory.java
+4
-0
Decorate.java
src/com/shopping/foundation/domain/Decorate.java
+142
-0
DecorateStyle.java
src/com/shopping/foundation/domain/DecorateStyle.java
+52
-0
DecorateType.java
src/com/shopping/foundation/domain/DecorateType.java
+53
-0
DecorateWork.java
src/com/shopping/foundation/domain/DecorateWork.java
+111
-0
Design.java
src/com/shopping/foundation/domain/Design.java
+0
-1
DesignExpert.java
src/com/shopping/foundation/domain/DesignExpert.java
+1
-1
User.java
src/com/shopping/foundation/domain/User.java
+13
-0
DecorateQueryObject.java
...shopping/foundation/domain/query/DecorateQueryObject.java
+16
-0
DecorateStyleQueryObject.java
...ing/foundation/domain/query/DecorateStyleQueryObject.java
+15
-0
DecorateTypeQueryObject.java
...ping/foundation/domain/query/DecorateTypeQueryObject.java
+15
-0
DecorateWorkQueryObject.java
...ping/foundation/domain/query/DecorateWorkQueryObject.java
+15
-0
IDecorateService.java
src/com/shopping/foundation/service/IDecorateService.java
+22
-0
IDecorateStyleService.java
...om/shopping/foundation/service/IDecorateStyleService.java
+23
-0
IDecorateTypeService.java
...com/shopping/foundation/service/IDecorateTypeService.java
+23
-0
IDecorateWork.java
src/com/shopping/foundation/service/IDecorateWork.java
+22
-0
DecorateServiceImpl.java
...shopping/foundation/service/impl/DecorateServiceImpl.java
+90
-0
DecorateStyleServiceImpl.java
...ing/foundation/service/impl/DecorateStyleServiceImpl.java
+90
-0
DecorateTypeServiceImpl.java
...ping/foundation/service/impl/DecorateTypeServiceImpl.java
+90
-0
DecorateWorkServiceImpl.java
...ping/foundation/service/impl/DecorateWorkServiceImpl.java
+91
-0
DecorateAction.java
src/com/shopping/manage/design/action/DecorateAction.java
+365
-0
LoginViewAction.java
src/com/shopping/view/web/action/LoginViewAction.java
+2
-2
No files found.
WebRoot/WEB-INF/templates/zh_cn/system/user/default/usercenter/decorate_message.html
0 → 100644
View file @
96865929
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
装修公司信息-$!{config.title}
</title>
<meta
name=
"keywords"
content=
"$!config.keywords"
/>
<meta
name=
"description"
content=
"$!config.description"
/>
<meta
name=
"generator"
content=
"shopping 2.0"
/>
<meta
name=
"author"
content=
"www.shopping.com"
>
<meta
name=
"copyright"
content=
"shopping Inc. All Rights Reserved"
>
<link
href=
"$!webPath/resources/style/system/front/default/css/public.css"
type=
"text/css"
rel=
"stylesheet"
/>
<link
href=
"$!webPath/resources/style/system/front/default/css/user.css"
type=
"text/css"
rel=
"stylesheet"
/>
<link
href=
"$!webPath/resources/style/common/css/jquery-ui-1.8.22.custom.css"
type=
text/css
rel=
stylesheet
>
<script
src=
"$!webPath/resources/js/jquery-1.11.0.min.js"
></script>
<script
src=
"$!webPath/resources/js/web-upload.js"
></script>
<script
src=
"$!webPath/resources/js/extemd-web-upload.js"
></script>
<script>
window
.
webuploader
=
{
//处理客户端新文件上传时,需要调用后台处理的地址, 必填
uploadUrl
:
'$!webPath/design/upload_avatar.htm'
,
limit
:
20
//处理客户端原有文件更新时的后台处理地址,必填
}
//图片上传结束
jQuery
(
document
).
ready
(
function
(){
//获取下级地区信息
jQuery
(
"select[id^=areas_]"
).
change
(
function
(){
var
areaMark
=
jQuery
(
this
).
attr
(
"areaMark"
);
var
parent_id
=
jQuery
(
"#areas_"
+
areaMark
).
val
();
jQuery
.
post
(
"$!webPath/buyer/account_getAreaChilds.htm"
,{
"parent_id"
:
parent_id
,
"areaMark"
:
areaMark
},
function
(
data
){
if
(
areaMark
==
"province"
){
jQuery
(
"#area_id"
).
html
(
"<option>请选择...</option>"
);
jQuery
(
"#areas_city"
).
html
(
data
);
}
if
(
areaMark
==
"city"
){
jQuery
(
"#area_id"
).
html
(
data
);
}
},
"text"
);
});
#
if
(
$objs
.
area
)
jQuery
(
"#areas_province"
).
val
(
"$!objs.area.parent.parent.id"
);
jQuery
(
"#areas_city"
).
html
(
"<option>$!objs.area.parent.areaName</option>"
);
jQuery
(
"#area_id"
).
html
(
"<option value='$!objs.area.id'>$!objs.area.areaName</option>"
);
#
end
if
(
$state
!=
0
){
$
(
"#designName"
).
addClass
(
"objs"
)
$
(
"#sumbitBut"
).
val
(
"保存修改"
)
}
$
(
"#sumbitBut"
).
click
(
function
(){
var
checkVal
=
''
,
rodioVal
=
''
,
desingName
,
desingArea
,
imagid
,
areaId
;
if
(
$
(
"#decorationName"
).
val
()
==
""
){
alert
(
"请输入公司名称"
)
return
}
else
{
desingName
=
$
(
"#decorationName"
).
val
()
}
if
(
$
(
"#area_id option:selected"
).
val
()
==
''
){
alert
(
"请选择所在地区,选至区域"
)
return
}
else
{
areaId
=
$
(
"#area_id option:selected"
).
val
()
}
if
(
$
(
"#decorationArea"
).
val
()
==
""
){
alert
(
"请输入公司详细地址"
)
return
}
else
{
desingArea
=
$
(
"#decorationArea"
).
val
()
}
if
(
$
(
'input[name=typeName]:checked'
).
length
<
1
){
alert
(
"请选择装修类型"
)
return
}
else
{
jQuery
.
each
(
$
(
'input[name=typeName]:checked'
),
function
(){
checkVal
+=
$
(
this
).
val
()
+
","
;
});
checkVal
=
checkVal
.
substr
(
0
,
checkVal
.
length
-
1
)
console
.
log
(
checkVal
)
}
if
(
$
(
'input[name=styleName]:checked'
).
length
<
1
){
alert
(
"请选装修风格"
)
return
}
else
{
jQuery
.
each
(
$
(
'input[name=styleName]:checked'
),
function
(){
rodioVal
+=
$
(
this
).
val
()
+
","
;
});
rodioVal
=
rodioVal
.
substr
(
0
,
rodioVal
.
length
-
1
)
console
.
log
(
rodioVal
)
}
/* if(!$('input[type=radio]:checked').val()){
alert("请选择费用范围")
return
}else{
rodioVal = $('input[type=radio]:checked').val()
} */
if
(
$
(
"#imgId"
).
val
()
==
""
){
alert
(
"请上传封面图片"
)
return
}
else
{
imagid
=
$
(
"#imgId"
).
val
()
}
var
params
=
{
'id'
:
$
(
"#decorateId"
).
val
(),
'decorateName'
:
desingName
,
'imgId'
:
imagid
,
'decorateType'
:
checkVal
,
'decorateStyle'
:
rodioVal
,
'areaId'
:
areaId
,
'decorateArea'
:
desingArea
}
jQuery
.
post
(
"$!webPath/design/decorate_save.htm"
,
params
,
function
(
data
){
alert
(
"保存成功"
)
window
.
location
.
href
=
"$!webPath/user/login.htm"
});
});
$
(
"#deign-upload"
).
click
(
function
(
e
){
if
(
$
(
"#imgId"
).
val
()
!=
""
){
$
(
".upload-tig"
).
addClass
(
"fontred"
)
return
false
}
else
{
debugger
e
.
preventDefault
();
$
(
"#filePickerOne"
).
find
(
"input[name='file']"
).
trigger
(
'click'
)
$
(
".upload-tig"
).
addClass
(
"fontred"
)
}
});
});
</script>
<style>
span
.setinput
select
{
border
:
1px
solid
#ddd
;
height
:
30px
;
line-height
:
30px
;
border-radius
:
3px
;
color
:
#333
;
margin-right
:
10px
;
width
:
150px
;
}
input
[
type
=
"radio"
]
{
zoom
:
160%
;
margin-right
:
3px
;
}
/* .webuploader-pick {
position: absolute;
width: 100px;
height: 100px;
}
*/
.serivce_img
{
width
:
100px
;
height
:
100px
;
border
:
1px
solid
#ddd
;
padding
:
10px
;
position
:
relative
;
margin-bottom
:
10px
;
}
.serivce_img
img
,
.design_img
img
{
width
:
100px
;
height
:
100px
;
}
#deign-upload
{
padding
:
8px
11px
;
width
:
123px
;
background
:
#65aae3
;
color
:
#fff
;
margin-bottom
:
20px
;
border-radius
:
3px
;
margin-right
:
15px
;
border
:
1px
solid
#ddd
;
}
input
.webuploader-element-invisible
{
display
:
none
;
}
.upload-tig
{
color
:
#999
}
#fileList
{
margin-bottom
:
15px
;
}
</style>
</head>
<body>
$!httpInclude.include("/top.htm")
$!httpInclude.include("/seller/nav_head.htm")
<div
class=
"seller_nav"
#
if
(!$!
user
.
store
)
style=
"height:auto;"
#
end
>
<i
class=
"seller_navr"
></i>
<i
class=
"seller_navl"
></i>
<div
class=
"main"
>
<ul>
<li><span><a
href=
"$!webPath/seller/index.htm"
>
卖家中心
</a></span>
</li>
<li><span><a
href=
"$!webPath/buyer/index.htm"
>
买家中心
</a></span></li>
<li><span><a
href=
"$!webPath/buyer/account.htm"
>
我的账户
</a></span></li>
<li><span><a
href=
"$!webPath/design/design_message.htm"
>
设计师
</a></span></li>
<li
class=
"this"
><span><a
href=
"$!webPath/design/decorate_message.htm"
>
装修公司
</a></span></li>
</ul>
#if($!user.store)
<span
class=
"seller_nav_a"
><a
href=
"javascript:void(0);"
dialog_uri=
"$!webPath/seller/store_quick_menu.htm"
dialog_title=
"设置快捷操作"
dialog_width=
"730"
dialog_height=
"100"
dialog_id=
"store_quick_menu"
>
设置快捷操作
</a></span>
#end
</div>
</div>
<div
class=
"main"
>
<div
class=
"user_center"
>
<table
width=
"1000"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"user_table"
>
<tr>
<td
width=
"177"
id=
"userbg"
valign=
"top"
>
<div
class=
"seller"
>
<!--店铺设置-->
<div
class=
"product_manage2"
>
<div
class=
"protitle_seller"
>
装修公司中心
</div>
<ul
class=
"sellul"
>
<ul>
<li><a
href=
"$!webPath/design/decorate_message.htm"
target=
"_blank"
>
资料管理
</a></li>
<li><a
href=
"javascript:void(0);"
child_show=
"true"
><b><img
src=
"$!webPath/resources/style/system/front/default/images/usercenter/seller_menu_sub.png"
width=
"9"
height=
"9"
/></b>
作品管理
</a>
<ul>
<li
op=
"goods"
><a
href=
'$!webPath/design/decorate_works_edit.htm'
>
作品新增
</a></li>
<li
op=
"goods"
><a
href=
'$!webPath/design/decorate_work_list.htm'
>
作品管理
</a></li>
</ul>
</li>
</ul>
</ul>
</div>
</div>
</td>
<td
id=
"centerbg"
valign=
"top"
>
<div
class=
"buyer_position"
><div
class=
"buyer_p_box"
>
<a
href=
"$!webPath/buyer/account.htm"
>
装修公司
</a>
>
<span>
资料管理
</span></div></div>
<div
class=
"productmain"
>
<div
class=
"ordercon"
>
<div
class=
"addnav"
>
#if($state==0)
<p
class=
""
>
您还没有注册装修公司,请先填写信息
</p>
#end
<table
width=
"705"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"addnavtable"
>
<tr>
<td
width=
"100"
align=
"right"
>
公司名称:
</td>
<td
class=
"px10"
>
<input
name=
"decorationName"
type=
"text"
id=
"decorationName"
class=
"designinput"
value=
"$!objs.decorationName"
/>
<input
name=
"id"
type=
"hidden"
id=
"decorateId"
value=
"$!objs.id"
/>
</td>
</tr>
<tr>
<td
align=
"right"
valign=
"top"
>
所在地区:
</td>
<td
class=
"px10"
><span
class=
"setinput"
>
<select
id=
"areas_province"
areaMark=
"province"
>
<option>
请选择...
</option>
#foreach($are in $areas)
<option
value=
"$!are.id"
>
$!are.areaName
</option>
#end
</select>
<select
id=
"areas_city"
areaMark=
"city"
>
<option
value=
""
>
请选择...
</option>
</select>
<select
id=
"area_id"
name=
"area_id"
>
<option
value=
"$!objs.area.id"
>
请选择...
</option>
</select>
</span></td>
</tr>
<tr>
<td
width=
"100"
align=
"right"
>
联系地址:
</td>
<td
class=
"px10"
>
<input
name=
"decorationArea"
type=
"text"
id=
"decorationArea"
class=
"designinput"
value=
"$!objs.decorationArea"
/>
</td>
</tr>
<tr>
<td
align=
"right"
valign=
"top"
>
装修类型:
</td>
<td
class=
"px10"
>
<span
class=
"expertList"
>
#foreach($exp in $type)
#if($exp.checked)
<label><input
name=
"typeName"
type=
"checkbox"
checked
value=
"$!{exp.id}"
/>
$!{exp.typeName}
</label>
#else
<label><input
name=
"typeName"
type=
"checkbox"
value=
"$!{exp.id}"
/>
$!{exp.typeName}
</label>
#end
#end
</span>
</td>
</tr>
<tr>
<td
align=
"right"
valign=
"top"
>
装修风格:
</td>
<td
class=
"px10"
>
<span
class=
"expertList"
>
#foreach($exp in $style)
#if($exp.checked)
<label><input
name=
"styleName"
type=
"checkbox"
checked
value=
"$!{exp.id}"
/>
$!{exp.styleName}
</label>
#else
<label><input
name=
"styleName"
type=
"checkbox"
value=
"$!{exp.id}"
/>
$!{exp.styleName}
</label>
#end
#end
</span>
</td>
</tr>
<tr>
<td
align=
"right"
valign=
"top"
>
封面图片:
</td>
<td
class=
"px10"
>
<div
id=
"uploader-demo"
>
#if($objs.acc.name)
#set($img="$webPath/$objs.acc.path/$objs.acc.name")
#else
#set($img="$webPath/resources/style/system/front/default/images/image.png")
#end
#if($objs.acc.name)
<div
class=
"serivce_img"
>
<img
src =
"$img"
></img>
<span
title=
"删除"
class=
"delImg"
></span>
</div>
#end
<div
id=
"fileList"
class=
"uploader-list"
></div>
<p><button
id=
"deign-upload"
>
上传图片
</button><i
class=
"upload-tig"
>
(只能上传一张图片,上传请先把原图删除)
</i></p>
<div
id=
"filePickerOne"
class=
"selectUpload"
>
</div>
#if($objs.acc.id)
#set($oid = "$!objs.acc.id")
#else
#set($oid = "")
#end
<input
name=
"imgId"
type=
"hidden"
id=
"imgId"
value=
"$oid"
/>
</div>
</td>
</tr>
<tr>
<td>
</td>
<td
class=
"px10"
><span
class=
"setsub"
>
<input
name=
""
id=
"sumbitBut"
value=
"保存"
style=
"cursor:pointer;"
readonly=
"readonly"
/>
</span>
</td>
</tr>
</table>
</div>
</div>
</div></td>
</tr>
</table>
</div>
<script
src=
"$!webPath/resources/js/laydate.js"
></script>
<script>
//执行一个laydate实例
laydate
.
render
({
elem
:
'#test16'
,
type
:
'datetime'
,
range
:
'到'
,
format
:
'yyyy-M-d HH:mm:ss'
,
change
:
function
(
value
,
date
,
endDate
){
var
begtime
=
date
.
year
+
"-"
+
date
.
month
+
"-"
+
date
.
date
var
endtime
=
endDate
.
year
+
"-"
+
endDate
.
month
+
"-"
+
endDate
.
date
console
.
log
(
begtime
,
endtime
)
document
.
getElementById
(
"beginTime"
).
value
=
begtime
document
.
getElementById
(
"endTime"
).
value
=
endtime
}
});
</script>
</div>
$!httpInclude.include("/footer.htm")
</body>
</html>
WebRoot/WEB-INF/templates/zh_cn/system/user/default/usercenter/decorate_work_list.html
0 → 100644
View file @
96865929
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
个人信息-$!{config.title}
</title>
<meta
name=
"keywords"
content=
"$!config.keywords"
/>
<meta
name=
"description"
content=
"$!config.description"
/>
<meta
name=
"generator"
content=
"shopping 2.0"
/>
<meta
name=
"author"
content=
"www.shopping.com"
>
<meta
name=
"copyright"
content=
"shopping Inc. All Rights Reserved"
>
<link
href=
"$!webPath/resources/style/system/front/default/css/public.css"
type=
"text/css"
rel=
"stylesheet"
/>
<link
href=
"$!webPath/resources/style/system/front/default/css/user.css"
type=
"text/css"
rel=
"stylesheet"
/>
<link
href=
"$!webPath/resources/style/common/css/jquery-ui-1.8.22.custom.css"
type=
text/css
rel=
stylesheet
>
<link
href=
"$!webPath/resources/style/system/front/default/css/upload.css"
type=
"text/css"
rel=
"stylesheet"
/>
<script
src=
"$!webPath/resources/js/jquery-1.11.0.min.js"
></script>
<script>
</script>
<style>
td
#centerbg
{
padding
:
0
0
0
25px
;
}
#opertitle
{
height
:
35px
;
}
.proname
{
width
:
200px
;
padding
:
10px
;}
.opertr
td
{
padding
:
10px
;}
table
.user_table
table
{
background
:
#fff
;
}
.alldel
{
height
:
50px
;
margin-top
:
10px
;}
</style>
</head>
<body>
$!httpInclude.include("/top.htm")
$!httpInclude.include("/seller/nav_head.htm")
<div
class=
"seller_nav"
#
if
(!$!
user
.
store
)
style=
"height:auto;"
#
end
>
<i
class=
"seller_navr"
></i>
<i
class=
"seller_navl"
></i>
<div
class=
"main"
>
<ul>
<li><span><a
href=
"$!webPath/seller/index.htm"
>
卖家中心
</a></span>
</li>
<li><span><a
href=
"$!webPath/buyer/index.htm"
>
买家中心
</a></span></li>
<li><span><a
href=
"$!webPath/buyer/account.htm"
>
我的账户
</a></span></li>
<li><span><a
href=
"$!webPath/design/decorate_message.htm"
>
设计师
</a></span></li>
<li
class=
"this"
><span><a
href=
"$!webPath/design/decorate_message.htm"
>
装修公司
</a></span></li>
</ul>
#if($!user.store)
<span
class=
"seller_nav_a"
><a
href=
"javascript:void(0);"
dialog_uri=
"$!webPath/seller/store_quick_menu.htm"
dialog_title=
"设置快捷操作"
dialog_width=
"730"
dialog_height=
"100"
dialog_id=
"store_quick_menu"
>
设置快捷操作
</a></span>
#end
</div>
</div>
<div
class=
"main"
>
<div
class=
"user_center"
>
<table
width=
"1000"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"user_table"
>
<tr>
<td
width=
"177"
id=
"userbg"
valign=
"top"
>
<div
class=
"seller"
>
<!--店铺设置-->
<div
class=
"product_manage2"
>
<div
class=
"protitle_seller"
>
设计师中心
</div>
<ul
class=
"sellul"
>
<ul>
<li><a
href=
"$!webPath/design/decorate_message.htm"
target=
"_blank"
>
资料管理
</a></li>
<li><a
href=
"javascript:void(0);"
child_show=
"true"
><b><img
src=
"$!webPath/resources/style/system/front/default/images/usercenter/seller_menu_sub.png"
width=
"9"
height=
"9"
/></b>
作品管理
</a>
<ul>
<li
op=
"goods"
><a
href=
'$!webPath/design/decorate_works_edit.htm'
>
作品新增
</a></li>
<li
op=
"goods"
><a
href=
'$!webPath/design/decorate_work_list.htm'
>
作品管理
</a></li>
</ul>
</li>
</ul>
</ul>
</div>
</div>
</td>
<td
id=
"centerbg"
valign=
"top"
>
<table>
<tr>
<td
colspan=
"4"
>
<div
class=
"buyer_position"
>
<div
class=
"buyer_p_box"
>
<a
href=
"$!webPath/design/decorate_message.htm"
>
装修公司
</a>
>
<span>
作品管理
</span>
</div>
</div>
</td>
</tr>
<tr
id=
"opertitle"
>
<td
width=
"220"
>
作品封面
</td>
<td
class=
"proname"
width=
"220"
>
作品名称
</td>
<td
width=
"217"
class=
"proclassify"
>
装修类型
</td>
<td
width=
"217"
class=
"proclassify"
>
装修风格
</td>
<td
width=
"240"
align=
"center"
>
操作
</td>
</tr>
#if($objs)
#foreach($obj in $objs)
<tr
class=
"opertr"
>
<td
class=
"proname"
valign=
"middle"
>
#if($obj.main_img)
#set($img="$!webPath/$!{obj.main_img.path}/$!{obj.main_img.name}")
#end
</span><span
class=
"imgpro"
>
<img
src=
"$img"
width=
"60"
height=
"63"
/></span><span
class=
"nameproduct"
>
</span></td>
<td
class=
"proclassify"
>
#if($!obj.worksName) $!{obj.worksName} #end
</td>
<td
class=
"promoney"
>
#if($!obj.decorateType.typeName) $!{obj.decorateType.typeName} #end
</td>
<td
class=
"promoney"
>
#if($!obj.decorateStyle.styleName) $!{obj.decorateStyle.styleName} #end
</td>
<td
class=
"operajt"
><span
class=
"edit"
><a
href=
"$!webPath/design/works_edit.htm?id=$!obj.id"
target=
"_blank"
>
编辑
</a></span>
<span
class=
"del"
>
<!-- <a href="javascript:if(confirm('删除后不可恢复?'))window.location.href='$!webPath/seller/goods_del.htm?mulitId=$!obj.id'">删除</a></span></td> -->
</tr>
#end
#end
<tr>
<td
colspan=
"4"
>
<div
class=
"alldel"
>
<div
class=
"userfenye"
>
$!gotoPageHTML
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
$!httpInclude.include("/footer.htm")
</body>
</html>
WebRoot/WEB-INF/templates/zh_cn/system/user/default/usercenter/decorate_works_edit.html
0 → 100644
View file @
96865929
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
个人信息-$!{config.title}
</title>
<meta
name=
"keywords"
content=
"$!config.keywords"
/>
<meta
name=
"description"
content=
"$!config.description"
/>
<meta
name=
"generator"
content=
"shopping 2.0"
/>
<meta
name=
"author"
content=
"www.shopping.com"
>
<meta
name=
"copyright"
content=
"shopping Inc. All Rights Reserved"
>
<link
href=
"$!webPath/resources/style/system/front/default/css/public.css"
type=
"text/css"
rel=
"stylesheet"
/>
<link
href=
"$!webPath/resources/style/system/front/default/css/user.css"
type=
"text/css"
rel=
"stylesheet"
/>
<link
href=
"$!webPath/resources/style/common/css/jquery-ui-1.8.22.custom.css"
type=
text/css
rel=
stylesheet
>
<link
href=
"$!webPath/resources/style/system/front/default/css/upload.css"
type=
"text/css"
rel=
"stylesheet"
/>
<script
src=
"$!webPath/resources/js/jquery-1.11.0.min.js"
></script>
<script
src=
"$!webPath/resources/js/jquery.validate.min.js"
></script>
<script
src=
"$!webPath/resources/js/jquery.shop.common.js"
></script>
<script
charset=
"utf-8"
src=
"$!webPath/resources/editor/kindeditor.js"
></script>
<script
charset=
"utf-8"
src=
"$!webPath/resources/editor/lang/zh_CN.js"
></script>
<script
src=
"$!webPath/resources/js/webUpload.min.js"
></script>
<script
src=
"$!webPath/resources/js/extend-webuploader-work.js"
></script>
<script>
//options为编辑配置属性
var
options
=
{
cssPath
:
'$!webPath/resources/editor/plugins/code/prettify.css'
,
filterMode
:
true
,
uploadJson
:
''
,
width
:
'620px'
,
height
:
'400px'
,
resizeType
:
1
,
allowImageUpload
:
true
,
allowFlashUpload
:
true
,
allowMediaUpload
:
true
,
allowFileManager
:
false
,
syncType
:
"form"
,
afterCreate
:
function
()
{
var
self
=
this
;
self
.
sync
();
},
afterChange
:
function
()
{
var
self
=
this
;
self
.
sync
();
},
afterBlur
:
function
()
{
var
self
=
this
;
self
.
sync
();
},
items
:[
'source'
,
'|'
,
'fullscreen'
,
'undo'
,
'redo'
,
'print'
,
'cut'
,
'copy'
,
'paste'
,
'plainpaste'
,
'wordpaste'
,
'|'
,
'justifyleft'
,
'justifycenter'
,
'justifyright'
,
'justifyfull'
,
'insertorderedlist'
,
'insertunorderedlist'
,
'indent'
,
'outdent'
,
'subscript'
,
'superscript'
,
'|'
,
'selectall'
,
'clearhtml'
,
'quickformat'
,
'|'
,
'formatblock'
,
'fontname'
,
'fontsize'
,
'|'
,
'forecolor'
,
'hilitecolor'
,
'bold'
,
'italic'
,
'underline'
,
'strikethrough'
,
'lineheight'
,
'removeformat'
,
'|'
,
'image'
,
'flash'
,
'media'
,
'table'
,
'hr'
,
'emoticons'
,
'link'
,
'unlink'
,
'|'
,
'about'
]
};
var
limit
=
2000
window
.
webuploader
=
{
config
:{
thumbWidth
:
90
,
//缩略图宽度,可省略,默认为110
thumbHeight
:
90
,
//缩略图高度,可省略,默认为110
wrapId
:
'uploader'
,
//必填
},
//处理客户端新文件上传时,需要调用后台处理的地址, 必填
uploadUrl
:
'$!webPath/design/upload_work.htm'
,
//处理客户端原有文件更新时的后台处理地址,必填
updateUrl
:
'$!webPath/design/upload_work.htm'
,
//当客户端原有文件删除时的后台处理地址,必填
removeUrl
:
'$!webPath/design/upload_work.htm'
,
//初始化客户端上传文件,从后台获取文件的地址, 可选,当此参数为空时,默认已上传的文件为空
initUrl
:
''
,
image_ids
:
""
,
NumLimit
:
limit
,
fileVal
:
'file'
,
smallimg
:
'$!webPath/resources/style/system/front/default/images/usercenter/smallimg.jpg'
,
img
:
'$!webPath/resources/style/system/front/default/images/usercenter/img.jpg'
}
jQuery
(
document
).
ready
(
function
(){
$
(
document
).
on
(
"click"
,
".workImg-boxs"
,
function
(){
$
(
this
).
addClass
(
"mainImg"
).
siblings
().
removeClass
(
"mainImg"
)
if
(
$
(
this
).
hasClass
(
"mainImg"
)){
var
imgid
=
$
(
this
).
find
(
'img'
).
attr
(
"image_id"
)
$
(
"#main_img"
).
val
(
imgid
)
}
})
editor
=
KindEditor
.
create
(
'#introduction'
,
options
);
//表单验证
$
(
"#workForm"
).
validate
({
ignore
:
""
,
rules
:
{
worksName
:{
required
:
true
,
minlength
:
2
,
maxlength
:
15
},
expertId
:{
required
:
true
},
main_img
:{
required
:
true
},
imgIds
:{
required
:
true
}
},
messages
:
{
worksName
:{
required
:
"作品名称不能为空"
,
minlength
:
"作品名称最少为2个字符"
,
maxlength
:
"作品名称最多为15个字符"
,
},
expertId
:{
required
:
"请选择空间类型"
},
main_img
:{
required
:
"请选择封面图片"
},
imgIds
:{
required
:
"请上传作品图片"
}
},
})
});
function
saveForm
(){
editor
.
sync
();
//同步编辑器的数据到texterea
jQuery
(
"#workForm"
).
submit
();
}
</script>
<style>
#imgPreview
{
float
:
left
;
border
:
none
;
}
#imgPreview
img
{
margin-right
:
10px
;
width
:
100px
;
height
:
50px
;
}
.upload-img
{
display
:
block
;
float
:
left
;
width
:
150px
;
height
:
150px
;
overflow
:
hidden
;
position
:
relative
;
background
:
url("../images/self/upload.png")
no-repeat
0
;
background-size
:
contain
;
}
//
这儿是为了改变上传按钮样式把
input
设为了透明色
.upload-img
input
{
height
:
50px
;
opacity
:
0
;
filter
:
alpha
(
opacity
=
0
);
position
:
absolute
;
top
:
0
;
right
:
0
;
}
#uploader
.queueList.filled
{
padding
:
10px
;
border
:
3px
dashed
#e6e6e6
;
}
#uploader
.statusBar
{
padding
:
0
0
0
20px
;
}
#uploader
.statusBar
.btns
{
right
:
0
;
}
</style>
</head>
<body>
$!httpInclude.include("/top.htm")
$!httpInclude.include("/seller/nav_head.htm")
<div
class=
"seller_nav"
#
if
(!$!
user
.
store
)
style=
"height:auto;"
#
end
>
<i
class=
"seller_navr"
></i>
<i
class=
"seller_navl"
></i>
<div
class=
"main"
>
<ul>
<li><span><a
href=
"$!webPath/seller/index.htm"
>
卖家中心
</a></span>
</li>
<li><span><a
href=
"$!webPath/buyer/index.htm"
>
买家中心
</a></span></li>
<li><span><a
href=
"$!webPath/buyer/account.htm"
>
我的账户
</a></span></li>
<li><span><a
href=
"$!webPath/design/design_message.htm"
>
设计师
</a></span></li>
<li
class=
"this"
><span><a
href=
"$!webPath/design/decorate_message.htm"
>
装修公司
</a></span></li>
</ul>
#if($!user.store)
<span
class=
"seller_nav_a"
><a
href=
"javascript:void(0);"
dialog_uri=
"$!webPath/seller/store_quick_menu.htm"
dialog_title=
"设置快捷操作"
dialog_width=
"730"
dialog_height=
"100"
dialog_id=
"store_quick_menu"
>
设置快捷操作
</a></span>
#end
</div>
</div>
<div
class=
"main"
>
<div
class=
"user_center"
>
<table
width=
"1000"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"user_table"
>
<tr>
<td
width=
"177"
id=
"userbg"
valign=
"top"
>
<div
class=
"seller"
>
<!--店铺设置-->
<div
class=
"product_manage2"
>
<div
class=
"protitle_seller"
>
设计师中心
</div>
<ul
class=
"sellul"
>
<ul>
<li><a
href=
"$!webPath/design/decorate_message.htm"
target=
"_blank"
>
资料管理
</a></li>
<li><a
href=
"javascript:void(0);"
child_show=
"true"
><b><img
src=
"$!webPath/resources/style/system/front/default/images/usercenter/seller_menu_sub.png"
width=
"9"
height=
"9"
/></b>
作品管理
</a>
<ul>
<li
op=
"goods"
><a
href=
'$!webPath/design/decorate_works_edit.htm'
>
作品新增
</a></li>
<li
op=
"goods"
><a
href=
'$!webPath/design/decorate_work_list.htm'
>
作品管理
</a></li>
</ul>
</li>
</ul>
</ul>
</div>
</div>
</td>
<td
id=
"centerbg"
valign=
"top"
>
<div
class=
"buyer_position"
><div
class=
"buyer_p_box"
>
<a
href=
"$!webPath/design/decorate_message.htm"
>
装修公司
</a>
>
<span>
作品新增
</span></div></div>
<div
class=
"productmain"
>
<div
class=
"ordercon"
>
<div
class=
"addnav"
>
<form
action=
"$!webPath/design/decorate_works_save.htm"
method=
"post"
enctype=
"multipart/form-data"
name=
"workForm"
id=
"workForm"
>
<table
width=
"735"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"addnavtable"
>
<tr>
<td
width=
"100"
align=
"right"
>
作品名称:
</td>
<td
class=
"px10"
>
<input
name=
"worksName"
type=
"text"
id=
"worksName"
class=
"designinput"
value=
"$!{objs.worksName}"
/>
<input
name=
"id"
type=
"hidden"
id=
"workid"
value=
"$!objs.id"
/>
</td>
</tr>
<tr>
<td
align=
"right"
valign=
"top"
>
装修类型:
</td>
<td
class=
"px10"
>
<span
class=
"expertList"
>
#foreach($exp in $expert)
#if($exp.checked)
<label><input
name=
"expertId"
type=
"checkbox"
checked
id=
"expertId"
value=
"$!{exp.id}"
/>
$!{exp.expertName}
</label>
#else
<label><input
name=
"expertId"
type=
"checkbox"
id=
"expertId"
value=
"$!{exp.id}"
/>
$!{exp.expertName}
</label>
#end
#end
</span>
</td>
</tr>
<tr>
<td
align=
"right"
valign=
"top"
>
装修风格:
</td>
<td
class=
"px10"
>
<span
class=
"expertList"
>
#foreach($exp in $expert)
#if($exp.checked)
<label><input
name=
"expertId"
type=
"checkbox"
checked
id=
"expertId"
value=
"$!{exp.id}"
/>
$!{exp.expertName}
</label>
#else
<label><input
name=
"expertId"
type=
"checkbox"
id=
"expertId"
value=
"$!{exp.id}"
/>
$!{exp.expertName}
</label>
#end
#end
</span>
</td>
</tr>
<tr>
<td
align=
"right"
valign=
"top"
>
作品图像:
</td>
<td
class=
"px10"
>
<div
id=
"uploader"
class=
"wu-example"
>
<div
class=
"queueList"
>
<div
id=
"dndArea"
class=
"placeholder"
>
<div
id=
"filePicker"
></div>
<p>
或将照片拖到这里
</p>
</div>
</div>
<div
class=
"statusBar"
style=
"display:none"
>
<div
class=
"progress"
>
<span
class=
"text"
>
0%
</span>
<span
class=
"percentage"
></span>
</div>
<div
class=
"info"
></div>
<div
class=
"btns"
>
<div
id=
"filePicker2"
></div>
<div
class=
"uploadBtn"
>
开始上传
</div>
</div>
</div>
</div>
<div
id=
'workpic-list'
>
#if($objs.accessory)
#foreach($imglist in $objs.accessory)
#set($img="$webPath/$imglist.path/$imglist.name")
#set($id="$imglist.id")
#if($id == $objs.main_img.id)
<div
class=
"workImg-boxs mainImg"
id=
"$id"
>
<img
class=
"work_img"
src=
"$img"
image_id=
"$id"
></img>
<p
class=
"setIndex"
>
设为封面
</p>
</div>
#else
<div
class=
"workImg-boxs"
id=
"$id"
>
<img
class=
"work_img"
src=
"$img"
image_id=
"$id"
></img>
<p
class=
"setIndex"
>
设为封面
</p>
</div>
#end
#end
#end
</div>
<input
type=
"hidden"
name=
"imgIds"
id=
"imgIds"
></input>
<input
name=
"main_img"
type=
"hidden"
id=
"main_img"
value=
""
/>
</td>
</tr>
<tr>
<td
width=
"100"
align=
"right"
valign=
"top"
>
商品描述:
</td>
<td
class=
"px10"
>
<textarea
name=
"introduction"
style=
"width:100%;height:400px;visibility:hidden;"
id=
"introduction"
>
$!obj.goods_details
</textarea>
</td>
</tr>
<tr>
<td>
</td>
<td
class=
"px10"
><span
class=
"setsub"
>
<input
type=
"button"
onclick=
"saveForm();"
value=
"保存"
style=
"cursor:pointer;"
/>
</span></td>
</tr>
</table>
</form>
</div>
</div>
</div></td>
</tr>
</table>
</div>
</div>
$!httpInclude.include("/footer.htm")
</body>
</html>
WebRoot/WEB-INF/templates/zh_cn/system/user/default/usercenter/design_message.html
View file @
96865929
...
...
@@ -194,6 +194,7 @@ $!httpInclude.include("/seller/nav_head.htm")
<li><span><a
href=
"$!webPath/buyer/index.htm"
>
买家中心
</a></span></li>
<li><span><a
href=
"$!webPath/buyer/account.htm"
>
我的账户
</a></span></li>
<li
class=
"this"
><span><a
href=
"$!webPath/design/design_message.htm"
>
设计师
</a></span></li>
<li><span><a
href=
"$!webPath/design/decorate_message.htm"
>
装修公司
</a></span></li>
</ul>
#if($!user.store)
<span
class=
"seller_nav_a"
><a
href=
"javascript:void(0);"
dialog_uri=
"$!webPath/seller/store_quick_menu.htm"
dialog_title=
"设置快捷操作"
dialog_width=
"730"
dialog_height=
"100"
dialog_id=
"store_quick_menu"
>
设置快捷操作
</a></span>
...
...
WebRoot/WEB-INF/templates/zh_cn/system/user/default/usercenter/seller_index.html
View file @
96865929
...
...
@@ -74,6 +74,7 @@ $!httpInclude.include("/seller/nav_head.htm")
<li><span><a
href=
"$!webPath/buyer/index.htm"
>
买家中心
</a></span></li>
<li><span><a
href=
"$!webPath/buyer/account.htm"
>
我的账户
</a></span></li>
<li><span><a
href=
"$!webPath/design/design_message.htm"
>
设计师
</a></span></li>
<li><span><a
href=
"$!webPath/design/decorate_message.htm"
>
装修公司
</a></span></li>
</ul>
#if($!user.store)
<span
class=
"seller_nav_a"
><a
href=
"javascript:void(0);"
dialog_uri=
"$!webPath/seller/store_quick_menu.htm"
dialog_title=
"设置快捷操作"
dialog_width=
"730"
dialog_height=
"100"
dialog_id=
"store_quick_menu"
>
设置快捷操作
</a></span>
...
...
WebRoot/WEB-INF/web.xml
View file @
96865929
...
...
@@ -35,6 +35,14 @@
<filter-name>
jpaFilter
</filter-name>
<url-pattern>
*.htm
</url-pattern>
</filter-mapping>
<!-- <filter>
<filter-name>hibernate-session</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernate-session</filter-name>
<url-pattern>*.htm</url-pattern>
</filter-mapping> -->
<!--编码过滤器-->
<filter>
<filter-name>
encoding-filter
</filter-name>
...
...
src/com/shopping/foundation/dao/DecorateDAO.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
dao
;
import
org.springframework.stereotype.Repository
;
import
com.shopping.core.base.GenericDAO
;
import
com.shopping.foundation.domain.Decorate
;
@Repository
(
"decorateDAO"
)
public
class
DecorateDAO
extends
GenericDAO
<
Decorate
>
{
}
src/com/shopping/foundation/dao/DecorateStyleDAO.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
dao
;
import
org.springframework.stereotype.Repository
;
import
com.shopping.core.base.GenericDAO
;
import
com.shopping.foundation.domain.DecorateStyle
;
@Repository
(
"decorateStyleDAO"
)
public
class
DecorateStyleDAO
extends
GenericDAO
<
DecorateStyle
>
{
}
src/com/shopping/foundation/dao/DecorateTypeDAO.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
dao
;
import
org.springframework.stereotype.Repository
;
import
com.shopping.core.base.GenericDAO
;
import
com.shopping.foundation.domain.DecorateType
;
@Repository
(
"decorateTypeDAO"
)
public
class
DecorateTypeDAO
extends
GenericDAO
<
DecorateType
>
{
}
src/com/shopping/foundation/dao/DecorateWorkDAO.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
dao
;
import
org.springframework.stereotype.Repository
;
import
com.shopping.core.base.GenericDAO
;
import
com.shopping.foundation.domain.DecorateWork
;
@Repository
(
"decorateWorkDAO"
)
public
class
DecorateWorkDAO
extends
GenericDAO
<
DecorateWork
>
{
}
src/com/shopping/foundation/domain/Accessory.java
View file @
96865929
...
...
@@ -69,6 +69,10 @@ public class Accessory extends IdEntity {
@ManyToMany
(
mappedBy
=
"accessory"
)
private
List
<
Works
>
works
=
new
ArrayList
<
Works
>();
// 做品图片
@ManyToMany
(
mappedBy
=
"accessory"
)
private
List
<
DecorateWork
>
decorateWorks
=
new
ArrayList
<
DecorateWork
>();
/*@OneToOne
private Works main_img;*/
...
...
src/com/shopping/foundation/domain/Decorate.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
domain
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Entity
;
import
javax.persistence.FetchType
;
import
javax.persistence.JoinTable
;
import
javax.persistence.ManyToMany
;
import
javax.persistence.OneToMany
;
import
javax.persistence.OneToOne
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Cache
;
import
org.hibernate.annotations.CacheConcurrencyStrategy
;
import
com.shopping.core.domain.IdEntity
;
@Cache
(
usage
=
CacheConcurrencyStrategy
.
READ_WRITE
)
@Entity
@Table
(
name
=
"shopping_decorate"
)
public
class
Decorate
extends
IdEntity
{
// 名
private
String
decorationName
;
// 咨询次数
private
Long
consult
;
// 区域
@OneToOne
(
fetch
=
FetchType
.
EAGER
)
private
Area
area
;
// 师用户
@OneToOne
(
fetch
=
FetchType
.
EAGER
)
private
User
user
;
@OneToOne
(
cascade
=
{
javax
.
persistence
.
CascadeType
.
REMOVE
},
fetch
=
FetchType
.
EAGER
)
private
Accessory
acc
;
// 地址
private
String
decorationArea
;
// 联系方式
private
String
decorationPhone
;
@ManyToMany
(
fetch
=
FetchType
.
LAZY
)
@JoinTable
(
name
=
"shopping_decorate_style_relation"
,
joinColumns
=
{
@javax
.
persistence
.
JoinColumn
(
name
=
"decorate_id"
)
},
inverseJoinColumns
=
{
@javax
.
persistence
.
JoinColumn
(
name
=
"style_id"
)
})
private
List
<
DecorateStyle
>
decorateStyle
=
new
ArrayList
<
DecorateStyle
>();
@ManyToMany
(
fetch
=
FetchType
.
LAZY
)
@JoinTable
(
name
=
"shopping_decorate_type_relation"
,
joinColumns
=
{
@javax
.
persistence
.
JoinColumn
(
name
=
"decorate_id"
)
},
inverseJoinColumns
=
{
@javax
.
persistence
.
JoinColumn
(
name
=
"type_id"
)
})
private
List
<
DecorateType
>
decorateType
=
new
ArrayList
<
DecorateType
>();
// 装修公司作品
@OneToMany
(
mappedBy
=
"decorateWorks"
,
targetEntity
=
DecorateWork
.
class
,
fetch
=
FetchType
.
LAZY
)
private
List
<
DecorateWork
>
works
=
new
ArrayList
<
DecorateWork
>();
public
String
getDecorationName
()
{
return
decorationName
;
}
public
void
setDecorationName
(
String
decorationName
)
{
this
.
decorationName
=
decorationName
;
}
public
Long
getConsult
()
{
return
consult
;
}
public
void
setConsult
(
Long
consult
)
{
this
.
consult
=
consult
;
}
public
Area
getArea
()
{
return
area
;
}
public
void
setArea
(
Area
area
)
{
this
.
area
=
area
;
}
public
User
getUser
()
{
return
user
;
}
public
void
setUser
(
User
user
)
{
this
.
user
=
user
;
}
public
Accessory
getAcc
()
{
return
acc
;
}
public
void
setAcc
(
Accessory
acc
)
{
this
.
acc
=
acc
;
}
public
String
getDecorationArea
()
{
return
decorationArea
;
}
public
void
setDecorationArea
(
String
decorationArea
)
{
this
.
decorationArea
=
decorationArea
;
}
public
String
getDecorationPhone
()
{
return
decorationPhone
;
}
public
void
setDecorationPhone
(
String
decorationPhone
)
{
this
.
decorationPhone
=
decorationPhone
;
}
public
List
<
DecorateStyle
>
getDecorateStyle
()
{
return
decorateStyle
;
}
public
void
setDecorateStyle
(
List
<
DecorateStyle
>
decorateStyle
)
{
this
.
decorateStyle
=
decorateStyle
;
}
public
List
<
DecorateType
>
getDecorateType
()
{
return
decorateType
;
}
public
void
setDecorateType
(
List
<
DecorateType
>
decorateType
)
{
this
.
decorateType
=
decorateType
;
}
public
List
<
DecorateWork
>
getWorks
()
{
return
works
;
}
public
void
setWorks
(
List
<
DecorateWork
>
works
)
{
this
.
works
=
works
;
}
}
src/com/shopping/foundation/domain/DecorateStyle.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
domain
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Entity
;
import
javax.persistence.ManyToMany
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Cache
;
import
org.hibernate.annotations.CacheConcurrencyStrategy
;
import
com.shopping.core.domain.IdEntity
;
@Cache
(
usage
=
CacheConcurrencyStrategy
.
READ_WRITE
)
@Entity
@Table
(
name
=
"shopping_decorate_style"
)
public
class
DecorateStyle
extends
IdEntity
{
// 名
private
String
styleName
;
// 排序序列
private
int
sequence
;
@ManyToMany
(
mappedBy
=
"decorateStyle"
)
private
List
<
Decorate
>
decorates
=
new
ArrayList
<
Decorate
>();
public
String
getStyleName
()
{
return
styleName
;
}
public
void
setStyleName
(
String
styleName
)
{
this
.
styleName
=
styleName
;
}
public
int
getSequence
()
{
return
sequence
;
}
public
void
setSequence
(
int
sequence
)
{
this
.
sequence
=
sequence
;
}
public
List
<
Decorate
>
getDecorates
()
{
return
decorates
;
}
public
void
setDecorates
(
List
<
Decorate
>
decorates
)
{
this
.
decorates
=
decorates
;
}
}
src/com/shopping/foundation/domain/DecorateType.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
domain
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Entity
;
import
javax.persistence.ManyToMany
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Cache
;
import
org.hibernate.annotations.CacheConcurrencyStrategy
;
import
com.shopping.core.domain.IdEntity
;
@Cache
(
usage
=
CacheConcurrencyStrategy
.
READ_WRITE
)
@Entity
@Table
(
name
=
"shopping_decorate_type"
)
public
class
DecorateType
extends
IdEntity
{
// 名
private
String
typeName
;
// 排序序列
private
int
sequence
;
@ManyToMany
(
mappedBy
=
"decorateType"
)
private
List
<
Decorate
>
decorate
=
new
ArrayList
<
Decorate
>();
public
String
getTypeName
()
{
return
typeName
;
}
public
void
setTypeName
(
String
typeName
)
{
this
.
typeName
=
typeName
;
}
public
int
getSequence
()
{
return
sequence
;
}
public
void
setSequence
(
int
sequence
)
{
this
.
sequence
=
sequence
;
}
public
List
<
Decorate
>
getDecorate
()
{
return
decorate
;
}
public
void
setDecorate
(
List
<
Decorate
>
decorate
)
{
this
.
decorate
=
decorate
;
}
}
src/com/shopping/foundation/domain/DecorateWork.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
domain
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Entity
;
import
javax.persistence.FetchType
;
import
javax.persistence.JoinTable
;
import
javax.persistence.ManyToMany
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.OneToOne
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Cache
;
import
org.hibernate.annotations.CacheConcurrencyStrategy
;
import
com.shopping.core.domain.IdEntity
;
@Cache
(
usage
=
CacheConcurrencyStrategy
.
READ_WRITE
)
@Entity
@Table
(
name
=
"shopping_decorate_work"
)
public
class
DecorateWork
extends
IdEntity
{
//作品名称
private
String
worksName
;
@ManyToOne
(
targetEntity
=
Decorate
.
class
,
fetch
=
FetchType
.
LAZY
)
@JoinTable
(
name
=
"shopping_decorate_work_relation"
,
joinColumns
=
{
@javax
.
persistence
.
JoinColumn
(
name
=
"work_id"
)
},
inverseJoinColumns
=
{
@javax
.
persistence
.
JoinColumn
(
name
=
"decorate_id"
)
})
private
Decorate
decorateWorks
;
@ManyToMany
(
fetch
=
FetchType
.
EAGER
)
@JoinTable
(
name
=
"shopping_decowork_photo_relation"
,
joinColumns
=
{
@javax
.
persistence
.
JoinColumn
(
name
=
"decorate_works_id"
)
},
inverseJoinColumns
=
{
@javax
.
persistence
.
JoinColumn
(
name
=
"photo_id"
)
})
private
List
<
Accessory
>
accessory
=
new
ArrayList
<
Accessory
>();
//作品主图
@OneToOne
private
Accessory
main_img
;
//作品描述
private
String
introduction
;
//作品类型
@OneToOne
private
DecorateType
decorateType
;
//作品风格
@OneToOne
private
DecorateStyle
decorateStyle
;
public
String
getWorksName
()
{
return
worksName
;
}
public
void
setWorksName
(
String
worksName
)
{
this
.
worksName
=
worksName
;
}
public
Decorate
getDecorateWorks
()
{
return
decorateWorks
;
}
public
void
setDecorateWorks
(
Decorate
decorateWorks
)
{
this
.
decorateWorks
=
decorateWorks
;
}
public
List
<
Accessory
>
getAccessory
()
{
return
accessory
;
}
public
void
setAccessory
(
List
<
Accessory
>
accessory
)
{
this
.
accessory
=
accessory
;
}
public
Accessory
getMain_img
()
{
return
main_img
;
}
public
void
setMain_img
(
Accessory
main_img
)
{
this
.
main_img
=
main_img
;
}
public
String
getIntroduction
()
{
return
introduction
;
}
public
void
setIntroduction
(
String
introduction
)
{
this
.
introduction
=
introduction
;
}
public
DecorateType
getDecorateType
()
{
return
decorateType
;
}
public
void
setDecorateType
(
DecorateType
decorateType
)
{
this
.
decorateType
=
decorateType
;
}
public
DecorateStyle
getDecorateStyle
()
{
return
decorateStyle
;
}
public
void
setDecorateStyle
(
DecorateStyle
decorateStyle
)
{
this
.
decorateStyle
=
decorateStyle
;
}
}
src/com/shopping/foundation/domain/Design.java
View file @
96865929
...
...
@@ -7,7 +7,6 @@ import javax.persistence.Entity;
import
javax.persistence.FetchType
;
import
javax.persistence.JoinTable
;
import
javax.persistence.ManyToMany
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.OneToMany
;
import
javax.persistence.OneToOne
;
import
javax.persistence.Table
;
...
...
src/com/shopping/foundation/domain/DesignExpert.java
View file @
96865929
...
...
@@ -32,7 +32,7 @@ public class DesignExpert extends IdEntity {
// 排序序列
private
int
sequence
;
// 设计师
// 设计师
designExpert
@ManyToMany
(
mappedBy
=
"designExpert"
)
private
List
<
Design
>
design
=
new
ArrayList
<
Design
>();
...
...
src/com/shopping/foundation/domain/User.java
View file @
96865929
...
...
@@ -11,6 +11,7 @@ import java.util.TreeSet;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.FetchType
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.JoinTable
;
import
javax.persistence.ManyToMany
;
import
javax.persistence.ManyToOne
;
...
...
@@ -252,6 +253,18 @@ public class User extends IdEntity implements UserDetails {
//会员级别
private
int
level
;
// 装修公司信息
@OneToOne
private
Decorate
decorate
;
public
Decorate
getDecorate
()
{
return
decorate
;
}
public
void
setDecorate
(
Decorate
decorate
)
{
this
.
decorate
=
decorate
;
}
public
int
getLevel
()
{
return
level
;
}
...
...
src/com/shopping/foundation/domain/query/DecorateQueryObject.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
domain
.
query
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.shopping.core.query.QueryObject
;
public
class
DecorateQueryObject
extends
QueryObject
{
public
DecorateQueryObject
(
String
currentPage
,
ModelAndView
mv
,
String
orderBy
,
String
orderType
)
{
super
(
currentPage
,
mv
,
orderBy
,
orderType
);
}
public
DecorateQueryObject
()
{
}
}
src/com/shopping/foundation/domain/query/DecorateStyleQueryObject.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
domain
.
query
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.shopping.core.query.QueryObject
;
public
class
DecorateStyleQueryObject
extends
QueryObject
{
public
DecorateStyleQueryObject
(
String
currentPage
,
ModelAndView
mv
,
String
orderBy
,
String
orderType
)
{
super
(
currentPage
,
mv
,
orderBy
,
orderType
);
}
public
DecorateStyleQueryObject
()
{
}
}
src/com/shopping/foundation/domain/query/DecorateTypeQueryObject.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
domain
.
query
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.shopping.core.query.QueryObject
;
public
class
DecorateTypeQueryObject
extends
QueryObject
{
public
DecorateTypeQueryObject
(
String
currentPage
,
ModelAndView
mv
,
String
orderBy
,
String
orderType
)
{
super
(
currentPage
,
mv
,
orderBy
,
orderType
);
}
public
DecorateTypeQueryObject
()
{
}
}
src/com/shopping/foundation/domain/query/DecorateWorkQueryObject.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
domain
.
query
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.shopping.core.query.QueryObject
;
public
class
DecorateWorkQueryObject
extends
QueryObject
{
public
DecorateWorkQueryObject
(
String
currentPage
,
ModelAndView
mv
,
String
orderBy
,
String
orderType
)
{
super
(
currentPage
,
mv
,
orderBy
,
orderType
);
}
public
DecorateWorkQueryObject
()
{
}
}
src/com/shopping/foundation/service/IDecorateService.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.shopping.core.query.support.IPageList
;
import
com.shopping.core.query.support.IQueryObject
;
import
com.shopping.foundation.domain.Decorate
;
public
interface
IDecorateService
{
public
abstract
boolean
save
(
Decorate
decorate
);
public
abstract
Decorate
getObjById
(
Long
paramLong
);
public
abstract
boolean
delete
(
Long
paramLong
);
public
abstract
boolean
update
(
Decorate
decorate
);
public
abstract
List
<
Decorate
>
query
(
String
paramString
,
Map
paramMap
,
int
paramInt1
,
int
paramInt2
);
public
abstract
IPageList
list
(
IQueryObject
paramIQueryObject
);
}
src/com/shopping/foundation/service/IDecorateStyleService.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.shopping.core.query.support.IPageList
;
import
com.shopping.core.query.support.IQueryObject
;
import
com.shopping.foundation.domain.DecorateStyle
;
public
interface
IDecorateStyleService
{
public
abstract
boolean
save
(
DecorateStyle
decorateStyle
);
public
abstract
DecorateStyle
getObjById
(
Long
paramLong
);
public
abstract
boolean
delete
(
Long
paramLong
);
public
abstract
boolean
update
(
DecorateStyle
decorateStyle
);
public
abstract
List
<
DecorateStyle
>
query
(
String
paramString
,
Map
paramMap
,
int
paramInt1
,
int
paramInt2
);
public
abstract
IPageList
list
(
IQueryObject
paramIQueryObject
);
}
src/com/shopping/foundation/service/IDecorateTypeService.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.shopping.core.query.support.IPageList
;
import
com.shopping.core.query.support.IQueryObject
;
import
com.shopping.foundation.domain.DecorateType
;
public
interface
IDecorateTypeService
{
public
abstract
boolean
save
(
DecorateType
decorateType
);
public
abstract
DecorateType
getObjById
(
Long
paramLong
);
public
abstract
boolean
delete
(
Long
paramLong
);
public
abstract
boolean
update
(
DecorateType
decorateType
);
public
abstract
List
<
DecorateType
>
query
(
String
paramString
,
Map
paramMap
,
int
paramInt1
,
int
paramInt2
);
public
abstract
IPageList
list
(
IQueryObject
paramIQueryObject
);
}
src/com/shopping/foundation/service/IDecorateWork.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.shopping.core.query.support.IPageList
;
import
com.shopping.core.query.support.IQueryObject
;
import
com.shopping.foundation.domain.DecorateWork
;
public
interface
IDecorateWork
{
public
abstract
boolean
save
(
DecorateWork
decorateWork
);
public
abstract
DecorateWork
getObjById
(
Long
paramLong
);
public
abstract
boolean
delete
(
Long
paramLong
);
public
abstract
boolean
update
(
DecorateWork
decorateWork
);
public
abstract
List
<
DecorateWork
>
query
(
String
paramString
,
Map
paramMap
,
int
paramInt1
,
int
paramInt2
);
public
abstract
IPageList
list
(
IQueryObject
paramIQueryObject
);
}
src/com/shopping/foundation/service/impl/DecorateServiceImpl.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
service
.
impl
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.shopping.core.dao.IGenericDAO
;
import
com.shopping.core.query.GenericPageList
;
import
com.shopping.core.query.PageObject
;
import
com.shopping.core.query.support.IPageList
;
import
com.shopping.core.query.support.IQueryObject
;
import
com.shopping.foundation.domain.Decorate
;
import
com.shopping.foundation.service.IDecorateService
;
@Service
@Transactional
public
class
DecorateServiceImpl
implements
IDecorateService
{
@Resource
(
name
=
"decorateDAO"
)
private
IGenericDAO
<
Decorate
>
decorateDAO
;
@Override
public
boolean
save
(
Decorate
decorate
)
{
try
{
this
.
decorateDAO
.
save
(
decorate
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
Decorate
getObjById
(
Long
id
)
{
Decorate
decorate
=
(
Decorate
)
this
.
decorateDAO
.
get
(
id
);
if
(
decorate
!=
null
)
{
return
decorate
;
}
return
null
;
}
@Override
public
boolean
delete
(
Long
id
)
{
try
{
this
.
decorateDAO
.
remove
(
id
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
boolean
update
(
Decorate
decorate
)
{
try
{
this
.
decorateDAO
.
update
(
decorate
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
List
<
Decorate
>
query
(
String
query
,
Map
params
,
int
begin
,
int
max
)
{
return
this
.
decorateDAO
.
query
(
query
,
params
,
begin
,
max
);
}
@Override
public
IPageList
list
(
IQueryObject
properties
)
{
if
(
properties
==
null
)
{
return
null
;
}
String
query
=
properties
.
getQuery
();
Map
params
=
properties
.
getParameters
();
GenericPageList
pList
=
new
GenericPageList
(
Decorate
.
class
,
query
,
params
,
this
.
decorateDAO
);
if
(
properties
!=
null
)
{
PageObject
pageObj
=
properties
.
getPageObj
();
if
(
pageObj
!=
null
)
pList
.
doList
(
pageObj
.
getCurrentPage
()
==
null
?
0
:
pageObj
.
getCurrentPage
().
intValue
(),
pageObj
.
getPageSize
()
==
null
?
0
:
pageObj
.
getPageSize
().
intValue
());
}
else
{
pList
.
doList
(
0
,
-
1
);
}
return
pList
;
}
}
src/com/shopping/foundation/service/impl/DecorateStyleServiceImpl.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
service
.
impl
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.shopping.core.dao.IGenericDAO
;
import
com.shopping.core.query.GenericPageList
;
import
com.shopping.core.query.PageObject
;
import
com.shopping.core.query.support.IPageList
;
import
com.shopping.core.query.support.IQueryObject
;
import
com.shopping.foundation.domain.DecorateStyle
;
import
com.shopping.foundation.service.IDecorateStyleService
;
@Service
@Transactional
public
class
DecorateStyleServiceImpl
implements
IDecorateStyleService
{
@Resource
(
name
=
"decorateStyleDAO"
)
private
IGenericDAO
<
DecorateStyle
>
decorateStyleDAO
;
@Override
public
boolean
save
(
DecorateStyle
decorateStyle
)
{
try
{
this
.
decorateStyleDAO
.
save
(
decorateStyle
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
DecorateStyle
getObjById
(
Long
id
)
{
DecorateStyle
decorateStyle
=
(
DecorateStyle
)
this
.
decorateStyleDAO
.
get
(
id
);
if
(
decorateStyle
!=
null
)
{
return
decorateStyle
;
}
return
null
;
}
@Override
public
boolean
delete
(
Long
id
)
{
try
{
this
.
decorateStyleDAO
.
remove
(
id
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
boolean
update
(
DecorateStyle
decorateStyle
)
{
try
{
this
.
decorateStyleDAO
.
update
(
decorateStyle
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
List
<
DecorateStyle
>
query
(
String
query
,
Map
params
,
int
begin
,
int
max
)
{
return
this
.
decorateStyleDAO
.
query
(
query
,
params
,
begin
,
max
);
}
@Override
public
IPageList
list
(
IQueryObject
properties
)
{
if
(
properties
==
null
)
{
return
null
;
}
String
query
=
properties
.
getQuery
();
Map
params
=
properties
.
getParameters
();
GenericPageList
pList
=
new
GenericPageList
(
DecorateStyle
.
class
,
query
,
params
,
this
.
decorateStyleDAO
);
if
(
properties
!=
null
)
{
PageObject
pageObj
=
properties
.
getPageObj
();
if
(
pageObj
!=
null
)
pList
.
doList
(
pageObj
.
getCurrentPage
()
==
null
?
0
:
pageObj
.
getCurrentPage
().
intValue
(),
pageObj
.
getPageSize
()
==
null
?
0
:
pageObj
.
getPageSize
().
intValue
());
}
else
{
pList
.
doList
(
0
,
-
1
);
}
return
pList
;
}
}
src/com/shopping/foundation/service/impl/DecorateTypeServiceImpl.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
service
.
impl
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.shopping.core.dao.IGenericDAO
;
import
com.shopping.core.query.GenericPageList
;
import
com.shopping.core.query.PageObject
;
import
com.shopping.core.query.support.IPageList
;
import
com.shopping.core.query.support.IQueryObject
;
import
com.shopping.foundation.domain.DecorateType
;
import
com.shopping.foundation.service.IDecorateTypeService
;
@Service
@Transactional
public
class
DecorateTypeServiceImpl
implements
IDecorateTypeService
{
@Resource
(
name
=
"decorateTypeDAO"
)
private
IGenericDAO
<
DecorateType
>
decorateTypeDAO
;
@Override
public
boolean
save
(
DecorateType
decorateType
)
{
try
{
this
.
decorateTypeDAO
.
save
(
decorateType
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
DecorateType
getObjById
(
Long
id
)
{
DecorateType
decorateType
=
(
DecorateType
)
this
.
decorateTypeDAO
.
get
(
id
);
if
(
decorateType
!=
null
)
{
return
decorateType
;
}
return
null
;
}
@Override
public
boolean
delete
(
Long
id
)
{
try
{
this
.
decorateTypeDAO
.
remove
(
id
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
boolean
update
(
DecorateType
decorateType
)
{
try
{
this
.
decorateTypeDAO
.
update
(
decorateType
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
List
<
DecorateType
>
query
(
String
query
,
Map
params
,
int
begin
,
int
max
)
{
return
this
.
decorateTypeDAO
.
query
(
query
,
params
,
begin
,
max
);
}
@Override
public
IPageList
list
(
IQueryObject
properties
)
{
if
(
properties
==
null
)
{
return
null
;
}
String
query
=
properties
.
getQuery
();
Map
params
=
properties
.
getParameters
();
GenericPageList
pList
=
new
GenericPageList
(
DecorateType
.
class
,
query
,
params
,
this
.
decorateTypeDAO
);
if
(
properties
!=
null
)
{
PageObject
pageObj
=
properties
.
getPageObj
();
if
(
pageObj
!=
null
)
pList
.
doList
(
pageObj
.
getCurrentPage
()
==
null
?
0
:
pageObj
.
getCurrentPage
().
intValue
(),
pageObj
.
getPageSize
()
==
null
?
0
:
pageObj
.
getPageSize
().
intValue
());
}
else
{
pList
.
doList
(
0
,
-
1
);
}
return
pList
;
}
}
src/com/shopping/foundation/service/impl/DecorateWorkServiceImpl.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
foundation
.
service
.
impl
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.shopping.core.dao.IGenericDAO
;
import
com.shopping.core.query.GenericPageList
;
import
com.shopping.core.query.PageObject
;
import
com.shopping.core.query.support.IPageList
;
import
com.shopping.core.query.support.IQueryObject
;
import
com.shopping.foundation.domain.DecorateWork
;
import
com.shopping.foundation.service.IDecorateWork
;
@Service
@Transactional
public
class
DecorateWorkServiceImpl
implements
IDecorateWork
{
@Resource
(
name
=
"decorateWorkDAO"
)
private
IGenericDAO
<
DecorateWork
>
decorateWorkDAO
;
@Override
public
boolean
save
(
DecorateWork
decorateWork
)
{
try
{
this
.
decorateWorkDAO
.
save
(
decorateWork
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
DecorateWork
getObjById
(
Long
id
)
{
DecorateWork
decorateWork
=
(
DecorateWork
)
this
.
decorateWorkDAO
.
get
(
id
);
if
(
decorateWork
!=
null
)
{
return
decorateWork
;
}
return
null
;
}
@Override
public
boolean
delete
(
Long
id
)
{
try
{
this
.
decorateWorkDAO
.
remove
(
id
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
boolean
update
(
DecorateWork
decorateWork
)
{
try
{
this
.
decorateWorkDAO
.
update
(
decorateWork
);
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
@Override
public
List
<
DecorateWork
>
query
(
String
query
,
Map
params
,
int
begin
,
int
max
)
{
return
this
.
decorateWorkDAO
.
query
(
query
,
params
,
begin
,
max
);
}
@Override
public
IPageList
list
(
IQueryObject
properties
)
{
if
(
properties
==
null
)
{
return
null
;
}
String
query
=
properties
.
getQuery
();
Map
params
=
properties
.
getParameters
();
GenericPageList
pList
=
new
GenericPageList
(
DecorateWork
.
class
,
query
,
params
,
this
.
decorateWorkDAO
);
if
(
properties
!=
null
)
{
PageObject
pageObj
=
properties
.
getPageObj
();
if
(
pageObj
!=
null
)
pList
.
doList
(
pageObj
.
getCurrentPage
()
==
null
?
0
:
pageObj
.
getCurrentPage
().
intValue
(),
pageObj
.
getPageSize
()
==
null
?
0
:
pageObj
.
getPageSize
().
intValue
());
}
else
{
pList
.
doList
(
0
,
-
1
);
}
return
pList
;
}
}
src/com/shopping/manage/design/action/DecorateAction.java
0 → 100644
View file @
96865929
package
com
.
shopping
.
manage
.
design
.
action
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.collections.list.TypedList
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.shopping.core.annotation.SecurityMapping
;
import
com.shopping.core.domain.virtual.SysMap
;
import
com.shopping.core.mv.JModelAndView
;
import
com.shopping.core.query.support.IPageList
;
import
com.shopping.core.security.support.SecurityUserHolder
;
import
com.shopping.core.tools.CommUtil
;
import
com.shopping.core.tools.WebForm
;
import
com.shopping.foundation.domain.Accessory
;
import
com.shopping.foundation.domain.Area
;
import
com.shopping.foundation.domain.Decorate
;
import
com.shopping.foundation.domain.DecorateStyle
;
import
com.shopping.foundation.domain.DecorateType
;
import
com.shopping.foundation.domain.DecorateWork
;
import
com.shopping.foundation.domain.Design
;
import
com.shopping.foundation.domain.DesignExpert
;
import
com.shopping.foundation.domain.DesignFees
;
import
com.shopping.foundation.domain.User
;
import
com.shopping.foundation.domain.Works
;
import
com.shopping.foundation.domain.query.DecorateWorkQueryObject
;
import
com.shopping.foundation.domain.query.WorksQueryObject
;
import
com.shopping.foundation.domain.virtual.DesignExpertVo
;
import
com.shopping.foundation.service.IAccessoryService
;
import
com.shopping.foundation.service.IAreaService
;
import
com.shopping.foundation.service.IDecorateService
;
import
com.shopping.foundation.service.IDecorateStyleService
;
import
com.shopping.foundation.service.IDecorateTypeService
;
import
com.shopping.foundation.service.IDecorateWork
;
import
com.shopping.foundation.service.ISysConfigService
;
import
com.shopping.foundation.service.IUserConfigService
;
import
com.shopping.foundation.service.IUserService
;
@Controller
public
class
DecorateAction
{
@Autowired
private
ISysConfigService
configService
;
@Autowired
private
IUserConfigService
userConfigService
;
@Autowired
private
IAreaService
areaService
;
@Autowired
private
IDecorateStyleService
decorateStyleService
;
@Autowired
private
IDecorateTypeService
decorateTypeService
;
@Autowired
private
IAccessoryService
accessoryService
;
@Autowired
private
IDecorateService
decorateService
;
@Autowired
private
IUserService
userService
;
@Autowired
private
IDecorateWork
decorateWork
;
/**
* 装修公司注册页面
*
* @param request
* @param response
* @return
*/
@SecurityMapping
(
display
=
false
,
rsequence
=
0
,
title
=
"装修公司注册页"
,
value
=
"/design/decorate_message.htm*"
,
rtype
=
"seller"
,
rname
=
"作品列表"
,
rcode
=
"usergoodsbrand_seller"
,
rgroup
=
"商品管理"
)
@RequestMapping
({
"/design/decorate_message.htm"
})
@Transactional
public
Object
design_message
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ModelAndView
mv
=
new
JModelAndView
(
"user/default/usercenter/decorate_message.html"
,
this
.
configService
.
getSysConfig
(),
this
.
userConfigService
.
getUserConfig
(),
0
,
request
,
response
);
User
user
=
SecurityUserHolder
.
getCurrentUser
();
Decorate
decorate
=
user
.
getDecorate
();
if
(
decorate
==
null
)
{
if
(
user
.
getLevel
()
==
0
)
{
return
"redirect:/index.htm"
;
}
else
{
mv
.
addObject
(
"state"
,
0
);
mv
.
addObject
(
"message"
,
"没有注册设计师,请先注册。"
);
mv
.
addObject
(
"objs"
,
null
);
}
}
else
{
mv
.
addObject
(
"state"
,
1
);
mv
.
addObject
(
"message"
,
"设计师信息。"
);
mv
.
addObject
(
"objs"
,
decorate
);
}
List
areas
=
this
.
areaService
.
query
(
"select obj from Area obj where obj.parent.id is null"
,
null
,
-
1
,
-
1
);
mv
.
addObject
(
"areas"
,
areas
);
List
<
DecorateStyle
>
listst
=
decorate
.
getDecorateStyle
();
//装修类型
//List<DecorateType> allDecorateTypeVoList = getDecorateTypeList(decorate == null ?null: decorate.getDecorateType());
//mv.addObject("type", allDecorateTypeVoList);
//装修风格
//List<DecorateStyle> allDecorateStyleVoList = getDecorateStyleList(decorate == null ?null:decorate.getDecorateStyle());
//mv.addObject("style", allDecorateStyleVoList);
return
mv
;
}
/**
* 查询装修类型
*/
private
List
<
DecorateType
>
getDecorateTypeList
(
List
<
DecorateType
>
currDesignExpertList
)
{
// 设计师擅长领域
List
<
DecorateType
>
allDecorateTypeList
=
this
.
decorateTypeService
.
query
(
"select obj from DecorateType obj"
,
null
,
-
1
,
-
1
);
// 设计师擅长领域展示
List
<
DecorateType
>
allDesignExpertVoList
=
new
ArrayList
<
DecorateType
>();
for
(
DecorateType
decorateType
:
allDecorateTypeList
)
{
if
(
currDesignExpertList
!=
null
)
{
for
(
DecorateType
decorateType2
:
currDesignExpertList
)
{
if
(
decorateType2
.
getId
().
equals
(
decorateType
.
getId
()))
{
//decorateType.setChecked(true);
}
}
}
allDesignExpertVoList
.
add
(
decorateType
);
}
return
allDesignExpertVoList
;
}
/**
* 查询装修风格
*/
private
List
<
DecorateStyle
>
getDecorateStyleList
(
List
<
DecorateStyle
>
currDesignExpertList
)
{
// 设计师擅长领域
List
<
DecorateStyle
>
allDecorateTypeList
=
this
.
decorateStyleService
.
query
(
"select obj from DecorateStyle obj"
,
null
,
-
1
,
-
1
);
// 设计师擅长领域展示
List
<
DecorateStyle
>
allDesignExpertVoList
=
new
ArrayList
<
DecorateStyle
>();
for
(
DecorateStyle
decorateType
:
allDecorateTypeList
)
{
if
(
currDesignExpertList
!=
null
)
{
for
(
DecorateStyle
decorateType2
:
currDesignExpertList
)
{
if
(
decorateType2
.
getId
().
equals
(
decorateType
.
getId
()))
{
//decorateType.setChecked(true);
}
}
}
allDesignExpertVoList
.
add
(
decorateType
);
}
return
allDesignExpertVoList
;
}
/**
* 设计师资料保存
*
* @param request
* @param response
* @return
*/
@SecurityMapping
(
display
=
false
,
rsequence
=
0
,
title
=
"设计师注册页"
,
value
=
"/design/design_message.htm*"
,
rtype
=
"seller"
,
rname
=
"作品列表"
,
rcode
=
"usergoodsbrand_seller"
,
rgroup
=
"商品管理"
)
@RequestMapping
({
"/design/decorate_save.htm"
})
public
String
design_save
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
id
,
String
imgId
,
String
decorateType
,
String
decorateStyle
,
String
areaId
,
String
decorateName
,
String
decorateArea
)
{
WebForm
wf
=
new
WebForm
();
Decorate
decorate
=
null
;
User
user
=
this
.
userService
.
getObjById
(
SecurityUserHolder
.
getCurrentUser
().
getId
());
if
(
id
.
equals
(
""
))
{
decorate
=
(
Decorate
)
wf
.
toPo
(
request
,
Decorate
.
class
);
decorate
.
setAddTime
(
new
Date
());
decorate
.
setUser
(
user
);
decorate
.
setDecorationName
(
decorateName
);
decorate
.
setDecorationArea
(
decorateArea
);
}
else
{
Decorate
obj
=
this
.
decorateService
.
getObjById
(
Long
.
valueOf
(
Long
.
parseLong
(
id
)));
decorate
=
(
Decorate
)
wf
.
toPo
(
request
,
obj
);
decorate
.
setDecorationName
(
decorateName
);
decorate
.
setDecorationArea
(
decorateArea
);
}
// 设计师头像
Accessory
main_img
=
null
;
if
((
imgId
!=
null
)
&&
(!
imgId
.
equals
(
""
)))
{
main_img
=
this
.
accessoryService
.
getObjById
(
Long
.
valueOf
(
Long
.
parseLong
(
imgId
)));
}
decorate
.
setAcc
(
main_img
);
//装修公司类型
/*String[] decorate_types = decorateType.split(",");
decorate.getDecorateType().clear();
for (int i = 0; i < decorate_types.length; i++) {
String type_id = decorate_types[i];
if (!type_id.equals("")) {
DecorateType type = this.decorateTypeService.getObjById(Long.valueOf(Long.parseLong(type_id)));
decorate.getDecorateType().add(type);
}
}*/
//装修公司风格
String
[]
decorate_styles
=
decorateStyle
.
split
(
","
);
decorate
.
getDecorateStyle
().
clear
();
for
(
int
i
=
0
;
i
<
decorate_styles
.
length
;
i
++)
{
String
style_id
=
decorate_styles
[
i
];
if
(!
style_id
.
equals
(
""
))
{
DecorateStyle
style
=
this
.
decorateStyleService
.
getObjById
(
Long
.
valueOf
(
Long
.
parseLong
(
style_id
)));
decorate
.
getDecorateStyle
().
add
(
style
);
}
}
// 设计师所属区域
Area
area
=
null
;
if
((
areaId
!=
null
)
&&
(!
areaId
.
equals
(
""
)))
{
area
=
this
.
areaService
.
getObjById
(
Long
.
valueOf
(
Long
.
parseLong
(
areaId
)));
}
decorate
.
setArea
(
area
);
if
(
id
.
equals
(
""
))
{
this
.
decorateService
.
save
(
decorate
);
user
.
setDecorate
(
decorate
);
this
.
userService
.
update
(
user
);
}
else
{
this
.
decorateService
.
update
(
decorate
);
}
return
"redirect:/shopping_logout.htm"
;
}
@SecurityMapping
(
display
=
false
,
rsequence
=
0
,
title
=
"装修公司作品编辑"
,
value
=
"/design/decorate_works_edit.htm*"
,
rtype
=
"seller"
,
rname
=
"作品编辑"
,
rcode
=
"usergoodsbrand_seller"
,
rgroup
=
"商品管理"
)
@RequestMapping
({
"/design/decorate_works_edit.htm"
})
public
ModelAndView
usergoodsbrand_edit
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
id
)
{
ModelAndView
mv
=
new
JModelAndView
(
"user/default/usercenter/decorate_works_edit.html"
,
this
.
configService
.
getSysConfig
(),
this
.
userConfigService
.
getUserConfig
(),
0
,
request
,
response
);
DecorateWork
works
=
null
;
if
((
id
!=
null
)
&&
(!
id
.
equals
(
""
)))
{
works
=
this
.
decorateWork
.
getObjById
(
Long
.
valueOf
(
Long
.
parseLong
(
id
)));
mv
.
addObject
(
"objs"
,
works
);
}
mv
.
addObject
(
"edit"
,
Boolean
.
valueOf
(
true
));
User
user
=
SecurityUserHolder
.
getCurrentUser
();
Decorate
decorate
=
user
.
getDecorate
();
if
(
decorate
==
null
)
{
mv
=
new
JModelAndView
(
"user/default/usercenter/decorate_message.html"
,
this
.
configService
.
getSysConfig
(),
this
.
userConfigService
.
getUserConfig
(),
0
,
request
,
response
);
}
else
{
// 查询装修公司风格
//查询装修公司类别
//mv.addObject("expert", allDesignExpertVoList);
}
return
mv
;
}
/**
*
* @param request
* @param response
* @param id
* @param imgIds
* @param worksName
* @param main_img
* @param introduction
* @param expertId
* @return
*/
@SecurityMapping
(
display
=
false
,
rsequence
=
0
,
title
=
"作品保存"
,
value
=
"/design/decorate_works_save.htm*"
,
rtype
=
"seller"
,
rname
=
"品牌保存"
,
rcode
=
"usergoodsbrand_seller"
,
rgroup
=
"商品管理"
)
@RequestMapping
({
"/design/decorate_works_save.htm"
})
public
ModelAndView
usergoodsbrand_save
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
id
,
String
imgIds
,
String
worksName
,
String
main_img
,
String
introduction
,
String
typeId
,
String
styleId
)
{
ModelAndView
mv
=
new
JModelAndView
(
"user/default/usercenter/works_edit.html"
,
this
.
configService
.
getSysConfig
(),
this
.
userConfigService
.
getUserConfig
(),
0
,
request
,
response
);
WebForm
wf
=
new
WebForm
();
DecorateWork
works
=
null
;
if
(
id
==
null
||
(
""
).
equals
(
id
))
{
works
=
(
DecorateWork
)
wf
.
toPo
(
request
,
DecorateWork
.
class
);
works
.
setAddTime
(
new
Date
());
User
user
=
SecurityUserHolder
.
getCurrentUser
();
works
.
setDecorateWorks
(
user
.
getDecorate
());
}
else
{
DecorateWork
obj
=
this
.
decorateWork
.
getObjById
(
Long
.
valueOf
(
Long
.
parseLong
(
id
)));
works
=
(
DecorateWork
)
wf
.
toPo
(
request
,
obj
);
}
works
.
setWorksName
(
worksName
);
works
.
setIntroduction
(
introduction
);
//保存主图
Accessory
mainImg
=
null
;
if
((
main_img
!=
null
)
&&
(!
main_img
.
equals
(
""
)))
{
mainImg
=
this
.
accessoryService
.
getObjById
(
Long
.
valueOf
(
Long
.
parseLong
(
main_img
)));
}
works
.
setMain_img
(
mainImg
);
//保存图片
works
.
getAccessory
().
clear
();
String
[]
img_ids
=
imgIds
.
split
(
","
);
for
(
int
i
=
0
;
i
<
img_ids
.
length
;
i
++)
{
String
img_id
=
img_ids
[
i
];
if
(!
img_id
.
equals
(
""
))
{
Accessory
img
=
this
.
accessoryService
.
getObjById
(
Long
.
valueOf
(
Long
.
parseLong
(
img_id
)));
works
.
getAccessory
().
add
(
img
);
}
}
//保存类型
//保存风格
if
(
id
==
null
||
(
""
).
equals
(
id
))
{
this
.
decorateWork
.
save
(
works
);
}
else
{
this
.
decorateWork
.
update
(
works
);
}
return
mv
;
}
@SecurityMapping
(
display
=
false
,
rsequence
=
0
,
title
=
"设计师作品列表"
,
value
=
"/design/decorate_work_list.htm*"
,
rtype
=
"seller"
,
rname
=
"作品列表"
,
rcode
=
"usergoodsbrand_seller"
,
rgroup
=
"商品管理"
)
@RequestMapping
({
"/design/decorate_work_list.htm"
})
public
ModelAndView
usergoodsbrand_list
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
currentPage
,
String
orderBy
,
String
orderType
)
{
ModelAndView
mv
=
new
JModelAndView
(
"user/default/usercenter/decorate_work_list.html"
,
this
.
configService
.
getSysConfig
(),
this
.
userConfigService
.
getUserConfig
(),
0
,
request
,
response
);
User
user
=
SecurityUserHolder
.
getCurrentUser
();
Decorate
decorate
=
user
.
getDecorate
();
if
(
decorate
==
null
)
{
mv
.
addObject
(
"state"
,
0
);
mv
.
addObject
(
"message"
,
"没有注册设计师,请先注册。"
);
mv
.
addObject
(
"objs"
,
null
);
}
else
{
DecorateWorkQueryObject
qo
=
new
DecorateWorkQueryObject
(
currentPage
,
mv
,
orderBy
,
orderType
);
qo
.
addQuery
(
"obj.decorateWorks.id"
,
new
SysMap
(
"id"
,
decorate
.
getId
()),
"="
);
qo
.
setOrderBy
(
"addTime"
);
qo
.
setOrderType
(
"desc"
);
IPageList
pList
=
this
.
decorateWork
.
list
(
qo
);
CommUtil
.
saveIPageList2ModelAndView
(
""
,
""
,
""
,
pList
,
mv
);
}
return
mv
;
}
}
src/com/shopping/view/web/action/LoginViewAction.java
View file @
96865929
...
...
@@ -277,8 +277,8 @@ public class LoginViewAction {
String
password
,
String
email
,
String
code
,
String
refereeId
)
throws
HttpException
,
IOException
{
// 获取refereeId推荐人id
if
(
(
refereeId
==
null
)
||
(
refereeId
.
equals
(
""
)))
{
refereeId
=
(
String
)
request
.
getAttribute
(
"refereeId"
);
if
(
!(
refereeId
==
null
)
&&
!
(
refereeId
.
equals
(
""
)))
{
//
refereeId = (String) request.getAttribute("refereeId");
}
else
{
refereeId
=
"32804"
;
}
...
...
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