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
f993e967
Commit
f993e967
authored
Apr 25, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
c00b036d
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
184 additions
and
59 deletions
+184
-59
RainbowPlanController.java
...qiankun/controller/rainbowplan/RainbowPlanController.java
+53
-31
RainbowPlanWebController.java
...nkun/controller/rainbowplan/RainbowPlanWebController.java
+24
-6
WishDao.java
src/main/java/com/qiankun/dao/WishDao.java
+3
-1
WishDaoImpl.java
src/main/java/com/qiankun/dao/WishDaoImpl.java
+15
-4
WishVo.java
src/main/java/com/qiankun/vo/WishVo.java
+3
-3
main.jsp
src/main/webapp/WEB-INF/decorators/main.jsp
+1
-1
userlist.jsp
src/main/webapp/WEB-INF/pages/rainbow/userlist.jsp
+17
-6
wishlist.jsp
src/main/webapp/WEB-INF/pages/rainbow/wishlist.jsp
+19
-5
wishview.jsp
src/main/webapp/WEB-INF/pages/rainbow/wishview.jsp
+1
-1
rainbowuser.js
src/main/webapp/resources/js/rainbow/rainbowuser.js
+38
-0
wish.js
src/main/webapp/resources/js/rainbow/wish.js
+10
-1
No files found.
src/main/java/com/qiankun/controller/rainbowplan/RainbowPlanController.java
View file @
f993e967
package
com
.
qiankun
.
controller
.
rainbowplan
;
package
com
.
qiankun
.
controller
.
rainbowplan
;
import
cn.binarywang.wx.miniapp.api.WxMaQrcodeService
;
import
java.io.File
;
import
cn.binarywang.wx.miniapp.api.WxMaService
;
import
java.io.IOException
;
import
cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.ResourceBundle
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang3.RandomUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
...
@@ -21,31 +47,19 @@ import com.qiankun.entity.WishReply;
...
@@ -21,31 +47,19 @@ import com.qiankun.entity.WishReply;
import
com.qiankun.pages.IPageList
;
import
com.qiankun.pages.IPageList
;
import
com.qiankun.service.ActivityService
;
import
com.qiankun.service.ActivityService
;
import
com.qiankun.utils.JwtTokenUtil
;
import
com.qiankun.utils.JwtTokenUtil
;
import
com.qiankun.vo.*
;
import
com.qiankun.vo.ImportWishVo
;
import
me.chanjar.weixin.common.error.WxErrorException
;
import
com.qiankun.vo.PublishWish
;
import
org.apache.commons.collections.CollectionUtils
;
import
com.qiankun.vo.ReceiveWishVo
;
import
org.apache.commons.io.FileUtils
;
import
com.qiankun.vo.RegisterInfo
;
import
org.apache.commons.lang3.RandomUtils
;
import
com.qiankun.vo.SendWishVo
;
import
org.apache.commons.lang3.StringUtils
;
import
com.qiankun.vo.UserInfo
;
import
org.dom4j.util.UserDataDocumentFactory
;
import
com.qiankun.vo.WishDetailVo
;
import
org.slf4j.Logger
;
import
com.qiankun.vo.WishReplyVo
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.scheduling.support.SimpleTriggerContext
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
cn.binarywang.wx.miniapp.api.WxMaQrcodeService
;
import
java.io.File
;
import
cn.binarywang.wx.miniapp.api.WxMaService
;
import
java.io.IOException
;
import
cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult
;
import
java.util.Date
;
import
me.chanjar.weixin.common.error.WxErrorException
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.ResourceBundle
;
@RestController
@RestController
@RequestMapping
(
"/wx/rainbowplan"
)
@RequestMapping
(
"/wx/rainbowplan"
)
...
@@ -273,7 +287,7 @@ public class RainbowPlanController extends BaseController<Object> {
...
@@ -273,7 +287,7 @@ public class RainbowPlanController extends BaseController<Object> {
wish
.
setChildren
(
user
);
wish
.
setChildren
(
user
);
wish
.
setActivity
(
activityService
.
findById
(
publishWish
.
getActivityId
()));
wish
.
setActivity
(
activityService
.
findById
(
publishWish
.
getActivityId
()));
wish
.
setVolunteer
(
null
);
wishDao
.
save
(
wish
);
wishDao
.
save
(
wish
);
}
else
{
}
else
{
throw
new
Exception
(
"保存失败,请上传图片"
);
throw
new
Exception
(
"保存失败,请上传图片"
);
...
@@ -538,6 +552,11 @@ public class RainbowPlanController extends BaseController<Object> {
...
@@ -538,6 +552,11 @@ public class RainbowPlanController extends BaseController<Object> {
wish
.
setStatus
(
Wish
.
STATUS_PUBLISH
);
wish
.
setStatus
(
Wish
.
STATUS_PUBLISH
);
wish
.
setRainbowPlanUserId
(
user
.
getId
());
wish
.
setRainbowPlanUserId
(
user
.
getId
());
wish
.
setActivityId
(
activity
.
getId
());
wish
.
setActivityId
(
activity
.
getId
());
wish
.
setChildren
(
user
);
wish
.
setActivity
(
activityService
.
findById
(
activity
.
getId
()));
wish
.
setVolunteer
(
null
);
wishDao
.
save
(
wish
);
wishDao
.
save
(
wish
);
}
else
{
}
else
{
throw
new
Exception
(
"保存失败,请上传图片"
);
throw
new
Exception
(
"保存失败,请上传图片"
);
...
@@ -563,16 +582,19 @@ public class RainbowPlanController extends BaseController<Object> {
...
@@ -563,16 +582,19 @@ public class RainbowPlanController extends BaseController<Object> {
user
.
setConnectTel
(
user
.
getPhone
());
user
.
setConnectTel
(
user
.
getPhone
());
userDao
.
save
(
user
);
userDao
.
save
(
user
);
//RainbowPlanUser user = userDao.find("7c32956c-7838-42b1-9462-be7364a1d566");
Wish
wish
=
new
Wish
();
Wish
wish
=
new
Wish
();
wish
.
setContent
(
"测试心愿测试心愿测试心愿测试心愿测试心愿测试心愿测试心愿"
);
wish
.
setContent
(
"测试心愿测试心愿测试心愿测试心愿测试心愿测试心愿测试心愿"
);
wish
.
setUploadImage
(
"/rainbowplan/wishUploadImage/wxd097672957e48ba8.o6zAJs19Nssw1OXAZZr6YDF-tx6U.0fpELldkHhwg5d73b7fa0dc34be23d4dca9ebe797b28.jpeg"
);
wish
.
setUploadImage
(
"/rainbowplan/wishUploadImage/wxd097672957e48ba8.o6zAJs19Nssw1OXAZZr6YDF-tx6U.0fpELldkHhwg5d73b7fa0dc34be23d4dca9ebe797b28.jpeg"
);
wish
.
setStatus
(
Wish
.
STATUS_PUBLISH
);
wish
.
setStatus
(
Wish
.
STATUS_PUBLISH
);
wish
.
setRainbowPlanUserId
(
user
.
getId
());
wish
.
setRainbowPlanUserId
(
user
.
getId
());
wish
.
setChildren
(
user
);
wish
.
setChildren
(
user
);
wish
.
setActivityId
(
"
0d734916-e53f-4fb6-82cc-ff812d8a429d
"
);
wish
.
setActivityId
(
"
322aa53a-a641-41e7-8aab-6f46b204c264
"
);
wish
.
setActivity
(
activityService
.
findById
(
"
0d734916-e53f-4fb6-82cc-ff812d8a429d
"
));
wish
.
setActivity
(
activityService
.
findById
(
"
322aa53a-a641-41e7-8aab-6f46b204c264
"
));
RainbowPlanUser
volunteer
=
userDao
.
find
(
"
a23bcd0d-2ad6-4ab1-b16d-199056e9ed95
"
);
RainbowPlanUser
volunteer
=
userDao
.
find
(
"
f2a9680b-1901-45a6-8da3-fe18aa95181b
"
);
wish
.
setVolunteer
(
volunteer
);
wish
.
setVolunteer
(
volunteer
);
wishDao
.
save
(
wish
);
wishDao
.
save
(
wish
);
...
...
src/main/java/com/qiankun/controller/rainbowplan/RainbowPlanWebController.java
View file @
f993e967
...
@@ -5,6 +5,7 @@ import java.util.List;
...
@@ -5,6 +5,7 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -39,16 +40,15 @@ public class RainbowPlanWebController extends BaseController<Object>{
...
@@ -39,16 +40,15 @@ public class RainbowPlanWebController extends BaseController<Object>{
public
ModelAndView
userlist
(
RainbowPlanUserVo
userVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
ModelAndView
userlist
(
RainbowPlanUserVo
userVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
ModelAndView
view
=
new
ModelAndView
();
List
<
Activity
>
activitylist
=
activityService
.
findByAavailableAndType
(
true
,
"3"
);
IPageList
<
RainbowPlanUser
>
userPage
=
userDao
.
findUserPage
(
userVo
.
getSearchStr
(),
userVo
.
getType
(),
userVo
.
getStatus
(),
userVo
.
getOrder
(),
userVo
.
getSort
(),
IPageList
<
RainbowPlanUser
>
userPage
=
userDao
.
findUserPage
(
userVo
.
getSearchStr
(),
userVo
.
getType
(),
userVo
.
getStatus
(),
userVo
.
getOrder
(),
userVo
.
getSort
(),
new
Hints
(
getStartRow
(
request
),
getPageCount
(
request
)));
new
Hints
(
getStartRow
(
request
),
getPageCount
(
request
)));
view
.
getModelMap
().
addAttribute
(
"activitylist"
,
activitylist
);
view
.
getModelMap
().
addAttribute
(
"userPage"
,
userPage
);
view
.
getModelMap
().
addAttribute
(
"userPage"
,
userPage
);
view
.
getModelMap
().
addAttribute
(
"pageCount"
,
getPageCount
(
request
));
view
.
getModelMap
().
addAttribute
(
"pageCount"
,
getPageCount
(
request
));
view
.
getModelMap
().
addAttribute
(
"pageNumber"
,
getPageNumber
(
request
));
view
.
getModelMap
().
addAttribute
(
"pageNumber"
,
getPageNumber
(
request
));
view
.
getModelMap
().
addAttribute
(
"userVo"
,
userVo
);
view
.
getModelMap
().
addAttribute
(
"userVo"
,
userVo
);
view
.
setViewName
(
"rainbow/userlist"
);
view
.
setViewName
(
"rainbow/userlist"
);
return
view
;
return
view
;
}
}
...
@@ -60,7 +60,8 @@ public class RainbowPlanWebController extends BaseController<Object>{
...
@@ -60,7 +60,8 @@ public class RainbowPlanWebController extends BaseController<Object>{
List
<
Activity
>
activitylist
=
activityService
.
findByAavailableAndType
(
null
,
"3"
);
List
<
Activity
>
activitylist
=
activityService
.
findByAavailableAndType
(
null
,
"3"
);
IPageList
<
Wish
>
wishPage
=
wishDao
.
findPages
(
wishVo
.
getSearchStr
(),
wishVo
.
getActivityId
(),
wishVo
.
getOrder
(),
wishVo
.
getSort
(),
new
Hints
(
getStartRow
(
request
),
getPageCount
(
request
)));
IPageList
<
Wish
>
wishPage
=
wishDao
.
findPages
(
wishVo
.
getSearchStr
(),
wishVo
.
getActivityId
(),
wishVo
.
getStatus
(),
wishVo
.
getOrder
(),
wishVo
.
getSort
(),
new
Hints
(
getStartRow
(
request
),
getPageCount
(
request
)));
view
.
getModelMap
().
addAttribute
(
"activitylist"
,
activitylist
);
view
.
getModelMap
().
addAttribute
(
"activitylist"
,
activitylist
);
view
.
getModelMap
().
addAttribute
(
"wishPage"
,
wishPage
);
view
.
getModelMap
().
addAttribute
(
"wishPage"
,
wishPage
);
...
@@ -75,9 +76,15 @@ public class RainbowPlanWebController extends BaseController<Object>{
...
@@ -75,9 +76,15 @@ public class RainbowPlanWebController extends BaseController<Object>{
@RequestMapping
(
"/rainbow/wish/view"
)
@RequestMapping
(
"/rainbow/wish/view"
)
public
ModelAndView
wishview
(
String
id
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
ModelAndView
wishview
(
String
id
,
String
userId
,
String
activityId
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
ModelAndView
view
=
new
ModelAndView
();
Wish
wish
=
wishDao
.
find
(
id
);
Wish
wish
=
new
Wish
();
if
(
StringUtils
.
isNotBlank
(
id
))
{
wish
=
wishDao
.
find
(
id
);
}
else
{
wish
.
setActivityId
(
activityId
);
wish
.
setRainbowPlanUserId
(
userId
);
}
view
.
getModelMap
().
addAttribute
(
"wish"
,
wish
);
view
.
getModelMap
().
addAttribute
(
"wish"
,
wish
);
view
.
setViewName
(
"rainbow/wishview"
);
view
.
setViewName
(
"rainbow/wishview"
);
return
view
;
return
view
;
...
@@ -90,5 +97,16 @@ public class RainbowPlanWebController extends BaseController<Object>{
...
@@ -90,5 +97,16 @@ public class RainbowPlanWebController extends BaseController<Object>{
return
view
;
return
view
;
}
}
@RequestMapping
(
"/rainbow/wish/validate"
)
public
ModelAndView
wishvalidate
(
String
userId
,
String
activityId
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
Long
count
=
wishDao
.
countByUserIdAndActivityId
(
userId
,
activityId
);
if
(
count
==
0
)
{
view
.
getModelMap
().
addAttribute
(
"message"
,
"success"
);
}
else
{
view
.
getModelMap
().
addAttribute
(
"message"
,
"no"
);
}
return
view
;
}
}
}
src/main/java/com/qiankun/dao/WishDao.java
View file @
f993e967
...
@@ -17,7 +17,9 @@ public interface WishDao extends IDao<Wish,String> {
...
@@ -17,7 +17,9 @@ public interface WishDao extends IDao<Wish,String> {
IPageList
<
Wish
>
findByVolunteeId
(
String
id
,
Hints
hints
);
IPageList
<
Wish
>
findByVolunteeId
(
String
id
,
Hints
hints
);
IPageList
<
Wish
>
findPages
(
String
searchStr
,
String
activityId
,
String
order
,
String
sort
,
Hints
hints
);
IPageList
<
Wish
>
findPages
(
String
searchStr
,
String
activityId
,
Integer
status
,
String
order
,
String
sort
,
Hints
hints
);
void
batchUpdateStatus
(
String
[]
id
,
String
status
);
void
batchUpdateStatus
(
String
[]
id
,
String
status
);
Long
countByUserIdAndActivityId
(
String
userId
,
String
activityId
);
}
}
src/main/java/com/qiankun/dao/WishDaoImpl.java
View file @
f993e967
...
@@ -17,9 +17,15 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
...
@@ -17,9 +17,15 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
private
static
final
String
FIND_BY_RAINBOWPLANUSERID_SQL
=
" from Wish where rainbowPlanUserId = ? and activityId = ? order by createTime desc"
;
private
static
final
String
FIND_BY_RAINBOWPLANUSERID_SQL
=
" from Wish where rainbowPlanUserId = ? and activityId = ? order by createTime desc"
;
private
static
final
String
FIND_BY_AVAILABLE_ACTIVITY_SQL
=
" from Wish where activityId = ? order by status asc,createTime desc"
;
private
static
final
String
FIND_BY_AVAILABLE_ACTIVITY_SQL
=
" from Wish where activityId = ? order by status asc,createTime desc"
;
private
static
final
String
FIND_BY_VOLUNTEE_ID
=
" from Wish where volunteerId = ? order by createTime desc"
;
private
static
final
String
FIND_BY_VOLUNTEE_ID
=
" from Wish where volunteerId = ? order by createTime desc"
;
private
static
final
String
FIND_BY_USERID_ACTIVITYID
=
" from Wish where children.id=? and activity.id=?"
;
private
static
final
String
UPDATE_STATUS_BY_IDS
=
"UPDATE wish w SET w.status = ? WHERE "
;
private
static
final
String
UPDATE_STATUS_BY_IDS
=
"UPDATE wish w SET w.status = ? WHERE "
;
@Override
public
Long
countByUserIdAndActivityId
(
String
userId
,
String
activityId
)
{
return
findCount
(
" select count(*) "
+
FIND_BY_USERID_ACTIVITYID
,
userId
,
activityId
);
}
@Override
@Override
public
IPageList
<
Wish
>
findByRainbowPlanUserId
(
String
userId
,
String
activityId
,
Hints
hints
)
{
public
IPageList
<
Wish
>
findByRainbowPlanUserId
(
String
userId
,
String
activityId
,
Hints
hints
)
{
IPageList
<
Wish
>
wishPageList
=
new
PageListImpl
<
Wish
>();
IPageList
<
Wish
>
wishPageList
=
new
PageListImpl
<
Wish
>();
...
@@ -31,7 +37,7 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
...
@@ -31,7 +37,7 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
@Override
@Override
public
IPageList
<
Wish
>
findPages
(
String
searchStr
,
String
activityId
,
String
order
,
String
sort
,
Hints
hints
)
{
public
IPageList
<
Wish
>
findPages
(
String
searchStr
,
String
activityId
,
Integer
status
,
String
order
,
String
sort
,
Hints
hints
)
{
String
hql
=
""
;
String
hql
=
""
;
if
(
StringUtils
.
isNotBlank
(
searchStr
))
{
if
(
StringUtils
.
isNotBlank
(
searchStr
))
{
...
@@ -41,7 +47,6 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
...
@@ -41,7 +47,6 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
hql
+=
" and "
;
hql
+=
" and "
;
}
}
String
param
=
"%"
+
searchStr
+
"%"
;
String
param
=
"%"
+
searchStr
+
"%"
;
hql
+=
" children.phone like '"
+
param
+
"' or volunteer.phone like '"
+
param
+
"' or children.name like '"
+
param
+
"' or volunteer.name like '"
+
param
+
"' "
;
hql
+=
" children.phone like '"
+
param
+
"' or volunteer.phone like '"
+
param
+
"' or children.name like '"
+
param
+
"' or volunteer.name like '"
+
param
+
"' "
;
}
}
...
@@ -51,10 +56,16 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
...
@@ -51,10 +56,16 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
}
else
{
}
else
{
hql
+=
" and "
;
hql
+=
" and "
;
}
}
hql
+=
" activity.id= '"
+
activityId
+
"'"
;
hql
+=
" activity.id= '"
+
activityId
+
"'"
;
}
if
(
status
!=
null
)
{
if
(
StringUtils
.
isBlank
(
hql
))
{
hql
+=
" where "
;
}
else
{
hql
+=
" and "
;
}
hql
+=
" status = "
+
status
;
}
}
IPageList
<
Wish
>
wishPageList
=
new
PageListImpl
<
Wish
>();
IPageList
<
Wish
>
wishPageList
=
new
PageListImpl
<
Wish
>();
...
...
src/main/java/com/qiankun/vo/WishVo.java
View file @
f993e967
...
@@ -10,7 +10,7 @@ public class WishVo {
...
@@ -10,7 +10,7 @@ public class WishVo {
private
String
title
;
//愿望标题
private
String
title
;
//愿望标题
private
String
content
;
//愿望内容
private
String
content
;
//愿望内容
private
String
uploadImage
;
//上传的图片
private
String
uploadImage
;
//上传的图片
private
int
status
;
//愿望状态,0:发布;1:领取;2.寄送中;3:红会代收;4:完成
private
Integer
status
;
//愿望状态,0:发布;1:领取;2.寄送中;3:红会代收;4:完成
private
String
volunteerId
;
//领取愿望的爱心人士ID
private
String
volunteerId
;
//领取愿望的爱心人士ID
private
String
rainbowPlanUserId
;
//小朋友ID
private
String
rainbowPlanUserId
;
//小朋友ID
private
Date
createTime
=
new
Date
();
private
Date
createTime
=
new
Date
();
...
@@ -74,11 +74,11 @@ public class WishVo {
...
@@ -74,11 +74,11 @@ public class WishVo {
this
.
uploadImage
=
uploadImage
;
this
.
uploadImage
=
uploadImage
;
}
}
public
int
getStatus
()
{
public
Integer
getStatus
()
{
return
status
;
return
status
;
}
}
public
void
setStatus
(
int
status
)
{
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
this
.
status
=
status
;
}
}
...
...
src/main/webapp/WEB-INF/decorators/main.jsp
View file @
f993e967
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
<div
class=
"navbar-header pull-left"
>
<div
class=
"navbar-header pull-left"
>
<a
href=
"#"
class=
"navbar-brand"
>
<a
href=
"#"
class=
"navbar-brand"
>
<small>
<small>
<i
class=
"icon-leaf"
></i>
中国造血干细胞捐献者资料库天津管理中心
中国造血干细胞捐献者资料库天津管理中心
</small>
</small>
</a>
<!-- /.brand -->
</a>
<!-- /.brand -->
...
...
src/main/webapp/WEB-INF/pages/rainbow/userlist.jsp
View file @
f993e967
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
<td title="">
<td title="">
<c:if test="${user.status==0}"><span class="label label-sm label-warning">未审核</span></c:if>
<c:if test="${user.status==0}"><span class="label label-sm label-warning">未审核</span></c:if>
<c:if test="${user.status==1}"><span class="label label-sm label-success">已审核</span></c:if></td>
<c:if test="${user.status==1}"><span class="label label-sm label-success">已审核</span></c:if></td>
<td title=""><c:if test="${user.avatar!=null&&user.avatar!=''}"><img alt="" src="<webpath:path/>/
loadResource?imageName=${user.avatar}"
/></c:if></td>
<td title=""><c:if test="${user.avatar!=null&&user.avatar!=''}"><img alt="" src="<webpath:path/>/
wx/rainbowplan/loadResource?imageName=${user.avatar}" width="60" height="60"
/></c:if></td>
<td title="">${user.phone}</td>
<td title="">${user.phone}</td>
<td title="">${user.name}</td>
<td title="">${user.name}</td>
<td title="">
<td title="">
...
@@ -89,9 +89,9 @@
...
@@ -89,9 +89,9 @@
</button>
</button>
--%>
--%>
<
!-- <button class="btn btn-xs btn-danger
">
<
button class="btn btn-xs btn-success" title="添加愿望" onclick="user.openlayer('${user.id}','${user.name}')
">
<i class="icon-
trash
bigger-120"></i>
<i class="icon-
lightbulb
bigger-120"></i>
</button>
-->
</button>
</div>
</div>
...
@@ -140,9 +140,9 @@
...
@@ -140,9 +140,9 @@
</button>
</button>
--%>
--%>
<
button class="btn btn-xs btn-danger"
>
<
!-- <button class="btn btn-xs btn-danger"
>
<i class="icon-trash bigger-120"></i>
<i class="icon-trash bigger-120"></i>
</button>
</button>
-->
</div>
</div>
...
@@ -171,4 +171,14 @@
...
@@ -171,4 +171,14 @@
</div>
</div>
<script>
var activityHTML = '<div id="message" style="text-align: center;"></div><div style="display: block;margin-left:auto;margin-right:auto;margin-top:20px;text-align: center;">'
+'<select class="" id="activityId" name="activityId"><option value="">请选择活动</option>'
<c:forEach var="list" items="${activitylist}">
activityHTML += '<option value="${list.id}">${list.name}</option>'
</c:forEach>
activityHTML += '</select><button class="btn-xs" onclick="user.validateWish()">确定</button></div>';
</script>
<script src="<webpath:path/>/resources/js/rainbow/rainbowuser.js" type="text/javascript"></script>
<script src="<webpath:path/>/resources/js/rainbow/rainbowuser.js" type="text/javascript"></script>
\ No newline at end of file
src/main/webapp/WEB-INF/pages/rainbow/wishlist.jsp
View file @
f993e967
...
@@ -34,6 +34,11 @@
...
@@ -34,6 +34,11 @@
<div class="col-xs-12">
<div class="col-xs-12">
<div class="widget-toolbox">
<div class="widget-toolbox">
<div class="btn-group">
<div class="btn-group">
<%-- <button class="btn btn-sm btn-success" onclick="window.location.href='<webpath:path/>/rainbow/wish/view'">
<i class="icon-plus bigger-110"></i>
新增
</button> --%>
<button class="btn btn-sm btn-success" onclick="wish.batchUpdateStatus()">
<button class="btn btn-sm btn-success" onclick="wish.batchUpdateStatus()">
<i class="icon-lightbulb bigger-110"></i>
<i class="icon-lightbulb bigger-110"></i>
修改状态
修改状态
...
@@ -43,11 +48,19 @@
...
@@ -43,11 +48,19 @@
</div>
</div>
<div class="pull-right">
<div class="pull-right">
<select class="" id="activityId" name="activityId">
<select class="" id="activityId" name="activityId">
<option value="">请选择</option>
<option value="">请选择
活动
</option>
<c:forEach var="list" items="${activitylist}">
<c:forEach var="list" items="${activitylist}">
<option value="${list.id}" <c:if test="${wishVo.activityId==list.id}">selected</c:if>>${list.name}</option>
<option value="${list.id}" <c:if test="${wishVo.activityId==list.id}">selected</c:if>>${list.name}</option>
</c:forEach>
</c:forEach>
</select>
</select>
<select class="" id="status" name="status">
<option value="">请选择愿望状态</option>
<option value="0" <c:if test="${wishVo.status==0}">selected</c:if>>发布</option>
<option value="1" <c:if test="${wishVo.status==1}">selected</c:if>>认领</option>
<option value="2" <c:if test="${wishVo.status==2}">selected</c:if>>寄送中</option>
<option value="3" <c:if test="${wishVo.status==3}">selected</c:if>>红会代收</option>
<option value="4" <c:if test="${wishVo.status==4}">selected</c:if>>完成</option>
</select>
<input type="text" placeholder="查询" class="nav-search-input" id="searchStr" value="${wishVo.searchStr}" autocomplete="off">
<input type="text" placeholder="查询" class="nav-search-input" id="searchStr" value="${wishVo.searchStr}" autocomplete="off">
<a href="javascript:void(0);" onclick="wish.search();"><i class="icon-search nav-search-icon"></i></a>
<a href="javascript:void(0);" onclick="wish.search();"><i class="icon-search nav-search-icon"></i></a>
</div>
</div>
...
@@ -86,7 +99,7 @@
...
@@ -86,7 +99,7 @@
<span class="lbl"></span>
<span class="lbl"></span>
</label>
</label>
</td>
</td>
<td title="" valign="middle"></td>
<td title="" valign="middle"><
a href="#"><img alt="" src="<webpath:path/>/wx/rainbowplan/loadResource?imageName=${wish.uploadImage}" width="60" height="60"/></a><
/td>
<td title="">姓名:${wish.children.name} 楼层床号:${wish.children.bedNum}<br/>
<td title="">姓名:${wish.children.name} 楼层床号:${wish.children.bedNum}<br/>
联系方式:${wish.children.phone}<br/>
联系方式:${wish.children.phone}<br/>
收件地址:${wish.children.receiveAddress};
收件地址:${wish.children.receiveAddress};
...
@@ -94,9 +107,10 @@
...
@@ -94,9 +107,10 @@
</td>
</td>
<td title="" valign="middle">${wish.title}</td>
<td title="" valign="middle">${wish.title}</td>
<td title="" valign="middle"><div class="slim-scroll" style="overflow: hidden; width: auto; height: 65px;">${wish.content}</div></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/>
<td title="" valign="middle">
<c:if test="${wish.volunteer != null}">姓名:${wish.volunteer.name}<br/>
手机:${wish.volunteer.phone}<br/>
手机:${wish.volunteer.phone}<br/>
回寄地址:${wish.volunteer.receiveAddress}
;
回寄地址:${wish.volunteer.receiveAddress}
</c:if>
</td>
</td>
<td title="" valign="middle"><c:if test="${wish.helpType == 1}">自送</c:if>
<td title="" valign="middle"><c:if test="${wish.helpType == 1}">自送</c:if>
<c:if test="${wish.helpType == 2}">快递:${wish.expressCompany}<br>
<c:if test="${wish.helpType == 2}">快递:${wish.expressCompany}<br>
...
@@ -105,7 +119,7 @@
...
@@ -105,7 +119,7 @@
<td title="" valign="middle">${wish.activity.name}</td>
<td title="" valign="middle">${wish.activity.name}</td>
<td title="" valign="middle">
<td title="" valign="middle">
<c:if test="${wish.status == 0}"><span class="label label-warning">发布</span></c:if>
<c:if test="${wish.status == 0}"><span class="label label-warning">发布</span></c:if>
<c:if test="${wish.status == 1}"><span class="label label-info">
领取
</span></c:if>
<c:if test="${wish.status == 1}"><span class="label label-info">
认领
</span></c:if>
<c:if test="${wish.status == 2}"><span class="label label-purple">寄送中</span></c:if>
<c:if test="${wish.status == 2}"><span class="label label-purple">寄送中</span></c:if>
<c:if test="${wish.status == 3}"><span class="label label-pink">红会代收</span></c:if>
<c:if test="${wish.status == 3}"><span class="label label-pink">红会代收</span></c:if>
<c:if test="${wish.status == 4}"><span class="label label-success">完成</span></c:if>
<c:if test="${wish.status == 4}"><span class="label label-success">完成</span></c:if>
...
...
src/main/webapp/WEB-INF/pages/rainbow/wishview.jsp
View file @
f993e967
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</li>
</li>
<li class="active">彩虹计划</li>
<li class="active">彩虹计划</li>
<li class="active">愿望管理</li>
<li class="active">愿望管理</li>
<li class="active">
${wish.children.name}
</li>
<li class="active">
保存
</li>
</ul><!-- .breadcrumb -->
</ul><!-- .breadcrumb -->
...
...
src/main/webapp/resources/js/rainbow/rainbowuser.js
View file @
f993e967
...
@@ -23,6 +23,44 @@ var user = {
...
@@ -23,6 +23,44 @@ var user = {
}
}
window
.
location
.
href
=
url
;
window
.
location
.
href
=
url
;
},
openlayer
:
function
(
id
,
name
)
{
user
.
userId
=
id
;
layer
.
open
({
type
:
1
,
title
:
name
,
skin
:
'layui-layer-rim'
,
//加上边框
area
:
[
'300px'
,
'200px'
],
//宽高
content
:
activityHTML
,
success
:
function
(
layero
,
index
){
}
});
},
userId
:
""
,
validateWish
:
function
(){
var
activityId
=
$
(
"#activityId"
).
val
()
$
.
ajax
({
type
:
'POST'
,
url
:
'/rainbow/wish/validate'
,
dataType
:
'json'
,
data
:
{
activityId
:
$
(
"#activityId"
).
val
(),
userId
:
user
.
userId
},
success
:
function
(
data
){
if
(
data
.
message
==
"success"
){
$
(
".layui-layer-close"
).
click
();
window
.
location
.
href
=
webPath
+
"/rainbow/wish/view?userId="
+
user
.
userId
+
"&activityId="
+
activityId
;
}
else
{
$
(
"#message"
).
html
(
"已有愿望!"
)
}
}
})
}
}
...
...
src/main/webapp/resources/js/rainbow/wish.js
View file @
f993e967
...
@@ -19,14 +19,23 @@ var wish = {
...
@@ -19,14 +19,23 @@ var wish = {
search
:
function
(){
search
:
function
(){
var
activityId
=
$
(
"#activityId"
).
val
();
var
activityId
=
$
(
"#activityId"
).
val
();
var
searchStr
=
$
(
"#searchStr"
).
val
();
var
searchStr
=
$
(
"#searchStr"
).
val
();
var
status
=
$
(
"#status"
).
val
();
var
url
=
webPath
+
"/rainbow/wish/list"
;
var
url
=
webPath
+
"/rainbow/wish/list"
;
if
(
activityId
!=
""
||
searchStr
!=
""
){
if
(
activityId
!=
""
||
searchStr
!=
""
||
status
!=
""
){
var
param
=
"?"
var
param
=
"?"
if
(
activityId
!=
""
){
if
(
activityId
!=
""
){
param
=
param
+
"activityId="
+
activityId
;
param
=
param
+
"activityId="
+
activityId
;
}
}
if
(
status
!=
""
){
if
(
param
==
"?"
){
param
=
param
+
"status="
+
status
;
}
else
{
param
=
param
+
"&status="
+
status
;
}
}
if
(
searchStr
!=
""
){
if
(
searchStr
!=
""
){
if
(
param
==
"?"
){
if
(
param
==
"?"
){
param
=
param
+
"searchStr="
+
searchStr
;
param
=
param
+
"searchStr="
+
searchStr
;
...
...
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