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
7aa7eb63
Commit
7aa7eb63
authored
May 22, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
eb713584
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
792 additions
and
35 deletions
+792
-35
GiftController.java
src/main/java/com/qiankun/controller/GiftController.java
+101
-0
PointsController.java
src/main/java/com/qiankun/controller/PointsController.java
+1
-0
UserController.java
src/main/java/com/qiankun/controller/UserController.java
+23
-4
GiftDao.java
src/main/java/com/qiankun/dao/GiftDao.java
+8
-0
GiftDaoImpl.java
src/main/java/com/qiankun/dao/GiftDaoImpl.java
+13
-0
Blood.java
src/main/java/com/qiankun/entity/Blood.java
+11
-8
Contacts.java
src/main/java/com/qiankun/entity/Contacts.java
+28
-0
Gift.java
src/main/java/com/qiankun/entity/Gift.java
+20
-0
User.java
src/main/java/com/qiankun/entity/User.java
+18
-1
UserGift.java
src/main/java/com/qiankun/entity/UserGift.java
+43
-20
GiftService.java
src/main/java/com/qiankun/service/GiftService.java
+42
-0
UserVo.java
src/main/java/com/qiankun/vo/UserVo.java
+35
-0
system.properties
src/main/resources/system.properties
+1
-0
main.jsp
src/main/webapp/WEB-INF/decorators/main.jsp
+2
-2
list.jsp
src/main/webapp/WEB-INF/pages/gift/list.jsp
+105
-0
save.jsp
src/main/webapp/WEB-INF/pages/gift/save.jsp
+146
-0
gift.js
src/main/webapp/resources/js/gift/gift.js
+195
-0
No files found.
src/main/java/com/qiankun/controller/GiftController.java
0 → 100644
View file @
7aa7eb63
package
com
.
qiankun
.
controller
;
import
java.io.File
;
import
java.util.ResourceBundle
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
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.multipart.MultipartFile
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.qiankun.controller.base.BaseController
;
import
com.qiankun.entity.Gift
;
import
com.qiankun.service.GiftService
;
@Controller
public
class
GiftController
extends
BaseController
<
Object
>{
@Autowired
private
GiftService
giftService
;
private
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
"system"
);
private
String
giftImagePath
=
File
.
separator
+
rb
.
getString
(
"giftImage"
);
@RequestMapping
(
"/gift/list"
)
public
ModelAndView
list
(
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
view
.
getModelMap
().
addAttribute
(
"gifts"
,
giftService
.
findAll
());
view
.
setViewName
(
"gift/list"
);
return
view
;
}
@RequestMapping
(
"/gift/add"
)
public
ModelAndView
typeAdd
(
String
id
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
Gift
gift
=
new
Gift
();
if
(
StringUtils
.
isNotBlank
(
id
))
{
gift
=
giftService
.
findById
(
id
);
}
view
.
setViewName
(
"gift/save"
);
view
.
getModel
().
put
(
"gift"
,
gift
);
return
view
;
}
@RequestMapping
(
value
=
"/gift/save"
,
method
=
RequestMethod
.
POST
)
public
ModelAndView
saveType
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
file
,
Gift
gift
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
Gift
g
=
new
Gift
();
if
(
StringUtils
.
isNotEmpty
(
gift
.
getId
()))
{
g
=
giftService
.
findById
(
gift
.
getId
());
view
.
getModelMap
().
addAttribute
(
"status"
,
2
);
}
else
{
view
.
getModelMap
().
addAttribute
(
"status"
,
1
);
}
g
.
setName
(
gift
.
getName
());
g
.
setContent
(
gift
.
getContent
());
g
.
setStock
(
gift
.
getStock
());
g
.
setTotal
(
gift
.
getTotal
());
g
.
setPoint
(
gift
.
getPoint
());
if
(
file
!=
null
)
{
String
fileFullName
=
file
.
getOriginalFilename
();
String
[]
originalFileName
=
fileFullName
.
split
(
"\\."
);
String
fileName
=
System
.
currentTimeMillis
()
+
"."
+
originalFileName
[
originalFileName
.
length
-
1
];
String
rootPath
=
rb
.
getString
(
"file_path"
);
if
(
StringUtils
.
isNotBlank
(
g
.
getUploadImage
()))
{
File
oldFile
=
new
File
(
rootPath
+
g
.
getUploadImage
());
if
(
oldFile
.
isFile
())
FileUtils
.
forceDelete
(
oldFile
);
}
File
destFile
=
new
File
(
rootPath
+
giftImagePath
,
fileName
);
FileUtils
.
writeByteArrayToFile
(
destFile
,
file
.
getBytes
());
g
.
setUploadImage
(
giftImagePath
+
File
.
separator
+
fileName
);
}
giftService
.
save
(
g
);
return
view
;
}
@RequestMapping
(
"/gift/del"
)
public
ModelAndView
delActivity
(
String
id
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
giftService
.
remove
(
id
);
return
view
;
}
}
\ No newline at end of file
src/main/java/com/qiankun/controller/PointsController.java
View file @
7aa7eb63
...
...
@@ -50,6 +50,7 @@ public class PointsController extends BaseController<Object>{
t
.
setId
(
type
.
getId
());
t
.
setName
(
type
.
getName
());
t
.
setPoint
(
type
.
getPoint
());
pointsService
.
saveType
(
t
);
view
.
getModelMap
().
addAttribute
(
"status"
,
2
);
}
else
{
pointsService
.
saveType
(
type
);
...
...
src/main/java/com/qiankun/controller/UserController.java
View file @
7aa7eb63
...
...
@@ -161,6 +161,8 @@ public class UserController extends BaseController<Object>{
User
user
=
new
User
();
Date
date
=
new
Date
();
Contacts
contacts1
=
new
Contacts
();
Contacts
contacts2
=
new
Contacts
();
if
(
StringUtils
.
isEmpty
(
userVo
.
getId
()))
{
...
...
@@ -177,6 +179,11 @@ public class UserController extends BaseController<Object>{
map
.
put
(
"message"
,
"userIsExist_userName"
);
return
map
;
}
user
.
setLastMobile
(
userVo
.
getMobile
());
contacts1
.
setLastName
(
userVo
.
getLastContactsName1
());
contacts1
.
setLastMobile
(
userVo
.
getLastContactsMobile1
());
contacts2
.
setLastName
(
userVo
.
getLastContactsName2
());
contacts2
.
setLastMobile
(
userVo
.
getLastContactsMobile2
());
user
.
setCreateTime
(
date
);
map
.
put
(
"status"
,
1
);
...
...
@@ -238,7 +245,7 @@ public class UserController extends BaseController<Object>{
user
.
setRole
(
userVo
.
getRole
());
user
.
setStatus
(
userVo
.
getStatus
());
Contacts
contacts1
=
new
Contacts
();
contacts1
.
setName
(
userVo
.
getContactsName1
());
contacts1
.
setAddr
(
userVo
.
getContactsAddr1
());
contacts1
.
setMobile
(
userVo
.
getContactsMobile1
());
...
...
@@ -249,7 +256,6 @@ public class UserController extends BaseController<Object>{
contacts1
.
setUser
(
user
);
user
.
getContacts
().
add
(
contacts1
);
Contacts
contacts2
=
new
Contacts
();
contacts2
.
setName
(
userVo
.
getContactsName2
());
contacts2
.
setAddr
(
userVo
.
getContactsAddr2
());
contacts2
.
setMobile
(
userVo
.
getContactsMobile2
());
...
...
@@ -412,7 +418,10 @@ public class UserController extends BaseController<Object>{
u
.
setProfession
(
row
.
getCell
(
17
).
getStringCellValue
());
u
.
setUnitAddr
(
row
.
getCell
(
18
).
getStringCellValue
());
u
.
setUnitTel
(
row
.
getCell
(
20
).
getStringCellValue
());
u
.
setMobile
(
row
.
getCell
(
21
).
getStringCellValue
());
u
.
setLastMobile
(
row
.
getCell
(
21
).
getStringCellValue
());
u
.
setTel
(
row
.
getCell
(
22
).
getStringCellValue
());
u
.
setQq
(
row
.
getCell
(
23
).
getStringCellValue
());
u
.
setEmail
(
row
.
getCell
(
24
).
getStringCellValue
());
...
...
@@ -430,16 +439,20 @@ public class UserController extends BaseController<Object>{
u
.
setRemark
(
row
.
getCell
(
30
).
getStringCellValue
());
c1
.
setName
(
row
.
getCell
(
31
).
getStringCellValue
());
c1
.
setLastName
(
row
.
getCell
(
31
).
getStringCellValue
());
c1
.
setRelation
(
row
.
getCell
(
32
).
getStringCellValue
());
c1
.
setAddr
(
row
.
getCell
(
33
).
getStringCellValue
());
c1
.
setMobile
(
row
.
getCell
(
35
).
getStringCellValue
());
c1
.
setLastMobile
(
row
.
getCell
(
35
).
getStringCellValue
());
c1
.
setQq
(
row
.
getCell
(
36
).
getStringCellValue
());
c1
.
setWeixin
(
row
.
getCell
(
38
).
getStringCellValue
());
c1
.
setUser
(
u
);
c2
.
setName
(
row
.
getCell
(
40
).
getStringCellValue
());
c2
.
setLastName
(
row
.
getCell
(
40
).
getStringCellValue
());
c2
.
setRelation
(
row
.
getCell
(
41
).
getStringCellValue
());
c2
.
setAddr
(
row
.
getCell
(
42
).
getStringCellValue
());
c2
.
setMobile
(
row
.
getCell
(
44
).
getStringCellValue
());
c2
.
setLastMobile
(
row
.
getCell
(
44
).
getStringCellValue
());
c2
.
setQq
(
row
.
getCell
(
45
).
getStringCellValue
());
c2
.
setWeixin
(
row
.
getCell
(
47
).
getStringCellValue
());
c2
.
setUser
(
u
);
...
...
@@ -491,7 +504,10 @@ public class UserController extends BaseController<Object>{
u
.
setProfession
(
row
.
getCell
(
15
).
getStringCellValue
());
u
.
setUnitAddr
(
row
.
getCell
(
16
).
getStringCellValue
());
u
.
setTel
(
row
.
getCell
(
18
).
getStringCellValue
());
u
.
setMobile
(
row
.
getCell
(
19
).
getStringCellValue
());
u
.
setLastMobile
(
row
.
getCell
(
19
).
getStringCellValue
());
u
.
setUnitTel
(
row
.
getCell
(
20
).
getStringCellValue
());
u
.
setEmail
(
row
.
getCell
(
21
).
getStringCellValue
());
if
(
StringUtils
.
isNotBlank
(
row
.
getCell
(
22
).
getStringCellValue
()))
{
...
...
@@ -515,10 +531,12 @@ public class UserController extends BaseController<Object>{
c1
.
setName
(
row
.
getCell
(
35
).
getStringCellValue
());
c1
.
setLastName
(
row
.
getCell
(
35
).
getStringCellValue
());
c1
.
setRelation
(
row
.
getCell
(
36
).
getStringCellValue
());
c1
.
setMobile
(
row
.
getCell
(
37
).
getStringCellValue
());
c1
.
setLastMobile
(
row
.
getCell
(
37
).
getStringCellValue
());
c1
.
setQq
(
row
.
getCell
(
38
).
getStringCellValue
());
c1
.
setMobile
(
row
.
getCell
(
39
).
getStringCellValue
());
c1
.
setWeixin
(
row
.
getCell
(
40
).
getStringCellValue
());
c1
.
setAddr
(
row
.
getCell
(
41
).
getStringCellValue
());
c1
.
setUser
(
u
);
...
...
@@ -526,8 +544,9 @@ public class UserController extends BaseController<Object>{
c2
.
setName
(
row
.
getCell
(
44
).
getStringCellValue
());
c2
.
setRelation
(
row
.
getCell
(
45
).
getStringCellValue
());
c2
.
setMobile
(
row
.
getCell
(
46
).
getStringCellValue
());
c2
.
setLastMobile
(
row
.
getCell
(
46
).
getStringCellValue
());
c2
.
setQq
(
row
.
getCell
(
47
).
getStringCellValue
());
c2
.
setMobile
(
row
.
getCell
(
48
).
getStringCellValue
());
c2
.
setWeixin
(
row
.
getCell
(
49
).
getStringCellValue
());
c2
.
setAddr
(
row
.
getCell
(
50
).
getStringCellValue
());
c2
.
setUser
(
u
);
...
...
src/main/java/com/qiankun/dao/GiftDao.java
0 → 100644
View file @
7aa7eb63
package
com
.
qiankun
.
dao
;
import
com.qiankun.dao.core.IDao
;
import
com.qiankun.entity.Gift
;
public
interface
GiftDao
extends
IDao
<
Gift
,
String
>
{
}
src/main/java/com/qiankun/dao/GiftDaoImpl.java
0 → 100644
View file @
7aa7eb63
package
com
.
qiankun
.
dao
;
import
org.springframework.stereotype.Repository
;
import
com.qiankun.dao.core.AbsDao
;
import
com.qiankun.entity.Gift
;
@Repository
public
class
GiftDaoImpl
extends
AbsDao
<
Gift
,
String
>
implements
GiftDao
{
}
src/main/java/com/qiankun/entity/Blood.java
View file @
7aa7eb63
package
com
.
qiankun
.
entity
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.Set
;
import
javax.persistence.CascadeType
;
import
javax.persistence.Entity
;
import
javax.persistence.FetchType
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Inheritance
;
import
javax.persistence.InheritanceType
;
import
javax.persistence.Lob
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.OneToMany
;
import
org.hibernate.annotations.Cache
;
import
org.hibernate.annotations.CacheConcurrencyStrategy
;
import
org.hibernate.annotations.GenericGenerator
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
@Entity
@Cache
(
usage
=
CacheConcurrencyStrategy
.
READ_WRITE
)
@Inheritance
(
strategy
=
InheritanceType
.
TABLE_PER_CLASS
)
...
...
@@ -45,7 +38,9 @@ public class Blood {
@ManyToOne
private
Activity
activity
=
null
;
private
Date
updateTime
=
new
Date
();
private
Date
updateTime
=
new
Date
();
//采血时间
private
Date
createTime
=
new
Date
();
//数据创建时间
public
String
getId
()
{
return
id
;
...
...
@@ -111,5 +106,13 @@ public class Blood {
this
.
bloodCollect
=
bloodCollect
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
}
src/main/java/com/qiankun/entity/Contacts.java
View file @
7aa7eb63
...
...
@@ -25,10 +25,12 @@ public class Contacts {
private
String
id
;
private
String
name
;
private
String
lastName
;
private
String
relation
;
//关系
private
String
mobile
;
//手机
private
String
lastMobile
;
private
String
qq
;
...
...
@@ -43,6 +45,8 @@ public class Contacts {
private
Date
updateTime
=
new
Date
();
private
Date
createTime
=
new
Date
();
//数据创建时间
public
String
getId
()
{
return
id
;
}
...
...
@@ -115,6 +119,30 @@ public class Contacts {
this
.
updateTime
=
updateTime
;
}
public
String
getLastName
()
{
return
lastName
;
}
public
void
setLastName
(
String
lastName
)
{
this
.
lastName
=
lastName
;
}
public
String
getLastMobile
()
{
return
lastMobile
;
}
public
void
setLastMobile
(
String
lastMobile
)
{
this
.
lastMobile
=
lastMobile
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
...
...
src/main/java/com/qiankun/entity/Gift.java
View file @
7aa7eb63
...
...
@@ -28,6 +28,10 @@ public class Gift {
private
String
uploadImage
;
//礼物照片路径
private
Long
total
;
//礼品总数
private
Long
stock
;
//库存
public
String
getId
()
{
return
id
;
}
...
...
@@ -68,6 +72,22 @@ public class Gift {
this
.
uploadImage
=
uploadImage
;
}
public
Long
getTotal
()
{
return
total
;
}
public
void
setTotal
(
Long
total
)
{
this
.
total
=
total
;
}
public
Long
getStock
()
{
return
stock
;
}
public
void
setStock
(
Long
stock
)
{
this
.
stock
=
stock
;
}
...
...
src/main/java/com/qiankun/entity/User.java
View file @
7aa7eb63
...
...
@@ -49,6 +49,7 @@ public class User {
private
String
profession
;
//职业
private
String
mobile
;
//本人手机
private
String
lastMobile
;
//上一次的手机
private
String
email
;
//邮箱
private
String
tel
;
//固定电话
private
String
qq
;
...
...
@@ -75,7 +76,7 @@ public class User {
private
String
marrowCode
;
//骨髓编号
private
Date
createTime
=
new
Date
();
private
Date
createTime
=
new
Date
();
//数据创建时间
private
Date
updateTime
=
new
Date
();
private
boolean
remove
=
false
;
...
...
@@ -92,6 +93,10 @@ public class User {
@JsonIgnore
private
Set
<
UserPoints
>
points
=
new
HashSet
<
UserPoints
>();
@OneToMany
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{
CascadeType
.
ALL
},
orphanRemoval
=
true
,
mappedBy
=
"user"
)
@JsonIgnore
private
Set
<
UserGift
>
gift
=
new
HashSet
<
UserGift
>();
private
Boolean
isRemove
=
false
;
//是否删除用户,默认false
...
...
@@ -377,6 +382,18 @@ public class User {
public
void
setMarrowCode
(
String
marrowCode
)
{
this
.
marrowCode
=
marrowCode
;
}
public
Set
<
UserGift
>
getGift
()
{
return
gift
;
}
public
void
setGift
(
Set
<
UserGift
>
gift
)
{
this
.
gift
=
gift
;
}
public
String
getLastMobile
()
{
return
lastMobile
;
}
public
void
setLastMobile
(
String
lastMobile
)
{
this
.
lastMobile
=
lastMobile
;
}
}
src/main/java/com/qiankun/entity/UserGift.java
View file @
7aa7eb63
package
com
.
qiankun
.
entity
;
import
java.util.Date
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Inheritance
;
import
javax.persistence.InheritanceType
;
import
javax.persistence.ManyToOne
;
import
org.hibernate.annotations.Cache
;
import
org.hibernate.annotations.CacheConcurrencyStrategy
;
...
...
@@ -20,13 +23,18 @@ public class UserGift {
@GeneratedValue
(
generator
=
"systemUUID"
)
private
String
id
;
private
String
name
;
//礼品名称
private
String
point
;
//礼品积分
private
String
content
;
//礼品介绍
@ManyToOne
private
Gift
gift
=
new
Gift
();
private
String
point
;
//礼品积分
@ManyToOne
private
User
user
=
new
User
();
private
String
uploadImage
;
//礼物照片路径
private
Date
updateTime
=
new
Date
();
private
String
expressCompany
;
//快递公司
private
String
expressCode
;
//快递单号
public
String
getId
()
{
return
id
;
...
...
@@ -36,38 +44,53 @@ public class UserGift {
this
.
id
=
id
;
}
public
String
get
Name
()
{
return
name
;
public
String
get
Point
()
{
return
point
;
}
public
void
set
Name
(
String
name
)
{
this
.
name
=
name
;
public
void
set
Point
(
String
point
)
{
this
.
point
=
point
;
}
public
String
getConten
t
()
{
return
conten
t
;
public
Gift
getGif
t
()
{
return
gif
t
;
}
public
void
set
Content
(
String
conten
t
)
{
this
.
content
=
conten
t
;
public
void
set
Gift
(
Gift
gif
t
)
{
this
.
gift
=
gif
t
;
}
public
String
getPoint
()
{
return
point
;
public
User
getUser
()
{
return
user
;
}
public
void
set
Point
(
String
point
)
{
this
.
point
=
point
;
public
void
set
User
(
User
user
)
{
this
.
user
=
user
;
}
public
String
getUploadImag
e
()
{
return
up
loadImag
e
;
public
Date
getUpdateTim
e
()
{
return
up
dateTim
e
;
}
public
void
setUp
loadImage
(
String
uploadImag
e
)
{
this
.
up
loadImage
=
uploadImag
e
;
public
void
setUp
dateTime
(
Date
updateTim
e
)
{
this
.
up
dateTime
=
updateTim
e
;
}
public
String
getExpressCompany
()
{
return
expressCompany
;
}
public
void
setExpressCompany
(
String
expressCompany
)
{
this
.
expressCompany
=
expressCompany
;
}
public
String
getExpressCode
()
{
return
expressCode
;
}
public
void
setExpressCode
(
String
expressCode
)
{
this
.
expressCode
=
expressCode
;
}
...
...
src/main/java/com/qiankun/service/GiftService.java
0 → 100644
View file @
7aa7eb63
package
com
.
qiankun
.
service
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.qiankun.dao.GiftDao
;
import
com.qiankun.entity.Gift
;
@Service
public
class
GiftService
{
@Autowired
private
GiftDao
giftDao
;
public
Gift
findById
(
String
id
)
{
Gift
gift
=
giftDao
.
find
(
id
);
return
gift
;
}
@Transactional
public
Gift
save
(
Gift
gift
)
{
return
giftDao
.
save
(
gift
);
}
@Transactional
public
void
remove
(
String
id
)
{
giftDao
.
remove
(
id
);
}
public
List
<
Gift
>
findAll
()
{
List
<
Gift
>
list
=
giftDao
.
findAll
();
return
list
;
}
}
src/main/java/com/qiankun/vo/UserVo.java
View file @
7aa7eb63
...
...
@@ -23,6 +23,7 @@ public class UserVo {
private
String
profession
;
//职业
private
String
mobile
;
//本人手机
private
String
lastMobile
;
//上一次本人手机
private
String
email
;
//邮箱
private
String
tel
;
//固定电话
private
String
qq
;
...
...
@@ -37,16 +38,20 @@ public class UserVo {
private
String
origin
;
//用户来源 小程序1 后台新增2 导入3
private
String
contactsName1
;
private
String
lastContactsName1
;
private
String
contactsQQ1
;
private
String
contactsRelation1
;
private
String
contactsWeixin1
;
private
String
contactsMobile1
;
private
String
lastContactsMobile1
;
private
String
contactsAddr1
;
private
String
contactsName2
;
private
String
lastContactsName2
;
private
String
contactsQQ2
;
private
String
contactsRelation2
;
private
String
contactsWeixin2
;
private
String
contactsMobile2
;
private
String
lastContactsMobile2
;
private
String
contactsAddr2
;
private
String
pwd
;
//密码
...
...
@@ -416,6 +421,36 @@ public class UserVo {
public
void
setEndbloodId
(
String
endbloodId
)
{
this
.
endbloodId
=
endbloodId
;
}
public
String
getLastMobile
()
{
return
lastMobile
;
}
public
void
setLastMobile
(
String
lastMobile
)
{
this
.
lastMobile
=
lastMobile
;
}
public
String
getLastContactsName1
()
{
return
lastContactsName1
;
}
public
void
setLastContactsName1
(
String
lastContactsName1
)
{
this
.
lastContactsName1
=
lastContactsName1
;
}
public
String
getLastContactsMobile1
()
{
return
lastContactsMobile1
;
}
public
void
setLastContactsMobile1
(
String
lastContactsMobile1
)
{
this
.
lastContactsMobile1
=
lastContactsMobile1
;
}
public
String
getLastContactsName2
()
{
return
lastContactsName2
;
}
public
void
setLastContactsName2
(
String
lastContactsName2
)
{
this
.
lastContactsName2
=
lastContactsName2
;
}
public
String
getLastContactsMobile2
()
{
return
lastContactsMobile2
;
}
public
void
setLastContactsMobile2
(
String
lastContactsMobile2
)
{
this
.
lastContactsMobile2
=
lastContactsMobile2
;
}
}
src/main/resources/system.properties
View file @
7aa7eb63
...
...
@@ -22,6 +22,7 @@ wishUploadImage=wishUploadImage
activityImage
=
activityImage
uploadAvatar
=
uploadAvatar
certificateImage
=
certificateImage
giftImage
=
giftImage
nation
=
\u
6c49
\u
65cf,
\u8499\u
53e4
\u
65cf,
\u
56de
\u
65cf,
\u
85cf
\u
65cf,
\u
7ef4
\u
543e
\u
5c14
\u
65cf,
\u
82d7
\u
65cf,
\u
5f5d
\u
65cf,
\u
58ee
\u
65cf,
\u
5e03
\u
4f9d
\u
65cf,
\u
671d
\u
9c9c
\u
65cf,
\u
6ee1
\u
65cf,
\u
4f97
\u
65cf,
\u7476\u
65cf,
\u
767d
\u
65cf,
\u
571f
\u
5bb6
\u
65cf,
\u
54c8
\u
5c3c
\u
65cf,
\u
54c8
\u8428\u
514b
\u
65cf,
\u
50a3
\u
65cf,
\u
9ece
\u
65cf,
\u5088\u
50f3
\u
65cf,
\u
4f64
\u
65cf,
\u7572\u
65cf,
\u
9ad8
\u
5c71
\u
65cf,
\u
62c9
\u
795c
\u
65cf,
\u
6c34
\u
65cf,
\u
4e1c
\u
4e61
\u
65cf,
\u
7eb3
\u
897f
\u
65cf,
\u
666f
\u9887\u
65cf,
\u
67ef
\u
5c14
\u
514b
\u
5b5c
\u
65cf,
\u
571f
\u
65cf,
\u
8fbe
\u
65a1
\u
5c14
\u
65cf,
\u
4eeb
\u
4f6c
\u
65cf,
\u
7f8c
\u
65cf,
\u
5e03
\u6717\u
65cf,
\u6492\u
62c9
\u
65cf,
\u
6bdb
\u5357\u
65cf,
\u
4ee1
\u
4f6c
\u
65cf,
\u9521\u
4f2f
\u
65cf,
\u
963f
\u
660c
\u
65cf,
\u
666e
\u
7c73
\u
65cf,
\u5854\u5409\u
514b
\u
65cf,
\u6012\u
65cf,
\u
4e4c
\u
5b5c
\u
522b
\u
514b
\u
65cf,
\u
4fc4
\u
7f57
\u
65af
\u
65cf,
\u9102\u
6e29
\u
514b
\u
65cf,
\u
5fb7
\u6602\u
65cf,
\u
4fdd
\u
5b89
\u
65cf,
\u
88d5
\u
56fa
\u
65cf,
\u
4eac
\u
65cf,
\u5854\u5854\u
5c14
\u
65cf,
\u
72ec
\u
9f99
\u
65cf,
\u9102\u
4f26
\u6625\u
65cf,
\u
8d6b
\u
54f2
\u
65cf,
\u
95e8
\u
5df4
\u
65cf,
\u
73de
\u
5df4
\u
65cf,
\u
57fa
\u
8bfa
\u
65cf
...
...
src/main/webapp/WEB-INF/decorators/main.jsp
View file @
7aa7eb63
...
...
@@ -278,14 +278,14 @@
</li>
<li>
<a
href=
"/points/type/list"
>
<a
href=
"
<webpath:path/>
/points/type/list"
>
<i
class=
"icon-list-alt"
></i>
<span
class=
"menu-text"
>
积分管理
</span>
</a>
</li>
<li>
<a
href=
"
#
"
>
<a
href=
"
<webpath:path/>/gift/list
"
>
<i
class=
"icon-briefcase "
></i>
<span
class=
"menu-text"
>
...
...
src/main/webapp/WEB-INF/pages/gift/list.jsp
0 → 100644
View file @
7aa7eb63
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="webpath" uri="/WEB-INF/tlds/path.tld"%>
<%@ taglib prefix="webpage" uri="/WEB-INF/tlds/pageview.tld"%>
<head>
</head>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="#">首页</a>
</li>
<li class="active">礼物管理</li>
</ul><!-- .breadcrumb -->
</div>
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<div class="widget-toolbox">
<div class="btn-group">
<button class="btn btn-sm btn-success" onclick="window.location.href='<webpath:path/>/gift/add'">
<i class="icon-plus-sign-alt bigger-110"></i>
新增
</button>
</div>
</div>
<div class="pull-left"></div>
<table id="table-data" class="table table-bordered ">
<thead>
<tr class="">
<th>礼物照片</th>
<th>礼品名称</th>
<th>详细信息</th>
<th>礼品积分</th>
<th>礼品总数</th>
<th>礼品库存</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
<c:forEach var="gift" items="${gifts}">
<tr class="tr-highlight">
<td title=""><img alt="" src="<webpath:path/>/wx/rainbowplan/loadResource?imageName=${gift.uploadImage}" width="60" height="60"/></td>
<td title="">${gift.name}</td>
<td title="">${gift.content}</td>
<td title="">${gift.point}</td>
<td title="">${gift.total}</td>
<td title="">${gift.stock}</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/>/gift/add?id=${gift.id}'">
<i class="icon-edit bigger-120"></i>
</button>
<button class="btn btn-xs btn-danger" onclick="gift.remove('${gift.id}')">
<i class="icon-trash bigger-120"></i>
</button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script src="<webpath:path/>/resources/js/gift/gift.js" type="text/javascript"></script>
\ No newline at end of file
src/main/webapp/WEB-INF/pages/gift/save.jsp
0 → 100644
View file @
7aa7eb63
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="webpath" uri="/WEB-INF/tlds/path.tld"%>
<%@ taglib prefix="webpage" uri="/WEB-INF/tlds/pageview.tld"%>
<head>
</head>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="#">首页</a>
</li>
<li class="active">礼物管理</li>
<li class="active">保存</li>
</ul><!-- .breadcrumb -->
</div>
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<form action="#" id="giftForm" name="giftForm" method="post" onsubmit="return false" class="form-horizontal" role="form">
<input type="hidden" id="id" name="id" value="${gift.id}"/>
<div class="row">
<div class="col-xs-12">
<h3 class="header smaller lighter blue">礼物</h3></div>
</div>
<div class="row">
<div class="col-xs-5">
<div class="form-group">
<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" class="col-xs-10 col-sm-10" value="${gift.name}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 详细信息 </label>
<div class="col-sm-9">
<textarea rows="4" class="col-xs-10 col-sm-10" id="content" name="content">${gift.content}</textarea>
</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">
<input type="text" id="point" name="point" class="col-xs-10 col-sm-10" value="${gift.point}"/>
</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">
<input type="text" id="total" name="total" class="col-xs-10 col-sm-10" value="${gift.total}"/>
</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">
<input type="text" id="stock" name="stock" class="col-xs-10 col-sm-10" value="${gift.stock}"/>
</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>
<div class="col-sm-9">
<c:if test="${gift.uploadImage!=null}">
<img src="<webpath:path/>/wx/rainbowplan/loadResource?imageName=${gift.uploadImage}" /><br></c:if>
<input type="file" id="input_file" name="file" >
</div>
</div>
</div>
</div>
<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>
返回
</a>
</div>
</form>
</div>
</div>
</div>
</div>
<script src="<webpath:path/>/resources/js/gift/gift.js" type="text/javascript"></script>
\ No newline at end of file
src/main/webapp/resources/js/gift/gift.js
0 → 100644
View file @
7aa7eb63
var
isSubmit
=
true
;
$
(
document
).
ready
(
function
(){
if
(
$
(
'#giftForm'
).
length
>
0
){
$
(
'#giftForm'
).
validate
({
rules
:
{
"name"
:
{
required
:
true
},
"content"
:
{
required
:
true
},
"point"
:
{
required
:
true
},
"total"
:
{
required
:
true
},
"stock"
:
{
required
:
true
}
},
messages
:{
"name"
:
{
required
:
"不能为空"
},
"content"
:
{
required
:
"不能为空"
},
"point"
:
{
required
:
"不能为空"
},
"total"
:
{
required
:
"不能为空"
},
"stock"
:
{
required
:
"不能为空"
}
},
submitHandler
:
function
(
form
){
gift
.
save
(
form
);
}
});
}
})
var
gift
=
{
remove
:
function
(
id
){
bootbox
.
confirm
({
buttons
:
{
cancel
:
{
label
:
'取消'
,
className
:
'btn-default'
},
confirm
:
{
label
:
'确认'
,
className
:
'btn-myStyle'
}
},
message
:
'请确认是否删除?'
,
callback
:
function
(
result
)
{
if
(
result
)
{
$
.
ajax
({
type
:
'GET'
,
url
:
webPath
+
'/gift/del?id='
+
id
,
dataType
:
'json'
,
success
:
function
(
data
){
window
.
location
.
reload
();
}
})
}
else
{
}
},
title
:
"删除"
});
},
save
:
function
(
form
){
if
(
isSubmit
){
isSubmit
=
false
;
var
formData
=
new
FormData
();
formData
.
append
(
'file'
,
$
(
'#input_file'
)[
0
].
files
[
0
]);
formData
.
append
(
'id'
,
$
(
'#id'
).
val
());
formData
.
append
(
'name'
,
$
(
'#name'
).
val
());
formData
.
append
(
'content'
,
$
(
'#content'
).
val
());
formData
.
append
(
'point'
,
$
(
'#point'
).
val
());
formData
.
append
(
'total'
,
$
(
'#total'
).
val
());
formData
.
append
(
'stock'
,
$
(
'#stock'
).
val
());
$
.
ajax
({
url
:
webPath
+
'/gift/save'
,
type
:
'POST'
,
cache
:
false
,
data
:
formData
,
processData
:
false
,
contentType
:
false
,
dataType
:
"json"
,
beforeSend
:
function
(){
},
success
:
function
(
data
){
var
status
=
data
.
status
;
if
(
status
==
1
){
//成功
bootbox
.
dialog
({
message
:
"新增成功"
,
buttons
:{
"cancel"
:{
"label"
:
"返回"
,
"className"
:
"btn-sm btn-primary"
,
"callback"
:
function
()
{
window
.
location
.
href
=
webPath
+
'/gift/list'
;
}
},
"success"
:{
"label"
:
"继续添加"
,
"className"
:
"btn-sm btn-primary"
,
"callback"
:
function
()
{
window
.
location
.
href
=
webPath
+
'/gift/add'
;
}
}
}
});
}
else
if
(
status
==
2
){
isSubmit
=
true
;
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