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
57afb45a
authored
Mar 16, 2018
by
Huang Linyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加开卡区域,客户区域查询,优化查询结果页面
parent
84f364b2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
24 deletions
src/main/java/com/ctrip/fun/admin/controller/market/CommuneAdmController.java
src/main/webapp/WEB-INF/templates/market/communeAdm/list.ftl
src/main/webapp/WEB-INF/templates/market/communeAdm/myBindList.ftl
src/main/java/com/ctrip/fun/admin/controller/market/CommuneAdmController.java
View file @
57afb45a
...
...
@@ -45,6 +45,13 @@ public class CommuneAdmController {
@Autowired
private
UserDetailsService
userDetailsService
;
/**
* 标签列表
* @param request
* @param query
* @param model
* @return
*/
@RequestMapping
(
value
=
"queryList"
,
method
=
RequestMethod
.
GET
)
public
String
queryList
(
HttpServletRequest
request
,
@ModelAttribute
(
"dto"
)
CommuneAdmQuery
query
,
ModelMap
model
)
{
int
currentPage
=
0
;
...
...
@@ -56,6 +63,9 @@ public class CommuneAdmController {
}
query
.
setPagerOffset
(
currentPage
*
query
.
getPagerPerPage
());
PagedResponseBean
<
CommuneAdmBean
>
response
=
communeAdmService
.
list
(
query
);
Response
<
List
<
AdminUserBean
>>
adminsresponse
=
userDetailsService
.
getCommuneAdmUserList
(
null
);
List
<
AdminUserBean
>
adminBeanList
=
adminsresponse
.
getBody
();
model
.
put
(
"adminBeanList"
,
adminBeanList
);
pageSize
=
query
.
getPagerPerPage
();
total
=
response
.
getCount
();
pageCount
=
(
0
==
total
%
pageSize
)
?
(
total
/
pageSize
)
:
(
total
/
pageSize
+
1
);
...
...
@@ -66,6 +76,13 @@ public class CommuneAdmController {
return
"market/communeAdm/list"
;
}
/**
* 我管理的标签
* @param request
* @param query
* @param model
* @return
*/
@RequestMapping
(
value
=
"myBindList"
,
method
=
RequestMethod
.
GET
)
public
String
myBindList
(
HttpServletRequest
request
,
@ModelAttribute
(
"dto"
)
CommuneAdmQuery
query
,
ModelMap
model
)
{
int
currentPage
=
0
;
...
...
@@ -77,10 +94,6 @@ public class CommuneAdmController {
}
String
username
=
SpringSecurityUtil
.
getCurrentUserName
();
query
.
setBindedAdm
(
username
);
/*String label = query.getLabels();
if(label!=null){
query.setLabels(" "+label+" ");
}*/
query
.
setPagerOffset
(
currentPage
*
query
.
getPagerPerPage
());
PagedResponseBean
<
CommuneAdmBean
>
response
=
communeAdmService
.
myBindList
(
query
);
pageSize
=
query
.
getPagerPerPage
();
...
...
@@ -94,18 +107,6 @@ public class CommuneAdmController {
return
"market/communeAdm/myBindList"
;
}
/*@RequestMapping(value = "update", method = RequestMethod.GET)
public String toUpdate(HttpServletRequest request, @ModelAttribute("id") Integer id, ModelMap model) {
CommuneExtBean bean = communeExtService.getById(id);
CommuneAdmBean admBean = communeAdmService.getByCommuneExtId(id);
model.put("dto", bean);
model.put("labels", admBean.getLabels());
model.put("action", "/communeExt/update");
model.put("page", request.getParameter("page"));
return "market/communeExt/form";
}*/
/**
* 批量绑定管理员
...
...
@@ -140,6 +141,10 @@ public class CommuneAdmController {
}
/**
* 查找所有的标签
* @return
*/
@ResponseBody
@RequestMapping
(
value
=
"/labels/list"
,
method
=
RequestMethod
.
GET
)
public
List
<
CommuneLabelBean
>
findAllLabels
()
{
...
...
src/main/webapp/WEB-INF/templates/market/communeAdm/list.ftl
View file @
57afb45a
...
...
@@ -95,9 +95,36 @@
<@com.textInput "dto.uid" "style=\"margin-left: 5px;\"" "UID"/>
<br />
<@com.textInput "dto.drawer" "style=\"margin-left: 5px;\"" "开单人"/>
<@com.textInput "dto.bindedAdm" "style=\"margin-left: 5px;\"" "绑定会服" />
<!-- <@com.textInput "dto.bindedAdm" "style=\"margin-left: 5px;\"" "绑定会服" /> -->
<div class="short_content_div">
<label class="control-label" for="checkedRegion" style="margin-left: 5px;">绑定会服</label>
<select id="bindedAdm" name="bindedAdm">
<option value="">全部</option>
<#if dto.bindedAdm?? && dto.bindedAdm=="0" >
<option value="0" selected="selected">未绑定会服</option>
<#else>
<option value="0" >未绑定会服</option>
</#if>
<#if dto.bindedAdm?? && dto.bindedAdm=="1" >
<option value="1" selected="selected">已绑定会服</option>
<#else>
<option value="1" >已绑定会服</option>
</#if>
<#list adminBeanList as item>
<#if dto.bindedAdm?? && dto.bindedAdm == item.userName >
<option value="${item.userName}" selected="selected">${item.userName}</option>
<#else>
<option value="${item.userName}" >${item.userName}</option>
</#if>
</#list>
</select>
</div>
<@com.textInputTwoDate "dto.communeAgainTimeStart" "dto.communeAgainTimeEnd" "" "社员到期时间"/>
<br />
<@com.singleSelectQuery path="dto.checkedRegion" options=enums["com.ctrip.fun.common.vo.user.CheckedRegionEnum"] label="开卡区域" />
<@com.singleSelectQuery path="dto.customerRegion" options=enums["com.ctrip.fun.common.vo.user.CustomerRegionEnum"] label="客户区域" />
<br />
<button type="submit" id="selectButton" class="btn btn-primary">查询</button>
<button type="button" id="batchBind" class="btn btn-primary">批量绑定</button>
...
...
@@ -114,6 +141,8 @@
<th>电话</th>
<th>uid</th>
<th>开单人</th>
<th>开卡区域</th>
<th>客户区域</th>
<th>生日</th>
<th>社员到期时间</th>
<th>绑定会服</th>
...
...
@@ -132,6 +161,8 @@
</td>
<td>${item.uid!}</td>
<td>${item.drawer!}</td>
<td>${item.checkedRegionMsg!}</td>
<td>${item.customerRegionMsg!}</td>
<td><#if item.birthday??>${item.birthday?string("yyyy-MM-dd")}</#if></td>
<td><#if item.communeAgainTime??>${item.communeAgainTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>${item.bindedAdm!}</td>
...
...
src/main/webapp/WEB-INF/templates/market/communeAdm/myBindList.ftl
View file @
57afb45a
...
...
@@ -241,12 +241,13 @@
<th><input type="checkbox" name="checkAll" id="checkAll" onclick="shiftCheckAll();"> </th>
<th>姓名</th>
<th>电话</th>
<th>uid</th>
<th>生日</th>
<th>开单人</th>
<th>开卡区域</th>
<th>客户区域</th>
<th>社员到期时间</th>
<th>标签</th>
<th>绑定会服</th>
<th>绑定时间</th>
<th colspan=1>操作</th>
</tr>
...
...
@@ -257,14 +258,15 @@
<td><input type="checkbox" name="datacheck" data-index="${item_index}" id="${item.id}" class="J_shiftCheck J_check-${item_index}" value="${item.id}"></td>
<td>${item.userName!}</td>
<td>
<a href="/system/user/${item.
mobilePhone
!}/detailByUid">${item.mobilePhone!}</a>
<a href="/system/user/${item.
uid
!}/detailByUid">${item.mobilePhone!}</a>
</td>
<td>${item.uid!}</td>
<td><#if item.birthday??>${item.birthday?string("yyyy-MM-dd")}</#if></td>
<td>${item.drawer!}</td>
<td>${item.checkedRegionMsg!}</td>
<td>${item.customerRegionMsg!}</td>
<td><#if item.communeAgainTime??>${item.communeAgainTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>${item.labels!}</td>
<td>${item.bindedAdm!}</td>
<td><#if item.bindTime??>${item.bindTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
<td>
<a target="_blank" href="/communeExt/update?id=${item.id!}&page=0">社员资料</a>
</td>
...
...
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