|
|
@@ -1,6 +1,5 @@
|
|
|
package com.happy.action;
|
|
|
|
|
|
-import com.happy.Model.Booking;
|
|
|
import com.happy.Model.weixin.Users;
|
|
|
import com.happy.Until.Enum.B;
|
|
|
import com.happy.Until.Enum.DataType;
|
|
|
@@ -18,7 +17,6 @@ import org.apache.struts2.interceptor.ServletRequestAware;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -43,6 +41,7 @@ public class AppMePageAction extends ActionSupport implements ServletRequestAwar
|
|
|
public int rows = 5;// 每页显示的行数rows
|
|
|
private String userId; // 用户id
|
|
|
private String userName; // 用户姓名
|
|
|
+ private String headPhoto; // 用户头像地址
|
|
|
private String contactId; // 相关联系人的id
|
|
|
public String status;
|
|
|
|
|
|
@@ -96,6 +95,7 @@ public class AppMePageAction extends ActionSupport implements ServletRequestAwar
|
|
|
|
|
|
|
|
|
/**
|
|
|
+ * userId
|
|
|
* 进入我的,查询订单列表
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -199,7 +199,7 @@ public class AppMePageAction extends ActionSupport implements ServletRequestAwar
|
|
|
|
|
|
// 相关联系人
|
|
|
Users users = new Users();
|
|
|
- users.setContactId(Func.parseInt(userId));
|
|
|
+ users.setContactId(Func.parseStr(userId));
|
|
|
users.setContactName(userName);
|
|
|
users.setCreate_time(TimeExchange.getDate());
|
|
|
users.setDataType(DataType.关联数据.toString());
|
|
|
@@ -215,6 +215,26 @@ public class AppMePageAction extends ActionSupport implements ServletRequestAwar
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 用户点击保存,更新用户信息
|
|
|
+ */
|
|
|
+ public void updateUserInfo()
|
|
|
+ {
|
|
|
+ if (Func.checkNullOrEmpty(userId))
|
|
|
+ return;
|
|
|
+ Users users = userService.queryByUserId(userId);
|
|
|
+ users.setHeadPhoto(headPhoto);
|
|
|
+ users.setUser_name(userName);
|
|
|
+ users.setDataType(DataType.游客数据.toString());
|
|
|
+
|
|
|
+ userService.update(users);
|
|
|
+ JSONObject resultJson = new JSONObject();
|
|
|
+ resultJson.put(B.CODE,ResultStatusCode.OK.getStatus());
|
|
|
+ resultJson.put(B.MESSAGE,ResultStatusCode.OK.getMsg());
|
|
|
+ ResponseUtil.writeJson(ServletActionContext.getResponse(),resultJson.toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * contactId
|
|
|
* 用户可以删除自己相关联系人
|
|
|
*/
|
|
|
public void delContact()
|
|
|
@@ -296,4 +316,12 @@ public class AppMePageAction extends ActionSupport implements ServletRequestAwar
|
|
|
public void setContactId(String contactId) {
|
|
|
this.contactId = contactId;
|
|
|
}
|
|
|
+
|
|
|
+ public String getHeadPhoto() {
|
|
|
+ return headPhoto;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setHeadPhoto(String headPhoto) {
|
|
|
+ this.headPhoto = headPhoto;
|
|
|
+ }
|
|
|
}
|