提交报名用户查询
This commit is contained in:
parent
54d4e7ab80
commit
1e46397105
|
|
@ -0,0 +1,17 @@
|
||||||
|
create table enroll_user (
|
||||||
|
id bigint(20) not null auto_increment comment '主键ID',
|
||||||
|
enroll_user_no bigint(20) default null comment '报名用户编号',
|
||||||
|
login_name varchar(30) not null comment '登录账号',
|
||||||
|
nickname varchar(100) default '' comment '昵称',
|
||||||
|
postname varchar(50) default '' comment '职务名称',
|
||||||
|
phonenumber varchar(11) default '' comment '手机号码',
|
||||||
|
playbill_address varchar(100) default '' comment '海报地址',
|
||||||
|
recommender_no varchar(20) default '' comment '推荐人编号',
|
||||||
|
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default null comment '备注',
|
||||||
|
primary key (id)
|
||||||
|
) engine=innodb auto_increment=100 comment = '报名用户信息表';
|
||||||
|
|
@ -0,0 +1,303 @@
|
||||||
|
//package com.wuzhen.web.controller.system;
|
||||||
|
//
|
||||||
|
//import com.wuzhen.common.annotation.Log;
|
||||||
|
//import com.wuzhen.common.constant.UserConstants;
|
||||||
|
//import com.wuzhen.common.core.controller.BaseController;
|
||||||
|
//import com.wuzhen.common.core.domain.AjaxResult;
|
||||||
|
//import com.wuzhen.common.core.domain.entity.SysRole;
|
||||||
|
//import com.wuzhen.common.core.domain.entity.SysUser;
|
||||||
|
//import com.wuzhen.common.core.page.TableDataInfo;
|
||||||
|
//import com.wuzhen.common.enums.BusinessType;
|
||||||
|
//import com.wuzhen.common.utils.poi.ExcelUtil;
|
||||||
|
//import com.wuzhen.framework.shiro.util.AuthorizationUtils;
|
||||||
|
//import com.wuzhen.system.domain.SysUserRole;
|
||||||
|
//import com.wuzhen.system.service.ISysRoleService;
|
||||||
|
//import com.wuzhen.system.service.ISysUserService;
|
||||||
|
//import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
//import org.springframework.stereotype.Controller;
|
||||||
|
//import org.springframework.ui.ModelMap;
|
||||||
|
//import org.springframework.validation.annotation.Validated;
|
||||||
|
//import org.springframework.web.bind.annotation.*;
|
||||||
|
//
|
||||||
|
//import java.util.List;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * 角色信息
|
||||||
|
// *
|
||||||
|
// * @author zhengzheng
|
||||||
|
// */
|
||||||
|
//@Controller
|
||||||
|
//@RequestMapping("/system/role")
|
||||||
|
//public class ActiveInfoController extends BaseController
|
||||||
|
//{
|
||||||
|
// private String prefix = "system/role";
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private ISysRoleService roleService;
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private ISysUserService userService;
|
||||||
|
//
|
||||||
|
// @RequiresPermissions("system:role:view")
|
||||||
|
// @GetMapping()
|
||||||
|
// public String role()
|
||||||
|
// {
|
||||||
|
// return prefix + "/role";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @RequiresPermissions("system:role:list")
|
||||||
|
// @PostMapping("/list")
|
||||||
|
// @ResponseBody
|
||||||
|
// public TableDataInfo list(SysRole role)
|
||||||
|
// {
|
||||||
|
// startPage();
|
||||||
|
// List<SysRole> list = roleService.selectRoleList(role);
|
||||||
|
// return getDataTable(list);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
||||||
|
// @RequiresPermissions("system:role:export")
|
||||||
|
// @PostMapping("/export")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult export(SysRole role)
|
||||||
|
// {
|
||||||
|
// List<SysRole> list = roleService.selectRoleList(role);
|
||||||
|
// ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
|
||||||
|
// return util.exportExcel(list, "角色数据");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 新增角色
|
||||||
|
// */
|
||||||
|
// @GetMapping("/add")
|
||||||
|
// public String add()
|
||||||
|
// {
|
||||||
|
// return prefix + "/add";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 新增保存角色
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:add")
|
||||||
|
// @Log(title = "角色管理", businessType = BusinessType.INSERT)
|
||||||
|
// @PostMapping("/add")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult addSave(@Validated SysRole role)
|
||||||
|
// {
|
||||||
|
// if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
|
||||||
|
// {
|
||||||
|
// return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
||||||
|
// }
|
||||||
|
// else if (UserConstants.ROLE_KEY_NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
|
||||||
|
// {
|
||||||
|
// return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||||
|
// }
|
||||||
|
// role.setCreateBy(getLoginName());
|
||||||
|
// AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||||
|
// return toAjax(roleService.insertRole(role));
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改角色
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:edit")
|
||||||
|
// @GetMapping("/edit/{roleId}")
|
||||||
|
// public String edit(@PathVariable("roleId") Long roleId, ModelMap mmap)
|
||||||
|
// {
|
||||||
|
// roleService.checkRoleDataScope(roleId);
|
||||||
|
// mmap.put("role", roleService.selectRoleById(roleId));
|
||||||
|
// return prefix + "/edit";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改保存角色
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:edit")
|
||||||
|
// @Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||||
|
// @PostMapping("/edit")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult editSave(@Validated SysRole role)
|
||||||
|
// {
|
||||||
|
// roleService.checkRoleAllowed(role);
|
||||||
|
// roleService.checkRoleDataScope(role.getRoleId());
|
||||||
|
// if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
|
||||||
|
// {
|
||||||
|
// return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
||||||
|
// }
|
||||||
|
// else if (UserConstants.ROLE_KEY_NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
|
||||||
|
// {
|
||||||
|
// return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||||
|
// }
|
||||||
|
// role.setUpdateBy(getLoginName());
|
||||||
|
// AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||||
|
// return toAjax(roleService.updateRole(role));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 角色分配数据权限
|
||||||
|
// */
|
||||||
|
// @GetMapping("/authDataScope/{roleId}")
|
||||||
|
// public String authDataScope(@PathVariable("roleId") Long roleId, ModelMap mmap)
|
||||||
|
// {
|
||||||
|
// mmap.put("role", roleService.selectRoleById(roleId));
|
||||||
|
// return prefix + "/dataScope";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 保存角色分配数据权限
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:edit")
|
||||||
|
// @Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||||
|
// @PostMapping("/authDataScope")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult authDataScopeSave(SysRole role)
|
||||||
|
// {
|
||||||
|
// roleService.checkRoleAllowed(role);
|
||||||
|
// roleService.checkRoleDataScope(role.getRoleId());
|
||||||
|
// role.setUpdateBy(getLoginName());
|
||||||
|
// if (roleService.authDataScope(role) > 0)
|
||||||
|
// {
|
||||||
|
// setSysUser(userService.selectUserById(getUserId()));
|
||||||
|
// return success();
|
||||||
|
// }
|
||||||
|
// return error();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @RequiresPermissions("system:role:remove")
|
||||||
|
// @Log(title = "角色管理", businessType = BusinessType.DELETE)
|
||||||
|
// @PostMapping("/remove")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult remove(String ids)
|
||||||
|
// {
|
||||||
|
// return toAjax(roleService.deleteRoleByIds(ids));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 校验角色名称
|
||||||
|
// */
|
||||||
|
// @PostMapping("/checkRoleNameUnique")
|
||||||
|
// @ResponseBody
|
||||||
|
// public String checkRoleNameUnique(SysRole role)
|
||||||
|
// {
|
||||||
|
// return roleService.checkRoleNameUnique(role);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 校验角色权限
|
||||||
|
// */
|
||||||
|
// @PostMapping("/checkRoleKeyUnique")
|
||||||
|
// @ResponseBody
|
||||||
|
// public String checkRoleKeyUnique(SysRole role)
|
||||||
|
// {
|
||||||
|
// return roleService.checkRoleKeyUnique(role);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 选择菜单树
|
||||||
|
// */
|
||||||
|
// @GetMapping("/selectMenuTree")
|
||||||
|
// public String selectMenuTree()
|
||||||
|
// {
|
||||||
|
// return prefix + "/tree";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 角色状态修改
|
||||||
|
// */
|
||||||
|
// @Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||||
|
// @RequiresPermissions("system:role:edit")
|
||||||
|
// @PostMapping("/changeStatus")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult changeStatus(SysRole role)
|
||||||
|
// {
|
||||||
|
// roleService.checkRoleAllowed(role);
|
||||||
|
// roleService.checkRoleDataScope(role.getRoleId());
|
||||||
|
// return toAjax(roleService.changeStatus(role));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 分配用户
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:edit")
|
||||||
|
// @GetMapping("/authUser/{roleId}")
|
||||||
|
// public String authUser(@PathVariable("roleId") Long roleId, ModelMap mmap)
|
||||||
|
// {
|
||||||
|
// mmap.put("role", roleService.selectRoleById(roleId));
|
||||||
|
// return prefix + "/authUser";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 查询已分配用户角色列表
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:list")
|
||||||
|
// @PostMapping("/authUser/allocatedList")
|
||||||
|
// @ResponseBody
|
||||||
|
// public TableDataInfo allocatedList(SysUser user)
|
||||||
|
// {
|
||||||
|
// startPage();
|
||||||
|
// List<SysUser> list = userService.selectAllocatedList(user);
|
||||||
|
// return getDataTable(list);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 取消授权
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:edit")
|
||||||
|
// @Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||||
|
// @PostMapping("/authUser/cancel")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult cancelAuthUser(SysUserRole userRole)
|
||||||
|
// {
|
||||||
|
// return toAjax(roleService.deleteAuthUser(userRole));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 批量取消授权
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:edit")
|
||||||
|
// @Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||||
|
// @PostMapping("/authUser/cancelAll")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult cancelAuthUserAll(Long roleId, String userIds)
|
||||||
|
// {
|
||||||
|
// return toAjax(roleService.deleteAuthUsers(roleId, userIds));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 选择用户
|
||||||
|
// */
|
||||||
|
// @GetMapping("/authUser/selectUser/{roleId}")
|
||||||
|
// public String selectUser(@PathVariable("roleId") Long roleId, ModelMap mmap)
|
||||||
|
// {
|
||||||
|
// mmap.put("role", roleService.selectRoleById(roleId));
|
||||||
|
// return prefix + "/selectUser";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 查询未分配用户角色列表
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:list")
|
||||||
|
// @PostMapping("/authUser/unallocatedList")
|
||||||
|
// @ResponseBody
|
||||||
|
// public TableDataInfo unallocatedList(SysUser user)
|
||||||
|
// {
|
||||||
|
// startPage();
|
||||||
|
// List<SysUser> list = userService.selectUnallocatedList(user);
|
||||||
|
// return getDataTable(list);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 批量选择用户授权
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:role:edit")
|
||||||
|
// @Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||||
|
// @PostMapping("/authUser/selectAll")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult selectAuthUserAll(Long roleId, String userIds)
|
||||||
|
// {
|
||||||
|
// roleService.checkRoleDataScope(roleId);
|
||||||
|
// return toAjax(roleService.insertAuthUsers(roleId, userIds));
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
@ -0,0 +1,160 @@
|
||||||
|
//package com.wuzhen.web.controller.system;
|
||||||
|
//
|
||||||
|
//import com.wuzhen.common.annotation.Log;
|
||||||
|
//import com.wuzhen.common.constant.UserConstants;
|
||||||
|
//import com.wuzhen.common.core.controller.BaseController;
|
||||||
|
//import com.wuzhen.common.core.domain.AjaxResult;
|
||||||
|
//import com.wuzhen.common.core.page.TableDataInfo;
|
||||||
|
//import com.wuzhen.common.enums.BusinessType;
|
||||||
|
//import com.wuzhen.common.utils.poi.ExcelUtil;
|
||||||
|
//import com.wuzhen.system.domain.SysPost;
|
||||||
|
//import com.wuzhen.system.service.ISysPostService;
|
||||||
|
//import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
//import org.springframework.stereotype.Controller;
|
||||||
|
//import org.springframework.ui.ModelMap;
|
||||||
|
//import org.springframework.validation.annotation.Validated;
|
||||||
|
//import org.springframework.web.bind.annotation.*;
|
||||||
|
//
|
||||||
|
//import java.util.List;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * 岗位信息操作处理
|
||||||
|
// *
|
||||||
|
// * @author zhengzheng
|
||||||
|
// */
|
||||||
|
//@Controller
|
||||||
|
//@RequestMapping("/system/post")
|
||||||
|
//public class ActiveUserController extends BaseController
|
||||||
|
//{
|
||||||
|
// private String prefix = "system/post";
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private ISysPostService postService;
|
||||||
|
//
|
||||||
|
// @RequiresPermissions("system:post:view")
|
||||||
|
// @GetMapping()
|
||||||
|
// public String operlog()
|
||||||
|
// {
|
||||||
|
// return prefix + "/post";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @RequiresPermissions("system:post:list")
|
||||||
|
// @PostMapping("/list")
|
||||||
|
// @ResponseBody
|
||||||
|
// public TableDataInfo list(SysPost post)
|
||||||
|
// {
|
||||||
|
// startPage();
|
||||||
|
// List<SysPost> list = postService.selectPostList(post);
|
||||||
|
// return getDataTable(list);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Log(title = "岗位管理", businessType = BusinessType.EXPORT)
|
||||||
|
// @RequiresPermissions("system:post:export")
|
||||||
|
// @PostMapping("/export")
|
||||||
|
//// @ResponseBody
|
||||||
|
// public AjaxResult export(SysPost post)
|
||||||
|
// {
|
||||||
|
// List<SysPost> list = postService.selectPostList(post);
|
||||||
|
// ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
|
||||||
|
// return util.exportExcel(list, "岗位数据");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @RequiresPermissions("system:post:remove")
|
||||||
|
// @Log(title = "岗位管理", businessType = BusinessType.DELETE)
|
||||||
|
// @PostMapping("/remove")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult remove(String ids)
|
||||||
|
// {
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// return toAjax(postService.deletePostByIds(ids));
|
||||||
|
// }
|
||||||
|
// catch (Exception e)
|
||||||
|
// {
|
||||||
|
// return error(e.getMessage());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 新增岗位
|
||||||
|
// */
|
||||||
|
// @GetMapping("/add")
|
||||||
|
// public String add()
|
||||||
|
// {
|
||||||
|
// return prefix + "/add";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 新增保存岗位
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:post:add")
|
||||||
|
// @Log(title = "岗位管理", businessType = BusinessType.INSERT)
|
||||||
|
// @PostMapping("/add")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult addSave(@Validated SysPost post)
|
||||||
|
// {
|
||||||
|
// if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
|
||||||
|
// {
|
||||||
|
// return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
||||||
|
// }
|
||||||
|
// else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
|
||||||
|
// {
|
||||||
|
// return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
||||||
|
// }
|
||||||
|
// post.setCreateBy(getLoginName());
|
||||||
|
// return toAjax(postService.insertPost(post));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改岗位
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:post:edit")
|
||||||
|
// @GetMapping("/edit/{postId}")
|
||||||
|
// public String edit(@PathVariable("postId") Long postId, ModelMap mmap)
|
||||||
|
// {
|
||||||
|
// mmap.put("post", postService.selectPostById(postId));
|
||||||
|
// return prefix + "/edit";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改保存岗位
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:post:edit")
|
||||||
|
// @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
|
||||||
|
// @PostMapping("/edit")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult editSave(@Validated SysPost post)
|
||||||
|
// {
|
||||||
|
// if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
|
||||||
|
// {
|
||||||
|
// return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
||||||
|
// }
|
||||||
|
// else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
|
||||||
|
// {
|
||||||
|
// return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
||||||
|
// }
|
||||||
|
// post.setUpdateBy(getLoginName());
|
||||||
|
// return toAjax(postService.updatePost(post));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 校验岗位名称
|
||||||
|
// */
|
||||||
|
// @PostMapping("/checkPostNameUnique")
|
||||||
|
// @ResponseBody
|
||||||
|
// public String checkPostNameUnique(SysPost post)
|
||||||
|
// {
|
||||||
|
// return postService.checkPostNameUnique(post);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 校验岗位编码
|
||||||
|
// */
|
||||||
|
// @PostMapping("/checkPostCodeUnique")
|
||||||
|
// @ResponseBody
|
||||||
|
// public String checkPostCodeUnique(SysPost post)
|
||||||
|
// {
|
||||||
|
// return postService.checkPostCodeUnique(post);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
@ -0,0 +1,160 @@
|
||||||
|
package com.wuzhen.web.controller.system;
|
||||||
|
|
||||||
|
import com.wuzhen.common.annotation.Log;
|
||||||
|
import com.wuzhen.common.core.controller.BaseController;
|
||||||
|
import com.wuzhen.common.core.domain.AjaxResult;
|
||||||
|
import com.wuzhen.common.core.page.TableDataInfo;
|
||||||
|
import com.wuzhen.common.enums.BusinessType;
|
||||||
|
import com.wuzhen.common.utils.poi.ExcelUtil;
|
||||||
|
import com.wuzhen.system.domain.EnrollUser;
|
||||||
|
import com.wuzhen.system.service.IEnrollUserService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名用户查询
|
||||||
|
*
|
||||||
|
* @author zhengzheng
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/enroll/user")
|
||||||
|
public class EnrollUserController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "enroll/user";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IEnrollUserService iEnrollUserService;
|
||||||
|
|
||||||
|
@RequiresPermissions("enroll:user:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String operlog()
|
||||||
|
{
|
||||||
|
return prefix + "/index";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequiresPermissions("enroll:user:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(EnrollUser enrollUser)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<EnrollUser> list = iEnrollUserService.selectEnrollUserList(enrollUser);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log(title = "用户导出管理", businessType = BusinessType.EXPORT)
|
||||||
|
@RequiresPermissions("enroll:user:export")
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(EnrollUser enrollUser)
|
||||||
|
{
|
||||||
|
List<EnrollUser> list = iEnrollUserService.selectEnrollUserList(enrollUser);
|
||||||
|
ExcelUtil<EnrollUser> util = new ExcelUtil<EnrollUser>(EnrollUser.class);
|
||||||
|
return util.exportExcel(list, "报名用户数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
// @RequiresPermissions("system:post:remove")
|
||||||
|
// @Log(title = "岗位管理", businessType = BusinessType.DELETE)
|
||||||
|
// @PostMapping("/remove")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult remove(String ids)
|
||||||
|
// {
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// return toAjax(postService.deletePostByIds(ids));
|
||||||
|
// }
|
||||||
|
// catch (Exception e)
|
||||||
|
// {
|
||||||
|
// return error(e.getMessage());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 新增岗位
|
||||||
|
// */
|
||||||
|
// @GetMapping("/add")
|
||||||
|
// public String add()
|
||||||
|
// {
|
||||||
|
// return prefix + "/add";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 新增保存岗位
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:post:add")
|
||||||
|
// @Log(title = "岗位管理", businessType = BusinessType.INSERT)
|
||||||
|
// @PostMapping("/add")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult addSave(@Validated SysPost post)
|
||||||
|
// {
|
||||||
|
// if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
|
||||||
|
// {
|
||||||
|
// return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
||||||
|
// }
|
||||||
|
// else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
|
||||||
|
// {
|
||||||
|
// return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
||||||
|
// }
|
||||||
|
// post.setCreateBy(getLoginName());
|
||||||
|
// return toAjax(postService.insertPost(post));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改岗位
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:post:edit")
|
||||||
|
// @GetMapping("/edit/{postId}")
|
||||||
|
// public String edit(@PathVariable("postId") Long postId, ModelMap mmap)
|
||||||
|
// {
|
||||||
|
// mmap.put("post", postService.selectPostById(postId));
|
||||||
|
// return prefix + "/edit";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改保存岗位
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("system:post:edit")
|
||||||
|
// @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
|
||||||
|
// @PostMapping("/edit")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult editSave(@Validated SysPost post)
|
||||||
|
// {
|
||||||
|
// if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
|
||||||
|
// {
|
||||||
|
// return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
||||||
|
// }
|
||||||
|
// else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
|
||||||
|
// {
|
||||||
|
// return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
||||||
|
// }
|
||||||
|
// post.setUpdateBy(getLoginName());
|
||||||
|
// return toAjax(postService.updatePost(post));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 校验岗位名称
|
||||||
|
// */
|
||||||
|
// @PostMapping("/checkPostNameUnique")
|
||||||
|
// @ResponseBody
|
||||||
|
// public String checkPostNameUnique(SysPost post)
|
||||||
|
// {
|
||||||
|
// return postService.checkPostNameUnique(post);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 校验岗位编码
|
||||||
|
// */
|
||||||
|
// @PostMapping("/checkPostCodeUnique")
|
||||||
|
// @ResponseBody
|
||||||
|
// public String checkPostCodeUnique(SysPost post)
|
||||||
|
// {
|
||||||
|
// return postService.checkPostCodeUnique(post);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('岗位列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="post-form">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
岗位编码:<input type="text" name="postCode"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
岗位名称:<input type="text" name="postName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
岗位状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:post:add">
|
||||||
|
<i class="fa fa-plus"></i> 新增
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:post:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:post:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:post:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('system:post:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('system:post:remove')}]];
|
||||||
|
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||||
|
var prefix = ctx + "system/post";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
sortName: "postSort",
|
||||||
|
modalName: "岗位",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'postId',
|
||||||
|
title: '岗位编号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'postCode',
|
||||||
|
title: '岗位编码',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'postName',
|
||||||
|
title: '岗位名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'postSort',
|
||||||
|
title: '显示顺序',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '状态',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(datas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createTime',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.postId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.postId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('报名列表')"/>
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="post-form">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
报名用户编号:<input type="text" name="enrollUserNo"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
职务:<input type="text" name="postName"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||||
|
class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
||||||
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="enroll:user:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer"/>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "enroll/user";
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
sortName: "enrollUserNo",
|
||||||
|
modalName: "职务",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'enrollUserNo',
|
||||||
|
title: '报名用户编号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'nickName',
|
||||||
|
title: '昵称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'postName',
|
||||||
|
title: '职务',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'phoneNumber',
|
||||||
|
title: '手机号码',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'playbillAddress',
|
||||||
|
title: '海报地址',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'recommenderNo',
|
||||||
|
title: '推荐人编号',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createTime',
|
||||||
|
title: '报名时间',
|
||||||
|
sortable: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
package com.wuzhen.system.domain;
|
||||||
|
|
||||||
|
import com.wuzhen.common.annotation.Excel;
|
||||||
|
import com.wuzhen.common.annotation.Excel.ColumnType;
|
||||||
|
import com.wuzhen.common.core.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名表 Enroll_user
|
||||||
|
*
|
||||||
|
* @author zhengzheng
|
||||||
|
*/
|
||||||
|
public class EnrollUser extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名用户编号
|
||||||
|
*/
|
||||||
|
@Excel(name = "报名用户编号", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long enrollUserNo;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
|
@Excel(name = "昵称")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "职务")
|
||||||
|
private String postName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号码
|
||||||
|
*/
|
||||||
|
@Excel(name = "手机号码")
|
||||||
|
private String phoneNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 海报地址
|
||||||
|
*/
|
||||||
|
@Excel(name = "海报地址")
|
||||||
|
private String playbillAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推荐人编号
|
||||||
|
*/
|
||||||
|
@Excel(name = "推荐人编号")
|
||||||
|
private String recommenderNo;
|
||||||
|
|
||||||
|
|
||||||
|
public Long getEnrollUserNo() {
|
||||||
|
return enrollUserNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnrollUserNo(Long enrollUserNo) {
|
||||||
|
this.enrollUserNo = enrollUserNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNickName() {
|
||||||
|
return nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNickName(String nickName) {
|
||||||
|
this.nickName = nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhoneNumber() {
|
||||||
|
return phoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhoneNumber(String phoneNumber) {
|
||||||
|
this.phoneNumber = phoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlaybillAddress() {
|
||||||
|
return playbillAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlaybillAddress(String playbillAddress) {
|
||||||
|
this.playbillAddress = playbillAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecommenderNo() {
|
||||||
|
return recommenderNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecommenderNo(String recommenderNo) {
|
||||||
|
this.recommenderNo = recommenderNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getPostName() {
|
||||||
|
return postName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPostName(String postName) {
|
||||||
|
this.postName = postName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("enrollUserNo", getEnrollUserNo())
|
||||||
|
.append("nickName", getNickName())
|
||||||
|
.append("postName", getPostName())
|
||||||
|
.append("phoneNumber", getPhoneNumber())
|
||||||
|
.append("playbillAddress", getPlaybillAddress())
|
||||||
|
.append("recommenderNo", getRecommenderNo())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
package com.wuzhen.system.mapper;
|
||||||
|
|
||||||
|
import com.wuzhen.system.domain.EnrollUser;
|
||||||
|
import com.wuzhen.system.domain.SysPost;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名用户信息 数据层
|
||||||
|
*
|
||||||
|
* @author zhengzheng
|
||||||
|
*/
|
||||||
|
public interface EnrollUserMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 报名用户数据集合
|
||||||
|
*
|
||||||
|
* @param enrollUser 报名用户信息
|
||||||
|
* @return 报名用户集合
|
||||||
|
*/
|
||||||
|
public List<EnrollUser> selectEnrollUserList(EnrollUser enrollUser);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 查询所有岗位
|
||||||
|
// *
|
||||||
|
// * @return 岗位列表
|
||||||
|
// */
|
||||||
|
// public List<SysPost> selectPostAll();
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 根据用户ID查询岗位
|
||||||
|
// *
|
||||||
|
// * @param userId 用户ID
|
||||||
|
// * @return 岗位列表
|
||||||
|
// */
|
||||||
|
// public List<SysPost> selectPostsByUserId(Long userId);
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 通过岗位ID查询岗位信息
|
||||||
|
// *
|
||||||
|
// * @param postId 岗位ID
|
||||||
|
// * @return 角色对象信息
|
||||||
|
// */
|
||||||
|
// public SysPost selectPostById(Long postId);
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 批量删除岗位信息
|
||||||
|
// *
|
||||||
|
// * @param ids 需要删除的数据ID
|
||||||
|
// * @return 结果
|
||||||
|
// */
|
||||||
|
// public int deletePostByIds(Long[] ids);
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改岗位信息
|
||||||
|
// *
|
||||||
|
// * @param post 岗位信息
|
||||||
|
// * @return 结果
|
||||||
|
// */
|
||||||
|
// public int updatePost(SysPost post);
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 新增岗位信息
|
||||||
|
// *
|
||||||
|
// * @param post 岗位信息
|
||||||
|
// * @return 结果
|
||||||
|
// */
|
||||||
|
// public int insertPost(SysPost post);
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 校验岗位名称
|
||||||
|
// *
|
||||||
|
// * @param postName 岗位名称
|
||||||
|
// * @return 结果
|
||||||
|
// */
|
||||||
|
// public SysPost checkPostNameUnique(String postName);
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 校验岗位编码
|
||||||
|
// *
|
||||||
|
// * @param postCode 岗位编码
|
||||||
|
// * @return 结果
|
||||||
|
// */
|
||||||
|
// public SysPost checkPostCodeUnique(String postCode);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
package com.wuzhen.system.service;
|
||||||
|
|
||||||
|
import com.wuzhen.system.domain.SysPost;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位信息 服务层
|
||||||
|
*
|
||||||
|
* @author zhengzheng
|
||||||
|
*/
|
||||||
|
public interface IActiveUserService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询岗位信息集合
|
||||||
|
*
|
||||||
|
* @param post 岗位信息
|
||||||
|
* @return 岗位信息集合
|
||||||
|
*/
|
||||||
|
public List<SysPost> selectPostList(SysPost post);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有岗位
|
||||||
|
*
|
||||||
|
* @return 岗位列表
|
||||||
|
*/
|
||||||
|
public List<SysPost> selectPostAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID查询岗位
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 岗位列表
|
||||||
|
*/
|
||||||
|
public List<SysPost> selectPostsByUserId(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过岗位ID查询岗位信息
|
||||||
|
*
|
||||||
|
* @param postId 岗位ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
public SysPost selectPostById(Long postId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除岗位信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePostByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存岗位信息
|
||||||
|
*
|
||||||
|
* @param post 岗位信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertPost(SysPost post);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存岗位信息
|
||||||
|
*
|
||||||
|
* @param post 岗位信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updatePost(SysPost post);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过岗位ID查询岗位使用数量
|
||||||
|
*
|
||||||
|
* @param postId 岗位ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int countUserPostById(Long postId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验岗位名称
|
||||||
|
*
|
||||||
|
* @param post 岗位信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public String checkPostNameUnique(SysPost post);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验岗位编码
|
||||||
|
*
|
||||||
|
* @param post 岗位信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public String checkPostCodeUnique(SysPost post);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.wuzhen.system.service;
|
||||||
|
|
||||||
|
import com.wuzhen.system.domain.EnrollUser;
|
||||||
|
import com.wuzhen.system.domain.SysPost;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名用户服务 服务层
|
||||||
|
*
|
||||||
|
* @author zhengzheng
|
||||||
|
*/
|
||||||
|
public interface IEnrollUserService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询岗位信息集合
|
||||||
|
*
|
||||||
|
* @param enrollUser 报名信息表
|
||||||
|
* @return 报名信息集合
|
||||||
|
*/
|
||||||
|
public List<EnrollUser> selectEnrollUserList(EnrollUser enrollUser);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 根据用户ID查询报名信息
|
||||||
|
// *
|
||||||
|
// * @param enrollUserNo 用户ID
|
||||||
|
// * @return 岗位列表
|
||||||
|
// */
|
||||||
|
// public List<SysPost> selectPostsByUserId(Long enrollUserNo);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.wuzhen.system.service.impl;
|
||||||
|
|
||||||
|
import com.wuzhen.system.domain.EnrollUser;
|
||||||
|
import com.wuzhen.system.mapper.EnrollUserMapper;
|
||||||
|
import com.wuzhen.system.service.IEnrollUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位信息 服务层处理
|
||||||
|
*
|
||||||
|
* @author zhengzheng
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EnrollUserServiceImpl implements IEnrollUserService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private EnrollUserMapper enrollUserMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报名用户信息集合
|
||||||
|
*
|
||||||
|
* @param enrollUser 报名信息
|
||||||
|
* @return 报名信息集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<EnrollUser> selectEnrollUserList(EnrollUser enrollUser)
|
||||||
|
{
|
||||||
|
return enrollUserMapper.selectEnrollUserList(enrollUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.wuzhen.system.mapper.EnrollUserMapper">
|
||||||
|
|
||||||
|
<resultMap type="EnrollUser" id="EnrollUserResult">
|
||||||
|
<id property="enrollUserNo" column="enroll_user_no"/>
|
||||||
|
<result property="nickName" column="nick_name"/>
|
||||||
|
<result property="postName" column="post_name"/>
|
||||||
|
<result property="phoneNumber" column="phone_number"/>
|
||||||
|
<result property="playbillAddress" column="playbill_address"/>
|
||||||
|
<result property="recommenderNo" column="recommender_no"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectUserVo">
|
||||||
|
select enroll_user_no, nick_name, post_name, phone_number, playbill_address,recommender_no,create_by, create_time, remark
|
||||||
|
from enroll_user
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectEnrollUserList" parameterType="EnrollUser" resultMap="EnrollUserResult">
|
||||||
|
<include refid="selectUserVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="enrollUserNo != null and enrollUserNo != ''">
|
||||||
|
AND enroll_user_no like concat('%', #{enrollUserNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="postName != null and postName != ''">
|
||||||
|
AND post_name like concat('%', #{postName}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue