| | |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | |
| | | } |
| | | if (data.getViplevelId()!=null){ |
| | | // todo 创建会员等级表 |
| | | |
| | | model.addAttribute("level","黄金"); |
| | | } |
| | | model.addAttribute("level","黄金"); |
| | |
| | | } |
| | | queryAppUser.setInsertType(objectType); |
| | | queryAppUser.setTypeId(UserExt.getUser().getObjectId()); |
| | | List<QueryAppUserVO> queryAppUserVOS = appUserClient.listAll(queryAppUser); |
| | | // 根据赛事支付记录 |
| | | |
| | | if (objectType == 2){ |
| | | // 获取运营商下的所有门店id集合 |
| | | List<Integer> storeIds = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)) |
| | |
| | | users.addAll(gameUsers); |
| | | // 去重后的用户id |
| | | List<Integer> collect = users.stream().distinct().collect(Collectors.toList()); |
| | | List<QueryAppUserVO> queryAppUserVOS1 = new ArrayList<>(); |
| | | for (QueryAppUserVO queryAppUserVO : queryAppUserVOS) { |
| | | if (collect.contains(queryAppUserVO.getId())){ |
| | | queryAppUserVOS1.add(queryAppUserVO); |
| | | } |
| | | } |
| | | queryAppUserVOS = queryAppUserVOS1; |
| | | queryAppUser.setUserIds(collect); |
| | | // List<QueryAppUserVO> queryAppUserVOS1 = new ArrayList<>(); |
| | | // // 根据用户消费记录 去查询用户ids |
| | | // for (Integer integer : collect) { |
| | | // if (!collect1.contains(integer)){ |
| | | // TAppUser tAppUser = appUserClient.queryAppUser1(integer); |
| | | // QueryAppUserVO queryAppUserVO = new QueryAppUserVO(); |
| | | // BeanUtils.copyProperties(tAppUser,queryAppUserVO); |
| | | // queryAppUserVOS.add(queryAppUserVO); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | List<QueryAppUserVO> queryAppUserVOS = appUserClient.listAll(queryAppUser); |
| | | List<Integer> collect1 = queryAppUserVOS.stream().map(QueryAppUserVO::getId).collect(Collectors.toList()); |
| | | for (QueryAppUserVO queryAppUserVO : queryAppUserVOS) { |
| | | if (queryAppUserVO.getSalesmanUserId()!=null){ |
| | | User byId = userService.getById(queryAppUserVO.getSalesmanUserId()); |
| | |
| | | @RequestMapping("/addAppUserStudent") |
| | | @ResponseBody |
| | | public Object addAppUser(@RequestBody TStudent student){ |
| | | Double height = student.getHeight(); |
| | | Double weight = student.getWeight(); |
| | | double v = weight / (height * height); |
| | | student.setBmi(v); |
| | | return studentClient.addStudent(student); |
| | | } |
| | | /** |