Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
youka-manage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
java-youka-wallet
youka-manage
Commits
c9176e95
Commit
c9176e95
authored
Mar 07, 2018
by
Java-聂换换
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户
parent
76df5e6e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
190 additions
and
18 deletions
+190
-18
YoukaCardDao.java
src/main/java/com/thinkgem/jeesite/modules/youka/dao/YoukaCardDao.java
+2
-1
YoukaUserService.java
src/main/java/com/thinkgem/jeesite/modules/youka/service/YoukaUserService.java
+11
-3
YoukaCardDao.xml
src/main/resources/mappings/modules/youka/YoukaCardDao.xml
+6
-0
YoukaUserDetailDao.xml
src/main/resources/mappings/modules/youka/YoukaUserDetailDao.xml
+1
-2
userList.jsp
src/main/webapp/WEB-INF/views/modules/youka/userList.jsp
+1
-1
userModify.jsp
src/main/webapp/WEB-INF/views/modules/youka/userModify.jsp
+167
-0
userRealNameAudit.jsp
src/main/webapp/WEB-INF/views/modules/youka/userRealNameAudit.jsp
+2
-11
No files found.
src/main/java/com/thinkgem/jeesite/modules/youka/dao/YoukaCardDao.java
View file @
c9176e95
...
...
@@ -11,5 +11,5 @@ import com.thinkgem.jeesite.modules.youka.entity.YoukaCardEntity;
*/
@MyBatisDao
public
interface
YoukaCardDao
extends
CrudDao
<
YoukaCardEntity
>
{
public
Integer
updateIsDebit
(
YoukaCardEntity
entity
);
}
\ No newline at end of file
src/main/java/com/thinkgem/jeesite/modules/youka/service/YoukaUserService.java
View file @
c9176e95
...
...
@@ -69,14 +69,21 @@ public class YoukaUserService extends CrudService<YoukaUserDao, YoukaUser> {
youkaUserDetail
.
setUpdateBy
(
UserUtils
.
getUser
());
youkaUserDetail
.
setUserCode
(
youkaUser
.
getCode
());
youkaUserDetailDao
.
update
(
youkaUserDetail
);
if
(
youkaUserDetailDao
.
getByUserCode
(
youkaUser
.
getCode
())
==
null
){
youkaUserDetail
.
preInsert
();
youkaUserDetail
.
setCode
(
IdGen
.
randomBase62
(
64
));
youkaUserDetailDao
.
insert
(
youkaUserDetail
);
}
else
{
youkaUserDetailDao
.
update
(
youkaUserDetail
);
}
}
List
<
YoukaCardEntity
>
youkaCardEntityList
=
youkaUser
.
getYoukaCardEntityList
();
if
(
youkaCardEntityList
!=
null
&&
youkaCardEntityList
.
size
()>
0
){
for
(
YoukaCardEntity
youkaCardEntity
:
youkaCardEntityList
){
if
(
youkaCardEntity
.
getIsDebit
()
!=
null
&&
!
youkaCardEntity
.
getIsDebit
().
equals
(
youkaCardEntity
.
getIsNewDebit
())){
youkaCardEntity
.
setIsDebit
(
youkaCardEntity
.
getIsNewDebit
());
youkaCardDao
.
update
(
youkaCardEntity
);
youkaCardDao
.
update
IsDebit
(
youkaCardEntity
);
}
}
}
...
...
@@ -98,13 +105,14 @@ public class YoukaUserService extends CrudService<YoukaUserDao, YoukaUser> {
YoukaUserDetail
youkaUserDetail
=
youkaUser
.
getYoukaUserDetail
();
if
(
youkaUserDetail
!=
null
){
youkaUserDetail
.
preInsert
();
youkaUser
.
setAvatar
(
StringUtils
.
replace
(
youkaUser
.
getAvatar
(),
Global
.
IMAGE_SAVE_URL
,
""
));
youkaUserDetail
.
setIdCardFront
(
StringUtils
.
replace
(
youkaUserDetail
.
getIdCardFront
(),
Global
.
IMAGE_SAVE_URL
,
""
));
youkaUserDetail
.
setIdCardBack
(
StringUtils
.
replace
(
youkaUserDetail
.
getIdCardBack
(),
Global
.
IMAGE_SAVE_URL
,
""
));
youkaUserDetail
.
setIdCardHold
(
StringUtils
.
replace
(
youkaUserDetail
.
getIdCardHold
(),
Global
.
IMAGE_SAVE_URL
,
""
));
youkaUserDetail
.
setDebitCard
(
StringUtils
.
replace
(
youkaUserDetail
.
getDebitCard
(),
Global
.
IMAGE_SAVE_URL
,
""
));
youkaUserDetail
.
setUpdateBy
(
UserUtils
.
getUser
());
youkaUserDetail
.
setUserCode
(
youkaUser
.
getCode
());
youkaUserDetail
.
setCode
(
IdGen
.
randomBase62
(
64
));
youkaUserDetailDao
.
insert
(
youkaUserDetail
);
}
...
...
src/main/resources/mappings/modules/youka/YoukaCardDao.xml
View file @
c9176e95
...
...
@@ -108,6 +108,12 @@
del_flag = #{delFlag}
WHERE id = #{id}
</update>
<update
id=
"updateIsDebit"
>
UPDATE youka_cards SET
is_debit = #{isDebit}
WHERE id = #{id}
</update>
<update
id=
"delete"
>
UPDATE youka_cards SET
...
...
src/main/resources/mappings/modules/youka/YoukaUserDetailDao.xml
View file @
c9176e95
...
...
@@ -59,7 +59,6 @@
<insert
id=
"insert"
>
INSERT INTO youka_user_details(
`id`,
`code`,
`user_code`,
`real_name`,
...
...
@@ -74,8 +73,8 @@
`update_date`,
`update_by`
) VALUES (
#{id},
#{code},
#{userCode},
#{realName},
#{idCard},
#{idCardPlace},
...
...
src/main/webapp/WEB-INF/views/modules/youka/userList.jsp
View file @
c9176e95
...
...
@@ -125,7 +125,7 @@
</td><
%
--
<
td
>
${user.roleNames}
</td>
--%>
<shiro:hasPermission
name=
"sys:user:edit"
><td>
<a
href=
"${ctx}/youka/user/
form
?id=${user.id}"
>
查看
</a>
<a
href=
"${ctx}/youka/user/
modify
?id=${user.id}"
>
查看
</a>
<a
href=
"${ctx}/youka/user/real/name/audit?id=${user.id}"
>
审核
</a>
<a
href=
"${ctx}/youka/user/form?id=${user.id}"
>
禁用
</a>
<a
href=
"${ctx}/youka/user/form?id=${user.id}"
>
账户明细
</a>
...
...
src/main/webapp/WEB-INF/views/modules/youka/userModify.jsp
0 → 100644
View file @
c9176e95
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/WEB-INF/views/include/taglib.jsp"
%
>
<html>
<head>
<title>
用户管理
</title>
<meta
name=
"decorator"
content=
"default"
/>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
"#no"
).
focus
();
$
(
"#inputForm"
).
validate
({
submitHandler
:
function
(
form
){
loading
(
'正在提交,请稍等...'
);
form
.
submit
();
},
errorContainer
:
"#messageBox"
,
errorPlacement
:
function
(
error
,
element
)
{
$
(
"#messageBox"
).
text
(
"输入有误,请先更正。"
);
if
(
element
.
is
(
":checkbox"
)
||
element
.
is
(
":radio"
)
||
element
.
parent
().
is
(
".input-append"
)){
error
.
appendTo
(
element
.
parent
().
parent
());
}
else
{
error
.
insertAfter
(
element
);
}
}
});
$
(
".isNewDebit"
).
click
(
function
()
{
$
(
".isDebit"
).
html
(
"否"
);;
$
(
".isNewDebit"
).
show
();
$
(
".isNewDebit"
).
val
(
"N"
);
$this
=
$
(
this
);
$this
.
closest
(
"tr"
).
find
(
".isDebit"
).
html
(
"是"
);
$this
.
closest
(
"tr"
).
find
(
".isNewDebit"
).
hide
();
$this
.
closest
(
"tr"
).
find
(
".isNewDebitInput"
).
val
(
"Y"
);
});
});
</script>
</head>
<body>
<ul
class=
"nav nav-tabs"
>
<li><a
href=
"${ctx}/youka/user/list"
>
用户列表
</a></li>
<li
class=
"active"
><a
href=
"${ctx}/youka/user/real/name/audit?id=${user.id}"
>
用户
<shiro:hasPermission
name=
"sys:user:edit"
>
修改
</shiro:hasPermission><shiro:lacksPermission
name=
"sys:user:edit"
></shiro:lacksPermission></a></li>
</ul><br/>
<form:form
id=
"inputForm"
modelAttribute=
"youkaUser"
action=
"${ctx}/youka/user/save"
method=
"post"
class=
"form-horizontal"
>
<form:hidden
path=
"id"
/>
<sys:message
content=
"${message}"
/>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
头像:
</label>
<div
class=
"controls"
>
<form:hidden
id=
"nameImage"
path=
"avatar"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"nameImage"
type=
"images"
uploadPath=
"/photo"
selectMultiple=
"false"
maxWidth=
"100"
maxHeight=
"100"
/>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
用户登录名:
</label>
<div
class=
"controls"
>
<form:input
path=
"nickname"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-medium required"
/>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
用户类型:
</label>
<div
class=
"controls"
>
<c:if
test=
"${youkaUser.level eq 'S'}"
>
管理员
</c:if>
<c:if
test=
"${youkaUser.level eq 'A'}"
>
王者会员
</c:if>
<c:if
test=
"${youkaUser.level eq 'B'}"
>
钻石会员
</c:if>
<c:if
test=
"${youkaUser.level eq 'C'}"
>
黄金会员
</c:if>
<c:if
test=
"${youkaUser.level eq 'D'}"
>
白银会员
</c:if>
<c:if
test=
"${youkaUser.level eq 'E'}"
>
青铜会员
</c:if>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
真实姓名:
</label>
<div
class=
"controls"
>
<form:input
path=
"youkaUserDetail.realName"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-medium"
/>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
身份证号:
</label>
<div
class=
"controls"
>
<form:input
path=
"youkaUserDetail.idCard"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-medium"
/>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
身份证地址:
</label>
<div
class=
"controls"
>
<form:input
path=
"youkaUserDetail.idCardPlace"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-medium"
/>
<c:if
test=
"${youkaUser.youkaUserDetail != null }"
>
${youkaUser.youkaUserDetail.idCard}
</c:if>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
身份证图片:
</label>
<div
class=
"controls"
>
<form:hidden
id=
"idCardFront"
path=
"youkaUserDetail.idCardFront"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"idCardFront"
type=
"images"
uploadPath=
"/photo"
selectMultiple=
"false"
maxWidth=
"100"
maxHeight=
"100"
/>
<form:hidden
id=
"idCardBack"
path=
"youkaUserDetail.idCardBack"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"idCardBack"
type=
"images"
uploadPath=
"/photo"
selectMultiple=
"false"
maxWidth=
"100"
maxHeight=
"100"
/>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
手持身份证图片:
</label>
<div
class=
"controls"
>
<form:hidden
id=
"idCardHold"
path=
"youkaUserDetail.idCardHold"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"idCardHold"
type=
"images"
uploadPath=
"/photo"
selectMultiple=
"false"
maxWidth=
"100"
maxHeight=
"100"
/>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
银行卡正面:
</label>
<div
class=
"controls"
>
<form:hidden
id=
"debitCard"
path=
"youkaUserDetail.debitCard"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"debitCard"
type=
"images"
uploadPath=
"/photo"
selectMultiple=
"false"
maxWidth=
"100"
maxHeight=
"100"
/>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
银行卡:
</label>
<div
class=
"controls"
>
<table
id=
"contentTable"
class=
"table table-striped table-bordered"
style=
"display:inline-block;"
>
<thead><tr><th>
序号
</th><th
style=
"width: 100px;"
>
银行卡名称
</th><th
>
银行卡类型
</th><th
>
银行卡号
</th><th
>
开户地址
</th><th
>
开户支行
</th><th
>
是否为结算卡
</th><
%
--
<
th
>
角色
</th>
--%>
<th
style=
"width: 80px;"
>
操作
</th></tr></thead>
<tbody>
<c:forEach
items=
"${youkaUser.youkaCardEntityList}"
var=
"card"
varStatus=
"indexs"
>
<tr>
<td>
${indexs.index}
</td>
<td>
${card.belongBank}
</td>
<td>
<c:if
test=
"${card.cardType eq 'D'}"
>
储蓄卡
</c:if>
<c:if
test=
"${card.cardType eq 'C'}"
>
信用卡
</c:if>
</td>
<td>
${card.cardNo}
</td>
<td>
${card.cardPlace}
</td>
<td>
${card.cardBank}
</td>
<td
class=
"isDebit"
>
<c:if
test=
"${card.isDebit eq 'Y'}"
>
是
</c:if>
<c:if
test=
"${card.isDebit eq 'N'}"
>
否
</c:if>
</td>
<td>
<input
name=
"youkaCardEntityList[${indexs.index}].isDebit"
value=
"${card.isDebit}"
style=
"display: none;"
/>
<input
name=
"youkaCardEntityList[${indexs.index}].id"
value=
"${card.id}"
style=
"display: none;"
/>
<input
name=
"youkaCardEntityList[${indexs.index}].isNewDebit"
value=
"${card.isDebit}"
style=
"display: none;"
class=
"isNewDebitInput"
/>
<c:if
test=
"${card.isDebit eq 'N'}"
><input
class=
"isNewDebit"
type=
"button"
value=
"设置成结算卡"
></c:if>
<c:if
test=
"${card.isDebit eq 'Y'}"
><input
class=
"isNewDebit"
type=
"button"
value=
"设置成结算卡"
style=
"display: none"
></c:if>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
<div
class=
"form-actions"
>
<shiro:hasPermission
name=
"sys:user:edit"
><input
id=
"btnSubmit"
class=
"btn btn-primary"
type=
"submit"
value=
"保 存"
/>
</shiro:hasPermission>
<input
id=
"btnCancel"
class=
"btn"
type=
"button"
value=
"返 回"
onclick=
"history.go(-1)"
/>
</div>
</form:form>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/views/modules/youka/userRealNameAudit.jsp
View file @
c9176e95
...
...
@@ -39,8 +39,7 @@
<label
class=
"control-label"
>
头像:
</label>
<div
class=
"controls"
>
<img
src=
"${youkaUser.avatar}"
/>
<form:hidden
id=
"nameImage"
path=
"avatar"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"nameImage"
type=
"images"
uploadPath=
"/photo"
selectMultiple=
"false"
maxWidth=
"100"
maxHeight=
"100"
/>
</div>
</div>
<div
class=
"control-group"
>
...
...
@@ -69,14 +68,6 @@
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
身份证号:
</label>
<div
class=
"controls"
>
<c:if
test=
"${youkaUser.youkaUserDetail != null }"
>
${youkaUser.youkaUserDetail.idCard}
</c:if>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
身份证号码:
</label>
<div
class=
"controls"
>
<c:if
test=
"${youkaUser.youkaUserDetail != null }"
>
...
...
@@ -116,7 +107,7 @@
<label
class=
"control-label"
>
银行卡正面:
</label>
<div
class=
"controls"
>
<c:if
test=
"${youkaUser.youkaUserDetail != null }"
>
<img
src=
"${youkaUser.youkaUserDetail.
idCardHol
d}"
>
<img
src=
"${youkaUser.youkaUserDetail.
debitCar
d}"
>
</c:if>
</div>
</div>
...
...
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