修改组织架构删除接口 小程序注册用户不能登录导办人员 修改用户查询接口 bug
| | |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.db.gen.entity.OrganizationChartEntity; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | | import com.dg.core.service.IClassifyAdministrationService; |
| | | import com.dg.core.service.ITransactionEventService; |
| | |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 树状分类选择列表 |
| | | * @return |
| | | */ |
| | | @ApiOperation("树状分类选择列表") |
| | | @GetMapping("/getClassifyList") |
| | | public TableDataInfo getClassifyList() |
| | | { |
| | | List<ClassifyAdministration> list=iClassifyAdministrationService.selectConfigList("","1"); |
| | | |
| | | |
| | | for(ClassifyAdministration entity:list) |
| | | { |
| | | entity.setClassifyAdministrationEntityList(iClassifyAdministrationService.selectParentData(entity.getId()+"")); |
| | | } |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | return error("部门不能为空"); |
| | | } |
| | | |
| | | ResultData data = IUserService.loginByPhonenumber(config.getPhonenumber()); |
| | | if (data != null) |
| | | { |
| | | SysUser user= (SysUser) data.getData(); |
| | | user.setUserType("2"); |
| | | //提示用户名或密码错误 |
| | | return toAjax(IUserService.updateConfig(user)); |
| | | } |
| | | config.setUserType("2"); |
| | | |
| | | SysUser user=IUserService.selectData(null,config.getPhonenumber()); |
| | | if (user != null) |
| | | { |
| | | config.setId(user.getId()); |
| | | //提示用户名或密码错误 |
| | | return toAjax(IUserService.updateConfig(config)); |
| | | } |
| | | |
| | | config.setCreateTime(LocalDateTime.now()); |
| | | config.setUpdateTime(LocalDateTime.now()); |
| | | config.setUserId(Snowflake.getId()); |
| | |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.db.gen.entity.OrganizationChartEntity; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import com.dg.core.service.ITransactionEventService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Autowired(required = true) |
| | | IOrganizationChartService iOrganizationChartService; |
| | | |
| | | @Autowired(required = true) |
| | | ITransactionEventService iTransactionEventService; |
| | | |
| | | /** |
| | | * 查询机构列表 |
| | |
| | | if(list!=null && list.size()>0) |
| | | { |
| | | return ResultData.error("该机构下存在其他部门!请先删除子部门"); |
| | | } |
| | | |
| | | List<String> ids=new ArrayList<>(); |
| | | ids.add(Id); |
| | | List<TransactionEvent> transactionEvents=iTransactionEventService.selectConfigList(null,null,ids); |
| | | |
| | | if(transactionEvents!=null && transactionEvents.size()>0) |
| | | { |
| | | return ResultData.error("该机构下已绑定办事指南!请解绑办事指南"); |
| | | } |
| | | return toAjax(iOrganizationChartService.deleteConfigById(Id)); |
| | | } |
| | |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | for (OrganizationChartEntity sysStreet:lists) |
| | | { |
| | | ids.add(sysStreet); |
| | | if(sysStreet.getChild()!=null && sysStreet.getChild().size()>0) |
| | | { |
| | | ids.addAll(disposestreet(sysStreet.getChild())); |
| | |
| | | } |
| | | |
| | | //本地表查询用户 |
| | | user = IUserService.selectData(huaChengSysUser.getUserId()+""); |
| | | user = IUserService.selectData(huaChengSysUser.getUserId()+"",null); |
| | | if (user == null) { |
| | | //本地没有此用户 新用户 |
| | | SysUser newSysUser=new SysUser(); |
| | |
| | | IUserService.insertConfig(newSysUser); |
| | | } |
| | | |
| | | user = IUserService.selectData(huaChengSysUser.getUserId()+""); |
| | | user = IUserService.selectData(huaChengSysUser.getUserId()+"",null); |
| | | |
| | | if (user == null) { |
| | | return ResultData.error("用户不存在!请联系管理员"); |
| | |
| | | return error("userId不能为空"); |
| | | } |
| | | |
| | | SysUser sysUser=IUserService.selectData(userId); |
| | | SysUser sysUser=IUserService.selectData(userId,null); |
| | | //删除标志(0代表存在 2代表删除) |
| | | sysUser.setDelFlag("2"); |
| | | return toAjax(IUserService.updateConfig(sysUser)); |
| | |
| | | return error("密码不能为空"); |
| | | } |
| | | |
| | | SysUser sysUser=IUserService.selectData(config.getUserId()+""); |
| | | SysUser sysUser=IUserService.selectData(config.getUserId()+"",null); |
| | | if(sysUser==null) |
| | | { |
| | | return error("用户不存在"); |
| | |
| | | private String parentName; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "ClassifyAdministrationEntityList", value = "父级分类名字") |
| | | @ApiModelProperty(name = "ClassifyAdministrationEntityList", value = "下级分类") |
| | | private List<ClassifyAdministration> ClassifyAdministrationEntityList; |
| | | |
| | | |
| | | } |
| | |
| | | List<String> selectParent(String parentId); |
| | | |
| | | |
| | | List<ClassifyAdministration> selectParentData(String parentId); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | SysUser selectData(String userId); |
| | | SysUser selectData(@Param("userId") String userId,@Param("phonenumber") String phonenumber); |
| | | |
| | | |
| | | /** |
| | |
| | | @Param("classifyGrade") String classifyGrade, |
| | | @Param("ids") List<String> ids); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 导办事物列表 (部分也) |
| | | * @param |
| | | * @return |
| | | */ |
| | | public List<TransactionEvent> selectConfigList(@Param("matterAndUser") String matterAndUser, |
| | | @Param("classifyGrade") String classifyGrade, |
| | | @Param("ids") List<String> ids); |
| | | |
| | | /** |
| | | * 新增导办事务 |
| | | * @param entity |
| | |
| | | //如果token验证成功,权限检查通过,将token对应的用户id存在request中,便于之后注入 |
| | | request.setAttribute(Constant.CURRENT_USER_ID, manager.getHCUserId(HCtoken)); |
| | | System.out.println("花城用户id:"+manager.getHCUserId(HCtoken)); |
| | | SysUser ss = IUserService.selectData(manager.getHCUserId(HCtoken)+""); |
| | | SysUser ss = IUserService.selectData(manager.getHCUserId(HCtoken)+"",null); |
| | | if(ss==null && ss.getUserId()<0) |
| | | { |
| | | HuaChengSysUser huaChengSysUser=iHuaChengSysUserService.selectData(manager.getHCUserId(HCtoken)+"","",""); |
| | |
| | | Long currentUserId = (Long) webRequest.getAttribute(Constant.CURRENT_USER_ID, RequestAttributes.SCOPE_REQUEST); |
| | | if (currentUserId != null) { |
| | | //从数据库中查询并返回 |
| | | return userService.selectData(currentUserId+""); |
| | | return userService.selectData(currentUserId+"",null); |
| | | } |
| | | return null; |
| | | // throw new MissingServletRequestPartException(Constant.CURRENT_USER_ID); |
| | |
| | | */ |
| | | List<String> selectParent(String parentId); |
| | | |
| | | List<ClassifyAdministration> selectParentData(String parentId); |
| | | |
| | | |
| | | } |
| | |
| | | public List<SysUser> selectConfigList(IPage<SysUser> page, Integer state,String userType); |
| | | |
| | | |
| | | SysUser selectData(String userId); |
| | | SysUser selectData(String userId,String phonenumber); |
| | | |
| | | /** |
| | | * 新增聊天记录 |
| | |
| | | List<String> ids); |
| | | |
| | | /** |
| | | * 导办事物列表 |
| | | * @return |
| | | */ |
| | | public List<TransactionEvent> selectConfigList(String matterAndUser, String classifyGrade, |
| | | List<String> ids); |
| | | |
| | | /** |
| | | * 新增导办事务 |
| | | * @param entity |
| | | * @return |
| | |
| | | return baseMapper.selectParent(parentId); |
| | | } |
| | | |
| | | @Override |
| | | public List<ClassifyAdministration> selectParentData(String parentId) { |
| | | return baseMapper.selectParentData(parentId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int insertConfig(ClassifyAdministration entity) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public SysUser selectData(String userId) { |
| | | return baseMapper.selectData(userId); |
| | | public SysUser selectData(String userId,String phonenumber) { |
| | | return baseMapper.selectData(userId,phonenumber); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<TransactionEvent> selectConfigList(String matterAndUser, String classifyGrade, List<String> ids) { |
| | | return baseMapper.selectConfigList(matterAndUser,classifyGrade,ids); |
| | | } |
| | | |
| | | @Override |
| | | public int insertConfig(TransactionEvent entity) { |
| | | return baseMapper.insertConfig(entity); |
| | | } |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectParentData" resultType="com.dg.core.db.gen.entity.ClassifyAdministration"> |
| | | <include refid="selectClassifyAdministrationEntityVo"/> |
| | | <where> |
| | | <if test="parentId != null and parentId != ''"> |
| | | AND parent_id = #{parentId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <if test="userId!=null and userId!='' "> |
| | | user_id= #{userId} |
| | | </if> |
| | | |
| | | <if test="phonenumber!=null and phonenumber!='' "> |
| | | phonenumber= #{phonenumber} |
| | | </if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="openid != null and openid != '' ">,openid=#{openid}</if> |
| | | ,update_time=sysdate() |
| | | </set> |
| | | where user_id= #{userId} |
| | | where id= #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteConfigById" parameterType="string"> |