| | |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.core.util.WoUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.TBalanceModifyRecord; |
| | | import com.stylefeng.guns.modular.system.model.TCompany; |
| | | import com.stylefeng.guns.modular.system.model.TUser; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ExcelExportUtil; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | @Autowired |
| | | private ITUserService tUserService; |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到用户管理首页 |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tUserService.getUserList(page, beginTime, endTime, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.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); |
| | | } |
| | | /** |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tUserService.getUserListCoupon(page, beginTime, endTime, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), isAuth, state, id, nickName, phone, companyName)); |
| | | page.setRecords(tUserService.getUserListCoupon(page, beginTime, endTime, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), isAuth, state, id, nickName, phone, companyName)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | @RequestParam Integer updateType, |
| | | @RequestParam BigDecimal money) { |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | |
| | | List<TEnterpriseWithdrawal> companyId = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", objectId)); |
| | | if(companyId.size()==0){ |
| | | return "5000"; |
| | | } |
| | | |
| | | List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone())); |
| | | if(userWithdrawals.size()==0){ |
| | | return "5001"; |
| | | } |
| | | // List<TEnterpriseWithdrawal> companyId = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", objectId)); |
| | | // if (companyId.size() == 0) { |
| | | // return "5000"; |
| | | // } |
| | | // |
| | | // List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone())); |
| | | // if (userWithdrawals.size() == 0) { |
| | | // return "5001"; |
| | | // } |
| | | |
| | | if (SinataUtil.isNotEmpty(tUser)){ |
| | | if (1 == updateType.intValue()){ //增加 |
| | |
| | | } |
| | | } |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | |
| | | |
| | |
| | | |
| | | Random random = new Random(); |
| | | String result=""; |
| | | for (int i=0;i<8;i++) |
| | | { |
| | | for (int i = 0; i < 8; i++) { |
| | | result+=random.nextInt(10); |
| | | } |
| | | tBalanceModifyRecord.setRecordID(result); |
| | |
| | | if (SinataUtil.isNotEmpty(tUser)){ |
| | | tUser.setPassWord(ShiroKit.md5(password, "&a.s")); |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | |
| | | tUser.setRemark(remark); |
| | | } |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroExtUtil.getUser().getId()); |
| | | tUser.setUpdateUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | |
| | | user.setState(1); |
| | | user.setFlag("1"); |
| | | user.setInsertTime(new Date()); |
| | | user.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | user.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | tUserService.insert(user); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/outUser") |
| | | public void outUser(HttpServletRequest request, HttpServletResponse response) { |
| | | List<Map<String, Object>> listMap = tUserService.getUserListNoPage(ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId()); |
| | | List<Map<String, Object>> listMap = tUserService.getUserListNoPage(shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |