| | |
| | | @Resource
|
| | | private HongBaoV2CountService hongBaoV2CountService;
|
| | |
|
| | |
|
| | | public UserInfo getUserByLoginTypeAndOpenId(int loginType, String openid, String appid) {
|
| | | List<UserInfo> list = null;
|
| | | if (loginType == 1) {
|
| | |
| | | list = userInfoDao.list("from UserInfo u where u.wxUnionId=? and u.appId = ? ",
|
| | | new Serializable[] { openid, appid });
|
| | | }
|
| | |
|
| | | if (list != null)
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | if (list.get(i).getState() == UserInfo.STATE_DELETE
|
| | | || list.get(i).getState() == UserInfo.STATE_DELETE_OUT_OF_DATE) {
|
| | | list.remove(i);
|
| | | i--;
|
| | | }
|
| | | }
|
| | |
|
| | | if (list != null && list.size() > 0) {
|
| | | return list.get(0);
|
| | | }
|
| | |
| | | String wxUnionId = weiXinUser.getUnionid();
|
| | | UserInfo find = getUserByLoginTypeAndOpenId(Constant.WEIXIN, wxUnionId, Constant.APPID);
|
| | |
|
| | | if (find == null||find.getState()==UserInfo.STATE_DELETE||find.getState()==UserInfo.STATE_DELETE_OUT_OF_DATE) {
|
| | | if (find == null) {
|
| | | find = new UserInfo();
|
| | | find.setAppId(Constant.APPID);
|
| | | find.setWxUnionId(weiXinUser.getUnionid());
|
| | |
| | | userInfoAdmin.setTodayOrder(todayOrder);
|
| | | userInfoAdmin.setMonthOrder(monthOrder);
|
| | |
|
| | | |
| | | // 未领取红包 待入账金额
|
| | | BigDecimal unaccountedMoney = hongBaoV2CountService.countWillGetMoneyByUid(uid);
|
| | | if (unaccountedMoney ==null) {
|
| | |
| | | totalMoneyHistory = new BigDecimal(0);
|
| | | }
|
| | | userInfoAdmin.setTotalMoneyHistory(totalMoneyHistory.toString());
|
| | | |
| | | |
| | | |
| | |
|
| | | // 支付宝账号 累计转账总金额
|
| | | double totalMoney = payInfoMapper.sumMoneyByUid(uid);
|
| | |
| | |
|
| | | /**
|
| | | * 根据电话号码、邀请码获取邀请用户
|
| | | * |
| | | * @param phone
|
| | | * @param inviteCode
|
| | | * @return
|