Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tjmdp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
other-project
tjmdp
Commits
d83ed006
Commit
d83ed006
authored
Apr 25, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
8f8fa6a9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
70 deletions
+90
-70
RainbowPlanWebController.java
...nkun/controller/rainbowplan/RainbowPlanWebController.java
+11
-4
WishDaoImpl.java
src/main/java/com/qiankun/dao/WishDaoImpl.java
+11
-1
AbsDao.java
src/main/java/com/qiankun/dao/core/AbsDao.java
+5
-1
wishlist.jsp
src/main/webapp/WEB-INF/pages/rainbow/wishlist.jsp
+26
-22
wishview.jsp
src/main/webapp/WEB-INF/pages/rainbow/wishview.jsp
+13
-42
buttons.html
src/main/webapp/demo/buttons.html
+0
-0
wish.js
src/main/webapp/resources/js/rainbow/wish.js
+24
-0
No files found.
src/main/java/com/qiankun/controller/rainbowplan/RainbowPlanWebController.java
View file @
d83ed006
...
...
@@ -73,14 +73,21 @@ public class RainbowPlanWebController extends BaseController<Object>{
}
@RequestMapping
(
"/rainbow/wish/view"
)
public
ModelAndView
wishview
(
String
id
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
Wish
wish
=
wishDao
.
find
(
id
);
view
.
getModelMap
().
addAttribute
(
"wish"
,
wish
);
view
.
setViewName
(
"rainbow/wishview"
);
return
view
;
}
@RequestMapping
(
"/rainbow/wish/status/update"
)
public
ModelAndView
wishStatusUpdate
(
@RequestParam
(
value
=
"id[]"
)
String
[]
id
,
String
status
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
wishDao
.
batchUpdateStatus
(
id
,
status
);
return
view
;
}
...
...
src/main/java/com/qiankun/dao/WishDaoImpl.java
View file @
d83ed006
...
...
@@ -98,6 +98,16 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
@Transactional
@Override
public
void
batchUpdateStatus
(
String
[]
id
,
String
status
)
{
public
void
batchUpdateStatus
(
String
[]
ids
,
String
status
)
{
String
sql
=
""
;
for
(
String
id
:
ids
)
{
if
(
StringUtils
.
isBlank
(
sql
))
{
sql
+=
" id='"
+
id
+
"'"
;
}
else
{
sql
+=
" or id='"
+
id
+
"'"
;
}
}
super
.
excuteBySql
(
UPDATE_STATUS_BY_IDS
+
sql
,
status
);
}
}
src/main/java/com/qiankun/dao/core/AbsDao.java
View file @
d83ed006
...
...
@@ -182,8 +182,12 @@ public class AbsDao<E, K extends Serializable> implements IDao<E, K> {
return
hql
.
toString
();
}
public
void
excuteBySql
(
String
sql
)
{
public
void
excuteBySql
(
String
sql
,
final
Object
...
values
)
{
SQLQuery
query
=
this
.
getSession
().
createSQLQuery
(
sql
);
if
(
values
!=
null
)
{
for
(
int
i
=
0
;
i
<
values
.
length
;
i
++)
query
.
setParameter
(
i
,
values
[
i
]);
}
query
.
executeUpdate
();
}
...
...
src/main/webapp/WEB-INF/pages/rainbow/wishlist.jsp
View file @
d83ed006
...
...
@@ -63,18 +63,17 @@
<span class="lbl"></span>
</label>
</th>
<th width="
5%
">图片</th>
<th width="">图片</th>
<th width="">小朋友</th>
<th width="">愿望</th>
<th width="">内容</th>
<th width="
10%
">愿望</th>
<th width="
20%
">内容</th>
<th width="">爱心人士</th>
<th width="">寄送方式</th>
<th width="">快递公司</th>
<th width="">快递单号</th>
<th width="">所属活动</th>
<th width="">状态</th>
<th width="">发布时间</th>
<
th width="5%">操作</th
>
<th width="
5%
">发布时间</th>
<
!-- <th width="5%">操作</th> --
>
</tr>
</thead>
...
...
@@ -88,16 +87,21 @@
</label>
</td>
<td title="" valign="middle"></td>
<td title="">${wish.children.name}<br/>
手机:${wish.children.phone}
<td title="">姓名:${wish.children.name} 楼层床号:${wish.children.bedNum}<br/>
联系方式:${wish.children.phone}<br/>
收件地址:${wish.children.receiveAddress};
</td>
<td title="" valign="middle">${wish.title}</td>
<td title="" valign="middle">${wish.content}</td>
<td title="" valign="middle">${wish.volunteer.name}<br/>
手机:${wish.volunteer.phone}</td>
<td title="" valign="middle"><c:if test="${wish.helpType == 1}">自送</c:if><c:if test="${wish.helpType == 1}">快递</c:if></td>
<td title="" valign="middle">${wish.expressCompany}</td>
<td title="" valign="middle">${wish.expressCode}</td>
<td title="" valign="middle"><div class="slim-scroll" style="overflow: hidden; width: auto; height: 65px;">${wish.content}</div></td>
<td title="" valign="middle">姓名:${wish.volunteer.name}<br/>
手机:${wish.volunteer.phone}<br/>
回寄地址:${wish.volunteer.receiveAddress};
</td>
<td title="" valign="middle"><c:if test="${wish.helpType == 1}">自送</c:if>
<c:if test="${wish.helpType == 2}">快递:${wish.expressCompany}<br>
单号:${wish.expressCode}</c:if></td>
<td title="" valign="middle">${wish.activity.name}</td>
<td title="" valign="middle">
<c:if test="${wish.status == 0}"><span class="label label-warning">发布</span></c:if>
...
...
@@ -109,23 +113,23 @@
<td title="" valign="middle"><fmt:formatDate value='${wish.createTime}' pattern='yyyy-MM-dd HH:mm' /></td>
<td>
<
%-- <
td>
<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
<
%-- <
button class="btn btn-xs btn-info" onclick="window.location.href='<webpath:path/>/rainbow/user/add?id=${user.id}'">
<button class="btn btn-xs btn-info" onclick="window.location.href='<webpath:path/>/rainbow/user/add?id=${user.id}'">
<i class="icon-credit-card bigger-120"></i>
</button>
--%>
<
!-- <button class="btn btn-xs btn-danger
">
<i class="icon-
trash
bigger-120"></i>
</
button> --
>
<
a class="btn btn-xs btn-link" title="详细信息" href="<webpath:path/>/rainbow/wish/view?id=${wish.id}
">
<i class="icon-
list-alt
bigger-120"></i>
</
a
>
</div>
</td>
</td>
--%>
</tr>
</c:forEach>
</tbody>
...
...
src/main/webapp/WEB-INF/pages/rainbow/
saveuser
.jsp
→
src/main/webapp/WEB-INF/pages/rainbow/
wishview
.jsp
View file @
d83ed006
...
...
@@ -22,8 +22,8 @@
<a href="#">首页</a>
</li>
<li class="active">彩虹计划</li>
<li class="active">
用户
</li>
<li class="active">
保存
</li>
<li class="active">
愿望管理
</li>
<li class="active">
${wish.children.name}
</li>
</ul><!-- .breadcrumb -->
...
...
@@ -33,11 +33,11 @@
<div class="col-xs-12">
<form action="#" id="
userForm" name="userForm
" method="post" onsubmit="return false" class="form-horizontal" role="form">
<input type="hidden" id="id" name="id" value="${user.id}"/>
<form action="#" id="
" name="
" method="post" onsubmit="return false" class="form-horizontal" role="form">
<div class="row">
<div class="col-xs-12">
<h3 class="header smaller lighter blue">
用户信息
</h3></div>
<h3 class="header smaller lighter blue">
${wish.children.name}
</h3></div>
</div>
...
...
@@ -45,65 +45,41 @@
<div class="col-xs-4">
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">
用户类型
</label>
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">
愿望
</label>
<div class="col-sm-9">
<select class="col-xs-10 col-sm-10" id="type" name="type">
<option value="0" <c:if test="${user.type==0}">selected</c:if>>小朋友</option>
<option value="1" <c:if test="${user.type==1}">selected</c:if>>爱心人士</option>
</select>
${wish.title}
</div>
</div>
<div class="form-group children">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">
状态
</label>
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">
内容
</label>
<div class="col-sm-9">
<select class="col-xs-10 col-sm-10" id="status" name="status">
<option value="0" <c:if test="${user.status==0}">selected</c:if>>未审核</option>
<option value="1" <c:if test="${user.status==1}">selected</c:if>>已审核</option>
</select>
<textarea rows="4" class="col-xs-10 col-sm-10" >${wish.content}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> <font color="red">*</font>
姓名
</label>
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> <font color="red">*</font>
图片
</label>
<div class="col-sm-9">
<i
nput type="text" id="name" name="name" value="${user.name}" class="col-xs-10 col-sm-10
" />
<i
mg src="<webpath:path/>/loadResource?imageName=${wish.uploadImage}
" />
</div>
</div>
<div class="form-group children">
<label class="col-sm-3 control-label no-padding-right" for="form-input-readonly">
昵称
</label>
<label class="col-sm-3 control-label no-padding-right" for="form-input-readonly">
状态
</label>
<div class="col-sm-9">
<input type="text" id="nickName" name="nickName" value="${user.nickName}" class="col-xs-10 col-sm-10" />
${wish.status}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 性别 </label>
<div class="col-sm-9">
<label>
<input name="gender" type="radio" class="ace" value="男" <c:if test="${user.gender=='男'}">checked</c:if>>
<span class="lbl"> 男</span>
</label>
<label>
<input name="gender" type="radio" class="ace" value="女" <c:if test="${user.gender=='女'}">checked</c:if>>
<span class="lbl"> 女</span>
</label>
</div>
</div>
<div class="form-group children">
...
...
@@ -343,12 +319,7 @@
<div class="col-md-offset-3 col-md-9">
<button class="btn btn-sm btn-success" type="submit">
<i class="icon-save bigger-110"></i>
保存
</button>
<a class="btn btn-sm btn-success" href="javascript:history.go(-1)">
<i class="icon-reply bigger-110"></i>
返回
...
...
src/main/webapp/demo/buttons.html
View file @
d83ed006
This diff is collapsed.
Click to expand it.
src/main/webapp/resources/js/rainbow/wish.js
View file @
d83ed006
...
...
@@ -4,6 +4,13 @@ $(document).ready(function(){
allowClear
:
true
});
$
(
'.slim-scroll'
).
each
(
function
()
{
var
$this
=
$
(
this
);
$this
.
slimScroll
({
height
:
$this
.
data
(
'height'
)
||
65
,
railVisible
:
true
});
});
})
...
...
@@ -102,6 +109,23 @@ var wish = {
status
:
$
(
"#changeStatus"
).
val
(),
id
:
ids
},
success
:
function
(
data
){
$
(
".layui-layer-close"
).
click
();
bootbox
.
dialog
({
message
:
"修改状态成功"
,
buttons
:{
"success"
:{
"label"
:
"确定"
,
"className"
:
"btn-sm btn-primary"
,
"callback"
:
function
()
{
window
.
location
.
reload
();
}
}
}
});
}
})
}
...
...
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