| | |
| | | package com.vci.frameworkcore.controller; |
| | | |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.frameworkcore.dto.SmUserDTO; |
| | | import com.vci.frameworkcore.model.dto.SmUserDTO; |
| | | import com.vci.frameworkcore.pagemodel.SmUserVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.web.model.SmUserDO; |
| | | import com.zeroc.IceInternal.Ex; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author weidy |
| | | * @date 2020/3/4 |
| | | */ |
| | | @Controller |
| | | @RestController |
| | | @RequestMapping("/userQueryController") |
| | | @Slf4j |
| | | public class SmUserQueryController { |
| | |
| | | * @throws VciBaseException 查询出错的时候会抛出异常,如果是老的项目里不抛出异常 |
| | | */ |
| | | @RequestMapping(value = "/refDataGrid",method = RequestMethod.GET) |
| | | @ResponseBody |
| | | public BaseResult<SmUserVO> refDataGrid(BaseQueryObject queryObject) throws VciBaseException { |
| | | //代码示例 |
| | | if(queryObject == null){ |
| | |
| | | * @throws VciBaseException 查询出错的时候会抛出异常,如果是老的项目里不抛出异常 |
| | | */ |
| | | @RequestMapping(value = "/refTree",method = RequestMethod.GET) |
| | | @ResponseBody |
| | | public BaseResult<Tree> refTree(TreeQueryObject treeQueryObject) throws VciBaseException{ |
| | | List<Tree> userTreeList = userQueryService.refTreeUsers(treeQueryObject); |
| | | return BaseResult.tree(userTreeList); |
| | |
| | | * @throws VciBaseException 部门主键为空、查询出错的时候会抛出异常,如果是老的项目里不抛出异常 |
| | | */ |
| | | @RequestMapping(value = "/refDataGridByPkDepartment",method = RequestMethod.GET) |
| | | @ResponseBody |
| | | public BaseResult<SmUserVO> refDataGridByPkDepartment(String pkDepartment,BaseQueryObject queryObject) throws VciBaseException{ |
| | | if(queryObject == null){ |
| | | queryObject = new BaseQueryObject(); |
| | |
| | | * @throws VciBaseException 角色的主键为空、查询出错的时候会抛出异常,如果是老的项目里不抛出异常 |
| | | */ |
| | | @RequestMapping(value = "/refDataGridByPkRole",method = RequestMethod.GET) |
| | | @ResponseBody |
| | | public BaseResult<SmUserVO> refDataGridByPkRole(String pkRole,BaseQueryObject queryObject) throws VciBaseException{ |
| | | if(queryObject == null){ |
| | | queryObject = new BaseQueryObject(); |
| | |
| | | * @param confirmPassword 确认密码 |
| | | */ |
| | | @RequestMapping(value = "/changePassword",method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public BaseResult changePassword(String userOid, String password, String confirmPassword) { |
| | | userQueryService.changePassword(userOid, password, confirmPassword); |
| | | return BaseResult.success("修改密码成功"); |
| | |
| | | * @throws VciBaseException 查询出错的时候会抛出异常,如果是老的项目里不抛出异常 |
| | | */ |
| | | @RequestMapping(value = "/getDataGridUsers",method = RequestMethod.GET) |
| | | @ResponseBody |
| | | @VciUnCheckRight |
| | | public BaseResult<SmUserVO> getDataGridUsers(BaseQueryObject queryObject) throws VciBaseException { |
| | | try { |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/addUser",method = RequestMethod.POST) |
| | | @ResponseBody |
| | | @VciUnCheckRight |
| | | public BaseResult addUser(@RequestBody SmUserDTO smUserDTO){ |
| | | try { |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/updateUser",method = RequestMethod.PUT) |
| | | @ResponseBody |
| | | @VciUnCheckRight |
| | | public BaseResult updateUser(@RequestBody SmUserDTO smUserDTO){ |
| | | try { |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/deleteUser",method = RequestMethod.DELETE) |
| | | @ResponseBody |
| | | //@VciUnCheckRight |
| | | public BaseResult deleteUser(String[] ids){ |
| | | try { |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/stopUsers",method = RequestMethod.POST) |
| | | @ResponseBody |
| | | //@VciUnCheckRight |
| | | public BaseResult disableOrEnableUsers(String[] ids,boolean flag){ |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 下载人员导入模板 |
| | | */ |
| | | @RequestMapping(value = "/downloadImportTemplate",method = RequestMethod.POST) |
| | | public void downloadImportTemplate(){ |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 人员导入 |
| | | */ |
| | | @RequestMapping(value = "/importUser",method = RequestMethod.POST) |
| | | public void importUser(){ |
| | | |
| | | } |
| | | |
| | | } |