| | |
| | | userInfo.setState(1); |
| | | userInfo.setAvatar("https://anhenew.obs.cn-north-4.myhuaweicloud.com/admin/cca63b23e3a84c89a01e5204c1819497.png"); |
| | | |
| | | |
| | | this.insert(userInfo); |
| | | |
| | | addnewCoupoun(phone,userInfo); |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryUserInfo(Integer uid) throws Exception { |
| | | public Map<String, Object> queryUserInfo(String code, Integer uid) throws Exception { |
| | | Map<String, String> map = weChatUtil.code2Session(code); |
| | | UserInfo userInfo = userInfoMapper.selectById(uid); |
| | | if(ToolUtil.isEmpty(userInfo.getAppletsOpenId())){ |
| | | userInfo.setAppletsOpenId(map.get("openid")); |
| | | userInfoMapper.updateById(userInfo); |
| | | } |
| | | return userInfoMapper.queryUserInfo(uid, null); |
| | | } |
| | | |
| | |
| | | */ |
| | | private synchronized void addCoupon(UserInfo userInfo) throws Exception{ |
| | | //添加优惠券 |
| | | List<Map<String, Object>> list = userActivityRegisteredService.query(userInfo.getCompanyId()); |
| | | List<Map<String, Object>> list = userActivityRegisteredService.query(null == userInfo.getCompanyId() ? 1 : userInfo.getCompanyId()); |
| | | int num = 0; |
| | | for(Map<String, Object> map : list){ |
| | | if(null != map){ |