mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-10-30 01:46:18 +08:00
add more information to profile edit
This commit is contained in:
@@ -60,17 +60,18 @@ public class ProfileModify extends HttpServlet {
|
|||||||
int block = checkBlock(request.getParameter("block"));
|
int block = checkBlock(request.getParameter("block"));
|
||||||
int room = checkRoom(request.getParameter("room"), block);
|
int room = checkRoom(request.getParameter("room"), block);
|
||||||
long phone = checkPhoneNumber(request.getParameter("phone"));
|
long phone = checkPhoneNumber(request.getParameter("phone"));
|
||||||
if (netAccount != null) {
|
if (room == -1)
|
||||||
u.setIsp(isp);
|
return new Response(Response.ResponseCode.REQUEST_FAILED, "Invalid_Room");
|
||||||
u.setNetAccount(netAccount);
|
if (phone == -1)
|
||||||
}
|
return new Response(Response.ResponseCode.REQUEST_FAILED, "Invalid_Phone_Number");
|
||||||
if (room != -1) {
|
if (netAccount == null)
|
||||||
u.setBlock(block);
|
return new Response(Response.ResponseCode.REQUEST_FAILED, "Invalid_Account");
|
||||||
u.setRoom(room);
|
|
||||||
}
|
u.setIsp(isp);
|
||||||
if (phone != -1) {
|
u.setNetAccount(netAccount);
|
||||||
u.setPhone(phone);
|
u.setBlock(block);
|
||||||
}
|
u.setRoom(room);
|
||||||
|
u.setPhone(phone);
|
||||||
try {
|
try {
|
||||||
TableUser.update(u);
|
TableUser.update(u);
|
||||||
} catch (ConstraintViolationException e) {
|
} catch (ConstraintViolationException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user