| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.*; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyService; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.modular.system.service.ITUserService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | |
| | | |
| | | @Autowired |
| | | private ITUserService tUserService; |
| | | |
| | | @Autowired |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到用户管理首页 |
| | |
| | | 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)); |
| | | page.setRecords(tUserService.getUserList(page,beginTime,endTime,shiroExtUtil.getUser().getRoleType(),shiroExtUtil.getUser().getObjectId(),isAuth,state,id,nickName,phone,companyName)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | |
| | | // tUser.setPassWord(MD5Util.encrypt(password)); |
| | | tUser.setPassWord(ShiroKit.md5(password, "&a.s")); |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | |
| | | tUser.setRemark(remark); |
| | | } |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | TUser user = new TUser(); |
| | | TCompany company = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1).notIn("flag", 3).last(" limit 1")); |
| | | user.setCompanyId(company.getId()); |
| | | user.setPhone(phone); |
| | | user.setNickName(nickName); |
| | | user.setBirthday(DateUtil.parseDate(birthday)); |
| | |
| | | user.setState(1); |
| | | user.setFlag("1"); |
| | | user.setInsertTime(new Date()); |
| | | user.setInsertUser(ShiroKit.getUser().getId()); |
| | | user.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.insert(user); |
| | | } |
| | | } |
| | |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @Autowired |
| | | private ITCompanyService itCompanyService; |
| | | |
| | | /** |
| | | * 判断日期是否满足yyyy-MM-dd格式 |
| | |
| | | */ |
| | | @RequestMapping(value = "/outUser") |
| | | public void outUser(HttpServletRequest request, HttpServletResponse response) { |
| | | List<Map<String,Object>> listMap = tUserService.getUserListNoPage(ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId()); |
| | | List<Map<String,Object>> listMap = tUserService.getUserListNoPage(shiroExtUtil.getUser().getRoleType(),shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |