Merge remote-tracking branch 'origin/master'
| | |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize; |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty("标签") |
| | | private String tags; |
| | |
| | | private Integer integral; |
| | | |
| | | @ApiModelProperty(value = "用户userid",hidden = true) |
| | | @Deprecated |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "申请提交人ID",hidden = true) |
| | |
| | | package com.panzhihua.common.model.vos.user; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import com.panzhihua.common.model.helper.sensitive.Sensitive; |
| | | import com.panzhihua.common.model.helper.sensitive.SensitiveStrategy; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructHouseVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "居民数据信息") |
| | | @EncryptDecryptClass |
| | | public class InputUserInfoVO implements Serializable { |
| | | |
| | | @ApiModelProperty("用户编号") |
| | |
| | | private Integer maritalStatus; |
| | | |
| | | @ApiModelProperty("联系方式") |
| | | @EncryptDecryptField |
| | | @Sensitive(strategy = SensitiveStrategy.PHONE) |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("文化程度") |
| | |
| | | import com.panzhihua.common.model.dtos.shop.*; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | |
| | | */ |
| | | @PostMapping("deletemicrowish") |
| | | R deletemicrowish(@RequestParam("id")Long id); |
| | | |
| | | /** |
| | | * 基础数据》特殊群体》分页查询 |
| | | * @param pageInputUserDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("common/data/special/page") |
| | | R specialInputUser(@RequestBody PageInputUserDTO pageInputUserDTO); |
| | | } |
| | |
| | | @PostMapping("putuserisvolunteer") |
| | | R putUserIsVolunteer(@RequestParam("phone") String phone,@RequestParam("type")int type); |
| | | |
| | | |
| | | /** |
| | | * 修改用户志愿者状态 |
| | | * @param userId 用户ID |
| | | * @param type 1 支援者 0不是志愿者 |
| | | */ |
| | | @PostMapping("putuserisvolunteerbyid") |
| | | R putUserIsVolunteerById(@RequestParam("userId") Long userId,@RequestParam("type")int type); |
| | | |
| | | /** |
| | | * 用户绑定社区、小区 |
| | | * @param loginUserInfoVO 社区小区数据 |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("common/data/special/tags/page") |
| | | R specialInputUserTags(@RequestBody ComMngUserTagDTO comMngUserTagDTO); |
| | | R specialInputUserTags(@RequestBody PageInputUserDTO comMngUserTagDTO); |
| | | |
| | | /** |
| | | * 新增或修改特殊群体标签 |
| | |
| | | public R specialInputUser(@RequestBody PageInputUserDTO pageInputUserDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | pageInputUserDTO.setCommunityId(communityId); |
| | | return userService.specialInputUser(pageInputUserDTO); |
| | | return communityService.specialInputUser(pageInputUserDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "特殊群体/删除", response = InputUserInfoVO.class) |
| | |
| | | |
| | | @ApiOperation(value = "特殊群体/分页查询标签列表", response = ComMngTagVO.class) |
| | | @PostMapping("/special/tags/page") |
| | | public R specialInputUserTags(@RequestBody ComMngUserTagDTO comMngUserTagDTO) { |
| | | public R specialInputUserTags(@RequestBody PageInputUserDTO comMngUserTagDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | comMngUserTagDTO.setCommunityId(communityId); |
| | | return userService.specialInputUserTags(comMngUserTagDTO); |
| | |
| | | int state = comMngVolunteerMngVO.getState().intValue(); |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | Date date = new Date(); |
| | | sysUserNoticeVO.setUserId(comMngVolunteerMngVO1.getUserId()); |
| | | sysUserNoticeVO.setType(3); |
| | | sysUserNoticeVO.setBusinessType(5); |
| | | sysUserNoticeVO.setUserId(comMngVolunteerMngVO1.getUserId()); |
| | | sysUserNoticeVO.setUserId(comMngVolunteerMngVO1.getSubmitUserId()); |
| | | sysUserNoticeVO.setBusinessTime(date); |
| | | sysUserNoticeVO.setStatus(0); |
| | | if (state==2) {//通过 |
| | | // 修改用户志愿者审核状态 |
| | | String phone = comMngVolunteerMngVO1.getPhone(); |
| | | R r3 = userService.putUserIsVolunteer(phone,1); |
| | | //String phone = comMngVolunteerMngVO1.getPhone(); |
| | | R r3 = userService.putUserIsVolunteerById(comMngVolunteerMngVO1.getSubmitUserId(),1); |
| | | if (R.isOk(r3)) { |
| | | log.info("修改手机号【{}】的支援者状态为否",phone); |
| | | log.info("修改用户【{}】的支援者状态为否", comMngVolunteerMngVO1.getSubmitUserId()); |
| | | }else{ |
| | | log.info("手机号【{}】没有小程序用户",phone); |
| | | log.info("用户【{}】没有小程序用户", comMngVolunteerMngVO1.getSubmitUserId()); |
| | | } |
| | | |
| | | sysUserNoticeVO.setTitle("志愿者申请通过审核"); |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_community.service.*; |
| | |
| | | R editPopulation(@RequestBody EditComMngPopulationVO editComMngPopulationVO,@RequestParam("communityId") Long communityId){ |
| | | return comMngPopulationService.editPopulation(editComMngPopulationVO, communityId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询特殊群体 |
| | | * @param pageInputUserDTO 请求参数 |
| | | * @return 特殊群体列表 |
| | | */ |
| | | @PostMapping("/special/page") |
| | | public R specialInputUser(@RequestBody PageInputUserDTO pageInputUserDTO) { |
| | | return comMngPopulationService.specialInputUser(pageInputUserDTO); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.user.ComHouseMemberVo; |
| | | import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; |
| | | import com.panzhihua.common.model.vos.user.InputUserInfoVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | "</script>") |
| | | IPage<ComMngPopulationVO> pagePopulation(Page page, @Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | |
| | | @Select("<script> " + |
| | | "select cmp.id,cmv.`alley` as areaName,cmp.`name`,cmp.phone,cmp.label as tags,cmp.create_at from com_mng_population as cmp " + |
| | | "left join com_mng_village as cmv on cmv.village_id = cmp.village_id where cmp.act_id = #{pageInputUserDTO.communityId} " + |
| | | "<if test='pageInputUserDTO.name != null and pageInputUserDTO.name != ""'>" + |
| | | " AND cmp.`name` LIKE concat(#{pageInputUserDTO.name},'%') " + |
| | | " </if> " + |
| | | "<if test='pageInputUserDTO.areaName != null and pageInputUserDTO.areaName != ""'>" + |
| | | " AND cmv.`alley` LIKE concat(#{pageInputUserDTO.areaName},'%') " + |
| | | " </if> " + |
| | | "<if test='pageInputUserDTO.tags != null and pageInputUserDTO.tags != ""'>" + |
| | | " AND cmp.label LIKE concat(#{pageInputUserDTO.tags},'%') " + |
| | | " </if> " + |
| | | " order by cmp.create_at desc " + |
| | | "</script>") |
| | | IPage<InputUserInfoVO> specialInputUser(Page page, @Param("pageInputUserDTO") PageInputUserDTO pageInputUserDTO); |
| | | |
| | | |
| | | } |
| | |
| | | "t.state,\n" + |
| | | "t.phone,\n" + |
| | | "t.apply_reson,\n" + |
| | | "t.create_at \n" + |
| | | "t.create_at, " + |
| | | "t.submit_user_id \n" + |
| | | "FROM\n" + |
| | | "com_mng_volunteer_mng t\n" + |
| | | " RIGHT JOIN \n" + |
| | | "(select phone, MAX(create_at)create_at from com_mng_volunteer_mng where state IN ( 1, 3 ) GROUP BY phone ) tmp \n" + |
| | | "on t.create_at = tmp.create_at and t.phone=tmp.phone "+ |
| | | "(select submit_user_id, MAX(create_at)create_at from com_mng_volunteer_mng where state IN ( 1, 3 ) GROUP BY submit_user_id ) tmp \n" + |
| | | "on t.create_at = tmp.create_at and t.submit_user_id=tmp.submit_user_id "+ |
| | | "WHERE\n" + |
| | | "state in (1,3) and community_id=#{comMngVolunteerMngVO.communityId} \n" + |
| | | "<if test='comMngVolunteerMngVO.name != null and comMngVolunteerMngVO.name.trim() != ""'>" + |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | |
| | | * @return |
| | | */ |
| | | R editPopulation(EditComMngPopulationVO editComMngPopulationVO, Long communityId); |
| | | |
| | | /** |
| | | * 分页查询特殊群体 |
| | | * @param pageInputUserDTO 请求参数 |
| | | * @return 特殊群体列表 |
| | | */ |
| | | R specialInputUser(PageInputUserDTO pageInputUserDTO); |
| | | } |
| | |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.user.ComHouseMemberVo; |
| | | import com.panzhihua.common.model.vos.user.InputUserInfoVO; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComActVillageDAO; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationDAO; |
| | |
| | | comMngPopulationDO.setActId(comActDO.getCommunityId()); |
| | | comMngPopulationDO.setStreetId(comActDO.getStreetId()); |
| | | comMngPopulationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | if(!userTag.isEmpty()){ |
| | | //特殊群体插入 |
| | | } |
| | | comMngPopulationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDOList.add(comMngPopulationDO); |
| | | index++; |
| | |
| | | this.updateById(populationDO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R specialInputUser(PageInputUserDTO pageInputUserDTO){ |
| | | IPage<InputUserInfoVO> iPage = populationDAO.specialInputUser(new Page<>(pageInputUserDTO.getPageNum() |
| | | ,pageInputUserDTO.getPageSize()), pageInputUserDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | } |
| | |
| | | } |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | BeanUtils.copyProperties(comMngVolunteerMngDO,comMngVolunteerMngVO); |
| | | String phone = comMngVolunteerMngVO.getPhone(); |
| | | comMngVolunteerMngVO.setUserId(comMngVolunteerMngDAO.selectUserIdByPhone(phone)); |
| | | //String phone = comMngVolunteerMngVO.getPhone(); |
| | | //comMngVolunteerMngVO.setUserId(comMngVolunteerMngDAO.selectUserIdByPhone(phone)); |
| | | return R.ok(comMngVolunteerMngVO); |
| | | } |
| | | |
| | |
| | | if(shopOrders.isEmpty()){//未查询到用户上一笔订单 |
| | | //查询用户收货地址中的默认地址 |
| | | ComShopUserAddressDO userAddressDO = comShopUserAddressDAO.selectOne(new QueryWrapper<ComShopUserAddressDO>() |
| | | .eq("delete_status", 2) |
| | | .eq("user_id",orderPreviewDTO.getUserId()).eq("is_default",ComShopUserAddressDO.isDefault.yes)); |
| | | if(userAddressDO != null){ |
| | | ComShopUserAddressVO userAddressVO = new ComShopUserAddressVO(); |
| | |
| | | }else{//查询到用户上一笔订单 |
| | | ComShopUserAddressDO userAddressDO = comShopUserAddressDAO.selectById(shopOrders.get(0).getReceiverId()); |
| | | if(userAddressDO != null){ |
| | | ComShopUserAddressVO userAddressVO = new ComShopUserAddressVO(); |
| | | BeanUtils.copyProperties(userAddressDO,userAddressVO); |
| | | orderPreviewVO.setUserAddressVO(userAddressVO); |
| | | if(userAddressDO.getDeleteStatus() == 2) { |
| | | ComShopUserAddressVO userAddressVO = new ComShopUserAddressVO(); |
| | | BeanUtils.copyProperties(userAddressDO, userAddressVO); |
| | | orderPreviewVO.setUserAddressVO(userAddressVO); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(orderPreviewVO); |
| | |
| | | ComShopOrderVO shopOrderVO = new ComShopOrderVO(); |
| | | //查询用户收货地址 |
| | | ComShopUserAddressDO userAddressDO = comShopUserAddressDAO.selectById(orderCreateDTO.getReceiverId()); |
| | | if(userAddressDO == null){ |
| | | if(userAddressDO == null||userAddressDO.getDeleteStatus()!=2){ |
| | | return R.fail("收货地址不存在"); |
| | | } |
| | | //用户id |
| | |
| | | R<LoginUserInfoVO> loginUserInfoVOR = userService.getUserInfo(account+"_5"); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(loginUserInfoVOR.getData()), LoginUserInfoVO.class); |
| | | |
| | | if(loginUserInfoVO==null){ |
| | | return R.fail(500, "该账号不存在"); |
| | | } |
| | | ComShopStoreDO comShopStoreDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ComShopStoreDO>() |
| | | .eq(ComShopStoreDO::getDeleteStatus, 1).eq(ComShopStoreDO::getSysUserId, loginUserInfoVO.getUserId())); |
| | | if (comShopStoreDO == null) { |
| | | R.fail(500, "商铺不存在"); |
| | | return R.fail(500, "该账号不存在"); |
| | | } |
| | | ShopStoreVO shopStoreVO = new ShopStoreVO(); |
| | | BeanUtils.copyProperties(comShopStoreDO, shopStoreVO); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改用户志愿者状态 |
| | | * @param userId 志愿者ID |
| | | * @param type 1是志愿者 0 不是 |
| | | */ |
| | | @PostMapping("putuserisvolunteerbyid") |
| | | R putUserIsVolunteerById(@RequestParam("userId")Long userId,@RequestParam("type")int type){ |
| | | return userService.putUserIsVolunteerById(userId, type); |
| | | } |
| | | |
| | | /** |
| | | * 用户绑定社区、小区 |
| | | * @param loginUserInfoVO 社区小区数据 |
| | | * @return 绑定结果 |
| | |
| | | */ |
| | | R putUserIsVolunteer(String phone, int type); |
| | | /** |
| | | * 修改用户志愿者状态 |
| | | * @param userId 用户ID |
| | | * @param type 1是志愿者 0 不是 |
| | | */ |
| | | R putUserIsVolunteerById(Long userId, int type); |
| | | /** |
| | | * 用户绑定社区、小区 |
| | | * @param loginUserInfoVO 社区小区数据 |
| | | * @return 绑定结果 |
| | |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改用户志愿者状态 |
| | | * |
| | | * @param userId 志愿者用户ID |
| | | * @param type |
| | | */ |
| | | @Override |
| | | public R putUserIsVolunteerById(Long userId, int type) { |
| | | SysUserDO sysUserDO = new SysUserDO(); |
| | | sysUserDO.setIsVolunteer(type); |
| | | sysUserDO.setUserId(userId); |
| | | |
| | | SysUserDO userInDB = userDao.selectById(userId); |
| | | if(userInDB!=null) { |
| | | boolean isVol = userInDB.getIsVolunteer()==1; |
| | | if(isVol){ |
| | | return R.fail("用户已是志愿者"); |
| | | } |
| | | if(userInDB.getType()!=1){ |
| | | return R.fail("用户不是小程序用户"); |
| | | } |
| | | int update = userDao.updateById(sysUserDO); |
| | | if (update > 0) { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | | /** |
| | | * 用户绑定社区、小区 |
| | | * |