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
e76e282e
Commit
e76e282e
authored
Apr 16, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
2b72dc2f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
85 additions
and
36 deletions
+85
-36
ActivityController.java
src/main/java/com/qiankun/controller/ActivityController.java
+20
-14
User.java
src/main/java/com/qiankun/entity/User.java
+15
-0
ActivityVo.java
src/main/java/com/qiankun/vo/ActivityVo.java
+28
-0
activitylist.jsp
src/main/webapp/WEB-INF/pages/activity/activitylist.jsp
+12
-12
saveactivity.jsp
src/main/webapp/WEB-INF/pages/activity/saveactivity.jsp
+8
-8
userlist.jsp
src/main/webapp/WEB-INF/pages/user/userlist.jsp
+1
-1
activity.js
src/main/webapp/resources/js/activity/activity.js
+1
-1
No files found.
src/main/java/com/qiankun/controller/ActivityController.java
View file @
e76e282e
...
...
@@ -19,9 +19,13 @@ import org.springframework.web.servlet.ModelAndView;
import
com.qiankun.annotation.Auth
;
import
com.qiankun.controller.base.BaseController
;
import
com.qiankun.dao.core.Hints
;
import
com.qiankun.entity.Activity
;
import
com.qiankun.entity.User
;
import
com.qiankun.pages.IPageList
;
import
com.qiankun.service.ActivityService
;
import
com.qiankun.vo.ActivityVo
;
import
com.qiankun.vo.UserVo
;
@Controller
public
class
ActivityController
extends
BaseController
<
Object
>{
...
...
@@ -30,26 +34,31 @@ public class ActivityController extends BaseController<Object>{
private
ActivityService
activityService
;
@RequestMapping
(
"/activity/list"
)
public
ModelAndView
list
()
throws
Exception
{
public
ModelAndView
list
(
ActivityVo
activityVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
IPageList
<
Activity
>
userPage
=
activityService
.
findByActivitys
(
activityVo
.
getSearchStr
(),
activityVo
.
getType
(),
activityVo
.
getOrder
(),
activityVo
.
getSort
(),
new
Hints
(
getStartRow
(
request
),
getPageCount
(
request
)));
view
.
getModelMap
().
addAttribute
(
"activityPage"
,
userPage
);
view
.
getModelMap
().
addAttribute
(
"pageCount"
,
getPageCount
(
request
));
view
.
getModelMap
().
addAttribute
(
"pageNumber"
,
getPageNumber
(
request
));
view
.
getModelMap
().
addAttribute
(
"activityVo"
,
activityVo
);
view
.
setViewName
(
"activity/activitylist"
);
return
view
;
}
@RequestMapping
(
"/activity/add"
)
public
ModelAndView
userAdd
(
String
id
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
Activity
Vo
vo
=
new
ActivityVo
();
ModelAndView
view
=
new
ModelAndView
();
Activity
activity
=
new
Activity
();
if
(
StringUtils
.
isNotBlank
(
id
))
{
Activity
activity
=
activityService
.
findById
(
id
);
activity
=
activityService
.
findById
(
id
);
}
view
.
setViewName
(
"activity/saveactivity"
);
view
.
getModel
().
put
(
"dict"
,
dict
());
view
.
getModel
().
put
(
"activity"
,
vo
);
view
.
getModel
().
put
(
"activity"
,
activity
);
return
view
;
}
...
...
@@ -93,10 +102,7 @@ public class ActivityController extends BaseController<Object>{
return
map
;
}
...
...
src/main/java/com/qiankun/entity/User.java
View file @
e76e282e
...
...
@@ -61,6 +61,9 @@ public class User {
@Lob
private
String
remark
;
//备注
private
String
origin
;
//用户来源
private
String
referrals
;
//推荐人
private
String
pwd
;
//密码
...
...
@@ -330,6 +333,18 @@ public class User {
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getOrigin
()
{
return
origin
;
}
public
void
setOrigin
(
String
origin
)
{
this
.
origin
=
origin
;
}
public
String
getReferrals
()
{
return
referrals
;
}
public
void
setReferrals
(
String
referrals
)
{
this
.
referrals
=
referrals
;
}
...
...
src/main/java/com/qiankun/vo/ActivityVo.java
View file @
e76e282e
...
...
@@ -23,6 +23,10 @@ private String id;
private
String
contacts
;
//联系人
private
String
tel
;
//联系电话
private
String
searchStr
;
private
String
order
;
private
String
sort
;
public
String
getId
()
{
return
id
;
...
...
@@ -113,6 +117,30 @@ private String id;
this
.
tel
=
tel
;
}
public
String
getSearchStr
()
{
return
searchStr
;
}
public
void
setSearchStr
(
String
searchStr
)
{
this
.
searchStr
=
searchStr
;
}
public
String
getOrder
()
{
return
order
;
}
public
void
setOrder
(
String
order
)
{
this
.
order
=
order
;
}
public
String
getSort
()
{
return
sort
;
}
public
void
setSort
(
String
sort
)
{
this
.
sort
=
sort
;
}
...
...
src/main/webapp/WEB-INF/pages/activity/activitylist.jsp
View file @
e76e282e
...
...
@@ -75,7 +75,7 @@
<tbody>
<c:forEach var="activity" items="${activityPage.records}">
<tr class="tr-highlight">
<td class="center" width=10>
<label>
...
...
@@ -84,21 +84,21 @@
</label>
</td>
<td title=""></td>
<td title=""></td>
<td title=""></td>
<td title=""></td>
<td title=""></td>
<td title=""></td>
<td title=""></td>
<td title=""></td>
<td title=""></td>
<td title="">
${activity.name}
</td>
<td title="">
${activity.type}
</td>
<td title="">
${activity.addr}
</td>
<td title=""><
fmt:formatDate value='${activity.day}' pattern='yyyy-MM-dd HH:mm' /><
/td>
<td title="">
${activity.max}
</td>
<td title="">
${activity.crowd}
</td>
<td title="">
${activity.contacts}
</td>
<td title="">
${activity.tel}
</td>
<td title="">
<c:if test="${activity.available}"><font color=green>正常</font></c:if><c:if test="${!activity.available}"><font color=red>关闭</font></c:if>
</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/>/'">
<button class="btn btn-xs btn-info" onclick="window.location.href='<webpath:path/>/
activity/add?id=${activity.id}
'">
<i class="icon-edit bigger-120"></i>
</button>
...
...
@@ -114,7 +114,7 @@
</td>
</tr>
</c:forEach>
...
...
src/main/webapp/WEB-INF/pages/activity/saveactivity.jsp
View file @
e76e282e
...
...
@@ -47,9 +47,9 @@
<div class="col-sm-9">
<select class="col-xs-10 col-sm-10" id="type" name="type">
<option value="1" <c:if test="${activity.type
==
1}">selected</c:if>>采血</option>
<option value="2" <c:if test="${activity.type
==
2}">selected</c:if>>公益</option>
<option value="3" <c:if test="${activity.type
==
3}">selected</c:if>>彩虹</option>
<option value="1" <c:if test="${activity.type
==
1}">selected</c:if>>采血</option>
<option value="2" <c:if test="${activity.type
==
2}">selected</c:if>>公益</option>
<option value="3" <c:if test="${activity.type
==
3}">selected</c:if>>彩虹</option>
</select>
</div>
...
...
@@ -59,7 +59,7 @@
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> <font color="red">*</font> 活动名称 </label>
<div class="col-sm-9">
<input type="text" id="name" name="name"
value="" class="col-xs-10 col-sm-10"
/>
<input type="text" id="name" name="name"
class="col-xs-10 col-sm-10" value="${activity.name}"
/>
</div>
</div>
...
...
@@ -70,7 +70,7 @@
<div class="col-sm-9">
<input type="text" id="addr" name="addr"
value="" class="col-xs-10 col-sm-10"
/>
<input type="text" id="addr" name="addr"
class="col-xs-10 col-sm-10" value="${activity.addr}"
/>
...
...
@@ -83,7 +83,7 @@
<label class="col-sm-3 control-label no-padding-right" for="form-input-readonly"> <font color="red">*</font> 活动时间 </label>
<div class="col-sm-9">
<input class="col-xs-10 col-sm-10" id="day" name="day" type="text" autocomplete="off" data-date-format="yyyy-mm-dd hh:ss" value="
${activity.day}
"/>
<input class="col-xs-10 col-sm-10" id="day" name="day" type="text" autocomplete="off" data-date-format="yyyy-mm-dd hh:ss" value="
<fmt:formatDate value='${activity.day}' pattern='yyyy-MM-dd HH:mm' />
"/>
</div>
</div>
...
...
@@ -115,12 +115,12 @@
<div class="form-group">
<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">
<select name="available" id="available" class="col-xs-10 col-sm-10">
<option value="true" <c:if test="${activity.available}">selected</c:if>>
可用
</option>
<option value="true" <c:if test="${activity.available}">selected</c:if>>
正常
</option>
<option value="false" <c:if test="${activity.available}">selected</c:if>>关闭</option>
</select>
...
...
src/main/webapp/WEB-INF/pages/user/userlist.jsp
View file @
e76e282e
...
...
@@ -104,7 +104,7 @@
普通用户
</c:if>
</td>
<td title="
${user.createTime}">${user.createTime}
</td>
<td title="
<fmt:formatDate value='${user.createTime}' pattern='yyyy-MM-dd HH:mm:ss' />"><fmt:formatDate value='${user.createTime}' pattern='yyyy-MM-dd HH:mm:ss' />
</td>
<td>
<c:if test="${user.status==0 || user.status==null}">
...
...
src/main/webapp/resources/js/activity/activity.js
View file @
e76e282e
...
...
@@ -99,7 +99,7 @@ var activity = {
name
:
$
(
'#name'
).
val
(),
type
:
$
(
'#type'
).
val
(),
addr
:
$
(
'#addr'
).
val
(),
content
:
$
(
'#content'
).
htm
l
(),
content
:
$
(
'#content'
).
va
l
(),
day
:
$
(
'#day'
).
val
(),
max
:
$
(
'#max'
).
val
(),
crowd
:
$
(
'#crowd'
).
val
(),
...
...
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