| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/communityList") |
| | | @GetMapping("/getAllCommunityList") |
| | | @ApiOperation(value = "获取当前账号下的社区/村落列表",response = StreetVO.class) |
| | | public R communityList(){ |
| | | return userService.communityList(this.getLoginUserInfo().getAccount(),this.getUserId()); |
| | | return userService.getAllCommunityList(); |
| | | } |
| | | |
| | | } |
| | |
| | | @NotBlank(groups = {AddGroup.class}, message = "微信账号不能为空") |
| | | private String wechatAccount; |
| | | |
| | | @ApiModelProperty("所属地区") |
| | | @NotBlank(groups = {AddGroup.class}, message = "所属地区不能为空") |
| | | private String region; |
| | | |
| | | @ApiModelProperty("详细地址") |
| | | @NotBlank(groups = {AddGroup.class}, message = "详细地址不能为空") |
| | | private String address; |
| | |
| | | @ApiModelProperty("社区名称") |
| | | private String communityName; |
| | | /** |
| | | * 所属地区 |
| | | */ |
| | | @ApiModelProperty("所属地区") |
| | | private String region; |
| | | /** |
| | | * 提货点地址 |
| | | */ |
| | | @ApiModelProperty("提货点地址") |
| | |
| | | R addComPbCheckUser(@RequestBody ComPbCheckUserDTO comPbCheckUserDTO); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 是否为专家登陆小程序 |
| | | * */ |
| | |
| | | * */ |
| | | @PostMapping("/feedBackReply") |
| | | R updateFeedBack(@RequestBody SysUserFeedbackVO sysUserFeedbackVO); |
| | | |
| | | /** |
| | | * 获取所有社区等 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getAllCommunityList") |
| | | R getAllCommunityList(); |
| | | |
| | | } |
| | |
| | | */ |
| | | private String communityName; |
| | | /** |
| | | * 所属地区 |
| | | */ |
| | | private String region; |
| | | /** |
| | | * 提货点地址 |
| | | */ |
| | | private String address; |
| | |
| | | <result column="name" jdbcType="VARCHAR" property="name"/> |
| | | <result column="community_id" jdbcType="BIGINT" property="communityId"/> |
| | | <result column="community_name" jdbcType="VARCHAR" property="communityName"/> |
| | | <result column="region" jdbcType="VARCHAR" property="region"/> |
| | | <result column="address" jdbcType="VARCHAR" property="address"/> |
| | | <result column="contacts" jdbcType="VARCHAR" property="contacts"/> |
| | | <result column="phone" jdbcType="VARCHAR" property="phone"/> |
| | |
| | | <result column="updated_by" jdbcType="BIGINT" property="updatedBy"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | id, `name`, community_id, community_name, region, address, contacts, phone, wechat_account, |
| | | id, `name`, community_id, community_name, address, contacts, phone, wechat_account, |
| | | lat, lon, `business_status`, cumulative_goods_num, prepare_goods_num, already_goods_num, is_del, |
| | | created_at, created_by, updated_at, updated_by |
| | | </sql> |
| | |
| | | return userService.getCommunityList(name,id); |
| | | } |
| | | |
| | | @GetMapping("/getAllCommunityList") |
| | | public R getAllCommunityList(){ |
| | | return userService.getAllCommunityList(); |
| | | } |
| | | |
| | | @GetMapping("/resetPasswordAccount") |
| | | public R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account,@RequestParam("appId")String appId){ |
| | | return userService.resetPassword(type,account,appId); |
| | |
| | | R getCommunityList(String name,Long id); |
| | | |
| | | /** |
| | | * 获取所有城镇或村落列表 |
| | | * @return |
| | | */ |
| | | R getAllCommunityList(); |
| | | |
| | | /** |
| | | * 重置密码 |
| | | * @param type |
| | | * @param account |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getAllCommunityList() { |
| | | List<Integer> areaList = areaCodeList(); |
| | | List<AreaVOS> areaVOList = new ArrayList<>(); |
| | | for (Integer code : areaList) { |
| | | AreaVOS areaVO = new AreaVOS(); |
| | | areaVO.setId(code); |
| | | areaVO.setName(areaCodeToName(code.longValue())); |
| | | List<StreetVOS> streetVOS = userDao.selectStreetByAreaCode(code); |
| | | Iterator<StreetVOS> iterator = streetVOS.listIterator(); |
| | | while (iterator.hasNext()) { |
| | | StreetVOS vo = iterator.next(); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), 3); |
| | | vo.setChildList(communityVOS); |
| | | |
| | | } |
| | | areaVO.setChildList(streetVOS); |
| | | areaVOList.add(areaVO); |
| | | } |
| | | return R.ok(areaVOList); |
| | | } |
| | | @Override |
| | | public R getCommunityList(String name, Long id) { |
| | | //区级账号名 |
| | | String[] streetList = {"bingcaogangjiedao", "donghuajiedao", "nongnongpingjiedao", "dadukoujiedaojiedao", "guazipingjiedao", |
| | |
| | | "jingjiangzhen", "renhezhen", "pingdizhen", "datianzhen", "tongdezhen", "futianzhen", "qianjinzhen", "panlianzhen", "binguzhen", "baimazhen", |
| | | "salianzhen", "puweizhen", "deshizhen", "wanqiuyizuxiang", "caochangzhen", "xinshanlisuzuxiang", "tongzilinzhen", "yongxingzhen", "yumenzhen", |
| | | "honggezhen", "hongguoyizuxiang"}; |
| | | List<Integer> ids = userDao.selectIdsByAccount(streetList); |
| | | // List<Integer> ids = userDao.selectIdsByAccount(streetList); |
| | | //村或社区账号 |
| | | Integer type = isVilliage(name); |
| | | //是否为市级账号 |