| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.apache.commons.beanutils.PropertyUtils;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.IPUtil;
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.vip.TearcherInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.dynamic.DynamicInfo;
|
| | | import com.yeshi.fanli.entity.integral.IntegralDetail;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
| | |
| | | */
|
| | | @RequestMapping(value = "getInfoDetail")
|
| | | public void getInfoDetail(String callback, Long uid, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | |
| | | UserInfo user = userInfoService.getUserByIdWithMybatis(uid);
|
| | | data.put("phone", user.getPhone()); |
| | | data.put("state", user.getState()); |
| | | data.put("createtime", user.getCreatetime()); |
| | | UserInfoVO userInfoVO = new UserInfoVO();
|
| | | userInfoVO.setPhone(user.getPhone());
|
| | | userInfoVO.setState(user.getState());
|
| | | userInfoVO.setCreatetime(user.getCreatetime());
|
| | |
|
| | | |
| | | String mark = "";
|
| | | String activation = "未激活";
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra != null) {
|
| | | if (!StringUtil.isNullOrEmpty(userInfoExtra.getMark())) {
|
| | | mark = userInfoExtra.getMark();
|
| | | userInfoVO.setMark( userInfoExtra.getMark());
|
| | | }
|
| | | |
| | | String inviteCode = userInfoExtra.getInviteCode();
|
| | | if (!StringUtil.isNullOrEmpty(inviteCode)) {
|
| | | activation = "已激活";
|
| | | } else {
|
| | | activation = "未激活";
|
| | | }
|
| | | userInfoVO.setInviteCode(userInfoExtra.getInviteCode());
|
| | | userInfoVO.setInviteCodeVip(userInfoExtra.getInviteCodeVip());
|
| | | }
|
| | | data.put("mark", mark); |
| | | data.put("activation", activation); |
| | |
|
| | | // 最近一次下单时间
|
| | | String orderTime = "";
|
| | | Date lastOrderTime = hongBaoV2CountService.getLastHongBaoTime(uid);
|
| | | if (lastOrderTime != null) {
|
| | | orderTime = TimeUtil.formatDate(lastOrderTime);
|
| | | userInfoVO.setLastOrderTime(lastOrderTime.getTime());
|
| | | }
|
| | | data.put("orderTime", orderTime); |
| | | |
| | |
|
| | | // 最近登录时间
|
| | | String activeTime = "";
|
| | | UserActiveLog userActiveLog = userActiveLogService.getUserLatestActiveInfo(uid);
|
| | | if (userActiveLog != null) {
|
| | | activeTime = TimeUtil.formatDate(userActiveLog.getCreateTime());
|
| | | userInfoVO.setLastLoginTime(userActiveLog.getCreateTime().getTime());
|
| | | }
|
| | | data.put("activeTime", activeTime); |
| | | // |
| | | // // 显示用户微信 淘宝 老版本存在
|
| | | // String wxUnionId = userInfoVO.getWxUnionId();
|
| | | // if (wxUnionId == null || wxUnionId.trim().length() == 0) {
|
| | | // userInfoVO.setWxName(null);
|
| | | // }
|
| | | //
|
| | | // // 是否绑定支付宝(购买 + 分享权限)
|
| | | // String taoBaoUid = userInfoVO.getTaoBaoUid();
|
| | | // String tbSpecialId = userInfoVO.getTbSpecialId();
|
| | | // String tbRelationId = userInfoVO.getTbRelationId();
|
| | | // if (StringUtil.isNullOrEmpty(taoBaoUid) || StringUtil.isNullOrEmpty(tbSpecialId)
|
| | | // || StringUtil.isNullOrEmpty(tbRelationId)) {
|
| | | // userInfoVO.setTbName(null);
|
| | | // userInfoVO.setTaoBaoUid(null);
|
| | | // }
|
| | | //
|
| | | // Long uid = userInfoVO.getId();
|
| | | // /* 绑定收款账号信息 */
|
| | | // List<BindingAccount> account = bindingAccountMapper.selectByUid(uid);
|
| | | // if (account != null && account.size() > 0) {
|
| | | // BindingAccount bindingAccount = account.get(0);
|
| | | // Integer type = bindingAccount.getType();
|
| | | // if (type != null && type == 1) {
|
| | | // // 支付宝
|
| | | // userInfoVO.setAccountAlipay(bindingAccount.getAccount());
|
| | | // userInfoVO.setAccountName(bindingAccount.getName());
|
| | | // userInfoVO.setAccountBindId(bindingAccount.getId());
|
| | | //
|
| | | // } else if (type != null && type == 2) {
|
| | | // // 微信
|
| | | // userInfoVO.setAccountWX(bindingAccount.getAccount());
|
| | | // userInfoVO.setAccountNameWX(bindingAccount.getName());
|
| | | // userInfoVO.setAccountBindIdWX(bindingAccount.getId());
|
| | | // }
|
| | | // }
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | |
| | | // 显示用户微信 淘宝 老版本存在
|
| | | String wxUnionId = user.getWxUnionId();
|
| | | if (wxUnionId == null || wxUnionId.trim().length() == 0) {
|
| | | user.setWxName(null);
|
| | | }
|
| | | user.setWxName(user.getWxUnionId());
|
| | | |
| | |
|
| | | // 是否绑定支付宝(购买 + 分享权限)
|
| | | UserExtraTaoBaoInfo extraTaoBaoInfo = userExtraTaoBaoInfoService.getByUid(uid);
|
| | | String taoBaoUid = extraTaoBaoInfo.getTaoBaoUid();
|
| | | String specialId = extraTaoBaoInfo.getSpecialId();
|
| | | String relationId = extraTaoBaoInfo.getRelationId();
|
| | | if (StringUtil.isNullOrEmpty(taoBaoUid) || StringUtil.isNullOrEmpty(specialId)
|
| | | || StringUtil.isNullOrEmpty(relationId)) {
|
| | | userInfoVO.setTbName(null);
|
| | | userInfoVO.setTaoBaoUid(null);
|
| | | } else {
|
| | | userInfoVO.setTbName(extraTaoBaoInfo.getTaoBaoNickName());
|
| | | userInfoVO.setTaoBaoUid(extraTaoBaoInfo.getTaoBaoUid());
|
| | | }
|
| | |
|
| | | /* 绑定收款账号信息 */
|
| | | List<BindingAccount> account = bindingAccountService.getBindingAccountByUid(uid);
|
| | | if (account != null && account.size() > 0) {
|
| | | BindingAccount bindingAccount = account.get(0);
|
| | | Integer type = bindingAccount.getType();
|
| | | if (type != null && type == 1) {
|
| | | // 支付宝
|
| | | userInfoVO.setAccountAlipay(bindingAccount.getAccount());
|
| | | userInfoVO.setAccountName(bindingAccount.getName());
|
| | | userInfoVO.setAccountBindId(bindingAccount.getId());
|
| | | } else if (type != null && type == 2) {
|
| | | // 微信
|
| | | userInfoVO.setAccountWX(bindingAccount.getAccount());
|
| | | userInfoVO.setAccountNameWX(bindingAccount.getName());
|
| | | userInfoVO.setAccountBindIdWX(bindingAccount.getId());
|
| | | }
|
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(userInfoVO));
|
| | | }
|
| | |
|
| | |
|