| | |
| | | import com.stylefeng.guns.core.util.*; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.IInviteService; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyService; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | |
| | | public String index() { |
| | | return PREFIX + "tUser.html"; |
| | | } |
| | | @RequestMapping("/invite/{id}") |
| | | public String inviteList(@PathVariable("id")Integer id, Model model) { |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tUser_invite.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改用户管理 |
| | |
| | | return PREFIX + "tUser_optUser.html"; |
| | | } |
| | | |
| | | @Autowired |
| | | private IInviteService inviteService; |
| | | /** |
| | | * 获取用户管理列表 |
| | | */ |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tUserService.getUserList(page,beginTime,endTime,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),isAuth,state,id,nickName,phone,companyName)); |
| | | List<Map<String, Object>> userList = tUserService.getUserList(page, beginTime, endTime, ShiroKit.getUser().getRoleType(), ShiroKit.getUser().getObjectId(), isAuth, state, id, nickName, phone, companyName); |
| | | for (Map<String, Object> stringObjectMap : userList) { |
| | | String string = stringObjectMap.get("id").toString(); |
| | | int i = inviteService.selectCount(new EntityWrapper<Invite>() |
| | | .eq("inviteUserId", string) |
| | | .eq("userType",1) |
| | | ); |
| | | stringObjectMap.put("inviteNumber", i); |
| | | } |
| | | page.setRecords(userList); |
| | | return super.packForBT(page); |
| | | } |
| | | /** |
| | | * 获取用户管理列表-邀请列表 |
| | | */ |
| | | @RequestMapping(value = "/inviteList") |
| | | @ResponseBody |
| | | public Object list(Integer uid,String userName,String time) { |
| | | if (uid==null)return null; |
| | | String startTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(time)){ |
| | | String[] timeArray = time.split(" - "); |
| | | startTime = timeArray[0]+" 00:00:00"; |
| | | endTime = timeArray[1]+" 23:59:59"; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String, Object>> userList = tUserService.inviteList(page, startTime,endTime,userName,uid); |
| | | for (Map<String, Object> stringObjectMap : userList) { |
| | | String string = stringObjectMap.get("inviteUserId").toString(); |
| | | TUser tUser = tUserService.selectById(string); |
| | | stringObjectMap.put("inviteUserName",tUser.getNickName()); |
| | | } |
| | | page.setRecords(userList); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | shellList.add("紧急联系人电话"); |
| | | shellList.add("是否实名认证"); |
| | | shellList.add("历史出行次数"); |
| | | shellList.add("邀请次数"); |
| | | shellList.add("历史消费"); |
| | | shellList.add("积分"); |
| | | shellList.add("备注"); |
| | |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("inviteNumber"))){ |
| | | shellList.add(object.get("inviteNumber").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("consumptionNum"))){ |
| | | shellList.add(object.get("consumptionNum").toString()); |
| | | }else{ |