Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ccaac867
authored
Jul 06, 2018
by
chongli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会服亲密度推荐功能
parent
00764816
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1423 additions
and
0 deletions
src/main/java/com/ctrip/fun/admin/controller/JsonController.java
src/main/java/com/ctrip/fun/admin/controller/market/EventGameController.java
src/main/java/com/ctrip/fun/admin/form/market/EventGameForm.java
src/main/java/com/ctrip/fun/admin/form/market/EventGameGroupForm.java
src/main/java/com/ctrip/fun/admin/form/market/EventGamePlayerForm.java
src/main/java/com/ctrip/fun/admin/form/market/EventGameQueryForm.java
src/main/java/com/ctrip/fun/admin/service/golf/EventCustomerInfoService.java
src/main/java/com/ctrip/fun/admin/service/market/EventGameGroupService.java
src/main/java/com/ctrip/fun/admin/service/market/EventGamePlayerService.java
src/main/java/com/ctrip/fun/admin/service/market/EventGameService.java
src/main/java/com/ctrip/fun/admin/service/system/UserService.java
src/main/resources/config/spring-service.xml
src/main/resources/properties/service.properties
src/main/webapp/WEB-INF/templates/common/layout.ftl
src/main/webapp/WEB-INF/templates/market/createGame.ftl
src/main/webapp/WEB-INF/templates/market/createGroup.ftl
src/main/webapp/WEB-INF/templates/market/eventGameForm.ftl
src/main/webapp/WEB-INF/templates/market/eventGameList.ftl
src/main/webapp/WEB-INF/templates/market/listEventGame.ftl
src/main/webapp/WEB-INF/templates/market/recommendPlayer.ftl
src/main/java/com/ctrip/fun/admin/controller/JsonController.java
View file @
ccaac867
...
...
@@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.validation.Errors
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -38,6 +39,8 @@ import org.springframework.web.bind.annotation.ResponseStatus;
import
com.ctrip.fun.admin.form.PaginationForm
;
import
com.ctrip.fun.admin.form.golf.ResourceInventoryForm
;
import
com.ctrip.fun.admin.form.golf.ResourcePriceForm
;
import
com.ctrip.fun.admin.form.market.EventGameGroupForm
;
import
com.ctrip.fun.admin.form.market.EventGamePlayerForm
;
import
com.ctrip.fun.admin.form.operation.SupplierQueryForm
;
import
com.ctrip.fun.admin.service.basic.DistrictService
;
import
com.ctrip.fun.admin.service.basic.EntityImageService
;
...
...
@@ -51,6 +54,8 @@ import com.ctrip.fun.admin.service.golf.CourseProductService;
import
com.ctrip.fun.admin.service.golf.CourseResourceService
;
import
com.ctrip.fun.admin.service.golf.CourseService
;
import
com.ctrip.fun.admin.service.golf.GameService
;
import
com.ctrip.fun.admin.service.market.EventGameGroupService
;
import
com.ctrip.fun.admin.service.market.EventGamePlayerService
;
import
com.ctrip.fun.admin.service.membership.CardTypeService
;
import
com.ctrip.fun.admin.service.membership.CourseCardsService
;
import
com.ctrip.fun.admin.service.notification.EventService
;
...
...
@@ -97,8 +102,13 @@ import com.ctrip.fun.common.vo.basic.SubDistrictQuery;
import
com.ctrip.fun.common.vo.basic.SysCodeBean
;
import
com.ctrip.fun.common.vo.basic.SysCodeQuery
;
import
com.ctrip.fun.common.vo.basic.TagBean
;
import
com.ctrip.fun.common.vo.basic.UserExtQuery
;
import
com.ctrip.fun.common.vo.basic.UserPrepayCardInfoBean
;
import
com.ctrip.fun.common.vo.basic.UserPrepayCardLogQuery
;
import
com.ctrip.fun.common.vo.market.EventGameGroupBean
;
import
com.ctrip.fun.common.vo.market.EventGameGroupQuery
;
import
com.ctrip.fun.common.vo.market.EventGamePlayerBean
;
import
com.ctrip.fun.common.vo.market.EventGamePlayerQuery
;
import
com.ctrip.fun.common.vo.membership.CardTypeBean
;
import
com.ctrip.fun.common.vo.membership.MbsOrderQueryBean
;
import
com.ctrip.fun.common.vo.notification.EventQuery
;
...
...
@@ -112,6 +122,8 @@ import com.ctrip.fun.common.vo.order.CourseOrderListBean;
import
com.ctrip.fun.common.vo.order.CourseOrderProcessBean
;
import
com.ctrip.fun.common.vo.order.CustomerBean
;
import
com.ctrip.fun.common.vo.order.EventActivityOrderProcessBean
;
import
com.ctrip.fun.common.vo.order.EventCustomerInfoBean
;
import
com.ctrip.fun.common.vo.order.EventCustomerInfoQuery
;
import
com.ctrip.fun.common.vo.order.OrderProcessEnum
;
import
com.ctrip.fun.common.vo.order.OrderProcessLogBean
;
import
com.ctrip.fun.common.vo.order.TourOrderListBean
;
...
...
@@ -154,6 +166,7 @@ import com.ctrip.fun.common.vo.user.TransferOutsideUserAmtBean;
import
com.ctrip.fun.common.vo.user.UserConractsBean
;
import
com.ctrip.fun.common.vo.user.UserConractsQuery
;
import
com.ctrip.fun.common.vo.user.UserExtBean
;
import
com.ctrip.fun.admin.service.golf.EventCustomerInfoService
;
/**
* Created by pat on 14-5-30.
...
...
@@ -227,6 +240,15 @@ public class JsonController {
@Autowired
private
CourseOrderStatisticsService
courseOrderStatisticsService
;
@Autowired
private
EventGamePlayerService
eventGamePlayerService
=
null
;
@Autowired
private
EventGameGroupService
eventGameGroupService
=
null
;
@Autowired
private
EventCustomerInfoService
eventCustomerInfoService
=
null
;
@Value
(
"${imageEndpoint}"
)
private
String
imageEndpoint
;
...
...
@@ -2273,4 +2295,107 @@ public class JsonController {
response
.
setBody
(
userContractsBeanList
);
return
response
;
}
@RequestMapping
(
value
=
"/updatePlayer"
,
method
=
RequestMethod
.
GET
)
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
Response
<
Serializable
>
playerUpdate
(
HttpServletRequest
request
,
@ModelAttribute
(
"eventGamePlayerForm"
)
EventGamePlayerForm
eventGamePlayerForm
,
ModelMap
model
)
{
EventGamePlayerQuery
query
=
new
EventGamePlayerQuery
();
query
.
setId
(
eventGamePlayerForm
.
getId
());
query
.
setSortField
(
"id"
);
PagedResponseBean
<
EventGamePlayerBean
>
players
=
eventGamePlayerService
.
list
(
""
,
query
);
if
(
players
.
getResult
()!=
null
&&
players
.
getResult
().
size
()>
0
){
List
<
EventGamePlayerBean
>
list
=
(
ArrayList
<
EventGamePlayerBean
>)
players
.
getResult
();
for
(
EventGamePlayerBean
temp:
list
){
if
(
eventGamePlayerForm
.
getMobilePhone
()!=
null
&&!
""
.
equals
(
eventGamePlayerForm
.
getMobilePhone
())){
temp
.
setMobilePhone
(
eventGamePlayerForm
.
getMobilePhone
());
}
if
(
eventGamePlayerForm
.
getUid
()!=
null
&&!
""
.
equals
(
eventGamePlayerForm
.
getUid
())){
temp
.
setUid
(
eventGamePlayerForm
.
getUid
());
}
eventGamePlayerService
.
update
(
""
,
temp
);
}
}
Response
<
Serializable
>
response
=
new
Response
<>();
return
response
;
}
@RequestMapping
(
value
=
"/updateGroup"
,
method
=
RequestMethod
.
GET
)
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
Response
<
Serializable
>
GroupUpdate
(
HttpServletRequest
request
,
@ModelAttribute
(
"eventGameGroupForm"
)
EventGameGroupForm
eventGameGroupForm
,
ModelMap
model
)
{
EventGameGroupQuery
query
=
new
EventGameGroupQuery
();
query
.
setId
(
eventGameGroupForm
.
getId
());
query
.
setSortField
(
"id"
);
PagedResponseBean
<
EventGameGroupBean
>
players
=
eventGameGroupService
.
list
(
""
,
query
);
if
(
players
.
getResult
()!=
null
&&
players
.
getResult
().
size
()>
0
){
List
<
EventGameGroupBean
>
list
=
(
ArrayList
<
EventGameGroupBean
>)
players
.
getResult
();
for
(
EventGameGroupBean
temp:
list
){
if
(
eventGameGroupForm
.
getFormatTeeTime
()!=
null
&&!
""
.
equals
(
eventGameGroupForm
.
getFormatTeeTime
())){
temp
.
setFormatTeeTime
(
eventGameGroupForm
.
getFormatTeeTime
());
}
eventGameGroupService
.
update
(
""
,
temp
);
}
}
Response
<
Serializable
>
response
=
new
Response
<>();
return
response
;
}
@RequestMapping
(
value
=
"/playerInfoList"
,
method
=
RequestMethod
.
GET
)
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
Response
<
List
<
EventGamePlayerBean
>>
playerInfoList
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"playerName"
,
required
=
false
)
String
playerName
)
{
Response
<
List
<
EventGamePlayerBean
>>
response
=
new
Response
<
List
<
EventGamePlayerBean
>>();
response
.
setStatus
(
ResponseStatusEnum
.
SUCCESS
.
getValue
());
response
.
setMessage
(
ResponseStatusEnum
.
SUCCESS
.
getMsg
());
EventGamePlayerQuery
query
=
new
EventGamePlayerQuery
();
query
.
setPlayerName
(
playerName
);
PagedResponseBean
<
EventGamePlayerBean
>
responseBean
=
eventGamePlayerService
.
playerInfoList
(
""
,
query
);
response
.
setBody
((
List
<
EventGamePlayerBean
>)
responseBean
.
getResult
());
return
response
;
}
@RequestMapping
(
value
=
"/getEventCustomerInfoByName"
,
method
=
RequestMethod
.
GET
)
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
Response
<
List
<
EventCustomerInfoBean
>>
getEventCustomerInfoByName
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"playerName"
,
required
=
false
)
String
playerName
)
{
Response
<
List
<
EventCustomerInfoBean
>>
response
=
new
Response
<
List
<
EventCustomerInfoBean
>>();
response
.
setStatus
(
ResponseStatusEnum
.
SUCCESS
.
getValue
());
response
.
setMessage
(
ResponseStatusEnum
.
SUCCESS
.
getMsg
());
EventCustomerInfoQuery
query
=
new
EventCustomerInfoQuery
();
query
.
setcName
(
playerName
);
List
<
EventCustomerInfoBean
>
list
=
eventCustomerInfoService
.
getEventCustomerInfoByName
(
query
);
response
.
setBody
(
list
);
return
response
;
}
@RequestMapping
(
value
=
"/getUserExtByName"
,
method
=
RequestMethod
.
GET
)
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
Response
<
List
<
UserExtBean
>>
getUserExtByName
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"playerName"
,
required
=
false
)
String
playerName
)
{
Response
<
List
<
UserExtBean
>>
response
=
new
Response
<
List
<
UserExtBean
>>();
response
.
setStatus
(
ResponseStatusEnum
.
SUCCESS
.
getValue
());
response
.
setMessage
(
ResponseStatusEnum
.
SUCCESS
.
getMsg
());
UserExtQuery
query
=
new
UserExtQuery
();
query
.
setName
(
playerName
);
PagedResponseBean
<
UserExtBean
>
pagedList
=
userService
.
getUserExtByName
(
""
,
query
);
response
.
setBody
((
List
<
UserExtBean
>)
pagedList
.
getResult
());
return
response
;
}
@RequestMapping
(
value
=
"/getEventGamePlayerByName"
,
method
=
RequestMethod
.
GET
)
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
Response
<
List
<
EventGamePlayerBean
>>
getEventGamePlayerByName
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"playerName"
,
required
=
false
)
String
playerName
)
{
Response
<
List
<
EventGamePlayerBean
>>
response
=
new
Response
<
List
<
EventGamePlayerBean
>>();
response
.
setStatus
(
ResponseStatusEnum
.
SUCCESS
.
getValue
());
response
.
setMessage
(
ResponseStatusEnum
.
SUCCESS
.
getMsg
());
EventGamePlayerQuery
query
=
new
EventGamePlayerQuery
();
query
.
setPlayerName
(
playerName
);
query
.
setSortField
(
"id"
);
PagedResponseBean
<
EventGamePlayerBean
>
pagedList
=
eventGamePlayerService
.
list
(
""
,
query
);
response
.
setBody
((
List
<
EventGamePlayerBean
>)
pagedList
.
getResult
());
return
response
;
}
}
src/main/java/com/ctrip/fun/admin/controller/market/EventGameController.java
0 → 100644
View file @
ccaac867
This diff is collapsed.
Click to expand it.
src/main/java/com/ctrip/fun/admin/form/market/EventGameForm.java
0 → 100644
View file @
ccaac867
package
com
.
ctrip
.
fun
.
admin
.
form
.
market
;
import
java.util.Date
;
import
org.springframework.format.annotation.DateTimeFormat
;
public
class
EventGameForm
{
private
Integer
id
;
// 赛事id
private
Integer
courseId
;
// 球场id
private
String
courseName
;
// 球场名称
private
String
gameName
;
// 赛事名称
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
playDate
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getCourseId
()
{
return
courseId
;
}
public
void
setCourseId
(
Integer
courseId
)
{
this
.
courseId
=
courseId
;
}
public
String
getCourseName
()
{
return
courseName
;
}
public
void
setCourseName
(
String
courseName
)
{
this
.
courseName
=
courseName
;
}
public
String
getGameName
()
{
return
gameName
;
}
public
void
setGameName
(
String
gameName
)
{
this
.
gameName
=
gameName
;
}
public
Date
getPlayDate
()
{
return
playDate
;
}
public
void
setPlayDate
(
Date
playDate
)
{
this
.
playDate
=
playDate
;
}
}
src/main/java/com/ctrip/fun/admin/form/market/EventGameGroupForm.java
0 → 100644
View file @
ccaac867
package
com
.
ctrip
.
fun
.
admin
.
form
.
market
;
public
class
EventGameGroupForm
{
private
Integer
id
;
// 赛事id
private
Integer
gameId
;
// 球场id
private
Integer
zuShu
;
// 批量创建时的组数
private
Integer
jianGe
;
// 批量创建时的每组间隔时间
private
String
formatTeeTime
;
//格式化TeeTime
private
Integer
teeTime
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getGameId
()
{
return
gameId
;
}
public
void
setGameId
(
Integer
gameId
)
{
this
.
gameId
=
gameId
;
}
public
Integer
getZuShu
()
{
return
zuShu
;
}
public
void
setZuShu
(
Integer
zuShu
)
{
this
.
zuShu
=
zuShu
;
}
public
Integer
getJianGe
()
{
return
jianGe
;
}
public
void
setJianGe
(
Integer
jianGe
)
{
this
.
jianGe
=
jianGe
;
}
public
Integer
getTeeTime
()
{
return
teeTime
;
}
public
void
setTeeTime
(
Integer
teeTime
)
{
this
.
teeTime
=
teeTime
;
}
public
String
getFormatTeeTime
()
{
return
String
.
format
(
"%02d"
,
this
.
teeTime
/
60
)
+
":"
+
String
.
format
(
"%02d"
,
this
.
teeTime
%
60
);
}
public
void
setFormatTeeTime
(
String
formatTeeTime
)
{
this
.
formatTeeTime
=
formatTeeTime
;
String
[]
segs
=
formatTeeTime
.
split
(
":"
);
this
.
teeTime
=
Integer
.
parseInt
(
segs
[
0
])
*
60
+
Integer
.
parseInt
(
segs
[
1
]);
}
}
src/main/java/com/ctrip/fun/admin/form/market/EventGamePlayerForm.java
0 → 100644
View file @
ccaac867
package
com
.
ctrip
.
fun
.
admin
.
form
.
market
;
public
class
EventGamePlayerForm
{
private
Integer
id
;
//id
private
String
mobilePhone
;
//手机号
private
String
uid
;
// 打球人uid
private
String
sex
;
//性别
private
Integer
candicate
;
//差点
private
String
remark
;
//备注
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getMobilePhone
()
{
return
mobilePhone
;
}
public
void
setMobilePhone
(
String
mobilePhone
)
{
this
.
mobilePhone
=
mobilePhone
;
}
public
String
getUid
()
{
return
uid
;
}
public
void
setUid
(
String
uid
)
{
this
.
uid
=
uid
;
}
public
String
getSex
()
{
return
sex
;
}
public
void
setSex
(
String
sex
)
{
this
.
sex
=
sex
;
}
public
Integer
getCandicate
()
{
return
candicate
;
}
public
void
setCandicate
(
Integer
candicate
)
{
this
.
candicate
=
candicate
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
}
src/main/java/com/ctrip/fun/admin/form/market/EventGameQueryForm.java
0 → 100644
View file @
ccaac867
package
com
.
ctrip
.
fun
.
admin
.
form
.
market
;
import
java.util.Date
;
import
org.springframework.format.annotation.DateTimeFormat
;
public
class
EventGameQueryForm
{
private
Integer
id
;
// 赛事id
private
Integer
courseId
;
// 球场id
private
String
courseName
;
// 球场名称
private
String
gameName
;
// 赛事名称
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
playDateStart
;
// 赛事时间查询开始日期
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
playDateEnd
;
// 赛事时间查询结束日期
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getCourseId
()
{
return
courseId
;
}
public
void
setCourseId
(
Integer
courseId
)
{
this
.
courseId
=
courseId
;
}
public
String
getCourseName
()
{
return
courseName
;
}
public
void
setCourseName
(
String
courseName
)
{
this
.
courseName
=
courseName
;
}
public
String
getGameName
()
{
return
gameName
;
}
public
void
setGameName
(
String
gameName
)
{
this
.
gameName
=
gameName
;
}
public
Date
getPlayDateStart
()
{
return
playDateStart
;
}
public
void
setPlayDateStart
(
Date
playDateStart
)
{
this
.
playDateStart
=
playDateStart
;
}
public
Date
getPlayDateEnd
()
{
return
playDateEnd
;
}
public
void
setPlayDateEnd
(
Date
playDateEnd
)
{
this
.
playDateEnd
=
playDateEnd
;
}
}
src/main/java/com/ctrip/fun/admin/service/golf/EventCustomerInfoService.java
View file @
ccaac867
...
...
@@ -49,6 +49,31 @@ public class EventCustomerInfoService extends BaseService {
return
new
ArrayList
<
OrderPlayerBean
>();
}
/**
* 根据用户姓名查询其在赛事中留下的电话信息
*/
public
List
<
EventCustomerInfoBean
>
getEventCustomerInfoByName
(
EventCustomerInfoQuery
query
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventCustomer.getEventCustomerInfoByName"
);
Request
<
EventCustomerInfoQuery
>
request
=
new
Request
<
EventCustomerInfoQuery
>(
""
,
query
);
HttpEntity
<
Request
<
EventCustomerInfoQuery
>>
entity
=
new
HttpEntity
<
Request
<
EventCustomerInfoQuery
>>(
request
);
Response
<
List
<
EventCustomerInfoBean
>>
response
=
null
;
try
{
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
List
<
EventCustomerInfoBean
>>>()
{
}).
getBody
();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
}
if
(
null
!=
response
&&
response
.
getStatus
()
==
ResponseStatusEnum
.
SUCCESS
.
getValue
())
{
return
response
.
getBody
();
}
else
{
logger
.
error
(
"{} status: {}, msg: {}"
,
"查询订单分组"
,
response
.
getStatus
(),
response
.
getMessage
());
}
return
new
ArrayList
<
EventCustomerInfoBean
>();
}
/**
* 根据赛事资源Id和活动日期获取参赛人员
*/
...
...
src/main/java/com/ctrip/fun/admin/service/market/EventGameGroupService.java
0 → 100644
View file @
ccaac867
package
com
.
ctrip
.
fun
.
admin
.
service
.
market
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.core.ParameterizedTypeReference
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpMethod
;
import
com.ctrip.fun.admin.service.BaseService
;
import
com.ctrip.fun.common.vo.PagedResponseBean
;
import
com.ctrip.fun.common.vo.Request
;
import
com.ctrip.fun.common.vo.Response
;
import
com.ctrip.fun.common.vo.ResponseStatusEnum
;
import
com.ctrip.fun.common.vo.market.EventGameGroupBean
;
import
com.ctrip.fun.common.vo.market.EventGameGroupQuery
;
public
class
EventGameGroupService
extends
BaseService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
EventGameGroupService
.
class
);
/**
* 根据ID查询模板
*
* @param userId 用户ID
* @param id 模板ID
* @return 模板实体
*/
public
EventGameGroupBean
get
(
String
userId
,
int
id
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventGameGroup.get"
);
EventGameGroupBean
retBean
=
null
;
HttpEntity
<
Request
<
Integer
>>
entity
=
new
HttpEntity
<
Request
<
Integer
>>(
new
Request
<
Integer
>(
userId
,
id
));
Response
<
EventGameGroupBean
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
EventGameGroupBean
>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
retBean
=
(
EventGameGroupBean
)
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[get] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
retBean
;
}
/**
* 创建模板
*
* @param userId 用户ID
* @param bean 模板实体
* @return 实体主键
*/
public
int
add
(
String
userId
,
EventGameGroupBean
bean
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventGameGroup.add"
);
int
retKey
=
0
;
Request
<
EventGameGroupBean
>
request
=
new
Request
<
EventGameGroupBean
>();
request
.
setUserId
(
userId
);
request
.
setBody
(
bean
);
HttpEntity
<
Request
<
EventGameGroupBean
>>
entity
=
new
HttpEntity
<
Request
<
EventGameGroupBean
>>(
request
);
Response
<
Integer
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
Integer
>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
retKey
=
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[add] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
retKey
;
}
/**
* 查询供应商列表
*
* @param userId 用户ID
* @param query 查询条件
* @return 供应商列表
*/
public
PagedResponseBean
<
EventGameGroupBean
>
list
(
String
userId
,
EventGameGroupQuery
query
)
{
PagedResponseBean
<
EventGameGroupBean
>
responseBean
=
null
;
String
uri
=
super
.
getServiceUri
(
"uri.eventGameGroup.list"
);
Request
<
EventGameGroupQuery
>
request
=
new
Request
<
EventGameGroupQuery
>(
userId
,
query
);
HttpEntity
<
Request
<
EventGameGroupQuery
>>
entity
=
new
HttpEntity
<
Request
<
EventGameGroupQuery
>>(
request
);
Response
<
PagedResponseBean
<
EventGameGroupBean
>>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
PagedResponseBean
<
EventGameGroupBean
>>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[list] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
responseBean
;
}
/**
* 更新模板
*
* @param userId 用户ID
* @param bean 模板实体
* @return 实体主键
*/
public
boolean
update
(
String
userId
,
EventGameGroupBean
bean
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventGameGroup.update"
);
boolean
retVal
=
false
;
Request
<
EventGameGroupBean
>
request
=
new
Request
<
EventGameGroupBean
>();
request
.
setUserId
(
userId
);
request
.
setBody
(
bean
);
HttpEntity
<
Request
<
EventGameGroupBean
>>
entity
=
new
HttpEntity
<
Request
<
EventGameGroupBean
>>(
request
);
Response
<
Integer
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
Integer
>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
ResponseStatusEnum
.
SUCCESS
.
getValue
())
{
retVal
=
true
;
}
else
{
logger
.
error
(
String
.
format
(
"[add] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
retVal
;
}
}
src/main/java/com/ctrip/fun/admin/service/market/EventGamePlayerService.java
0 → 100644
View file @
ccaac867
package
com
.
ctrip
.
fun
.
admin
.
service
.
market
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.core.ParameterizedTypeReference
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpMethod
;
import
com.ctrip.fun.admin.service.BaseService
;
import
com.ctrip.fun.common.vo.PagedResponseBean
;
import
com.ctrip.fun.common.vo.Request
;
import
com.ctrip.fun.common.vo.Response
;
import
com.ctrip.fun.common.vo.ResponseStatusEnum
;
import
com.ctrip.fun.common.vo.market.EventGamePlayerBean
;
import
com.ctrip.fun.common.vo.market.EventGamePlayerQuery
;
public
class
EventGamePlayerService
extends
BaseService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
EventGamePlayerService
.
class
);
/**
* 根据ID查询模板
*
* @param userId 用户ID
* @param id 模板ID
* @return 模板实体
*/
public
EventGamePlayerBean
get
(
String
userId
,
int
id
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventGamePlayer.get"
);
EventGamePlayerBean
retBean
=
null
;
HttpEntity
<
Request
<
Integer
>>
entity
=
new
HttpEntity
<
Request
<
Integer
>>(
new
Request
<
Integer
>(
userId
,
id
));
Response
<
EventGamePlayerBean
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
EventGamePlayerBean
>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
retBean
=
(
EventGamePlayerBean
)
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[get] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
retBean
;
}
/**
* 创建模板
*
* @param userId 用户ID
* @param bean 模板实体
* @return 实体主键
*/
public
int
add
(
String
userId
,
EventGamePlayerBean
bean
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventGamePlayer.add"
);
int
retKey
=
0
;
Request
<
EventGamePlayerBean
>
request
=
new
Request
<
EventGamePlayerBean
>();
request
.
setUserId
(
userId
);
request
.
setBody
(
bean
);
HttpEntity
<
Request
<
EventGamePlayerBean
>>
entity
=
new
HttpEntity
<
Request
<
EventGamePlayerBean
>>(
request
);
Response
<
Integer
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
Integer
>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
retKey
=
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[add] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
retKey
;
}
/**
* 查询供应商列表
*
* @param userId 用户ID
* @param query 查询条件
* @return 供应商列表
*/
public
PagedResponseBean
<
EventGamePlayerBean
>
list
(
String
userId
,
EventGamePlayerQuery
query
)
{
PagedResponseBean
<
EventGamePlayerBean
>
responseBean
=
null
;
String
uri
=
super
.
getServiceUri
(
"uri.eventGamePlayer.list"
);
Request
<
EventGamePlayerQuery
>
request
=
new
Request
<
EventGamePlayerQuery
>(
userId
,
query
);
HttpEntity
<
Request
<
EventGamePlayerQuery
>>
entity
=
new
HttpEntity
<
Request
<
EventGamePlayerQuery
>>(
request
);
Response
<
PagedResponseBean
<
EventGamePlayerBean
>>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
PagedResponseBean
<
EventGamePlayerBean
>>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[list] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
responseBean
;
}
/**
* 更新模板
*
* @param userId 用户ID
* @param bean 模板实体
* @return 实体主键
*/
public
boolean
update
(
String
userId
,
EventGamePlayerBean
bean
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventGamePlayer.update"
);
boolean
retVal
=
false
;
Request
<
EventGamePlayerBean
>
request
=
new
Request
<
EventGamePlayerBean
>();
request
.
setUserId
(
userId
);
request
.
setBody
(
bean
);
HttpEntity
<
Request
<
EventGamePlayerBean
>>
entity
=
new
HttpEntity
<
Request
<
EventGamePlayerBean
>>(
request
);
Response
<
Integer
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
Integer
>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
ResponseStatusEnum
.
SUCCESS
.
getValue
())
{
retVal
=
true
;
}
else
{
logger
.
error
(
String
.
format
(
"[add] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
retVal
;
}
public
PagedResponseBean
<
EventGamePlayerBean
>
playerInfoList
(
String
userId
,
EventGamePlayerQuery
query
)
{
PagedResponseBean
<
EventGamePlayerBean
>
responseBean
=
null
;
String
uri
=
super
.
getServiceUri
(
"uri.eventGamePlayer.playerInfoList"
);
Request
<
EventGamePlayerQuery
>
request
=
new
Request
<
EventGamePlayerQuery
>(
userId
,
query
);
HttpEntity
<
Request
<
EventGamePlayerQuery
>>
entity
=
new
HttpEntity
<
Request
<
EventGamePlayerQuery
>>(
request
);
Response
<
PagedResponseBean
<
EventGamePlayerBean
>>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
PagedResponseBean
<
EventGamePlayerBean
>>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[list] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
responseBean
;
}
public
PagedResponseBean
<
EventGamePlayerBean
>
recommendPlayer
(
String
string
,
String
playerPhone
)
{
PagedResponseBean
<
EventGamePlayerBean
>
responseBean
=
null
;
String
uri
=
super
.
getServiceUri
(
"uri.eventGamePlayer.recommendPlayer"
);
Request
<
String
>
request
=
new
Request
<
String
>(
""
,
playerPhone
);
HttpEntity
<
Request
<
String
>>
entity
=
new
HttpEntity
<
Request
<
String
>>(
request
);
Response
<
PagedResponseBean
<
EventGamePlayerBean
>>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
PagedResponseBean
<
EventGamePlayerBean
>>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[list] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
responseBean
;
}
}
src/main/java/com/ctrip/fun/admin/service/market/EventGameService.java
0 → 100644
View file @
ccaac867
package
com
.
ctrip
.
fun
.
admin
.
service
.
market
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.core.ParameterizedTypeReference
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpMethod
;
import
com.ctrip.fun.admin.service.BaseService
;
import
com.ctrip.fun.common.vo.PagedResponseBean
;
import
com.ctrip.fun.common.vo.Request
;
import
com.ctrip.fun.common.vo.Response
;
import
com.ctrip.fun.common.vo.ResponseStatusEnum
;
import
com.ctrip.fun.common.vo.market.EventGameBean
;
import
com.ctrip.fun.common.vo.market.EventGameQuery
;
public
class
EventGameService
extends
BaseService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
EventGameService
.
class
);
/**
* 根据ID查询模板
*
* @param userId 用户ID
* @param id 模板ID
* @return 模板实体
*/
public
EventGameBean
get
(
String
userId
,
int
id
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventGame.get"
);
EventGameBean
retBean
=
null
;
HttpEntity
<
Request
<
Integer
>>
entity
=
new
HttpEntity
<
Request
<
Integer
>>(
new
Request
<
Integer
>(
userId
,
id
));
Response
<
EventGameBean
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
EventGameBean
>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
retBean
=
(
EventGameBean
)
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[get] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
retBean
;
}
/**
* 创建模板
*
* @param userId 用户ID
* @param bean 模板实体
* @return 实体主键
*/
public
int
add
(
String
userId
,
EventGameBean
bean
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventGame.add"
);
int
retKey
=
0
;
Request
<
EventGameBean
>
request
=
new
Request
<
EventGameBean
>();
request
.
setUserId
(
userId
);
request
.
setBody
(
bean
);
HttpEntity
<
Request
<
EventGameBean
>>
entity
=
new
HttpEntity
<
Request
<
EventGameBean
>>(
request
);
Response
<
Integer
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
Integer
>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
retKey
=
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[add] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
retKey
;
}
/**
* 查询供应商列表
*
* @param userId 用户ID
* @param query 查询条件
* @return 供应商列表
*/
public
PagedResponseBean
<
EventGameBean
>
list
(
String
userId
,
EventGameQuery
query
)
{
PagedResponseBean
<
EventGameBean
>
responseBean
=
null
;
String
uri
=
super
.
getServiceUri
(
"uri.eventGame.list"
);
Request
<
EventGameQuery
>
request
=
new
Request
<
EventGameQuery
>(
userId
,
query
);
HttpEntity
<
Request
<
EventGameQuery
>>
entity
=
new
HttpEntity
<
Request
<
EventGameQuery
>>(
request
);
Response
<
PagedResponseBean
<
EventGameBean
>>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
PagedResponseBean
<
EventGameBean
>>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[list] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
responseBean
;
}
/**
* 更新模板
*
* @param userId 用户ID
* @param bean 模板实体
* @return 实体主键
*/
public
boolean
update
(
String
userId
,
EventGameBean
bean
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventGame.update"
);
boolean
retVal
=
false
;
Request
<
EventGameBean
>
request
=
new
Request
<
EventGameBean
>();
request
.
setUserId
(
userId
);
request
.
setBody
(
bean
);
HttpEntity
<
Request
<
EventGameBean
>>
entity
=
new
HttpEntity
<
Request
<
EventGameBean
>>(
request
);
Response
<
Integer
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
Integer
>>()
{
}
).
getBody
();
if
(
null
!=
response
)
{
if
(
response
.
getStatus
()
==
ResponseStatusEnum
.
SUCCESS
.
getValue
())
{
retVal
=
true
;
}
else
{
logger
.
error
(
String
.
format
(
"[add] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
}
return
retVal
;
}
}
src/main/java/com/ctrip/fun/admin/service/system/UserService.java
View file @
ccaac867
...
...
@@ -491,4 +491,31 @@ public class UserService extends BaseService {
return
response
.
getBody
();
}
public
PagedResponseBean
<
UserExtBean
>
getUserExtByName
(
String
string
,
UserExtQuery
query
)
{
String
uri
=
super
.
getServiceUri
(
"uri.User.getUserExtByName"
);
PagedResponseBean
<
UserExtBean
>
pageResponseBean
=
null
;
Request
<
UserExtQuery
>
request
=
new
Request
<
UserExtQuery
>();
request
.
setUserId
(
string
);
request
.
setBody
(
query
);
HttpEntity
<
Request
<
UserExtQuery
>>
httpEntity
=
new
HttpEntity
<
Request
<
UserExtQuery
>>(
request
);
Response
<
PagedResponseBean
<
UserExtBean
>>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
httpEntity
,
new
ParameterizedTypeReference
<
Response
<
PagedResponseBean
<
UserExtBean
>>>()
{
}).
getBody
();
if
(
response
.
getStatus
()
==
ResponseStatusEnum
.
SUCCESS
.
getValue
())
{
pageResponseBean
=
response
.
getBody
();
}
else
{
Map
<
String
,
String
>
tags
=
new
HashMap
<>();
tags
.
put
(
"userId"
,
string
);
tags
.
put
(
"query"
,
query
.
toString
());
logger
.
error
(
"用户list异常"
,
String
.
format
(
"status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()),
tags
);
}
return
pageResponseBean
;
}
}
src/main/resources/config/spring-service.xml
View file @
ccaac867
...
...
@@ -267,6 +267,16 @@
<bean
name=
"communeInviteActivityService"
class=
"com.ctrip.fun.admin.service.market.CommuneInviteActivityService"
parent=
"baseService"
/>
<!-- 赛事创建 -->
<bean
name=
"eventGameService"
class=
"com.ctrip.fun.admin.service.market.EventGameService"
parent=
"baseService"
/>
<bean
name=
"eventGameGroupService"
class=
"com.ctrip.fun.admin.service.market.EventGameGroupService"
parent=
"baseService"
/>
<bean
name=
"eventGamePlayerService"
class=
"com.ctrip.fun.admin.service.market.EventGamePlayerService"
parent=
"baseService"
/>
<!-- 社员工分 -->
<bean
name=
"workPointService"
class=
"com.ctrip.fun.admin.service.workPoint.WorkPointService"
parent=
"baseService"
/>
...
...
src/main/resources/properties/service.properties
View file @
ccaac867
...
...
@@ -8,6 +8,7 @@ uri.endpoint=${uri.endpoint}
uri.User.list
=
/fun-golf-service/userext/list
uri.User.get
=
/fun-golf-service/userext/get
uri.User.getByUid
=
/fun-golf-service/userext/getByUid
uri.User.getUserExtByName
=
/fun-golf-service/userext/getUserExtByName
uri.User.updateRecode
=
/fun-golf-service/userext/updateRecode
uri.User.updateBlockFlag
=
/fun-golf-service/userext/updateBlockFlag
uri.User.getOutsideUser
=
/fun-golf-service/user/getOutsideUserByUsername
...
...
@@ -444,6 +445,26 @@ uri.communeInviteActivity.queryList=/fun-golf-service/communeInviteActivity/quer
uri.communeInviteActivity.payRewardAmount
=
/fun-golf-service/communeInviteActivity/payRewardAmount
uri.communeInviteActivity.getDetail
=
/fun-golf-service/communeInviteActivity/getOpDetail
#eventGame
uri.eventGame.add
=
/fun-golf-service/eventGame/add
uri.eventGame.get
=
/fun-golf-service/eventGame/get
uri.eventGame.list
=
/fun-golf-service/eventGame/list
uri.eventGame.update
=
/fun-golf-service/eventGame/update
#eventGameGroup
uri.eventGameGroup.add
=
/fun-golf-service/eventGameGroup/add
uri.eventGameGroup.get
=
/fun-golf-service/eventGameGroup/get
uri.eventGameGroup.list
=
/fun-golf-service/eventGameGroup/list
uri.eventGameGroup.update
=
/fun-golf-service/eventGameGroup/update
#eventGameGroup
uri.eventGamePlayer.add
=
/fun-golf-service/eventGamePlayer/add
uri.eventGamePlayer.get
=
/fun-golf-service/eventGamePlayer/get
uri.eventGamePlayer.list
=
/fun-golf-service/eventGamePlayer/list
uri.eventGamePlayer.update
=
/fun-golf-service/eventGamePlayer/update
uri.eventGamePlayer.playerInfoList
=
/fun-golf-service/eventGamePlayer/playerInfoList
uri.eventGamePlayer.recommendPlayer
=
/fun-golf-service/eventGamePlayer/recommendPlayer
#communeExt
uri.communeExt.list
=
/fun-golf-service/communeExt/list
uri.communeExt.get
=
/fun-golf-service/communeExt/get
...
...
@@ -478,6 +499,7 @@ uri.eventCustomer.importExcelGroupInfo=/fun-golf-service/eventCustomerInfo/impor
uri.eventCustomer.importExcelRankList
=
/fun-golf-service/eventCustomerInfo/importExcelRankList
uri.eventCustomer.listByResourceIdAndPriceDate
=
/fun-golf-service/eventCustomerInfo/listByResourceIdAndPriceDate
uri.eventCustomer.findOrderPlayers
=
/fun-golf-service/eventCustomerInfo/findOrderPlayers
uri.eventCustomer.getEventCustomerInfoByName
=
/fun-golf-service/eventCustomerInfo/getEventCustomerInfoByName
uri.eventCustomer.listGroupByResourceIdAndPriceDate
=
/fun-golf-service/eventCustomerInfo/listGroupByResourceIdAndPriceDate
uri.eventCustomer.updateGroupNum
=
/fun-golf-service/eventCustomerInfo/updateGroupNum
uri.eventCustomer.getByEventCustomerId
=
/fun-golf-service/eventCustomerInfo/getByEventCustomerId
...
...
src/main/webapp/WEB-INF/templates/common/layout.ftl
View file @
ccaac867
...
...
@@ -518,6 +518,18 @@ ${pageCss}
<li
<#
if
current =
=
"
userOrderBehaviour_listValidUserOrder
"
>
class="active"
</
#
if>
>
<a
href=
"/userOrderBehaviour/listValidUserOrder"
>
用户有效订单查询
</a>
</li>
<li
<#
if
current =
=
"
userOrderBehaviour_recommendPlayer
"
>
class="active"
</
#
if>
>
<a
href=
"/market/eventGame/recommendPlayerGet"
>
客户推荐
</a>
</li>
<li
<#
if
current =
=
"
userOrderBehaviour_createGame
"
>
class="active"
</
#
if>
>
<a
href=
"/market/eventGame/create"
>
创建赛事
</a>
</li>
<li
<#
if
current =
=
"
userOrderBehaviour_listEventGame
"
>
class="active"
</
#
if>
>
<a
href=
"/market/eventGame/list"
>
赛事列表
</a>
</li>
</ul>
</
#
if>
</div>
...
...
src/main/webapp/WEB-INF/templates/market/createGame.ftl
0 → 100644
View file @
ccaac867
<#assign pageJsContent>
<script type="text/javascript">
$("#course_container").collapse({query: 'h3'});
$("#J_queryBtn").click(function () {
$.ajax({
url: "/j/course/list",
type: "get",
data: {
courseName: $("#courseNameForSearch").val()
},
success: function (obj) {
alert('aaaa');
//注册一个显示营业状态的Helper
Handlebars.registerHelper("statusShow",function(v1){
var staShow = "";
if(v1=1){
staShow = "营业中";
}else if(v1=2){
staShow = "停业";
}else if(v1=3){
staShow = "暂停营业";
}else if(v1=4){
staShow = "无效";
}else{
staShow = "无";
}
return staShow;
});
alert('bbbbb');
var source = $("#courseSelector-template").html();
var template = Handlebars.compile(source);
$('#tableList').html(template(obj))
}
});
});
$('#courseName').next().click(function () {
$("#myModal").modal('show');
});
$("#supplierList").on("click", "#J_supplierSelctorBtn", function () {
$('#courseName').val($(this).data('id'));
$('#supplierModal').modal('hide');
})
$("#playDate").iCalendar({
placeholder: $("#playDate").val() ? $("#playDate").val() : "blank"
});
</script>
</#assign>
<@com.layout title="资源编辑" module="communeAdm" current="userOrderBehaviour_createGame" pageJs=pageJsContent>
<ul class="nav nav-tabs">
<li class="active"> <a href="${action}?id=${id!}">资源</a> </li>
<#if id != 0>
<li><a href="/userOrderBehaviour/createGroup?gameId=${id!}">分组</a></li>
<#else>
<li class="disabled"><a href="javascript:;">分组</a></li>
</#if>
</ul>
<form action='${action!}' method="post">
<input type="hidden" name="id" value='${id!}'/>
赛事名称:<input type="text" name="gameName" value='${gameName!}'/>
球场id:<input type="text" name="courseId" value='${courseId!}'/>
赛事日期:<input type="text" name="playDate" value='${playDate!}'/>
<input type=submit name="submit1" value="提交">
</form>
<div class="modal hide fade" id="myModal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>查询球场</h3>
</div>
<div class="modal-body">
<div class="input-append">
<input type="text" name="courseName" id="courseNameForSearch" value="" placeholder="球场名称" class="input-medium" autocomplete="off"/>
<button id="J_queryBtn" class="btn" data-toggle="modal" >查询</button>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>球场名称</th>
<th width=14%>目的地</th>
<th width=14%>状态</th>
<th style="text-align: center;"><i class="icon-wrench"></i></th>
</tr>
</thead>
<tbody id="tableList">
</tbody>
</table>
<div class="pagination pagination-mini">
<ul>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
</div>
</div>
<script id="table-template" type="text/x-handlebars-template">
{{#each body}}
<tr>
<td>{{id}}</td>
<td><a href="/golf/course/edit?id={{id}}" target="_blank">{{name}}</a></td>
<td>{{districtName}}</td>
<td>{{statusShow status}}</td>
<td><a class="J_courseSelctorBtn" data-id="{{id}}" >选择</a></td>
</tr>
{{/each}}
</script>
</@com.layout>
src/main/webapp/WEB-INF/templates/market/createGroup.ftl
0 → 100644
View file @
ccaac867
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/templates/market/eventGameForm.ftl
0 → 100644
View file @
ccaac867
<#assign pageJsContent>
<script type="text/javascript">
$("#playDate").iCalendar({
placeholder: $("#playDate").val() ? $("#playDate").val() : "blank"
});
var $popDiv=$("#courseSelector");
$('#courseId').next().click(function () {
$("#myModal").modal('show');
});
$("#tableList").on("click", ".J_courseSelctorBtn", function () {
$('#courseId').val($(this).data('id'));
$('#myModal').modal('hide');
})
$("#J_queryBtn").click(function () {
var courseName = $popDiv.find("input[name=courseName]").val();
$.ajax({
url: "/j/course/list",
type: "get",
data: {
courseName: courseName,
coursesId: ""
},
success: function (obj) {
//注册一个显示营业状态的Helper
Handlebars.registerHelper("statusShow",function(v1){
var staShow = "";
if(v1=1){
staShow = "营业中";
}else if(v1=2){
staShow = "停业";
}else if(v1=3){
staShow = "暂停营业";
}else if(v1=4){
staShow = "无效";
}else{
staShow = "无";
}
return staShow;
});
var source = $("#table_course").html();
var template = Handlebars.compile(source);
$('#tableList').html(template(obj))
}
});
});
</script>
</#assign>
<@com.layout title="资源编辑" module="communeAdm" current="template_create" pageJs=pageJsContent>
<ul class="nav nav-tabs">
<li class="active">
<a href="#">赛事</a>
</li>
<#if eventGameForm.id ?? >
<li><a href="/market/eventGame/createGroupGet?gameId=${eventGameForm.id!}">分组</a></li>
<#else>
<li class="disabled"><a href="javascript:;">分组</a></li>
</#if>
</ul>
<form class="form-inline" action="${action}" method="post">
<div id="course_container">
<div class="row-fluid show-grid">
<@form.hidden "eventGameForm.id"/>
<@form.textInput "eventGameForm.gameName" "class=\"input-medium\"" "赛事名称" />
<@form.addonTextInput path="eventGameForm.courseId" attributes="class=\"input-medium\" required min=\"1\"" label="球场ID" addon="选择" addonType="button" type="number"/>
<@form.textInput "eventGameForm.playDate" "class=\"input-medium\"" "赛事日期" />
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary">提交</button>
</div>
</div>
</div>
</div>
</form>
<div class="modal hide fade" id="myModal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>查询球场</h3>
</div>
<div class="modal-body" id='courseSelector'>
<div class="input-append">
<input type="text" name="courseName" value="" placeholder="球场名称" class="input-medium" autocomplete="off"/>
<button id="J_queryBtn" class="btn" data-toggle="modal" >查询</button>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>球场名称</th>
<th width=14%>目的地</th>
<th width=14%>状态</th>
<th style="text-align: center;"><i class="icon-wrench"></i></th>
</tr>
</thead>
<tbody id="tableList">
</tbody>
</table>
<div class="pagination pagination-mini">
<ul>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
</div>
</div>
<script id="table_course" type="text/x-handlebars-template">
{{#each body}}
<tr>
<td>{{id}}</td>
<td><a href="/golf/course/edit?id={{id}}" target="_blank">{{name}}</a></td>
<td>{{districtName}}</td>
<td>{{statusShow status}}</td>
<td><a class="J_courseSelctorBtn" data-id="{{id}}" >选择</a></td>
</tr>
{{/each}}
</script>
</@com.layout>
\ No newline at end of file
src/main/webapp/WEB-INF/templates/market/eventGameList.ftl
0 → 100644
View file @
ccaac867
<#assign pageJsContent>
<script type="text/javascript">
</script>
</#assign>
<@com.layout title="查询模板" module="communeAdm" current="template_create" pageJs=pageJsContent>
<form class="form-inline" action="/market/eventGame/list" method="get">
<@com.textInputTwoDate "eventGameQueryForm.playDateStart" "eventGameQueryForm.playDateEnd" "style=\"margin-left: 5px;\"" "赛事时间"/>
<@com.textInput "eventGameQueryForm.courseId" "style=\"margin-left: 5px;\"" "球场id" "text"/>
<button type="submit" class="btn btn-primary">查询</button>
</form>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="span1">赛事名称</th>
<th class="span4">打球时间</th>
<th class="span4">创建人</th>
<th class="span4">创建时间</th>
<th style="text-align: center;"><i class="icon-wrench"></i></th>
</tr>
</thead>
<tbody>
<#list list as item>
<tr>
<td width='300px'>${item.gameName!}</td>
<td>${item.playDate?string("yyyy-MM-dd HH:mm:ss")}</td>
<td>${item.createUser!}</td>
<td>${item.createTime?string("yyyy-MM-dd HH:mm:ss")}</td>
<td><a title='${item.id}' href="/market/eventGame/edit?id=${item.id}">编辑</a></td>
</tr>
</#list>
</tbody>
</table>
<div class="pagination pagination-right">
<ul>
<@paginator.first />
<@paginator.previous />
<@paginator.numbers separator=""/>
<@paginator.next />
<@paginator.last />
</ul>
<@paginator.statistics />
</div>
<div class="modal hide fade" id="myModal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>查询球场</h3>
</div>
<div class="modal-body" id='courseSelector'>
<div class="input-append">
<input type="text" name="courseName" value="" placeholder="球场名称" class="input-medium" autocomplete="off"/>
<button id="J_queryBtn" class="btn" data-toggle="modal" >查询</button>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>球场名称</th>
<th width=14%>目的地</th>
<th width=14%>状态</th>
<th style="text-align: center;"><i class="icon-wrench"></i></th>
</tr>
</thead>
<tbody id="tableList">
</tbody>
</table>
<div class="pagination pagination-mini">
<ul>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
</div>
</div>
<script id="table_course" type="text/x-handlebars-template">
{{#each body}}
<tr>
<td>{{id}}</td>
<td><a href="/golf/course/edit?id={{id}}" target="_blank">{{name}}</a></td>
<td>{{districtName}}</td>
<td>{{statusShow status}}</td>
<td><a class="J_courseSelctorBtn" data-id="{{id}}" >选择</a></td>
</tr>
{{/each}}
</script>
</@com.layout>
src/main/webapp/WEB-INF/templates/market/listEventGame.ftl
0 → 100644
View file @
ccaac867
<#assign pageJsContent>
<script src="${staticServer}/js/lib/highcharts.js"></script>
<script src="${staticServer}/js/app/myHighcharts.js"></script>
<script src="${staticServer}/js/app/statistics.js"></script>
<script>
</script>
</#assign>
<#assign pageCssContent>
<link rel="stylesheet" href='${staticServer}/css/app/statistics.css'/>
<style>
</style>
</#assign>
<@com.layout title="用户下单行为分析" module="communeAdm" current="userOrderBehaviour_listEventGame" pageCss=pageCssContent pageJs=pageJsContent>
<form id="J_Form" class="form-inline search-box" action="/userOrderBehaviour/listEventGame" method="get">
<table class="table table-bordered table-striped widthShow">
<thead>
<tr>
<th>序号</th>
<th>赛事名称</th>
<th>所在球场</th>
<th>赛事日期</th>
<th>创建人</th>
<th>创建时间</th>
<th>编辑</th>
</tr>
</thead>
<tbody class="J_shift">
<#list list as item>
<tr>
<td>1</td>
<td>${item.gameName!}</td>
<td>${item.courseName!}</td>
<td>${item.playDate!}</td>
<td>${item.createUser!} </td>
<td>${item.createDate!} </td>
<td><a href="/userOrderBehaviour/editEventGame?id=${item.id}">编辑</a></td>
</tr>
</#list>
</tbody>
</table>
<div class="pagination pagination-right" style="width:1100px;">
<ul class="pagination pagination-right">
<@paginator.first />
<@paginator.previous />
<@paginator.numbers separator=""/>
<@paginator.next />
<@paginator.last />
</ul>
<@paginator.statistics />
</div>
</div>
</form>
</@com.layout>
\ No newline at end of file
src/main/webapp/WEB-INF/templates/market/recommendPlayer.ftl
0 → 100644
View file @
ccaac867
<#assign pageJsContent>
<script type="text/javascript">
</script>
</#assign>
<@com.layout title="资源编辑" module="communeAdm" current="userOrderBehaviour_recommendPlayer" pageJs=pageJsContent>
<form action='/market/eventGame/recommendPlayerPost' method="post">
已报名客户手机号:<input type="text" name="playerPhone" value='${playerPhone!}'/>
<input type=submit name="submit1" value="推荐" style='margin-bottom: 10px;'>
</form>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="span1">客户姓名</th>
<th class="span4">客户手机号</th>
<th class="span4">与已报名用户打球次数</th>
<th class="span4">最近一次打球时间</th>
</tr>
</thead>
<tbody>
<#list list as item>
<tr>
<td width='500px'>${item.playerName!}</td>
<td width='500px'>${item.mobilePhone!}</td>
<td width='500px'>${item.times!}</td>
<td width='500px'>${item.latestTime?string("yyyy-MM-dd")}</td>
</tr>
</#list>
</tbody>
</table>
</@com.layout>
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