| | |
| | | inviteMapper.insert(invite); |
| | | if (userType==1){ |
| | | // 只有用户邀请用户会获得优惠券 |
| | | List<Map<String, Object>> query = userActivityInviteMapper.query(userInfo.getCompanyId()); |
| | | List<Map<String, Object>> query = userActivityInviteMapper.query(1); |
| | | Date date = new Date(); |
| | | for(Map<String, Object> map : query){ |
| | | Double lavePrice = Double.valueOf(map.get("lavePrice").toString()); |
| | |
| | | } |
| | | if(type == 1){//用户分享 |
| | | UserInfo userInfo = userInfoMapper.selectById(uid); |
| | | List<Map<String, Object>> query = userActivityInviteMapper.query(userInfo.getCompanyId()); |
| | | List<Map<String, Object>> query = userActivityInviteMapper.query(1); |
| | | Date date = new Date(); |
| | | for(Map<String, Object> map : query){ |
| | | Double lavePrice = Double.valueOf(map.get("lavePrice").toString()); |
| | |
| | | inviteMapper.insert(invite); |
| | | if (userType==1){ |
| | | // 只有用户邀请用户会获得优惠券 |
| | | List<Map<String, Object>> query = userActivityInviteMapper.query(userInfo.getCompanyId()); |
| | | List<Map<String, Object>> query = userActivityInviteMapper.query(1); |
| | | Date date = new Date(); |
| | | for(Map<String, Object> map : query){ |
| | | Double lavePrice = Double.valueOf(map.get("lavePrice").toString()); |
| | |
| | | * @throws Exception |
| | | */ |
| | | public synchronized void addCoupon(Integer userId, Double money, Integer companyId, Integer paymentRecordId) throws Exception{ |
| | | List<Map<String, Object>> query = userActivityBalanceService.query(money, companyId); |
| | | List<Map<String, Object>> query = userActivityBalanceService.query(money, 1); |
| | | List<UserCouponRecord> list = new ArrayList<>(); |
| | | for(Map<String, Object> map : query){ |
| | | //添加通用优惠券 |
| | |
| | | */ |
| | | private synchronized void addCoupon(UserInfo userInfo) throws Exception{ |
| | | //添加优惠券 |
| | | List<Map<String, Object>> list = userActivityRegisteredService.query(userInfo.getCompanyId()); |
| | | List<Map<String, Object>> list = userActivityRegisteredService.query(1); |
| | | int num = 0; |
| | | for(Map<String, Object> map : list){ |
| | | if(null != map){ |
| | |
| | | */ |
| | | private synchronized void addInviteCoupon(UserInfo userInfo) throws Exception{ |
| | | //添加优惠券 |
| | | List<Map<String, Object>> list = userActivityInviteMapper.query(userInfo.getCompanyId()); |
| | | List<Map<String, Object>> list = userActivityInviteMapper.query(1); |
| | | int num = 0; |
| | | for(Map<String, Object> map : list){ |
| | | if(null != map){ |