Merge remote-tracking branch 'origin/master' into master
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageVolunteerDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingActivityVO; |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "车辆登记") |
| | | @PostMapping("car/register") |
| | | public R addComMngCar(@RequestBody ComMngCarAppletDTO comMngCarAppletDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null!=communityId && 0!=communityId) { |
| | | comMngCarAppletDTO.setCommunityId(communityId); |
| | | comMngCarAppletDTO.setAreaId(loginUserInfo.getAreaId()); |
| | | comMngCarAppletDTO.setUserName(loginUserInfo.getName()); |
| | | comMngCarAppletDTO.setUserId(loginUserInfo.getUserId()); |
| | | comMngCarAppletDTO.setMobile(loginUserInfo.getPhone()); |
| | | comMngCarAppletDTO.setSource(1); |
| | | } |
| | | return communityService.addComMngCarApplet(comMngCarAppletDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "登记车辆列表",response = ComMngCarVO.class) |
| | | @GetMapping("car/list") |
| | | public R comMngCarList() { |
| | | return communityService.userComMngCarList(this.getUserId()); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessDetailVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @description: 社区便民服务商家接口 |
| | | * @author: Null |
| | | * @date: 2021/3/11 13:26 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"社区运营/便民服务"}) |
| | | @RestController |
| | | @RequestMapping("/convenient") |
| | | public class CommunityConvenientApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "分页查询便民服务商家",response = ComCvtBusinessVO.class) |
| | | @PostMapping("/business/area/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null!=communityId && 0!=communityId) { |
| | | comCvtBusinessAppletsDTO.setCommunityId(communityId); |
| | | } |
| | | return communityService.pageComCvtBusinessByServiceArea(comCvtBusinessAppletsDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询便民服务商家详情",response = ComCvtBusinessDetailVO.class) |
| | | @GetMapping("/business/get") |
| | | public R getComCvtBusinessServeDetail(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtBusinessServeDetail(id); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.advertisement.ComOpsAdvVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageBackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.user.NoticeUnReadVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserAgreementVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | |
| | | public R agreement (@RequestParam("type")Integer type){ |
| | | return userService.agreement(type); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("发布留言") |
| | | @PostMapping("addmessage") |
| | | public R addMessage(@RequestBody @Validated(AddGroup.class) ComActMessageVO comActMessageVO){ |
| | | // 微信内容审核 |
| | | String msg = comActMessageVO.getMsgContent(); |
| | | if (!checkService.checkMessage(msg)) { |
| | | return R.fail("内容违规"); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | Integer type = loginUserInfo.getType(); |
| | | if(null==type||(type!=1&&type!=2)) { |
| | | return R.fail("留言对象类型错误!"); |
| | | } |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comActMessageVO.setCommunityId(communityId); |
| | | comActMessageVO.setUserId(userId); |
| | | comActMessageVO.setUserName(loginUserInfo.getName()); |
| | | comActMessageVO.setUserAccount(loginUserInfo.getAccount()); |
| | | comActMessageVO.setUserPhone(loginUserInfo.getPhone()); |
| | | comActMessageVO.setIspublic(1); |
| | | comActMessageVO.setStatus(1); |
| | | return communityService.addMessage(comActMessageVO); |
| | | } |
| | | |
| | | @ApiOperation("发布留言回复") |
| | | @PostMapping("addmessageback") |
| | | public R addMessageBack(@RequestBody @Validated(AddGroup.class) ComActMessageBackVO comActMessageBackVO){ |
| | | // 微信内容审核 |
| | | String msg = comActMessageBackVO.getMsgContent(); |
| | | if (!checkService.checkMessage(msg)) { |
| | | return R.fail("内容违规"); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | Integer type = loginUserInfo.getType(); |
| | | if(null==type||(type!=1&&type!=2)) { |
| | | return R.fail("留言对象类型错误!"); |
| | | } |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comActMessageBackVO.setCommunityId(communityId); |
| | | comActMessageBackVO.setUserId(userId); |
| | | comActMessageBackVO.setUserName(loginUserInfo.getName()); |
| | | comActMessageBackVO.setUserAccount(loginUserInfo.getAccount()); |
| | | comActMessageBackVO.setIspublic(1); |
| | | comActMessageBackVO.setStatus(1); |
| | | return communityService.addMessageBack(comActMessageBackVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页显示我的留言",response = ComActMessageVO.class) |
| | | @PostMapping("pagemymessage") |
| | | public R pageMyMessage (@RequestBody ComActMessageVO comActMessageVO){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | comActMessageVO.setCommunityId(communityId); |
| | | comActMessageVO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.pageMyMessageApplets(comActMessageVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页显示居民给我的留言",response = ComActMessageVO.class) |
| | | @PostMapping("pagesendtomemessage") |
| | | public R pageSendToMessage (@RequestBody ComActMessageVO comActMessageVO){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | comActMessageVO.setCommunityId(communityId); |
| | | comActMessageVO.setUserId(loginUserInfo.getUserId()); |
| | | comActMessageVO.setPhone(loginUserInfo.getPhone()); |
| | | return communityService.pageSendToMessageApplets(comActMessageVO); |
| | | } |
| | | @ApiOperation(value = "分页显示指定用户的留言",response =ComActMessageVO.class ) |
| | | @PostMapping("pagemessagebyuser") |
| | | public R pageMessageByUser (@RequestBody ComActMessageVO comActMessageVO){ |
| | | return communityService.pageMessageByUser(comActMessageVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "留言详情",response =ComActMessageVO.class ) |
| | | @GetMapping("detailmessage") |
| | | @ApiImplicitParam(name = "id",value = "随手拍主键") |
| | | public R detailMessage(@RequestParam("id") Long id){ |
| | | return communityService.detailMessage(id); |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "维护用户基本信息(昵称、性别、头像)") |
| | | @PostMapping("updateUserWeiXinInfo") |
| | | public R updateUserWeiXinInfo(@RequestBody LoginRequest loginRequest){ |
| | | String encryptedData = loginRequest.getEncryptedData(); |
| | | String iv = loginRequest.getIv(); |
| | | boolean empty = ObjectUtils.isEmpty(iv); |
| | | boolean empty1 = ObjectUtils.isEmpty(encryptedData); |
| | | if (empty||empty1) { |
| | | return R.fail("微信用户参数不全"); |
| | | } |
| | | WxMaService maService = wxMaConfiguration.getMaService(); |
| | | Long userId = this.getUserId(); |
| | | boolean empty2 = ObjectUtils.isEmpty(userId); |
| | | if (empty2) { |
| | | throw new UnAuthenticationException(); |
| | | } |
| | | R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId + ""); |
| | | LoginUserInfoVO loginUserInfoVO =r.getData(); |
| | | WxMaUserInfo wxUserInfo = null; |
| | | try { |
| | | log.info(encryptedData); |
| | | log.info(iv); |
| | | wxUserInfo = maService.getUserService().getUserInfo(loginUserInfoVO.getSessionKey(), |
| | | encryptedData, iv); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | return R.fail("微信解析基本信息失败"); |
| | | } |
| | | WxMaUserInfo wxUserInfo = loginRequest.getUserInfo(); |
| | | if (null == wxUserInfo) { |
| | | return R.fail("微信解析基本信息失败"); |
| | | return R.fail("缺少基本信息参数"); |
| | | } |
| | | String avatarUrl = wxUserInfo.getAvatarUrl(); |
| | | String gender = wxUserInfo.getGender(); |
| | |
| | | Long userId = loginUserInfo.getUserId(); |
| | | Long areaId = loginUserInfo.getAreaId(); |
| | | R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId + ""); |
| | | String phone = loginUserInfo.getPhone(); |
| | | if (R.isOk(r)) { |
| | | Object data = r.getData(); |
| | | if (!ObjectUtils.isEmpty(data)) { |
| | |
| | | package com.panzhihua.applets.model.vos; |
| | | |
| | | import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | @ApiModelProperty(name = "iv",value = "加密算法的初始向量") |
| | | String iv; |
| | | |
| | | @ApiModelProperty(name = "userInfo",value = "用户基本信息") |
| | | WxMaUserInfo userInfo; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.jcraft.jsch.SftpException; |
| | | import com.panzhihua.common.constants.FtpConstants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.listen.ComCvtServeExcelListen; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @description: 社区便民服务商家接口 |
| | | * @author: Null |
| | | * @date: 2021/3/11 13:26 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"社区运营/便民服务"}) |
| | | @RestController |
| | | @RequestMapping("/convenient") |
| | | public class CommunityConvenientApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @Value("${excel.convenientUrl}") |
| | | private String excelConvenientUrl="http://panzhihua.nhys.cdnhxx.com/web/bianminfuwudaoru.xlsx"; |
| | | // FTP 登录用户名 |
| | | @Value("${ftp.username}") |
| | | private String userName; |
| | | // FTP 登录密码 |
| | | @Value("${ftp.password}") |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | @Value("${ftp.host}") |
| | | private String host; |
| | | // FTP 端口 |
| | | @Value("${ftp.port}") |
| | | private int port; |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | @ApiOperation(value = "分页查询便民服务商家",response = ComCvtBusinessVO.class) |
| | | @PostMapping("/business/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessDTO pageComCvtBusinessDTO) { |
| | | return communityService.pageComCvtBusiness(pageComCvtBusinessDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "新增便民服务商家") |
| | | @PostMapping("/business/add") |
| | | public R addComCvtBusiness(@RequestBody ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comCvtBusinessDTO.setCreateBy(userId); |
| | | return communityService.addComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区下拉列表" ,response = ComActVO.class) |
| | | @GetMapping("/community") |
| | | public R listCommunity(){ |
| | | return communityService.listCommunityAll(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "编辑便民服务商家") |
| | | @PutMapping("/business/put") |
| | | public R putComCvtBusiness(@RequestBody ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | return communityService.putComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询便民服务商家详情") |
| | | @GetMapping("/business/get") |
| | | public R getComCvtBusiness(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtBusiness(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "删除便民服务商家详情") |
| | | @DeleteMapping("/business/delete") |
| | | public R deleteComCvtBusiness(@RequestParam("id") Long id) { |
| | | return communityService.deleteComCvtBusiness(id); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "分页查询便民服务分类",response = ComCvtCategoryVO.class) |
| | | @PostMapping("/category/page") |
| | | public R pageComCvtCategory(@RequestBody PageComCvtCategoryDTO pageComCvtCategoryDTO) { |
| | | return communityService.pageComCvtCategory(pageComCvtCategoryDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务所有分类,下拉框",response = ComCvtCategoryVO.class) |
| | | @PostMapping("/category/all") |
| | | public R allComCvtCategory() { |
| | | return communityService.allComCvtCategory(); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增便民服务分类") |
| | | @PostMapping("/category/add") |
| | | public R pageComCvtCategory(@RequestBody ComCvtCategoryDTO comCvtCategoryDTO) { |
| | | return communityService.addComCvtCategory(comCvtCategoryDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "编辑便民服务分类") |
| | | @PutMapping("/category/put") |
| | | public R putComCvtCategory(@RequestBody ComCvtCategoryDTO comCvtCategoryDTO) { |
| | | return communityService.putComCvtCategory(comCvtCategoryDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询便民服务分类详情",response = ComCvtCategoryVO.class) |
| | | @GetMapping("/category/get") |
| | | public R getComCvtCategory(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtCategory(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "删除便民服务分类信息") |
| | | @DeleteMapping("/category/delete") |
| | | public R deleteComCvtCategory(@RequestParam("id") Long id) { |
| | | return communityService.deleteComCvtCategory(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "分页查询便民服务",response = ComCvtServeVO.class) |
| | | @PostMapping("/serve/page") |
| | | public R pageComCvtServe(@RequestBody PageComCvtServeDTO pageComCvtServeDTO) { |
| | | return communityService.pageComCvtServe(pageComCvtServeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增便民服务") |
| | | @PostMapping("/serve/add") |
| | | public R addComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comCvtServeDTO.setCreateBy(userId); |
| | | return communityService.addComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑便民服务") |
| | | @PutMapping("/serve/put") |
| | | public R putComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | | return communityService.putComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务详情",response = ComCvtServeVO.class) |
| | | @GetMapping("/serve/get") |
| | | public R getComCvtServe(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtServe(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除便民服务信息") |
| | | @DeleteMapping("/serve/delete") |
| | | public R deleteComCvtServe(@RequestParam("id") Long id) { |
| | | return communityService.deleteComCvtServe(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "下载模板-便民服务") |
| | | @GetMapping(value = "/serve/download/template") |
| | | public R downloadTemplate(HttpServletResponse response) throws IOException, SftpException { |
| | | return R.ok(excelConvenientUrl); |
| | | } |
| | | |
| | | @ApiOperation(value = "上传文件") |
| | | @PostMapping(value = "/upload/file", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name= UUID.randomUUID().toString().replaceAll("-","")+"."+extension; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName,password,host,port); |
| | | sftp.login(); |
| | | InputStream is = file.getInputStream(); |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | | sftp.logout(); |
| | | return R.ok(url + "/idcard/" + name); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "excel导入便民服务") |
| | | @PostMapping(value = "/serve/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R downloadTemplate(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | String fileName = file.getOriginalFilename(); //获取文件名 |
| | | log.info("传入文件名字【{}】",fileName); |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | EasyExcel.read(inputStream, ComCvtServeExcelVO.class, new ComCvtServeExcelListen(communityService,null)).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
New file |
| | |
| | | HELP.md |
| | | target/ |
| | | !.mvn/wrapper/maven-wrapper.jar |
| | | !**/src/main/**/target/ |
| | | !**/src/test/**/target/ |
| | | |
| | | ### STS ### |
| | | .apt_generated |
| | | .classpath |
| | | .factorypath |
| | | .project |
| | | .settings |
| | | .springBeans |
| | | .sts4-cache |
| | | |
| | | ### IntelliJ IDEA ### |
| | | .idea |
| | | *.iws |
| | | *.iml |
| | | *.ipr |
| | | |
| | | ### NetBeans ### |
| | | /nbproject/private/ |
| | | /nbbuild/ |
| | | /dist/ |
| | | /nbdist/ |
| | | /.nb-gradle/ |
| | | build/ |
| | | !**/src/main/**/build/ |
| | | !**/src/test/**/build/ |
| | | |
| | | ### VS Code ### |
| | | .vscode/ |
| | | /.gitignore |
New file |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 便民服务导入监听 |
| | | * @author: Null |
| | | * @date: 2021/3/11 13:26 |
| | | */ |
| | | @Slf4j |
| | | public class ComCvtServeExcelListen extends AnalysisEventListener<ComCvtServeExcelVO> { |
| | | |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | public ComCvtServeExcelListen(CommunityService communityService,Long communityId){ |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | |
| | | private static final int BATCH_COUNT = 100; |
| | | private List<ComCvtServeExcelVO> list = new ArrayList<>(); |
| | | @Override |
| | | public void invoke(ComCvtServeExcelVO comCvtServeExcelVO, AnalysisContext analysisContext) { |
| | | list.add(comCvtServeExcelVO); |
| | | // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM |
| | | if(list.size() >= BATCH_COUNT){ |
| | | log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); |
| | | R r = this.communityService.listSaveConvenientServeExcelVO(list,this.communityId); |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | | list.clear(); //清空list |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); |
| | | R r = this.communityService.listSaveConvenientServeExcelVO(list,this.communityId);//确保最后遗留的数据保存在数据库中 |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 便民服务 商家信息新增/编辑 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:36 |
| | | */ |
| | | @Data |
| | | @ApiModel("商家信息新增/编辑") |
| | | public class ComCvtBusinessDTO implements Serializable { |
| | | |
| | | @ApiModelProperty("商家ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("商家名称") |
| | | @NotBlank(groups = {AddGroup.class},message = "商家名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("联系人") |
| | | @NotBlank(groups = {AddGroup.class},message = "联系人不能为空") |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("联系方式") |
| | | @NotBlank(groups = {AddGroup.class},message = "联系方式不能为空") |
| | | private String contactsPhone; |
| | | |
| | | @ApiModelProperty("详细地址") |
| | | @NotBlank(groups = {AddGroup.class},message = "详细地址不能为空") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("主营业务") |
| | | @NotBlank(groups = {AddGroup.class},message = "主营业务不能为空") |
| | | private String busScope; |
| | | |
| | | @ApiModelProperty("服务范围标记:1-全攀枝花市,2-部分地区") |
| | | @NotBlank(groups = {AddGroup.class},message = "服务范围标记不能为空") |
| | | private Integer areaFlag; |
| | | |
| | | @ApiModelProperty("商家logo") |
| | | @NotBlank(groups = {AddGroup.class},message = "商家logo不能为空") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("创建人") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "社区主键",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("服务范围集合") |
| | | private List<Long> communityIds; |
| | | |
| | | @ApiModelProperty("商家介绍媒体文件类型:1-图片 2-视频") |
| | | private Integer mediaType; |
| | | |
| | | @ApiModelProperty("介绍媒体文件集合") |
| | | private List<String> mediaPaths; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 便民服务 分类信息 |
| | | * @author: Null |
| | | * @date: 2021/3/11 17:11 |
| | | */ |
| | | @Data |
| | | @ApiModel("分类信息") |
| | | public class ComCvtCategoryDTO implements Serializable { |
| | | |
| | | @ApiModelProperty("分类ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | @NotBlank(groups = {AddGroup.class},message = "分类名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("权重") |
| | | @NotBlank(groups = {AddGroup.class},message = "权重不能为空") |
| | | private Integer weight; |
| | | |
| | | @ApiModelProperty(value = "创建人",hidden = true) |
| | | private String createBy; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 便民服务新增/编辑参数 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:52 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务新增/编辑参数") |
| | | public class ComCvtServeDTO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -7734682979200558948L; |
| | | @ApiModelProperty("服务主键ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("服务名称") |
| | | @NotBlank(groups = {AddGroup.class},message = "服务名称不能为空") |
| | | private String serviceName; |
| | | |
| | | @ApiModelProperty("服务价格") |
| | | @NotBlank(groups = {AddGroup.class},message = "服务价格不能为空") |
| | | private BigDecimal servicePrice; |
| | | |
| | | @ApiModelProperty("服务分类ID") |
| | | @NotBlank(groups = {AddGroup.class},message = "服务分类不能为空") |
| | | private Long categoryId; |
| | | |
| | | @ApiModelProperty("服务描述") |
| | | @NotBlank(groups = {AddGroup.class},message = "服务描述不能为空") |
| | | private String serviceDesc; |
| | | |
| | | @ApiModelProperty("所属商家ID") |
| | | @NotBlank(groups = {AddGroup.class},message = "所属商家不能为空") |
| | | private Long businessId; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "创建人",hidden = true) |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value ="创建时间",hidden = true) |
| | | private Date createAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @description: 车辆登记 |
| | | * @author: Null |
| | | * @date: 2021/3/16 14:37 |
| | | */ |
| | | @Data |
| | | @ApiModel("小程序车辆登记参数") |
| | | public class ComMngCarAppletDTO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "车辆主键ID",hidden = true) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "车牌号") |
| | | @NotBlank(groups = {AddGroup.class},message = "车牌号不能为空") |
| | | private String plateNum; |
| | | |
| | | @ApiModelProperty(value = "车辆品牌") |
| | | @NotBlank(groups = {AddGroup.class},message = "车辆品牌不能为空") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value = "车身颜色") |
| | | @NotBlank(groups = {AddGroup.class},message = "车身颜色不能为空") |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value = "车辆型号") |
| | | @NotBlank(groups = {AddGroup.class},message = "车辆型号不能为空") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(value = "社区ID",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "小区名称",hidden = true) |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty(value = "小区ID",hidden = true) |
| | | private Long areaId; |
| | | |
| | | @ApiModelProperty(value = "车主姓名",hidden = true) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "车主ID",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "车主手机号码",hidden = true) |
| | | private String mobile; |
| | | |
| | | @ApiModelProperty(value = "创建人",hidden = true) |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "数据来源:1-小程序 2-后台录入",hidden = true) |
| | | private Integer source; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description: 房屋信息导出 |
| | | * @author: Null |
| | | * @date: 2021/3/16 09:36 |
| | | */ |
| | | @Data |
| | | public class ExcelHouseDTO { |
| | | |
| | | @ExcelProperty("楼栋") |
| | | private String build; |
| | | |
| | | @ExcelProperty("单元") |
| | | private String unit; |
| | | |
| | | @ExcelProperty("楼层") |
| | | private String floor; |
| | | |
| | | @ExcelProperty("房间") |
| | | private String room; |
| | | |
| | | @ExcelProperty("面积") |
| | | private String square; |
| | | |
| | | @ExcelProperty("房屋状态") |
| | | private String state; |
| | | |
| | | @ExcelProperty("居住人") |
| | | private String username; |
| | | |
| | | @ExcelProperty("联系电话") |
| | | private String phone; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description: 便民服务商家请求参数 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:36 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家请求参数") |
| | | public class PageComCvtBusinessAppletsDTO { |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description: 便民服务商家请求参数 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:36 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家请求参数") |
| | | public class PageComCvtBusinessDTO { |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("商家名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description: 便民服务分类请求参数 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:36 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务请求参数") |
| | | public class PageComCvtCategoryDTO { |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description: 便民服务列表请求参数 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:52 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务列表请求参数") |
| | | public class PageComCvtServeDTO { |
| | | |
| | | @ApiModelProperty("服务名称") |
| | | private String serviceName; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("职位") |
| | | @NotBlank(groups = AddGroup.class,message = "职位不能为空") |
| | | private String job; |
| | | |
| | | @ApiModelProperty("岗位职责") |
| | | @NotBlank(groups = AddGroup.class,message = "岗位职责不能为空") |
| | | private String jobResponsibilities; |
| | | |
| | | @ApiModelProperty("照片") |
| | | @NotBlank(groups = AddGroup.class,message = "照片不能为空") |
| | | private String url; |
| | | |
| | | @ApiModelProperty("电话") |
| | | @NotBlank(groups = AddGroup.class,message = "电话不能为空") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("create_at") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("照片") |
| | | private String url; |
| | | @ApiModelProperty("职位") |
| | | private String job; |
| | | @ApiModelProperty("岗位职责") |
| | | private String jobResponsibilities; |
| | | @ApiModelProperty("电话") |
| | | private String phone; |
| | | @ApiModelProperty("是否注册") |
| | | private Integer isReg; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "用户名称",example = "") |
| | | private String name; |
| | | @ApiModelProperty(value="手机号",example = "") |
| | | private String phone; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("性别 1 男 2 女") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty("是否社区团队或者党委 1 是 2 否") |
| | | private Integer ismemberrole; |
| | | |
| | | @ApiModelProperty("生日") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | |
| | | |
| | | @ApiModelProperty(value = "是否增加 1 增加 0 不增加") |
| | | private Integer isAdd; |
| | | |
| | | @ApiModelProperty(value = "分类:1-社区风采 2-社区动态") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "封面模式:1-小图展示 2-大图展示") |
| | | private Integer coverMode; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | @Data |
| | | @ApiModel("留言回复") |
| | | public class ComActMessageBackVO { |
| | | @ApiModelProperty("主键") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("留言id") |
| | | private Long msgId; |
| | | |
| | | @ApiModelProperty("回复内容") |
| | | @NotBlank(groups = {AddGroup.class},message = "回复内容不能为空") |
| | | private String msgContent; |
| | | |
| | | @ApiModelProperty("图片地址 多个用逗号隔开") |
| | | private String photoPah; |
| | | |
| | | @ApiModelProperty(value = "联系方式",hidden = true) |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "留言人id",hidden = true) |
| | | private Long sendtoUserId; |
| | | |
| | | @ApiModelProperty(value = "留言人姓名",hidden = true) |
| | | private String sendtoUserName; |
| | | |
| | | @ApiModelProperty(value = "状态 1 待回复 2 已回复",hidden = true) |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "是否公开 1 公开 2 保密",hidden = true) |
| | | private Integer ispublic; |
| | | |
| | | @ApiModelProperty(value = "回复人主键",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "回复人账号",hidden = true) |
| | | private String userAccount; |
| | | |
| | | @ApiModelProperty(value = "回复人姓名",hidden = true) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "社区主键",hidden = true) |
| | | private Long communityId; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "回复时间",hidden = true) |
| | | private Date createAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | @Data |
| | | @ApiModel("留言") |
| | | public class ComActMessageVO { |
| | | @ApiModelProperty("主键") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("留言内容") |
| | | @NotBlank(groups = {AddGroup.class},message = "留言内容不能为空") |
| | | private String msgContent; |
| | | |
| | | @ApiModelProperty("图片地址 多个用逗号隔开") |
| | | private String photoPah; |
| | | |
| | | @ApiModelProperty(value = "留言对象联系方式",hidden = true) |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("回复人id") |
| | | private Long sendtoUserId; |
| | | |
| | | @ApiModelProperty(value = "留言对象姓名",hidden = false) |
| | | private String sendtoUserName; |
| | | |
| | | @ApiModelProperty(value = "状态 1 待回复 2 已回复",hidden = false) |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "是否公开 1 公开 2 保密",hidden = false) |
| | | private Integer ispublic; |
| | | |
| | | @ApiModelProperty(value = "留言人主键",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "留言人账号",hidden = false) |
| | | private String userAccount; |
| | | |
| | | @ApiModelProperty("留言人电话") |
| | | @NotBlank(groups = {AddGroup.class},message = "联系方式不能为空") |
| | | private String userPhone; |
| | | @ApiModelProperty(value = "留言人姓名",hidden = false) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "社区主键",hidden = true) |
| | | private Long communityId; |
| | | @ApiModelProperty(value = "留言对象 1社区团队2社区团委",hidden = false) |
| | | private Long type; |
| | | @ApiModelProperty(value = "回复时间",hidden = true) |
| | | private Date createAt; |
| | | @ApiModelProperty("当前页数") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty("每页记录数") |
| | | private Long pageSize; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("发布开始时间") |
| | | private Date publishAtBegin; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("发布结束时间") |
| | | private Date publishAtEnd; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 小程序便民服务商家服务分类 |
| | | * @author: Null |
| | | * @date: 2021/3/12 13:36 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家服务分类") |
| | | public class ComCvtBusinessCategoryServeVO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 925697143924235721L; |
| | | |
| | | |
| | | @ApiModelProperty("商家服务分类名称") |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty("商家分类服务列表") |
| | | private List<ComCvtServeVO> comCvtServeVOS; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 小程序便民服务商家详情信息 |
| | | * @author: Null |
| | | * @date: 2021/3/12 13:36 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家详情信息") |
| | | public class ComCvtBusinessDetailVO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 8381895998705845852L; |
| | | @ApiModelProperty("商家ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("商家名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("联系人") |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("联系方式") |
| | | private String contactsPhone; |
| | | |
| | | @ApiModelProperty("详细地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("主营业务") |
| | | private String busScope; |
| | | |
| | | @ApiModelProperty("服务范围标记:1-全攀枝花市,2-部分地区") |
| | | private Integer areaFlag; |
| | | |
| | | @ApiModelProperty("商家logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty(value = "社区主键",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("服务范围集合") |
| | | List<String> comActVOS; |
| | | |
| | | @ApiModelProperty("商家介绍媒体文件类型:1-图片 2-视频") |
| | | private Integer mediaType; |
| | | |
| | | @ApiModelProperty("介绍媒体文件集合") |
| | | private List<String> mediaPaths; |
| | | |
| | | @ApiModelProperty("分类服务") |
| | | List<ComCvtBusinessCategoryServeVO> categoryServeVOS; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 便民服务 商家信息 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:36 |
| | | */ |
| | | @Data |
| | | @ApiModel("商家信息") |
| | | public class ComCvtBusinessVO implements Serializable { |
| | | |
| | | @ApiModelProperty("商家ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("商家名称") |
| | | @NotBlank(groups = {AddGroup.class},message = "商家名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("联系人") |
| | | @NotBlank(groups = {AddGroup.class},message = "联系人不能为空") |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("联系方式") |
| | | @NotBlank(groups = {AddGroup.class},message = "联系方式不能为空") |
| | | private String contactsPhone; |
| | | |
| | | @ApiModelProperty("详细地址") |
| | | @NotBlank(groups = {AddGroup.class},message = "详细地址不能为空") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("主营业务") |
| | | @NotBlank(groups = {AddGroup.class},message = "主营业务不能为空") |
| | | private String busScope; |
| | | |
| | | @ApiModelProperty("服务范围标记:1-全攀枝花市,2-部分地区") |
| | | @NotBlank(groups = {AddGroup.class},message = "主营业务不能为空") |
| | | private Integer areaFlag; |
| | | |
| | | @ApiModelProperty("商家logo") |
| | | @NotBlank(groups = {AddGroup.class},message = "商家logo不能为空") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("创建人") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty("创建人名称") |
| | | private String createByName; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "社区主键",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("服务范围集合") |
| | | List<ComActVO> comActVOS; |
| | | |
| | | @ApiModelProperty("商家介绍媒体文件类型:1-图片 2-视频") |
| | | private Integer mediaType; |
| | | |
| | | @ApiModelProperty("介绍媒体文件集合") |
| | | private List<String> mediaPaths; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 便民服务 分类信息 |
| | | * @author: Null |
| | | * @date: 2021/3/11 17:11 |
| | | */ |
| | | @Data |
| | | @ApiModel("分类信息") |
| | | public class ComCvtCategoryVO implements Serializable { |
| | | |
| | | @ApiModelProperty("分类ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | @NotBlank(groups = {AddGroup.class},message = "分类名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("权重") |
| | | @NotBlank(groups = {AddGroup.class},message = "权重不能为空") |
| | | private Integer weight; |
| | | |
| | | @ApiModelProperty("创建人") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createAt; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 批量导入便民服务 |
| | | * @author: Null |
| | | * @date: 2021/3/11 17:11 |
| | | */ |
| | | @Data |
| | | public class ComCvtServeExcelVO implements Serializable { |
| | | /** |
| | | * 服务分类 |
| | | */ |
| | | @ExcelProperty(value = "服务分类" ,index = 0) |
| | | private String categoryName; |
| | | /** |
| | | * 服务名称 |
| | | */ |
| | | @ExcelProperty(value = "服务名称" ,index = 1) |
| | | private String serviceName; |
| | | /** |
| | | * 服务价格(元) |
| | | */ |
| | | @ExcelProperty(value = "服务价格(元)" ,index = 2) |
| | | private BigDecimal servicePrice; |
| | | /** |
| | | * 服务描述 |
| | | */ |
| | | @ExcelProperty(value = "服务描述" ,index = 3) |
| | | private String serviceDesc; |
| | | /** |
| | | * 商家名称 |
| | | */ |
| | | @ExcelProperty(value = "商家名称" ,index = 4) |
| | | private String businessName; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ExcelProperty(value = "备注" ,index = 5) |
| | | private String remark; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 便民服务列表 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:52 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务") |
| | | public class ComCvtServeVO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -7734682979200558948L; |
| | | @ApiModelProperty("服务主键ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("服务名称") |
| | | private String serviceName; |
| | | |
| | | @ApiModelProperty("服务价格") |
| | | private BigDecimal servicePrice; |
| | | |
| | | @ApiModelProperty("服务分类ID") |
| | | private Long categoryId; |
| | | |
| | | @ApiModelProperty("服务分类名称") |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty("服务描述") |
| | | private String serviceDesc; |
| | | |
| | | @ApiModelProperty("所属商家ID") |
| | | private Long businessId; |
| | | |
| | | @ApiModelProperty("所属商家名称") |
| | | private String businessName; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("创建人") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 车辆管理 |
| | | * @author: Null |
| | | * @date: 2021/3/16 14:28 |
| | | */ |
| | | @Data |
| | | @ApiModel("车辆管理") |
| | | public class ComMngCarVO implements Serializable { |
| | | |
| | | @ApiModelProperty("主键") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("社区ID") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("小区名称") |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty("小区ID") |
| | | private Long areaId; |
| | | |
| | | @ApiModelProperty("车主姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("车主用户ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("车主手机号码") |
| | | private String mobile; |
| | | |
| | | @ApiModelProperty("车牌号") |
| | | private String plateNum; |
| | | |
| | | @ApiModelProperty("车辆品牌") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty("车身颜色") |
| | | private String color; |
| | | |
| | | @ApiModelProperty("车辆型号") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("创建人") |
| | | private String createBy; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.omg.PortableInterceptor.INACTIVE; |
| | | |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | @Data |
| | | @ApiModel("留言") |
| | | public class PageComActMessageVO { |
| | | @ApiModelProperty("主键") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("留言内容") |
| | | @NotBlank(groups = {AddGroup.class},message = "留言内容不能为空") |
| | | private String msgContent; |
| | | |
| | | @ApiModelProperty("图片地址 多个用逗号隔开") |
| | | private String photoPah; |
| | | |
| | | @ApiModelProperty("留言对象联系方式") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("回复人id") |
| | | private Long sendtoUserId; |
| | | |
| | | @ApiModelProperty("回复人姓名") |
| | | private String sendtoUserName; |
| | | |
| | | @ApiModelProperty("状态 1 待回复 2 已回复") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("是否公开 1 公开 2 保密") |
| | | private Integer ispublic; |
| | | |
| | | @ApiModelProperty("留言人主键") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("留言人账号") |
| | | private String userAccount; |
| | | |
| | | @ApiModelProperty("留言人电话") |
| | | @NotBlank(groups = {AddGroup.class},message = "联系方式不能为空") |
| | | private String userPhone; |
| | | @ApiModelProperty("留言人姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("社区主键") |
| | | private Long communityId; |
| | | @ApiModelProperty("留言对象 1社区团队2社区团委") |
| | | private Long type; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("回复时间") |
| | | private Date createAt; |
| | | |
| | | private List<ComActMessageBackVO> backList; |
| | | |
| | | @ApiModelProperty("当前页数") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty("每页记录数") |
| | | private Long pageSize; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | @Data |
| | | @ApiModel("留言-批量设置公开隐藏") |
| | | public class ResetComActMessageVO { |
| | | @ApiModelProperty("主键集合") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty(value = "是否公开 1 公开 2 保密") |
| | | private Integer ispublic; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.partybuilding; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | |
| | | @ApiModelProperty("职位") |
| | | private String job; |
| | | |
| | | @ApiModelProperty("岗位职责") |
| | | private String jobResponsibilities; |
| | | |
| | | @ApiModelProperty("照片") |
| | | private String url; |
| | |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | @ApiModelProperty("电话") |
| | | private String phone; |
| | | @ApiModelProperty("是否注册") |
| | | private Integer isReg; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "是否增加 1 增加 0 不增加") |
| | | private Integer isAdd; |
| | | |
| | | @ApiModelProperty("动态分类:1-党建动态 2-党员帮扶 3-党员示范") |
| | | private Integer dynType; |
| | | |
| | | @ApiModelProperty("封面模式:1-小图展示 2-大图展示") |
| | | private Integer coverMode; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.partybuilding; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @Data |
| | | @ApiModel("党委") |
| | | public class PartyCommitteeVO { |
| | | @ApiModelProperty(value = "党员id") |
| | | private Long PartyMemberId; |
| | | @ApiModelProperty(value = "身份id") |
| | | private Long roleId; |
| | | @ApiModelProperty(value = "身份名字") |
| | | private String roleName; |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | @ApiModelProperty(value = "主键") |
| | | |
| | | @ApiModelProperty("主键") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("电话") |
| | | @NotBlank(groups = {AddGroup.class},message = "电话不能为空") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("是否注册") |
| | | private Integer isReg; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | @NotBlank(groups = {AddGroup.class},message = "姓名不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("性别") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty("出生日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthTime; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty("职位") |
| | | @NotBlank(groups = {AddGroup.class},message = "电话不能为空") |
| | | private String position; |
| | | |
| | | @ApiModelProperty("岗位职责") |
| | | @NotBlank(groups = {AddGroup.class},message = "岗位职责不能为空") |
| | | private String jobResponsibilities; |
| | | |
| | | @ApiModelProperty("头像图片路径") |
| | | @NotBlank(groups = {AddGroup.class},message = "头像不能为空") |
| | | private String photoPath; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "当前页数") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "每页记录数") |
| | | private Long pageSize; |
| | | @ApiModelProperty(value = "党员姓名") |
| | | private String name; |
| | | @ApiModelProperty(value = "党员照片") |
| | | private String photoPath; |
| | | @ApiModelProperty(value = "党龄") |
| | | private Integer partyAge; |
| | | @ApiModelProperty(value = "政治面貌") |
| | | private String politicalOutlook; |
| | | @ApiModelProperty(value = "联系方式") |
| | | private String phone; |
| | | } |
| | |
| | | private Long id; |
| | | @ApiModelProperty(value = "党组织名字") |
| | | private String name; |
| | | @ApiModelProperty(value = "状态") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "党员人数") |
| | | private Integer countPerson; |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.user.UserPhoneVO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | */ |
| | | @PostMapping("checkAreaHouse") |
| | | R checkAreaHouse(@RequestParam("id")Long id); |
| | | /** |
| | | * 新增留言 |
| | | * @param comActMessageVO 新增留言信息 |
| | | * @return 发布结果 |
| | | */ |
| | | @PostMapping("addmessage") |
| | | R addMessage(@RequestBody ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 我的留言 |
| | | * @param comActMessageVO 留言信息 |
| | | * @return 发布结果 |
| | | */ |
| | | @PostMapping("pagemymessage") |
| | | R pageMyMessageApplets(@RequestBody ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 给我的留言 |
| | | * @param comActMessageVO 留言信息 |
| | | * @return 发布结果 |
| | | */ |
| | | @PostMapping("pagesendtomemessage") |
| | | R pageSendToMessageApplets(@RequestBody ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 新增留言回复 |
| | | * @param comActMessageBackVO 保存留言回复信息 |
| | | * @return 发布结果 |
| | | */ |
| | | @PostMapping("addmessageback") |
| | | R addMessageBack(@RequestBody ComActMessageBackVO comActMessageBackVO); |
| | | /** |
| | | * 根据id查询留言列表 |
| | | * @param id 用户id |
| | | * @return 发布结果 |
| | | */ |
| | | @PostMapping("pagemessagebyuser") |
| | | R pageMessageByUser(@RequestBody ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 根据id删除留言 |
| | | * @param id id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("deletemessage") |
| | | R deleteMessage(@RequestBody ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 根据id集合批量设置是否公开 |
| | | * @param ids id集合 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("resetmessagepublic") |
| | | R resetMessagePublic(@RequestBody ResetComActMessageVO resetComActMessageVO); |
| | | /** |
| | | * 分页显示社区所有留言 |
| | | * @param comActMessageVO 留言信息 |
| | | * @return 结果集合 |
| | | */ |
| | | @PostMapping("pagemycommunitymessage") |
| | | R pageMyCommunityMessage(@RequestBody ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 根据id查找留言详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("detailmessage") |
| | | R detailMessage(@RequestParam("id")Long id); |
| | | |
| | | /** |
| | | * 小程序通过便民服务区域分页查询便民服务商家 |
| | | * @param comCvtBusinessAppletsDTO 查询参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/convenient/business/area/page") |
| | | R pageComCvtBusinessByServiceArea(@RequestBody PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO); |
| | | |
| | | /** |
| | | * 一起议-新增 |
| | |
| | | @PostMapping("pageOpsHouse") |
| | | R pageOpsHouse(@RequestBody PageComOpsHouseDTO pageComOpsHouseDTO); |
| | | |
| | | /** |
| | | * 社区后台分页查询便民服务商家 |
| | | * @param pageComCvtBusinessDTO 查询参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/convenient/business/page") |
| | | R pageComCvtBusiness(@RequestBody PageComCvtBusinessDTO pageComCvtBusinessDTO); |
| | | |
| | | /** |
| | | * 添加便民服务商家信息 |
| | | * @param comCvtBusinessDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/business/add") |
| | | R addComCvtBusiness(ComCvtBusinessDTO comCvtBusinessDTO); |
| | | |
| | | |
| | | /** |
| | | * 编辑便民服务商家 |
| | | * |
| | | * @param comCvtBusinessDTO 商家参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PutMapping("/convenient/business/put") |
| | | R putComCvtBusiness(@RequestBody ComCvtBusinessDTO comCvtBusinessDTO); |
| | | |
| | | /** |
| | | * 查询便民服务商家详情 |
| | | * |
| | | * @param id 商家主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @GetMapping("/convenient/business/get") |
| | | R getComCvtBusiness(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 删除便民服务商家信息 |
| | | * |
| | | * @param id 商家主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @DeleteMapping("/convenient/business/delete") |
| | | R deleteComCvtBusiness(@RequestParam("id") Long id); |
| | | |
| | | |
| | | /** |
| | | * 社区后台分页查询便民服务分类 |
| | | * |
| | | * @param pageComCvtCategoryDTO 查询参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/convenient/category/page") |
| | | R pageComCvtCategory(@RequestBody PageComCvtCategoryDTO pageComCvtCategoryDTO); |
| | | |
| | | |
| | | /** |
| | | * 社区后台分页查询便民服务分类 |
| | | * |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/convenient/category/all") |
| | | R allComCvtCategory(); |
| | | |
| | | /** |
| | | * 新增便民服务分类 |
| | | * |
| | | * @param comCvtCategoryDTO 分类参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/convenient/category/add") |
| | | R addComCvtCategory(@RequestBody ComCvtCategoryDTO comCvtCategoryDTO); |
| | | |
| | | /** |
| | | * 编辑便民服务分类 |
| | | * |
| | | * @param comCvtCategoryDTO 分类参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PutMapping("/convenient/category/put") |
| | | R putComCvtCategory(@RequestBody ComCvtCategoryDTO comCvtCategoryDTO); |
| | | |
| | | /** |
| | | * 查询便民服务分类详情 |
| | | * |
| | | * @param id 分类主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @GetMapping("/convenient/category/get") |
| | | R getComCvtCategory(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 删除便民服务分类信息 |
| | | * |
| | | * @param id 分类主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @DeleteMapping("/convenient/category/delete") |
| | | R deleteComCvtCategory(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 社区后台分页查询便民服务 |
| | | * |
| | | * @param pageComCvtServeDTO 查询参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/convenient/serve/page") |
| | | R pageComCvtServe(@RequestBody PageComCvtServeDTO pageComCvtServeDTO); |
| | | |
| | | /** |
| | | * 新增便民服务 |
| | | * |
| | | * @param comCvtServeDTO 参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/convenient/serve/add") |
| | | R addComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO); |
| | | |
| | | /** |
| | | * 编辑便民服务 |
| | | * |
| | | * @param comCvtServeDTO 分类参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PutMapping("/convenient/serve/put") |
| | | R putComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO); |
| | | |
| | | /** |
| | | * 查询便民服务详情 |
| | | * |
| | | * @param id 服务主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @GetMapping("/convenient/serve/get") |
| | | R getComCvtServe(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 删除便民服务信息 |
| | | * |
| | | * @param id 服务主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @DeleteMapping("/convenient/serve/delete") |
| | | R deleteComCvtServe(@RequestParam("id") Long id); |
| | | |
| | | |
| | | /** |
| | | * 小程序便民服务商家详情 |
| | | * @param id 商家ID |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/business/serve/get") |
| | | R getComCvtBusinessServeDetail(@RequestParam("id")Long id); |
| | | |
| | | /** |
| | | * 批量导入便民服务 |
| | | * @param list 便民服务集合 |
| | | */ |
| | | @PostMapping("/convenient/serve/import") |
| | | R listSaveConvenientServeExcelVO(@RequestBody List<ComCvtServeExcelVO> list,@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 导出房屋信息 |
| | | * @param areaId |
| | | * @return |
| | | */ |
| | | @PostMapping("/house/export") |
| | | R houseExport(@RequestParam("areaId") Long areaId); |
| | | |
| | | /** |
| | | * 小程序添加车辆信息 |
| | | * @param comCvtBusinessDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/common/data/car/user/register") |
| | | R addComMngCarApplet(@RequestBody ComMngCarAppletDTO comCvtBusinessDTO); |
| | | |
| | | /** |
| | | * 小程序用户登记车辆列表 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/common/data/car/user/list") |
| | | R userComMngCarList(@RequestParam("userId") Long userId); |
| | | >>>>>>> origin/master |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | R addPartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO); |
| | | |
| | | /** |
| | | * 平台所有的党组织 |
| | | * 社区所有启用的党组织列表 |
| | | * @return 党组织集合 |
| | | */ |
| | | @PostMapping("/partybuildIng/listpartyorganization") |
| | | R listPartyOrganization(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 社区所有的党组织列表 |
| | | * @return 党组织集合 |
| | | */ |
| | | @PostMapping("/partybuildIng/listpartyorganizationAll") |
| | | R listPartyOrganizationAll(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 新增党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/partybuildIng/addpartyorganization") |
| | | R addPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO); |
| | | |
| | | /** |
| | | * 编辑党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("/partybuildIng/updatepartyorganization") |
| | | R updatePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO); |
| | | |
| | | /** |
| | | * 启用,禁用党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("/partybuildIng/resetpartyorganization") |
| | | R resetPartyOrganization(PartyOrganizationVO partyOrganizationVO); |
| | | |
| | | /** |
| | | * 删除党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/partybuildIng/deletepartyorganization") |
| | | R deletePartyOrganization(PartyOrganizationVO partyOrganizationVO); |
| | | |
| | | /** |
| | | * 批量新增党员 |
| | | * @param list 党员集合 |
| | |
| | | */ |
| | | @PostMapping("/partybuildIng/pagepartycommittee") |
| | | R pagePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO); |
| | | |
| | | |
| | | /** |
| | | * 新建党建动态 |
| | | * @param partyCommitteeVO 动态内容 |
| | |
| | | */ |
| | | @PostMapping("/partybuildIng/addactivityinfo") |
| | | R addActivityApplets(@RequestBody ComPbActivityDTO comPbActivityDTO); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @PostMapping("export") |
| | | R export(@RequestBody ExportUserDTO exportUserDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | /** |
| | | * @description: 身份证手机号脱敏处理 |
| | | * @author: Null |
| | | * @date: 2021/3/16 15:53 |
| | | */ |
| | | public class SensitiveUtil { |
| | | |
| | | /** |
| | | * 手机号码脱敏处理 |
| | | * |
| | | * @param phoneNumber |
| | | * @return |
| | | */ |
| | | public static String desensitizedPhoneNumber(String phoneNumber) { |
| | | if (StringUtils.isNotEmpty(phoneNumber)) { |
| | | phoneNumber = phoneNumber.replaceAll("(\\w{3})\\w*(\\w{4})", "$1****$2"); |
| | | } |
| | | return phoneNumber; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 身份证号码脱敏处理 |
| | | * |
| | | * @param idNumber |
| | | * @return |
| | | */ |
| | | public static String desensitizedIdNumber(String idNumber) { |
| | | if (!StringUtils.isEmpty(idNumber)) { |
| | | if (idNumber.length() == 15) { |
| | | idNumber = idNumber.replaceAll("(\\w{6})\\w*(\\w{3})", "$1******$2"); |
| | | } |
| | | if (idNumber.length() == 18) { |
| | | idNumber = idNumber.replaceAll("(\\w{6})\\w*(\\w{4})", "$1********$2"); |
| | | } |
| | | } |
| | | return idNumber; |
| | | } |
| | | |
| | | } |
| | |
| | | Long communityId = this.getCommunityId(); |
| | | comActDynVO.setCommunityId(communityId); |
| | | Date publishAt = comActDynVO.getPublishAt(); |
| | | if(null==publishAt){ |
| | | publishAt = new Date(); |
| | | comActDynVO.setPublishAt(publishAt); |
| | | } |
| | | long time = publishAt.getTime(); |
| | | long l = System.currentTimeMillis(); |
| | | if (l >= time) { |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.jcraft.jsch.SftpException; |
| | | import com.panzhihua.common.constants.FtpConstants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.user.EexcelUserDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.listen.ComCvtServeExcelListen; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @description: 社区便民服务商家接口 |
| | | * @author: Null |
| | | * @date: 2021/3/11 13:26 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"社区运营/便民服务"}) |
| | | @RestController |
| | | @RequestMapping("/convenient") |
| | | public class CommunityConvenientApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @Value("${excel.convenientUrl}") |
| | | private String excelConvenientUrl="http://panzhihua.nhys.cdnhxx.com/web/bianminfuwudaoru.xlsx"; |
| | | |
| | | @Value("${excel.userurl}") |
| | | private String excelUrl; |
| | | |
| | | // FTP 登录用户名 |
| | | @Value("${ftp.username}") |
| | | private String userName; |
| | | // FTP 登录密码 |
| | | @Value("${ftp.password}") |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | @Value("${ftp.host}") |
| | | private String host; |
| | | // FTP 端口 |
| | | @Value("${ftp.port}") |
| | | private int port; |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | @ApiOperation(value = "分页查询便民服务商家",response = ComCvtBusinessVO.class) |
| | | @PostMapping("/business/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessDTO pageComCvtBusinessDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | pageComCvtBusinessDTO.setCommunityId(communityId); |
| | | return communityService.pageComCvtBusiness(pageComCvtBusinessDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增便民服务商家") |
| | | @PostMapping("/business/add") |
| | | public R addComCvtBusiness(@RequestBody ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comCvtBusinessDTO.setCommunityId(communityId); |
| | | comCvtBusinessDTO.setCreateBy(userId); |
| | | return communityService.addComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区下拉列表" ,response = ComActVO.class) |
| | | @GetMapping("/community") |
| | | public R listCommunity(){ |
| | | return communityService.listCommunityAll(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "编辑便民服务商家") |
| | | @PutMapping("/business/put") |
| | | public R putComCvtBusiness(@RequestBody ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | return communityService.putComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务商家详情") |
| | | @GetMapping("/business/get") |
| | | public R getComCvtBusiness(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtBusiness(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除便民服务商家详情") |
| | | @DeleteMapping("/business/delete") |
| | | public R deleteComCvtBusiness(@RequestParam("id") Long id) { |
| | | return communityService.deleteComCvtBusiness(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询便民服务",response = ComCvtServeVO.class) |
| | | @PostMapping("/serve/page") |
| | | public R pageComCvtServe(@RequestBody PageComCvtServeDTO pageComCvtServeDTO) { |
| | | return communityService.pageComCvtServe(pageComCvtServeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务所有分类,下拉框",response = ComCvtCategoryVO.class) |
| | | @PostMapping("/category/all") |
| | | public R allComCvtCategory() { |
| | | return communityService.allComCvtCategory(); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增便民服务") |
| | | @PostMapping("/serve/add") |
| | | public R addComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comCvtServeDTO.setCreateBy(userId); |
| | | return communityService.addComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑便民服务") |
| | | @PutMapping("/serve/put") |
| | | public R putComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | | return communityService.putComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务详情",response = ComCvtServeVO.class) |
| | | @GetMapping("/serve/get") |
| | | public R getComCvtServe(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtServe(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除便民服务信息") |
| | | @DeleteMapping("/serve/delete") |
| | | public R deleteComCvtServe(@RequestParam("id") Long id) { |
| | | return communityService.deleteComCvtServe(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "下载模板-便民服务") |
| | | @GetMapping(value = "/serve/download/template") |
| | | public R downloadTemplate(HttpServletResponse response) throws IOException, SftpException { |
| | | return R.ok(excelConvenientUrl); |
| | | } |
| | | |
| | | @ApiOperation(value = "上传文件") |
| | | @PostMapping(value = "/upload/file", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name= UUID.randomUUID().toString().replaceAll("-","")+"."+extension; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName,password,host,port); |
| | | sftp.login(); |
| | | InputStream is = file.getInputStream(); |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | | sftp.logout(); |
| | | return R.ok(url + "/idcard/" + name); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "excel导入便民服务") |
| | | @PostMapping(value = "/serve/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R downloadTemplate(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | String fileName = file.getOriginalFilename(); //获取文件名 |
| | | log.info("传入文件名字【{}】",fileName); |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | EasyExcel.read(inputStream, ComCvtServeExcelVO.class, new ComCvtServeExcelListen(communityService,this.getCommunityId())).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.FtpConstants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ExcelHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportUserDTO; |
| | | import com.panzhihua.common.model.dtos.user.EexcelUserDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | } |
| | | return R.fail("未查询到用户"); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出小区房屋信息") |
| | | @GetMapping("house/export") |
| | | public R houseExport(@RequestParam("areaId") Long areaId){ |
| | | String url=excelUrl; |
| | | String uuid= UUID.randomUUID().toString().replace("-",""); |
| | | //String name=uuid+".xlsx"; |
| | | String ftpUrl="/mnt/data/web/excel/"; |
| | | R<ComMngStructAreaVO> areaR = communityService.detailArea(areaId); |
| | | if(!R.isOk(areaR)){ |
| | | return areaR; |
| | | } |
| | | ComMngStructAreaVO areaVO = JSONObject.parseObject(JSONObject.toJSONString(areaR.getData()),ComMngStructAreaVO.class); |
| | | Long communityId = areaVO.getCommunityId(); |
| | | R<ComActVO> comActR = communityService.detailCommunity(communityId); |
| | | if(!R.isOk(comActR)){ |
| | | return comActR; |
| | | } |
| | | ComActVO comActVO = JSONObject.parseObject(JSONObject.toJSONString(comActR.getData()),ComActVO.class); |
| | | R r=communityService.houseExport(areaId); |
| | | if (R.isOk(r)) { |
| | | List<ExcelHouseDTO> excelHouseDTOS = JSONArray.parseArray(JSONArray.toJSONString(r.getData()),ExcelHouseDTO.class); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName,password,host,port); |
| | | sftp.login(); |
| | | String name=comActVO.getName()+areaVO.getAreaName()+"房屋信息.xlsx"; |
| | | boolean existDir = sftp.isExistDir(ftpUrl+name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator+name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream=null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ExcelHouseDTO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet(comActVO.getName()+areaVO.getAreaName()).build(); |
| | | excelWriter.write(excelHouseDTOS, writeSheet); |
| | | excelWriter.finish(); |
| | | File file=new File(fileName); |
| | | inputStream=new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】",absolutePath,delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(url+URLEncoder.encode(name,"UTF-8")); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return R.fail("未查询到用户"); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ResetComActMessageVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.user.RoleVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | |
| | | public class CommunityPartyBuildingApi extends BaseController { |
| | | @Resource |
| | | private PartyBuildingService partyBuildingService; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Value("${excel.url}") |
| | |
| | | private String url; |
| | | |
| | | |
| | | @ApiOperation(value = "社区所有党组织", response = PartyOrganizationVO.class) |
| | | @ApiOperation(value = "社区所有启用的党组织列表", response = PartyOrganizationVO.class) |
| | | @GetMapping("listpartyorganization") |
| | | public R listPartyOrganization() { |
| | | Long communityId = this.getCommunityId(); |
| | | log.info("社区所有党组织社区id【{}】", communityId); |
| | | return partyBuildingService.listPartyOrganization(communityId); |
| | | } |
| | | @ApiOperation(value = "社区所有党组织列表", response = PartyOrganizationVO.class) |
| | | @GetMapping("listpartyorganizationAll") |
| | | public R listPartyOrganizationAll() { |
| | | Long communityId = this.getCommunityId(); |
| | | log.info("社区所有党组织社区id【{}】", communityId); |
| | | return partyBuildingService.listPartyOrganizationAll(communityId); |
| | | } |
| | | |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 1) |
| | | @ApiOperation(value = "新增党支部") |
| | | @PostMapping("addpartyorganization") |
| | | public R addPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long communityId = this.getCommunityId(); |
| | | partyOrganizationVO.setCommunityId(communityId); |
| | | R r = partyBuildingService.addPartyOrganization(partyOrganizationVO); |
| | | return r; |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 2) |
| | | @ApiOperation(value = "编辑党支部") |
| | | @PostMapping("updatepartyorganization") |
| | | public R updatePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long id = partyOrganizationVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("党支部id不能为空"); |
| | | } |
| | | return partyBuildingService.updatePartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 3) |
| | | @ApiOperation(value = "启用、禁用党支部") |
| | | @PutMapping("resetpartyorganization") |
| | | public R resetPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long id = partyOrganizationVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("党支部id不能为空"); |
| | | } |
| | | Integer status = partyOrganizationVO.getStatus(); |
| | | if(null==status||(status!=1&&status!=2)) { |
| | | return R.fail("输入有效的状态,1:启用,2:禁用"); |
| | | } |
| | | return partyBuildingService.resetPartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 4) |
| | | @ApiOperation(value = "删除党支部") |
| | | @DeleteMapping("deletepartyorganization") |
| | | public R deletePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long id = partyOrganizationVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("党支部id不能为空"); |
| | | } |
| | | return partyBuildingService.deletePartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 1) |
| | | @ApiOperation(value = "新增党员") |
| | | @PostMapping("addpartybuildingmember") |
| | |
| | | @OperLog(operModul = "党委管理", operType = 1) |
| | | @ApiOperation(value = "新增党委") |
| | | @PostMapping("addpartycommittee") |
| | | public R addPartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { |
| | | public R addPartyCommittee(@RequestBody @Validated(AddGroup.class) PartyCommitteeVO partyCommitteeVO) { |
| | | Long communityId = this.getCommunityId(); |
| | | partyCommitteeVO.setCommunityId(communityId); |
| | | return partyBuildingService.addPartyCommittee(partyCommitteeVO); |
| | |
| | | @OperLog(operModul = "党委管理", operType = 2) |
| | | @ApiOperation(value = "编辑党委") |
| | | @PutMapping("updatepartycommittee") |
| | | public R updatePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { |
| | | public R updatePartyCommittee(@RequestBody @Validated(AddGroup.class) PartyCommitteeVO partyCommitteeVO) { |
| | | Long id = partyCommitteeVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("主键不能为空"); |
| | | } |
| | | Long communityId = this.getCommunityId(); |
| | | partyCommitteeVO.setCommunityId(communityId); |
| | | return partyBuildingService.updatePartyCommittee(partyCommitteeVO); |
| | |
| | | @ApiOperation(value = "删除党委") |
| | | @DeleteMapping("deletepartycommittee") |
| | | public R deletePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { |
| | | Long id = partyCommitteeVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("主键不能为空"); |
| | | } |
| | | Long communityId = this.getCommunityId(); |
| | | partyCommitteeVO.setCommunityId(communityId); |
| | | return partyBuildingService.deletePartyCommittee(partyCommitteeVO); |
| | |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | partyCommitteeVO.setCreateBy(loginUserInfo.getUserId()); |
| | | partyCommitteeVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | Date publishAt = partyCommitteeVO.getPublishAt(); |
| | | if(null==publishAt){ |
| | | publishAt = new Date(); |
| | | partyCommitteeVO.setPublishAt(publishAt); |
| | | } |
| | | long time = publishAt.getTime(); |
| | | long l = System.currentTimeMillis(); |
| | | if (l >= time) { |
| | | partyCommitteeVO.setStatus(2); |
| | | } |
| | | return partyBuildingService.adddYnamic(partyCommitteeVO); |
| | | } |
| | | |
| | |
| | | Long id = partyCommitteeVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("动态主键不能为空"); |
| | | } |
| | | Date publishAt = partyCommitteeVO.getPublishAt(); |
| | | if (!ObjectUtils.isEmpty(publishAt)) { |
| | | long time = publishAt.getTime(); |
| | | long l = System.currentTimeMillis(); |
| | | if (l >= time) { |
| | | partyCommitteeVO.setStatus(1); |
| | | } |
| | | } |
| | | return partyBuildingService.updateYnamic(partyCommitteeVO); |
| | | } |
| | |
| | | pageComPbServiceTeamDTO.setCommunityId(this.getCommunityId()); |
| | | return partyBuildingService.pageServiceTeam(pageComPbServiceTeamDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "留言-删除") |
| | | @DeleteMapping("deletemessage") |
| | | public R deleteMessage(@RequestBody ComActMessageVO comActMessageVO) { |
| | | return communityService.deleteMessage(comActMessageVO); |
| | | } |
| | | @ApiOperation(value = "批量设置留言(公开1,保密2)") |
| | | @DeleteMapping("resetmessagepublic") |
| | | public R resetMessagePublic(@RequestBody ResetComActMessageVO resetComActMessageVO) { |
| | | return communityService.resetMessagePublic(resetComActMessageVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页显示社区所有的留言",response = ComActMessageVO.class) |
| | | @PostMapping("pagemycommunitymessage") |
| | | public R pageMyCommunityMessage (@RequestBody ComActMessageVO comActMessageVO){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | comActMessageVO.setCommunityId(communityId); |
| | | comActMessageVO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.pageMyCommunityMessage(comActMessageVO); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.user.UserPhoneVO; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.service_community.model.dos.ComActActPrizeDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDynDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngStructAreaDO; |
| | | import com.panzhihua.service_community.service.*; |
| | | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | private ComMngVolunteerMngService comMngVolunteerMngService; |
| | | @Resource |
| | | private ComMngStructAreaDistrictService comMngStructAreaDistrictService; |
| | | @Resource |
| | | private ComActMessageService comActMessageService; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | public R checkAreaHouse(@RequestParam("id")Long id){ |
| | | return comMngStructAreaService.checkAreaHouse(id); |
| | | } |
| | | /** |
| | | * 新增留言 |
| | | * @param comActMessageVO 新增留言信息 |
| | | * @return 发布结果 |
| | | */ |
| | | @PostMapping("addmessage") |
| | | public R addMessage(@RequestBody ComActMessageVO comActMessageVO){ |
| | | // 微信内容审核 |
| | | return comActMessageService.addMessage(comActMessageVO); |
| | | } |
| | | /** |
| | | * 我发的留言 |
| | | * @return 结果集合 |
| | | */ |
| | | @PostMapping("pagemymessage") |
| | | public R pageMyMessage (@RequestBody ComActMessageVO comActMessageVO){ |
| | | return comActMessageService.pageMyMessageApplets(comActMessageVO); |
| | | } |
| | | /** |
| | | * 发给我的留言 |
| | | * @return 结果集合 |
| | | */ |
| | | @PostMapping("pagesendtomemessage") |
| | | public R pageSendToMessage (@RequestBody ComActMessageVO comActMessageVO){ |
| | | return comActMessageService.pageSendToMessageApplets(comActMessageVO); |
| | | } |
| | | /** |
| | | * 根据id查询留言集合 |
| | | * @return 结果集合 |
| | | */ |
| | | @PostMapping("pagemessagebyuser") |
| | | public R pageMessageByUser (@RequestBody ComActMessageVO comActMessageVO){ |
| | | return comActMessageService.pageMessageByUserApplets(comActMessageVO); |
| | | } |
| | | /** |
| | | * 社区留言 |
| | | * @return 结果集合 |
| | | */ |
| | | @PostMapping("pagemycommunitymessage") |
| | | public R pageMyCommunityMessage (@RequestBody ComActMessageVO comActMessageVO){ |
| | | return comActMessageService.pageMyCommunityMessageApplets(comActMessageVO); |
| | | } |
| | | /** |
| | | * 新增留言回复 |
| | | * @param comActMessageVO 新增留言回复信息 |
| | | * @return 发布结果 |
| | | */ |
| | | @PostMapping("addmessageback") |
| | | public R addMessageBack(@RequestBody ComActMessageBackVO comActMessageBackVO){ |
| | | // 微信内容审核 |
| | | return comActMessageService.addMessageBack(comActMessageBackVO); |
| | | } |
| | | @PostMapping("deletemessage") |
| | | public R deleteMessage(@RequestBody ComActMessageVO comActMessageVO) { |
| | | return comActMessageService.deleteMessage(comActMessageVO); |
| | | } |
| | | |
| | | @PostMapping("resetmessagepublic") |
| | | public R resetMessagePublic(@RequestBody ResetComActMessageVO resetComActMessageVO) { |
| | | return comActMessageService.resetMessagePublic(resetComActMessageVO); |
| | | } |
| | | |
| | | /** |
| | | * 留言详情 |
| | | * |
| | | * @param id 主键 |
| | | * @return 详情内容 |
| | | */ |
| | | @PostMapping("detailmessage") |
| | | public R detailMessage(@RequestParam("id") Long id) { |
| | | return comActMessageService.detailMessage(id); |
| | | } |
| | | |
| | | /** |
| | | * 导出房屋信息 |
| | | * @param areaId |
| | | * @return |
| | | */ |
| | | @PostMapping("house/export") |
| | | public R houseExport(@RequestParam("areaId") Long areaId) { |
| | | return comMngStructHouseService.houseExport(areaId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComMngCarService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @description: 社区管理/基础数据 |
| | | * @author: Null |
| | | * @date: 2021/3/11 13:19 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/common/data") |
| | | public class CommunityCommonDataApi { |
| | | |
| | | @Resource |
| | | private ComMngCarService comMngCarService; |
| | | |
| | | |
| | | /** |
| | | * 小程序用户车辆登记 |
| | | * @param comCvtBusinessDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/car/user/register") |
| | | public R addComCvtBusiness(@RequestBody ComMngCarAppletDTO comCvtBusinessDTO) { |
| | | return comMngCarService.addComMngCarApplet(comCvtBusinessDTO); |
| | | } |
| | | |
| | | /** |
| | | * 小程序用户车辆列表 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/car/user/list") |
| | | public R userComMngCarList(@RequestParam("userId") Long userId) { |
| | | return comMngCarService.userComMngCarList(userId); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.exceptions.PartyBuildingMemberException; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberExcelVO; |
| | | import com.panzhihua.service_community.service.ComCvtBusinessService; |
| | | import com.panzhihua.service_community.service.ComCvtCategoryService; |
| | | import com.panzhihua.service_community.service.ComCvtServeService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 便民服务接口 |
| | | * @author: Null |
| | | * @date: 2021/3/11 13:19 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/convenient") |
| | | public class ConvenientApi { |
| | | |
| | | @Resource |
| | | private ComCvtBusinessService comCvtBusinessService; |
| | | |
| | | @Resource |
| | | private ComCvtCategoryService comCvtCategoryService; |
| | | |
| | | @Resource |
| | | private ComCvtServeService comCvtServeService; |
| | | |
| | | /** |
| | | * 社区后台分页查询便民服务商家 |
| | | * |
| | | * @param pageComCvtBusinessDTO 查询参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/business/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessDTO pageComCvtBusinessDTO) { |
| | | return comCvtBusinessService.pageComCvtBusiness(pageComCvtBusinessDTO); |
| | | } |
| | | |
| | | /** |
| | | * 小程序通过便民服务区域分页查询便民服务商家 |
| | | * |
| | | * @param comCvtBusinessAppletsDTO 查询参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/business/area/page") |
| | | public R pageComCvtBusinessByServiceArea(@RequestBody PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO) { |
| | | return comCvtBusinessService.pageComCvtBusinessByServiceArea(comCvtBusinessAppletsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增便民服务商家 |
| | | * |
| | | * @param comCvtBusinessDTO 商家参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/business/add") |
| | | public R addComCvtBusiness(@RequestBody ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | return comCvtBusinessService.addComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑便民服务商家 |
| | | * |
| | | * @param comCvtBusinessDTO 商家参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PutMapping("/business/put") |
| | | public R putComCvtBusiness(@RequestBody ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | return comCvtBusinessService.putComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询便民服务商家详情 |
| | | * |
| | | * @param id 商家主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @GetMapping("/business/get") |
| | | public R getComCvtBusiness(@RequestParam("id") Long id) { |
| | | return comCvtBusinessService.getComCvtBusiness(id); |
| | | } |
| | | |
| | | /** |
| | | * 删除便民服务商家信息 |
| | | * |
| | | * @param id 商家主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @DeleteMapping("/business/delete") |
| | | public R deleteComCvtBusiness(@RequestParam("id") Long id) { |
| | | return comCvtBusinessService.deleteComCvtBusiness(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 社区后台分页查询便民服务分类 |
| | | * |
| | | * @param pageComCvtCategoryDTO 查询参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/category/page") |
| | | public R pageComCvtCategory(@RequestBody PageComCvtCategoryDTO pageComCvtCategoryDTO) { |
| | | return comCvtCategoryService.pageComCvtCategory(pageComCvtCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务分类下拉,所有分类 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/category/all") |
| | | public R allComCvtCategory() { |
| | | return comCvtCategoryService.allComCvtCategory(); |
| | | } |
| | | |
| | | /** |
| | | * 新增便民服务分类 |
| | | * |
| | | * @param comCvtCategoryDTO 分类参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/category/add") |
| | | public R addComCvtCategory(@RequestBody ComCvtCategoryDTO comCvtCategoryDTO) { |
| | | return comCvtCategoryService.addComCvtCategory(comCvtCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑便民服务分类 |
| | | * |
| | | * @param comCvtCategoryDTO 分类参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PutMapping("/category/put") |
| | | public R putComCvtCategory(@RequestBody ComCvtCategoryDTO comCvtCategoryDTO) { |
| | | return comCvtCategoryService.putComCvtCategory(comCvtCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询便民服务分类详情 |
| | | * |
| | | * @param id 分类主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @GetMapping("/category/get") |
| | | public R getComCvtCategory(@RequestParam("id") Long id) { |
| | | return comCvtCategoryService.getComCvtCategory(id); |
| | | } |
| | | |
| | | /** |
| | | * 删除便民服务分类信息 |
| | | * |
| | | * @param id 分类主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @DeleteMapping("/category/delete") |
| | | public R deleteComCvtCategory(@RequestParam("id") Long id) { |
| | | return comCvtCategoryService.deleteComCvtCategory(id); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台分页查询便民服务 |
| | | * |
| | | * @param pageComCvtServeDTO 查询参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/serve/page") |
| | | public R pageComCvtServe(@RequestBody PageComCvtServeDTO pageComCvtServeDTO) { |
| | | return comCvtServeService.pageComCvtServe(pageComCvtServeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增便民服务 |
| | | * |
| | | * @param comCvtServeDTO 参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PostMapping("/serve/add") |
| | | public R addComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | | return comCvtServeService.addComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑便民服务 |
| | | * |
| | | * @param comCvtServeDTO 分类参数 |
| | | * @return 返回结果 |
| | | */ |
| | | @PutMapping("/serve/put") |
| | | public R putComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | | return comCvtServeService.putComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询便民服务详情 |
| | | * |
| | | * @param id 服务主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @GetMapping("/serve/get") |
| | | public R getComCvtServe(@RequestParam("id") Long id) { |
| | | return comCvtServeService.getComCvtServe(id); |
| | | } |
| | | |
| | | /** |
| | | * 删除便民服务信息 |
| | | * |
| | | * @param id 服务主键 |
| | | * @return 返回结果 |
| | | */ |
| | | @DeleteMapping("/serve/delete") |
| | | public R deleteComCvtServe(@RequestParam("id") Long id) { |
| | | return comCvtServeService.deleteComCvtServe(id); |
| | | } |
| | | |
| | | /** |
| | | * 小程序便民服务商家详情 |
| | | * @param id 商家ID |
| | | * @return |
| | | */ |
| | | @GetMapping("/business/serve/get") |
| | | public R getComCvtBusinessServeDetail(@RequestParam("id")Long id){ |
| | | return comCvtBusinessService.getComCvtBusinessServeDetail(id); |
| | | }; |
| | | |
| | | /** |
| | | * 批量新增商家服务 |
| | | * @param list 服务集合 |
| | | */ |
| | | @PostMapping("/serve/import") |
| | | public R listSaveConvenientServeExcelVO(@RequestBody List<ComCvtServeExcelVO> list,@RequestParam("communityId") Long communityId){ |
| | | return comCvtServeService.listSaveConvenientServeExcelVO(list,communityId); |
| | | } |
| | | } |
| | |
| | | "AND #{pageComActDTO.createAtEnd}" + |
| | | " </if> " + |
| | | " </where>" + |
| | | " order by a.create_at desc"+ |
| | | "</script>") |
| | | IPage<ComActVO> pageCommunity(Page page, @Param("pageComActDTO") PageComActDTO pageComActDTO); |
| | | @Update("update sys_user u set u.password=#{password} where u.account=#{account} and u.type=3 and u.community_id=#{communityId}") |
| | |
| | | "d.`status`,\n" + |
| | | "d.`content`,\n" + |
| | | "d.`cover`,\n" + |
| | | "d.`type`,\n" + |
| | | "d.`cover_mode`,\n" + |
| | | "d.is_topping,\n" + |
| | | "d.publish_at,\n" + |
| | | "d.create_at\n" + |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActMessageBackDO; |
| | | @Mapper |
| | | public interface ComActMessageBackDAO extends BaseMapper<ComActMessageBackDO> { |
| | | @Update("delete from com_act_message_back where msg_id=#{msgId}") |
| | | void deleteMsgBackByMsgId(@Param("msgId")Long msgId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageBackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.ComPbServiceTeamVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyCommitteeVO; |
| | | import com.panzhihua.service_community.model.dos.ComActMessageDO; |
| | | |
| | | @Mapper |
| | | public interface ComActMessageDAO extends BaseMapper<ComActMessageDO> { |
| | | |
| | | @Select("select * from com_pb_member_role where id=#{id}") |
| | | PartyCommitteeVO selectPartyCommitteeById(@Param("id")Long id); |
| | | @Select("select * from com_pb_service_team where id=#{id}") |
| | | ComPbServiceTeamVO selectComPbServiceTeamById(@Param("id")Long id); |
| | | |
| | | @Select("select * from com_act_message_back where msg_id=#{id} order by create_at desc") |
| | | List<ComActMessageBackVO> selectMsgBackList(@Param("id")Long id); |
| | | |
| | | @Select("select * from com_act_message where (sendto_user_id in (select id from com_pb_member_role t1 where t1.phone=#{comActMessageVO.phone})) or (sendto_user_id in (select id from com_pb_service_team t2 where t2.phone=#{comActMessageVO.phone})) order by create_at desc") |
| | | IPage<PageComActMessageVO> pageSendMeMessageApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO); |
| | | |
| | | @Select("select * from com_act_message where user_id=#{comActMessageVO.userId} order by create_at desc") |
| | | IPage<PageComActMessageVO> pageMyMessageApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO); |
| | | @Select("select * from com_act_message where sendto_user_id=#{comActMessageVO.sendtoUserId} and ispublic=1") |
| | | IPage<PageComActMessageVO> pageMessageByUserApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO); |
| | | |
| | | @Update("update com_act_message set ispublic=#{ispublic} where id=#{id}") |
| | | void updatePublic(@Param("ispublic") Integer ispublic,@Param("id") Long id); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT * \n" + |
| | | "FROM\n" + |
| | | "com_act_message t where t.community_id=#{comActMessageVO.communityId}\n" + |
| | | "<if test='comActMessageVO.userAccount != null and comActMessageVO.userAccount.trim() != ""'>" + |
| | | " and t.user_account=#{comActMessageVO.userAccount} \n" + |
| | | " </if> " + |
| | | "<if test='comActMessageVO.userName != null and comActMessageVO.userName.trim() != ""'>" + |
| | | " and t.user_name=#{comActMessageVO.userName} \n" + |
| | | " </if> " + |
| | | "<if test='comActMessageVO.userPhone != null and comActMessageVO.userPhone.trim() != ""'>" + |
| | | " and t.user_phone=#{comActMessageVO.userPhone} \n" + |
| | | " </if> " + |
| | | "<if test='comActMessageVO.msgContent != null and comActMessageVO.msgContent.trim() != ""'>" + |
| | | " and t.msg_content like concat('%',#{comActMessageVO.msgContent},'%') \n" + |
| | | " </if> " + |
| | | "<if test='comActMessageVO.status != null and comActMessageVO.status != 0'>" + |
| | | " and t.`status`=#{comActMessageVO.status} \n" + |
| | | " </if> " + |
| | | "<if test='comActMessageVO.ispublic != null and comActMessageVO.ispublic != 0'>" + |
| | | " and t.ispublic=#{comActMessageVO.ispublic} \n" + |
| | | " </if> " + |
| | | "<if test='comActMessageVO.sendtoUserName != null and comActMessageVO.sendtoUserName.trim() != ""'>" + |
| | | " and t.sendto_user_name=#{comActMessageVO.sendtoUserName} \n" + |
| | | " </if> " + |
| | | "<if test='comActMessageVO.publishAtBegin != null '>" + |
| | | "AND t.create_at BETWEEN #{comActMessageVO.publishAtBegin} \n" + |
| | | "AND #{comActMessageVO.publishAtEnd} \n" + |
| | | " </if> " + |
| | | "<if test='comActMessageVO.type != null and comActMessageVO.type !=0'>" + |
| | | " AND t.type=#{comActMessageVO.type} \n" + |
| | | " </if> " + |
| | | " order by create_at desc"+ |
| | | "</script>") |
| | | IPage<PageComActMessageVO> pageMyCommunityMessageApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessAreaDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ComCvtBusinessAreaDAO extends BaseMapper<ComCvtBusinessAreaDO> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessVO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | @Mapper |
| | | public interface ComCvtBusinessDAO extends BaseMapper<ComCvtBusinessDO> { |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | "a.*, " + |
| | | "IF(u.type=2,CONCAT('运营平台(',u.account,')'),CONCAT('社区平台(',u.account,')')) create_by_name " + |
| | | "FROM " + |
| | | "com_cvt_business a " + |
| | | "LEFT JOIN sys_user u ON a.create_by = u.user_id "+ |
| | | " <where>" + |
| | | "<if test='pageComCvtBusinessDTO.name != null and pageComCvtBusinessDTO.name.trim() != ""'>" + |
| | | " and a.name LIKE concat( #{pageComCvtBusinessDTO.name}, '%' ) " + |
| | | " </if> " + |
| | | "<if test='pageComCvtBusinessDTO.communityId != null and pageComCvtBusinessDTO.communityId != 0'>" + |
| | | " and a.community_id = #{pageComCvtBusinessDTO.communityId} " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " order by a.create_at desc"+ |
| | | "</script>") |
| | | IPage<ComCvtBusinessVO> pageComCvtBusiness(Page page, @Param("pageComCvtBusinessDTO") PageComCvtBusinessDTO pageComCvtBusinessDTO); |
| | | |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | "t.* " + |
| | | "FROM " + |
| | | "com_cvt_business t " + |
| | | " <where>" + |
| | | "<if test='comCvtBusinessAppletsDTO.communityId != null and comCvtBusinessAppletsDTO.communityId != 0'>" + |
| | | " t.area_flag = 1 " + |
| | | " OR (" + |
| | | " t.area_flag = 2 " + |
| | | " AND EXISTS ( SELECT * FROM com_cvt_business_area t2 WHERE t2.business_id = t.id AND t2.community_id = #{comCvtBusinessAppletsDTO.communityId} ) \n" + |
| | | " ) " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " order by t.create_at desc"+ |
| | | "</script>") |
| | | IPage<ComCvtBusinessVO> pageComCvtBusinessByServiceArea(Page page, @Param("comCvtBusinessAppletsDTO") PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessIntroduceDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ComCvtBusinessIntroduceDAO extends BaseMapper<ComCvtBusinessIntroduceDO> { |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtCategoryVO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtCategoryDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | @Mapper |
| | | public interface ComCvtCategoryDAO extends BaseMapper<ComCvtCategoryDO> { |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | "a.* " + |
| | | "FROM " + |
| | | "com_cvt_category a " + |
| | | " <where>" + |
| | | "<if test='pageComCvtCategoryDTO.name != null and pageComCvtCategoryDTO.name.trim() != ""'>" + |
| | | " and a.name LIKE concat( #{pageComCvtCategoryDTO.name}, '%' ) " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " order by a.weight desc"+ |
| | | "</script>") |
| | | IPage<ComCvtCategoryVO> pageComCvtCategory(Page page, @Param("pageComCvtCategoryDTO") PageComCvtCategoryDTO pageComCvtCategoryDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtServeDTO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeVO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtServeDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | @Mapper |
| | | public interface ComCvtServeDAO extends BaseMapper<ComCvtServeDO> { |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " t.id , " + |
| | | " t.service_name AS serviceName, " + |
| | | " t.service_price AS servicePrice, " + |
| | | " t.category_id AS categoryId, " + |
| | | " t.service_desc AS serviceDesc, " + |
| | | " t.business_id AS businessId, " + |
| | | " t.remark, " + |
| | | " t.create_by AS createBy, " + |
| | | " t.create_at AS createAt, " + |
| | | " t1.`name` AS businessName, " + |
| | | " t2.`name` AS categoryName " + |
| | | "FROM " + |
| | | " com_cvt_serve t " + |
| | | " LEFT JOIN com_cvt_business t1 ON t.business_id = t1.id " + |
| | | " LEFT JOIN com_cvt_category t2 ON t.category_id= t2.id" + |
| | | " <where>" + |
| | | " <if test='pageComCvtServeDTO.serviceName != null and pageComCvtServeDTO.serviceName.trim() != ""'>" + |
| | | " and t.service_name LIKE concat( #{pageComCvtServeDTO.serviceName}, '%' ) " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " ORDER BY t.create_at desc" + |
| | | "</script>") |
| | | IPage<ComCvtServeVO> pageComCvtServe(Page page, @Param(value = "pageComCvtServeDTO") PageComCvtServeDTO pageComCvtServeDTO); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComMngCarDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @description: 车辆管理 |
| | | * @author: Null |
| | | * @date: 2021/3/16 14:28 |
| | | */ |
| | | @Mapper |
| | | public interface ComMngCarDAO extends BaseMapper<ComMngCarDO> { |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.dtos.community.ExcelHouseDTO; |
| | | import com.panzhihua.service_community.model.dos.ComMngStructHouseDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Options; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.mapping.StatementType; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Select("{call smart_life.removeByParentCode(#{areaCode,jdbcType=VARCHAR,mode=IN})}") |
| | | @Options(statementType = StatementType.CALLABLE) |
| | | int batchDeleteHouse(String areaCode); |
| | | |
| | | @Select("<script> " + |
| | | " SELECT REPLACE " + |
| | | " ( h3.house_name, h4.house_name, '' ) build, " + |
| | | " REPLACE ( h2.house_name, h3.house_name, '' ) unit, " + |
| | | " REPLACE ( h1.house_name, h2.house_name, '' ) floor, " + |
| | | " REPLACE ( h.house_name, h1.house_name, '' ) room, " + |
| | | " h.square, " + |
| | | "CASE " + |
| | | " h.state " + |
| | | " WHEN 1 THEN " + |
| | | " '自住' " + |
| | | " WHEN 2 THEN " + |
| | | " '租住' " + |
| | | " WHEN 3 THEN " + |
| | | " '商用' ELSE '未知' " + |
| | | " END AS state, " + |
| | | " su.NAME username, " + |
| | | " su.phone " + |
| | | "FROM " + |
| | | " com_mng_struct_house h " + |
| | | " LEFT JOIN com_mng_struct_house h1 ON h.parent_code = h1.house_code " + |
| | | " LEFT JOIN com_mng_struct_house h2 ON h1.parent_code = h2.house_code " + |
| | | " LEFT JOIN com_mng_struct_house h3 ON h2.parent_code = h3.house_code " + |
| | | " LEFT JOIN com_mng_struct_house h4 ON h3.parent_code = h4.house_code " + |
| | | " LEFT JOIN com_mng_struct_house_user hu ON h.house_code = hu.house_code " + |
| | | " LEFT JOIN sys_user su ON hu.user_id = su.user_id " + |
| | | "WHERE " + |
| | | " h.house_code LIKE concat(#{houseCode},'%') " + |
| | | " AND h.type = 5" + |
| | | " ORDER BY h.house_code ASC " + |
| | | "</script> ") |
| | | List<ExcelHouseDTO> houseExport(String houseCode); |
| | | } |
| | |
| | | * 封面图 |
| | | */ |
| | | private String cover; |
| | | |
| | | /** |
| | | * 分类:1-社区风采 2-社区动态 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 封面模式:1-小图展示 2-大图展示 |
| | | */ |
| | | private Integer coverMode; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName(value = "com_act_message_back") |
| | | public class ComActMessageBackDO { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | * 留言id |
| | | */ |
| | | private Long msgId; |
| | | |
| | | /** |
| | | * 回复内容 |
| | | */ |
| | | private String msgContent; |
| | | |
| | | /** |
| | | * 图片地址 多个用逗号隔开 |
| | | */ |
| | | private String photoPah; |
| | | |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 留言人id |
| | | */ |
| | | private Long sendtoUserId; |
| | | |
| | | /** |
| | | * 留言人姓名 |
| | | */ |
| | | private String sendtoUserName; |
| | | |
| | | /** |
| | | * 状态 1 待回复 2 已回复 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否公开 1 公开 2 保密 |
| | | */ |
| | | private Integer ispublic; |
| | | |
| | | /** |
| | | * 回复人主键 |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 回复人账号 |
| | | */ |
| | | private String userAccount; |
| | | |
| | | /** |
| | | * 回复人姓名 |
| | | */ |
| | | private String userName; |
| | | |
| | | /** |
| | | * 社区主键 |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 回复时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName(value = "com_act_message") |
| | | public class ComActMessageDO { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | * 留言内容 |
| | | */ |
| | | private String msgContent; |
| | | |
| | | /** |
| | | * 图片地址 多个用逗号隔开 |
| | | */ |
| | | private String photoPah; |
| | | |
| | | /** |
| | | * 留言对象联系方式 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 回复人id |
| | | */ |
| | | private Long sendtoUserId; |
| | | |
| | | /** |
| | | * 回复人姓名 |
| | | */ |
| | | private String sendtoUserName; |
| | | |
| | | /** |
| | | * 状态 1 待回复 2 已回复 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否公开 1 公开 2 保密 |
| | | */ |
| | | private Integer ispublic; |
| | | |
| | | /** |
| | | * 留言人主键 |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 留言人账号 |
| | | */ |
| | | private String userAccount; |
| | | |
| | | /** |
| | | * 留言人姓名 |
| | | */ |
| | | private String userName; |
| | | |
| | | /** |
| | | * 社区主键 |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 留言对象 1 社区团队 2 社区党委 |
| | | */ |
| | | |
| | | private Long type; |
| | | /** |
| | | * 留言人电话 |
| | | */ |
| | | private String userPhone; |
| | | /** |
| | | * 回复时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @description: 便民服务 商家服务范围 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:48 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_cvt_business_area") |
| | | public class ComCvtBusinessAreaDO implements Serializable { |
| | | private static final long serialVersionUID = -6760581768682304976L; |
| | | |
| | | /**ID*/ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /**商家ID*/ |
| | | private Long businessId; |
| | | |
| | | /**服务社区ID*/ |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 便民服务 商家信息 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:36 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_cvt_business") |
| | | public class ComCvtBusinessDO implements Serializable { |
| | | private static final long serialVersionUID = -3935153251027679550L; |
| | | /** |
| | | * 商家ID |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 商家名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | private String contacts; |
| | | |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | private String contactsPhone; |
| | | |
| | | /** |
| | | * 详细地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 主营业务 |
| | | */ |
| | | private String busScope; |
| | | |
| | | /** |
| | | * 服务范围标记:1-全攀枝花市,2-部分地区 |
| | | */ |
| | | private Integer areaFlag; |
| | | |
| | | /** |
| | | * 商家logo |
| | | */ |
| | | private String logo; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("商家介绍媒体文件类型:1-图片 2-视频") |
| | | private Integer mediaType; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @description: 便民服务 商家介绍 图片或视频 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:38 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_cvt_business_introduce") |
| | | public class ComCvtBusinessIntroduceDO implements Serializable { |
| | | private static final long serialVersionUID = 2727023439541122421L; |
| | | /**主键ID*/ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /**商家ID*/ |
| | | private Long businessId; |
| | | |
| | | /**媒体文件路径*/ |
| | | private String mediaPath; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @description: 便民服务分类 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:22 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_cvt_category") |
| | | public class ComCvtCategoryDO implements Serializable { |
| | | private static final long serialVersionUID = 6973090444078148152L; |
| | | |
| | | /** |
| | | * 分类id 自增 |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | private String name; |
| | | |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 权重 |
| | | */ |
| | | private Integer weight; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 便民服务列表 |
| | | * @author: Null |
| | | * @date: 2021/3/11 10:52 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_cvt_serve") |
| | | public class ComCvtServeDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 6641346373561429677L; |
| | | /** |
| | | * 服务主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | * 服务名称 |
| | | */ |
| | | private String serviceName; |
| | | |
| | | /** |
| | | * 服务价格 |
| | | */ |
| | | private BigDecimal servicePrice; |
| | | |
| | | /** |
| | | * 服务分类ID |
| | | */ |
| | | private Long categoryId; |
| | | |
| | | /** |
| | | * 服务描述 |
| | | */ |
| | | private String serviceDesc; |
| | | |
| | | /** |
| | | * 所属商家ID |
| | | */ |
| | | private Long businessId; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | public boolean equals(ComCvtServeDO obj) { |
| | | return obj.getBusinessId() == this.getBusinessId() |
| | | && obj.getCategoryId() == this.getCategoryId() |
| | | && obj.getServiceName().equals(this.getServiceName()) |
| | | && obj.getServicePrice().compareTo(this.getServicePrice()) == 0 |
| | | && obj.getServiceDesc().equals(this.getServiceDesc()) |
| | | ; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 车辆管理 |
| | | * @author: Null |
| | | * @date: 2021/3/16 14:28 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_mng_car") |
| | | public class ComMngCarDO implements Serializable { |
| | | |
| | | /**主键*/ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /**社区ID*/ |
| | | private Long communityId; |
| | | |
| | | /**小区名称*/ |
| | | private String areaName; |
| | | |
| | | /**小区ID*/ |
| | | private Long areaId; |
| | | |
| | | /**车主姓名*/ |
| | | private String userName; |
| | | |
| | | /**车主用户ID*/ |
| | | private Long userId; |
| | | |
| | | /**车主手机号码*/ |
| | | private String mobile; |
| | | |
| | | /**车牌号*/ |
| | | private String plateNum; |
| | | |
| | | /**车辆品牌*/ |
| | | private String brand; |
| | | |
| | | /**车身颜色*/ |
| | | private String color; |
| | | |
| | | /**车辆型号*/ |
| | | private String model; |
| | | |
| | | /**创建时间*/ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /**创建人*/ |
| | | private Long createBy; |
| | | |
| | | /**数据来源:1-小程序 2-后台录入*/ |
| | | private Integer source; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageBackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ResetComActMessageVO; |
| | | import com.panzhihua.service_community.model.dos.ComActMessageDO; |
| | | |
| | | public interface ComActMessageService extends IService<ComActMessageDO> { |
| | | /** |
| | | * 保存留言 |
| | | * @param comActMessageVO |
| | | * @return |
| | | */ |
| | | R addMessage(ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 我的留言 |
| | | * @param comActMessageVO |
| | | * @return |
| | | */ |
| | | R pageMyMessageApplets(ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 给我的留言 |
| | | * @param comActMessageVO |
| | | * @return |
| | | */ |
| | | R pageSendToMessageApplets(ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 社区留言 |
| | | * @param comActMessageVO |
| | | * @return |
| | | */ |
| | | R pageMyCommunityMessageApplets(ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 保存留言回复 |
| | | * @param comActMessageBackVO |
| | | * @return |
| | | */ |
| | | R addMessageBack(ComActMessageBackVO comActMessageBackVO); |
| | | /** |
| | | * 根据用户id查询留言 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R pageMessageByUserApplets(ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 根据id删除留言,同时要删除回复 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R deleteMessage(ComActMessageVO comActMessageVO); |
| | | /** |
| | | * 根据id集合批量设置是否公开 |
| | | * @param ids id集合 |
| | | * @return 删除结果 |
| | | */ |
| | | R resetMessagePublic(ResetComActMessageVO resetComActMessageVO); |
| | | /** |
| | | * 留言详情 |
| | | * |
| | | * @param id 主键 |
| | | * @return 详情内容 |
| | | */ |
| | | R detailMessage(Long id); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessAreaDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 便民服务 商家相关接口 |
| | | * @author: Null |
| | | * @date: 2021/3/11 11:11 |
| | | */ |
| | | public interface ComCvtBusinessAreaService { |
| | | |
| | | /** |
| | | * 批量保存便民服务商家服务范围 |
| | | * @param comCvtBusinessAreaDOs 参数 |
| | | */ |
| | | R batchSave(List<ComCvtBusinessAreaDO> comCvtBusinessAreaDOs); |
| | | |
| | | /** |
| | | * 查询商家服务范围的社区Ids集合 |
| | | * @param businessId |
| | | * @return |
| | | */ |
| | | List<Long> getBusinessServiceAreaIds(Long businessId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessIntroduceDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 便民服务商家介绍媒体文件路径 |
| | | * @author: Null |
| | | * @date: 2021/3/11 15:44 |
| | | */ |
| | | public interface ComCvtBusinessIntroduceService { |
| | | |
| | | /** |
| | | * 保存便民服务商家介绍图片或视频文件 |
| | | * @param comCvtBusinessIntroduceDOS 参数 |
| | | */ |
| | | R batchSave(List<ComCvtBusinessIntroduceDO> comCvtBusinessIntroduceDOS); |
| | | |
| | | /** |
| | | * 查询商家介绍媒体文件集合 |
| | | * @param businessId |
| | | * @return |
| | | */ |
| | | List<String> getBusinessMediaPaths(Long businessId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @description: 便民服务 商家相关接口 |
| | | * @author: Null |
| | | * @date: 2021/3/11 11:11 |
| | | */ |
| | | public interface ComCvtBusinessService { |
| | | |
| | | /** |
| | | * 分页查询便民服务商家 |
| | | * @param pageComCvtBusinessDTO 查询参数 |
| | | * @return 分页集合 |
| | | */ |
| | | R pageComCvtBusiness(PageComCvtBusinessDTO pageComCvtBusinessDTO); |
| | | |
| | | /** |
| | | * 添加便民服务商家信息 |
| | | * @param comCvtBusinessDTO |
| | | * @return |
| | | */ |
| | | R addComCvtBusiness(ComCvtBusinessDTO comCvtBusinessDTO); |
| | | |
| | | |
| | | /** |
| | | * 编辑便民服务商家信息 |
| | | * @param comCvtBusinessDTO |
| | | * @return |
| | | */ |
| | | R putComCvtBusiness(ComCvtBusinessDTO comCvtBusinessDTO); |
| | | |
| | | /** |
| | | * 查询便民服务商家详情 |
| | | * @return |
| | | */ |
| | | R getComCvtBusiness(Long id); |
| | | |
| | | /** |
| | | * 删除便民服务商家信息 |
| | | * @return |
| | | */ |
| | | R deleteComCvtBusiness(Long id); |
| | | |
| | | /** |
| | | * 通过服务区域 分页查询便民服务商家 |
| | | * @param comCvtBusinessAppletsDTO 查询参数 |
| | | * @return 分页集合 |
| | | */ |
| | | R pageComCvtBusinessByServiceArea(PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO); |
| | | |
| | | /** |
| | | * 小程序便民服务商家详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R getComCvtBusinessServeDetail(Long id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @description: 便民服务 分类 |
| | | * @author: Null |
| | | * @date: 2021/3/11 16:56 |
| | | */ |
| | | public interface ComCvtCategoryService { |
| | | |
| | | /** |
| | | * 分页查询便民服务分类 |
| | | * @param pageComCvtCategoryDTO 查询参数 |
| | | * @return 分页集合 |
| | | */ |
| | | R pageComCvtCategory(PageComCvtCategoryDTO pageComCvtCategoryDTO); |
| | | |
| | | /** |
| | | * 添加便民服务分类 |
| | | * @param comCvtCategoryDTO |
| | | * @return |
| | | */ |
| | | R addComCvtCategory(ComCvtCategoryDTO comCvtCategoryDTO); |
| | | |
| | | |
| | | /** |
| | | * 编辑便民服务分类信息 |
| | | * @param comCvtCategoryDTO |
| | | * @return |
| | | */ |
| | | R putComCvtCategory(ComCvtCategoryDTO comCvtCategoryDTO); |
| | | |
| | | /** |
| | | * 查询便民服务分类详情 |
| | | * @return |
| | | */ |
| | | R getComCvtCategory(Long id); |
| | | |
| | | /** |
| | | * 删除便民服务分类信息 |
| | | * @return |
| | | */ |
| | | R deleteComCvtCategory(Long id); |
| | | |
| | | /** |
| | | * 查询便民服务所有分类 |
| | | * @return |
| | | */ |
| | | R allComCvtCategory(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtServeDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessCategoryServeVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 社区 便民服务接口 |
| | | * @author: Null |
| | | * @date: 2021/3/12 8:57 |
| | | */ |
| | | public interface ComCvtServeService { |
| | | |
| | | /** |
| | | * 分页查询便民服务 |
| | | * @param pageComCvtServeDTO 查询参数 |
| | | * @return 分页集合 |
| | | */ |
| | | R pageComCvtServe(PageComCvtServeDTO pageComCvtServeDTO); |
| | | |
| | | /** |
| | | * 添加便民服务 |
| | | * @param comCvtServeDTO |
| | | * @return |
| | | */ |
| | | R addComCvtServe(ComCvtServeDTO comCvtServeDTO); |
| | | |
| | | |
| | | /** |
| | | * 编辑便民服务信息 |
| | | * @param comCvtServeDTO |
| | | * @return |
| | | */ |
| | | R putComCvtServe(ComCvtServeDTO comCvtServeDTO); |
| | | |
| | | /** |
| | | * 查询便民服务详情 |
| | | * @return |
| | | */ |
| | | R getComCvtServe(Long id); |
| | | |
| | | /** |
| | | * 删除便民服务信息 |
| | | * @return |
| | | */ |
| | | R deleteComCvtServe(Long id); |
| | | |
| | | |
| | | /** |
| | | * 查询商家服务 |
| | | * @param businessId 商家主键 |
| | | * @return |
| | | */ |
| | | List<ComCvtBusinessCategoryServeVO> getBusinessCategoryServeVOS(Long businessId); |
| | | |
| | | /** |
| | | * 导入便民服务 |
| | | * @param list |
| | | * @return |
| | | */ |
| | | R listSaveConvenientServeExcelVO(List<ComCvtServeExcelVO> list,Long communityId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | public interface ComMngCarService { |
| | | |
| | | /** |
| | | * 小程序端:添加车辆信息 |
| | | * @param comCvtBusinessDTO |
| | | * @return |
| | | */ |
| | | R addComMngCarApplet(ComMngCarAppletDTO comCvtBusinessDTO); |
| | | |
| | | /** |
| | | * 小程序用户车辆列表 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R userComMngCarList(Long userId); |
| | | } |
| | |
| | | * @return 新增结果 |
| | | */ |
| | | R addHouses(ComMngStructHouseVO comMngStructHouseVO); |
| | | |
| | | /** |
| | | * 导出小区房屋信息 |
| | | * @param areaId |
| | | * @return |
| | | */ |
| | | R houseExport(Long areaId); |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoCommentDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoCommentUserDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoDAO; |
| | |
| | | }else { |
| | | comActEasyPhotoVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | comActEasyPhotoVO1.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO1.getPhone())); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | |
| | | } else { |
| | | comActEasyPhotoVO.setHaveGiveThumbsUp(1); |
| | | } |
| | | |
| | | if (status.intValue()==4) { |
| | | Date feedbackAt = comActEasyPhotoVO.getFeedbackAt(); |
| | | if (null==feedbackAt) { |
| | | comActEasyPhotoVO.setFeedbackAt(comActEasyPhotoVO.getExamineAt()); |
| | | } |
| | | } |
| | | comActEasyPhotoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO.getPhone())); |
| | | return R.ok(comActEasyPhotoVO); |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageBackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ResetComActMessageVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.ComPbServiceTeamVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyCommitteeVO; |
| | | import com.panzhihua.service_community.dao.ComActMessageBackDAO; |
| | | import com.panzhihua.service_community.dao.ComActMessageDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoUserDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMessageBackDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMessageDO; |
| | | import com.panzhihua.service_community.service.ComActMessageService; |
| | | |
| | | @Service |
| | | public class ComActMessageServiceImpl extends ServiceImpl<ComActMessageDAO, ComActMessageDO> |
| | | implements ComActMessageService { |
| | | @Resource |
| | | private ComActMessageDAO comActMessageDAO; |
| | | @Resource |
| | | private ComActMessageBackDAO comActMessageBackDAO; |
| | | |
| | | @Override |
| | | public R addMessage(ComActMessageVO comActMessageVO) { |
| | | Long type = comActMessageVO.getType(); |
| | | String phone = ""; |
| | | String sendtoUserName = ""; |
| | | |
| | | if (type == 1) { |
| | | ComPbServiceTeamVO team = comActMessageDAO.selectComPbServiceTeamById(comActMessageVO.getSendtoUserId()); |
| | | if (ObjectUtils.isEmpty(team)) |
| | | return R.fail(); |
| | | phone = team.getPhone(); |
| | | sendtoUserName = team.getName(); |
| | | } else if (type == 2) { |
| | | PartyCommitteeVO party = comActMessageDAO.selectPartyCommitteeById(comActMessageVO.getSendtoUserId()); |
| | | if (ObjectUtils.isEmpty(party)) |
| | | return R.fail(); |
| | | phone = party.getPhone(); |
| | | sendtoUserName = party.getName(); |
| | | } |
| | | if (ObjectUtils.isEmpty(phone)) |
| | | return R.fail("未找到联系方式"); |
| | | comActMessageVO.setPhone(phone); |
| | | comActMessageVO.setSendtoUserName(sendtoUserName); |
| | | ComActMessageDO comActMessageDO = new ComActMessageDO(); |
| | | BeanUtils.copyProperties(comActMessageVO, comActMessageDO); |
| | | int insert = comActMessageDAO.insert(comActMessageDO); |
| | | if (insert > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 我发的留言 |
| | | */ |
| | | @Override |
| | | public R pageMyMessageApplets(ComActMessageVO comActMessageVO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = comActMessageVO.getPageNum(); |
| | | Long pageSize = comActMessageVO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<PageComActMessageVO> iPage = comActMessageDAO.pageMyMessageApplets(page, comActMessageVO); |
| | | List<PageComActMessageVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActMessageVO1 -> { |
| | | Long id = comActMessageVO1.getId(); |
| | | List<ComActMessageBackVO> list = comActMessageDAO.selectMsgBackList(id); |
| | | comActMessageVO1.setBackList(list); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | /** |
| | | * 发给我的留言 |
| | | */ |
| | | @Override |
| | | public R pageSendToMessageApplets(ComActMessageVO comActMessageVO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = comActMessageVO.getPageNum(); |
| | | Long pageSize = comActMessageVO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | String phone = comActMessageVO.getPhone(); |
| | | if(ObjectUtils.isEmpty(phone)) { |
| | | IPage<PageComActMessageVO> iPage=null; |
| | | return R.ok(iPage); |
| | | } |
| | | IPage<PageComActMessageVO> iPage = comActMessageDAO.pageSendMeMessageApplets(page, comActMessageVO); |
| | | List<PageComActMessageVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActMessageVO1 -> { |
| | | Long id = comActMessageVO1.getId(); |
| | | List<ComActMessageBackVO> list = comActMessageDAO.selectMsgBackList(id); |
| | | comActMessageVO1.setBackList(list); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | /** |
| | | * 我的社区留言 |
| | | */ |
| | | |
| | | @Override |
| | | public R pageMyCommunityMessageApplets(ComActMessageVO comActMessageVO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = comActMessageVO.getPageNum(); |
| | | Long pageSize = comActMessageVO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<PageComActMessageVO> iPage = comActMessageDAO.pageMyCommunityMessageApplets(page, comActMessageVO); |
| | | List<PageComActMessageVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActMessageVO1 -> { |
| | | Long id = comActMessageVO1.getId(); |
| | | List<ComActMessageBackVO> list = comActMessageDAO.selectMsgBackList(id); |
| | | comActMessageVO1.setBackList(list); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R addMessageBack(ComActMessageBackVO comActMessageBackVO) { |
| | | ComActMessageBackDO comActMessageBackDO=new ComActMessageBackDO(); |
| | | BeanUtils.copyProperties(comActMessageBackVO, comActMessageBackDO); |
| | | int insert = comActMessageBackDAO.insert(comActMessageBackDO); |
| | | if (insert > 0) { |
| | | ComActMessageDO selectById = comActMessageDAO.selectById(comActMessageBackDO.getMsgId()); |
| | | selectById.setStatus(2); |
| | | comActMessageDAO.updateById(selectById); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R pageMessageByUserApplets(ComActMessageVO comActMessageVO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = comActMessageVO.getPageNum(); |
| | | Long pageSize = comActMessageVO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<PageComActMessageVO> iPage = comActMessageDAO.pageMessageByUserApplets(page, comActMessageVO); |
| | | List<PageComActMessageVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActMessageVO1 -> { |
| | | Long id = comActMessageVO1.getId(); |
| | | List<ComActMessageBackVO> list = comActMessageDAO.selectMsgBackList(id); |
| | | comActMessageVO1.setBackList(list); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteMessage(ComActMessageVO comActMessageVO) { |
| | | Long id = comActMessageVO.getId(); |
| | | comActMessageDAO.deleteById(id); |
| | | comActMessageBackDAO.deleteMsgBackByMsgId(id); |
| | | // List<ComActMessageBackVO> list = comActMessageDAO.selectMsgBackList(id); |
| | | // for (ComActMessageBackVO comActMessageBackVO : list) { |
| | | // comActMessageBackDAO.deleteById(comActMessageBackVO.getId()); |
| | | // } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R resetMessagePublic(ResetComActMessageVO resetComActMessageVO) { |
| | | if(ObjectUtils.isEmpty(resetComActMessageVO)) return R.fail(); |
| | | Integer ispublic = resetComActMessageVO.getIspublic(); |
| | | if(ispublic==null||(ispublic!=1&&ispublic!=2)) return R.fail("状态错误"); |
| | | List<Long> list = resetComActMessageVO.getIds(); |
| | | for (Long id : list) { |
| | | comActMessageDAO.updatePublic(ispublic, id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R detailMessage(Long id) { |
| | | ComActMessageDO comActMessageDO = comActMessageDAO.selectById(id); |
| | | PageComActMessageVO vo=new PageComActMessageVO(); |
| | | BeanUtils.copyProperties(comActMessageDO, vo); |
| | | List<ComActMessageBackVO> list = comActMessageDAO.selectMsgBackList(id); |
| | | vo.setBackList(list); |
| | | // TODO Auto-generated method stub |
| | | return R.ok(vo); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishDAO; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishUserDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | |
| | | } else { |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | comActMicroWishVO1.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone())); |
| | | |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | |
| | | }else { |
| | | comActMicroWishVO.setHaveGiveThumbsUp(1); |
| | | } |
| | | comActMicroWishVO.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO.getSponsorPhone())); |
| | | return R.ok(comActMicroWishVO); |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComCvtBusinessAreaDAO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessAreaDO; |
| | | import com.panzhihua.service_community.service.ComCvtBusinessAreaService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @description: 便民服务商家服务范围接口 |
| | | * @author: Null |
| | | * @date: 2021/3/11 11:11 |
| | | */ |
| | | @Service |
| | | public class ComCvtBusinessAreaServiceImpl extends ServiceImpl<ComCvtBusinessAreaDAO, ComCvtBusinessAreaDO> implements ComCvtBusinessAreaService { |
| | | |
| | | @Resource |
| | | private ComCvtBusinessAreaDAO comCvtBusinessAreaDAO; |
| | | |
| | | @Override |
| | | public R batchSave(List<ComCvtBusinessAreaDO> comCvtBusinessAreaDOs) { |
| | | boolean result = this.saveBatch(comCvtBusinessAreaDOs); |
| | | if(result){ |
| | | R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Long> getBusinessServiceAreaIds(Long businessId) { |
| | | List<ComCvtBusinessAreaDO> comCvtBusinessAreaDOS = comCvtBusinessAreaDAO.selectList(new QueryWrapper<ComCvtBusinessAreaDO>().lambda().eq(ComCvtBusinessAreaDO::getBusinessId, businessId)); |
| | | List<Long> ids = comCvtBusinessAreaDOS.stream().map(comCvtBusinessAreaDO -> comCvtBusinessAreaDO.getCommunityId()).collect(Collectors.toList()); |
| | | return ids; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComCvtBusinessIntroduceDAO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessIntroduceDO; |
| | | import com.panzhihua.service_community.service.ComCvtBusinessIntroduceService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 便民服务商家介绍媒体文件路径 |
| | | * @author: Null |
| | | * @date: 2021/3/11 15:46 |
| | | */ |
| | | @Service |
| | | public class ComCvtBusinessIntroduceServiceImpl extends ServiceImpl<ComCvtBusinessIntroduceDAO,ComCvtBusinessIntroduceDO> implements ComCvtBusinessIntroduceService { |
| | | |
| | | @Resource |
| | | private ComCvtBusinessIntroduceDAO comCvtBusinessIntroduceDAO; |
| | | |
| | | @Override |
| | | public R batchSave(List<ComCvtBusinessIntroduceDO> comCvtBusinessIntroduceDOS) { |
| | | boolean result = this.saveBatch(comCvtBusinessIntroduceDOS); |
| | | if(result){ |
| | | R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getBusinessMediaPaths(Long businessId) { |
| | | List<String> mediaPaths = new ArrayList<>(); |
| | | List<ComCvtBusinessIntroduceDO> comCvtBusinessIntroduceDOS = comCvtBusinessIntroduceDAO.selectList(new QueryWrapper<ComCvtBusinessIntroduceDO>().lambda().eq(ComCvtBusinessIntroduceDO::getBusinessId, businessId)); |
| | | if (!ObjectUtils.isEmpty(comCvtBusinessIntroduceDOS)) { |
| | | |
| | | comCvtBusinessIntroduceDOS.forEach(media -> { |
| | | mediaPaths.add(media.getMediaPath()); |
| | | }); |
| | | } |
| | | return mediaPaths; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessDetailVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessVO; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComCvtBusinessAreaDAO; |
| | | import com.panzhihua.service_community.dao.ComCvtBusinessDAO; |
| | | import com.panzhihua.service_community.dao.ComCvtBusinessIntroduceDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessAreaDO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessDO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessIntroduceDO; |
| | | import com.panzhihua.service_community.service.ComCvtBusinessAreaService; |
| | | import com.panzhihua.service_community.service.ComCvtBusinessIntroduceService; |
| | | import com.panzhihua.service_community.service.ComCvtBusinessService; |
| | | import com.panzhihua.service_community.service.ComCvtServeService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @description: 便民服务商家接口 |
| | | * @author: Null |
| | | * @date: 2021/3/11 11:11 |
| | | */ |
| | | @Service |
| | | public class ComCvtBusinessServiceImpl extends ServiceImpl<ComCvtBusinessDAO, ComCvtBusinessDO> implements ComCvtBusinessService { |
| | | |
| | | @Resource |
| | | private ComCvtBusinessDAO comCvtBusinessDAO; |
| | | @Resource |
| | | private ComCvtBusinessAreaDAO comCvtBusinessAreaDAO; |
| | | @Resource |
| | | private ComCvtBusinessIntroduceDAO comCvtBusinessIntroduceDAO; |
| | | @Resource |
| | | private ComCvtBusinessAreaService comCvtBusinessAreaService; |
| | | @Resource |
| | | private ComCvtBusinessIntroduceService comCvtBusinessIntroduceService; |
| | | @Resource |
| | | private ComCvtServeService comCvtServeService; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | |
| | | @Override |
| | | public R pageComCvtBusiness(PageComCvtBusinessDTO pageComCvtBusinessDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = pageComCvtBusinessDTO.getPageNum(); |
| | | Long pageSize = pageComCvtBusinessDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComCvtBusinessVO> iPage = comCvtBusinessDAO.pageComCvtBusiness(page, pageComCvtBusinessDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addComCvtBusiness(ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | ComCvtBusinessDO comCvtBusinessDO = new ComCvtBusinessDO(); |
| | | BeanUtils.copyProperties(comCvtBusinessDTO, comCvtBusinessDO); |
| | | comCvtBusinessDO.setCreateAt(new Date()); |
| | | int count = comCvtBusinessDAO.insert(comCvtBusinessDO); |
| | | if (count < 1) { |
| | | return R.fail(); |
| | | } |
| | | if (comCvtBusinessDTO.getAreaFlag() == 2 && !ObjectUtils.isEmpty(comCvtBusinessDTO.getCommunityIds())) { |
| | | List<ComCvtBusinessAreaDO> comCvtBusinessAreaDOS = new ArrayList<>(); |
| | | comCvtBusinessDTO.getCommunityIds().stream().forEach(areaId -> { |
| | | ComCvtBusinessAreaDO comCvtBusinessAreaDO = new ComCvtBusinessAreaDO(); |
| | | comCvtBusinessAreaDO.setBusinessId(comCvtBusinessDO.getId()); |
| | | comCvtBusinessAreaDO.setCommunityId(areaId); |
| | | comCvtBusinessAreaDOS.add(comCvtBusinessAreaDO); |
| | | }); |
| | | comCvtBusinessAreaService.batchSave(comCvtBusinessAreaDOS); |
| | | } |
| | | if (!ObjectUtils.isEmpty(comCvtBusinessDTO.getMediaPaths())) { |
| | | List<ComCvtBusinessIntroduceDO> comCvtBusinessIntroduceDOS = new ArrayList<>(); |
| | | comCvtBusinessDTO.getMediaPaths().stream().forEach(mediaPath -> { |
| | | ComCvtBusinessIntroduceDO comCvtBusinessIntroduceDO = new ComCvtBusinessIntroduceDO(); |
| | | comCvtBusinessIntroduceDO.setBusinessId(comCvtBusinessDO.getId()); |
| | | comCvtBusinessIntroduceDO.setMediaPath(mediaPath); |
| | | comCvtBusinessIntroduceDOS.add(comCvtBusinessIntroduceDO); |
| | | }); |
| | | comCvtBusinessIntroduceService.batchSave(comCvtBusinessIntroduceDOS); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R putComCvtBusiness(ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | ComCvtBusinessDO comCvtBusinessDO = comCvtBusinessDAO.selectById(comCvtBusinessDTO.getId()); |
| | | if (null == comCvtBusinessDO) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | BeanUtils.copyProperties(comCvtBusinessDTO, comCvtBusinessDO); |
| | | comCvtBusinessDAO.updateById(comCvtBusinessDO); |
| | | //删除服务范围 |
| | | comCvtBusinessAreaDAO.delete(new QueryWrapper<ComCvtBusinessAreaDO>().lambda().eq(ComCvtBusinessAreaDO::getBusinessId, comCvtBusinessDO.getId())); |
| | | //删除商家介绍媒体文件 |
| | | comCvtBusinessIntroduceDAO.delete(new QueryWrapper<ComCvtBusinessIntroduceDO>().lambda().eq(ComCvtBusinessIntroduceDO::getBusinessId, comCvtBusinessDO.getId())); |
| | | if (comCvtBusinessDTO.getAreaFlag() == 2 && !ObjectUtils.isEmpty(comCvtBusinessDTO.getCommunityIds())) { |
| | | List<ComCvtBusinessAreaDO> comCvtBusinessAreaDOS = new ArrayList<>(); |
| | | comCvtBusinessDTO.getCommunityIds().stream().forEach(areaId -> { |
| | | ComCvtBusinessAreaDO comCvtBusinessAreaDO = new ComCvtBusinessAreaDO(); |
| | | comCvtBusinessAreaDO.setBusinessId(comCvtBusinessDO.getId()); |
| | | comCvtBusinessAreaDO.setCommunityId(areaId); |
| | | comCvtBusinessAreaDOS.add(comCvtBusinessAreaDO); |
| | | }); |
| | | comCvtBusinessAreaService.batchSave(comCvtBusinessAreaDOS); |
| | | } |
| | | if (!ObjectUtils.isEmpty(comCvtBusinessDTO.getMediaPaths())) { |
| | | List<ComCvtBusinessIntroduceDO> comCvtBusinessIntroduceDOS = new ArrayList<>(); |
| | | comCvtBusinessDTO.getMediaPaths().stream().forEach(mediaPath -> { |
| | | ComCvtBusinessIntroduceDO comCvtBusinessIntroduceDO = new ComCvtBusinessIntroduceDO(); |
| | | comCvtBusinessIntroduceDO.setBusinessId(comCvtBusinessDO.getId()); |
| | | comCvtBusinessIntroduceDO.setMediaPath(mediaPath); |
| | | comCvtBusinessIntroduceDOS.add(comCvtBusinessIntroduceDO); |
| | | }); |
| | | comCvtBusinessIntroduceService.batchSave(comCvtBusinessIntroduceDOS); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getComCvtBusiness(Long id) { |
| | | ComCvtBusinessDO comCvtBusinessDO = comCvtBusinessDAO.selectById(id); |
| | | if (null == comCvtBusinessDO) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | ComCvtBusinessVO comCvtBusinessVO = new ComCvtBusinessVO(); |
| | | BeanUtils.copyProperties(comCvtBusinessDO, comCvtBusinessVO); |
| | | List<ComActDO> comActDOS = new ArrayList<>(); |
| | | |
| | | if(comCvtBusinessDO.getAreaFlag()==1){ |
| | | comActDOS = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState,0)); |
| | | }else{ |
| | | List<Long> areaIds = comCvtBusinessAreaService.getBusinessServiceAreaIds(comCvtBusinessDO.getId()); |
| | | if(!ObjectUtils.isEmpty(areaIds)){ |
| | | comActDOS = comActDAO.selectBatchIds(areaIds); |
| | | } |
| | | } |
| | | |
| | | if (!ObjectUtils.isEmpty(comActDOS)) { |
| | | List<ComActVO> comActVOS = new ArrayList<>(); |
| | | comActDOS.forEach(comActDO -> { |
| | | ComActVO comActVO = new ComActVO(); |
| | | BeanUtils.copyProperties(comActDO, comActVO); |
| | | comActVOS.add(comActVO); |
| | | }); |
| | | comCvtBusinessVO.setComActVOS(comActVOS); |
| | | } |
| | | List<String> mediaPaths = comCvtBusinessIntroduceService.getBusinessMediaPaths(id); |
| | | comCvtBusinessVO.setMediaPaths(mediaPaths); |
| | | return R.ok(comCvtBusinessVO); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R deleteComCvtBusiness(Long id) { |
| | | int delete = comCvtBusinessDAO.deleteById(id); |
| | | if (delete==0) { |
| | | return R.fail(); |
| | | } |
| | | //删除服务范围 |
| | | comCvtBusinessAreaDAO.delete(new QueryWrapper<ComCvtBusinessAreaDO>().lambda().eq(ComCvtBusinessAreaDO::getBusinessId, id)); |
| | | //删除商家介绍媒体文件 |
| | | comCvtBusinessIntroduceDAO.delete(new QueryWrapper<ComCvtBusinessIntroduceDO>().lambda().eq(ComCvtBusinessIntroduceDO::getBusinessId, id)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R pageComCvtBusinessByServiceArea(PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = comCvtBusinessAppletsDTO.getPageNum(); |
| | | Long pageSize = comCvtBusinessAppletsDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComCvtBusinessVO> iPage = comCvtBusinessDAO.pageComCvtBusinessByServiceArea(page, comCvtBusinessAppletsDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R getComCvtBusinessServeDetail(Long id) { |
| | | ComCvtBusinessDO comCvtBusinessDO = comCvtBusinessDAO.selectById(id); |
| | | if (null == comCvtBusinessDO) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | ComCvtBusinessDetailVO comCvtBusinessDetailVO = new ComCvtBusinessDetailVO(); |
| | | BeanUtils.copyProperties(comCvtBusinessDO, comCvtBusinessDetailVO); |
| | | if(comCvtBusinessDO.getAreaFlag()!=1){ |
| | | List<Long> areaIds = comCvtBusinessAreaService.getBusinessServiceAreaIds(comCvtBusinessDO.getId()); |
| | | List<ComActDO> comActDOS = comActDAO.selectBatchIds(areaIds); |
| | | if (!ObjectUtils.isEmpty(comActDOS)) { |
| | | List<String> comActVOS = new ArrayList<>(); |
| | | comActDOS.forEach(comActDO -> { |
| | | comActVOS.add(comActDO.getName()); |
| | | }); |
| | | comCvtBusinessDetailVO.setComActVOS(comActVOS); |
| | | } |
| | | } |
| | | List<String> mediaPaths = comCvtBusinessIntroduceService.getBusinessMediaPaths(id); |
| | | comCvtBusinessDetailVO.setMediaPaths(mediaPaths); |
| | | comCvtBusinessDetailVO.setCategoryServeVOS(comCvtServeService.getBusinessCategoryServeVOS(id)); |
| | | return R.ok(comCvtBusinessDetailVO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtCategoryVO; |
| | | import com.panzhihua.service_community.dao.ComCvtCategoryDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtCategoryDO; |
| | | import com.panzhihua.service_community.service.ComCvtCategoryService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: |
| | | * @author: Null |
| | | * @date: 2021/3/11 16:56 |
| | | */ |
| | | @Service |
| | | public class ComCvtCategoryServiceImpl implements ComCvtCategoryService { |
| | | |
| | | @Resource |
| | | private ComCvtCategoryDAO comCvtCategoryDAO; |
| | | |
| | | @Override |
| | | public R pageComCvtCategory(PageComCvtCategoryDTO pageComCvtCategoryDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = pageComCvtCategoryDTO.getPageNum(); |
| | | Long pageSize = pageComCvtCategoryDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComCvtCategoryVO> iPage = comCvtCategoryDAO.pageComCvtCategory(page, pageComCvtCategoryDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R addComCvtCategory(ComCvtCategoryDTO comCvtCategoryDTO) { |
| | | ComCvtCategoryDO comCvtCategoryDO = comCvtCategoryDAO.selectOne(new QueryWrapper<ComCvtCategoryDO>().lambda().eq(ComCvtCategoryDO::getName,comCvtCategoryDTO.getName())); |
| | | if(null!=comCvtCategoryDO){ |
| | | return R.fail("分类名称重复"); |
| | | } |
| | | comCvtCategoryDO = new ComCvtCategoryDO(); |
| | | BeanUtils.copyProperties(comCvtCategoryDTO,comCvtCategoryDO); |
| | | int count = comCvtCategoryDAO.insert(comCvtCategoryDO); |
| | | if(count<1){ |
| | | return R.fail(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R putComCvtCategory(ComCvtCategoryDTO comCvtCategoryDTO) { |
| | | ComCvtCategoryDO old = comCvtCategoryDAO.selectById(comCvtCategoryDTO.getId()); |
| | | if(null==old){ |
| | | return R.fail("分类不存在"); |
| | | } |
| | | ComCvtCategoryDO comCvtCategoryDO = comCvtCategoryDAO.selectOne(new QueryWrapper<ComCvtCategoryDO>().lambda().eq(ComCvtCategoryDO::getName,comCvtCategoryDTO.getName())); |
| | | if(null!=comCvtCategoryDO && !old.getName().equals(comCvtCategoryDO.getName())){ |
| | | return R.fail("分类名称重复"); |
| | | } |
| | | BeanUtils.copyProperties(comCvtCategoryDTO,old); |
| | | int count = comCvtCategoryDAO.updateById(old); |
| | | if(count<1){ |
| | | return R.fail(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getComCvtCategory(Long id) { |
| | | ComCvtCategoryDO comCvtCategoryDO = comCvtCategoryDAO.selectById(id); |
| | | if(null==comCvtCategoryDO){ |
| | | return R.fail("分类不存在"); |
| | | } |
| | | ComCvtCategoryVO comCvtCategoryVO = new ComCvtCategoryVO(); |
| | | BeanUtils.copyProperties(comCvtCategoryDO,comCvtCategoryVO); |
| | | return R.ok(comCvtCategoryVO); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteComCvtCategory(Long id) { |
| | | ComCvtCategoryDO comCvtCategoryDO = comCvtCategoryDAO.selectById(id); |
| | | if(null==comCvtCategoryDO){ |
| | | return R.fail("分类不存在"); |
| | | } |
| | | int count = comCvtCategoryDAO.deleteById(id); |
| | | if(count<1){ |
| | | return R.fail("删除失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R allComCvtCategory() { |
| | | List<ComCvtCategoryVO> comCvtCategoryVOS = new ArrayList<>(); |
| | | List<ComCvtCategoryDO> categoryDOS = comCvtCategoryDAO.selectList(new QueryWrapper<ComCvtCategoryDO>().lambda().orderByDesc(ComCvtCategoryDO::getWeight)); |
| | | if (!ObjectUtils.isEmpty(categoryDOS)) { |
| | | categoryDOS.forEach(categoryDO -> { |
| | | ComCvtCategoryVO comCvtCategoryVO=new ComCvtCategoryVO(); |
| | | BeanUtils.copyProperties(categoryDO,comCvtCategoryVO); |
| | | comCvtCategoryVOS.add(comCvtCategoryVO); |
| | | }); |
| | | } |
| | | return R.ok(comCvtCategoryVOS); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtServeDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessCategoryServeVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeVO; |
| | | import com.panzhihua.service_community.dao.ComCvtBusinessAreaDAO; |
| | | import com.panzhihua.service_community.dao.ComCvtBusinessDAO; |
| | | import com.panzhihua.service_community.dao.ComCvtCategoryDAO; |
| | | import com.panzhihua.service_community.dao.ComCvtServeDAO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessAreaDO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtBusinessDO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtCategoryDO; |
| | | import com.panzhihua.service_community.model.dos.ComCvtServeDO; |
| | | import com.panzhihua.service_community.service.ComCvtServeService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @description: 社区 便民服务接口实现类 |
| | | * @author: Null |
| | | * @date: 2021/3/12 8:58 |
| | | */ |
| | | @Service |
| | | public class ComCvtServeServiceImpl extends ServiceImpl<ComCvtServeDAO, ComCvtServeDO> implements ComCvtServeService { |
| | | |
| | | @Resource |
| | | private ComCvtServeDAO comCvtServeDAO; |
| | | |
| | | @Resource |
| | | private ComCvtBusinessDAO comCvtBusinessDAO; |
| | | |
| | | @Resource |
| | | private ComCvtCategoryDAO comCvtCategoryDAO; |
| | | |
| | | @Override |
| | | public R pageComCvtServe(PageComCvtServeDTO pageComCvtServeDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = pageComCvtServeDTO.getPageNum(); |
| | | Long pageSize = pageComCvtServeDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComCvtServeVO> iPage = comCvtServeDAO.pageComCvtServe(page, pageComCvtServeDTO); |
| | | return R.ok(iPage); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public R addComCvtServe(ComCvtServeDTO comCvtServeDTO) { |
| | | ComCvtServeDO comCvtServeDO = new ComCvtServeDO(); |
| | | BeanUtils.copyProperties(comCvtServeDTO, comCvtServeDO); |
| | | if(checkRepeat(comCvtServeDO)){ |
| | | return R.fail("服务已存在"); |
| | | } |
| | | int insert = comCvtServeDAO.insert(comCvtServeDO); |
| | | if (insert > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R putComCvtServe(ComCvtServeDTO comCvtServeDTO) { |
| | | ComCvtServeDO comCvtServeDO = comCvtServeDAO.selectById(comCvtServeDTO.getId()); |
| | | if (null == comCvtServeDO) { |
| | | return R.fail("该服务不存在"); |
| | | } |
| | | ComCvtServeDO comCvtServeDO2 = new ComCvtServeDO(); |
| | | BeanUtils.copyProperties(comCvtServeDTO, comCvtServeDO2); |
| | | if(!comCvtServeDO.equals(comCvtServeDO2) && checkRepeat(comCvtServeDO2)){ |
| | | return R.fail("该服务与其他服务重复"); |
| | | } |
| | | int update = comCvtServeDAO.updateById(comCvtServeDO2); |
| | | if (update > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R getComCvtServe(Long id) { |
| | | ComCvtServeDO comCvtServeDO = comCvtServeDAO.selectById(id); |
| | | if (null == comCvtServeDO) { |
| | | return R.fail("该服务不存在"); |
| | | } |
| | | ComCvtServeVO comCvtServeVO = new ComCvtServeVO(); |
| | | BeanUtils.copyProperties(comCvtServeDO, comCvtServeVO); |
| | | ComCvtBusinessDO comCvtBusinessDO = comCvtBusinessDAO.selectById(comCvtServeDO.getBusinessId()); |
| | | if (null != comCvtBusinessDO) { |
| | | comCvtServeVO.setBusinessName(comCvtBusinessDO.getName()); |
| | | } |
| | | ComCvtCategoryDO comCvtCategoryDO = comCvtCategoryDAO.selectById(comCvtServeDO.getCategoryId()); |
| | | if (null != comCvtCategoryDO) { |
| | | comCvtServeVO.setCategoryName(comCvtCategoryDO.getName()); |
| | | } |
| | | return R.ok(comCvtServeDO); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteComCvtServe(Long id) { |
| | | ComCvtServeDO comCvtServeDO = comCvtServeDAO.selectById(id); |
| | | if (null == comCvtServeDO) { |
| | | return R.fail("该服务不存在"); |
| | | } |
| | | int count = comCvtServeDAO.deleteById(id); |
| | | if (count < 1) { |
| | | return R.fail("删除失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public List<ComCvtBusinessCategoryServeVO> getBusinessCategoryServeVOS(Long businessId) { |
| | | List<ComCvtBusinessCategoryServeVO> comCvtBusinessCategoryServeVOS = new ArrayList<>(); |
| | | List<ComCvtServeDO> comCvtServeDOS = comCvtServeDAO.selectList(new QueryWrapper<ComCvtServeDO>().lambda().eq(ComCvtServeDO::getBusinessId, businessId)); |
| | | List<ComCvtCategoryDO> categoryDOS = comCvtCategoryDAO.selectList(new QueryWrapper<ComCvtCategoryDO>().lambda().orderByDesc(ComCvtCategoryDO::getWeight)); |
| | | categoryDOS.stream().forEach(categoryDO -> { |
| | | List<ComCvtServeVO> serveVOS = getComCvtServeDOSByCategory(comCvtServeDOS, categoryDO.getId()); |
| | | if (!ObjectUtils.isEmpty(serveVOS)) { |
| | | ComCvtBusinessCategoryServeVO comCvtServeVo = new ComCvtBusinessCategoryServeVO(); |
| | | comCvtServeVo.setCategoryName(categoryDO.getName()); |
| | | comCvtServeVo.setComCvtServeVOS(serveVOS); |
| | | comCvtBusinessCategoryServeVOS.add(comCvtServeVo); |
| | | } |
| | | }); |
| | | return comCvtBusinessCategoryServeVOS; |
| | | } |
| | | |
| | | /** |
| | | * 按分类筛选 |
| | | * |
| | | * @param comCvtServeDOS |
| | | * @param categoryId |
| | | * @return |
| | | */ |
| | | private List<ComCvtServeVO> getComCvtServeDOSByCategory(List<ComCvtServeDO> comCvtServeDOS, Long categoryId) { |
| | | List<ComCvtServeVO> comCvtServeVOS = new ArrayList<>(); |
| | | comCvtServeDOS = comCvtServeDOS.stream().filter(dos -> dos.getCategoryId() == categoryId).collect(Collectors.toList()); |
| | | comCvtServeDOS.forEach(comCvtServeDO -> { |
| | | ComCvtServeVO vo = new ComCvtServeVO(); |
| | | BeanUtils.copyProperties(comCvtServeDO, vo); |
| | | comCvtServeVOS.add(vo); |
| | | }); |
| | | return comCvtServeVOS; |
| | | } |
| | | |
| | | @Override |
| | | public R listSaveConvenientServeExcelVO(List<ComCvtServeExcelVO> list, Long communityId) { |
| | | List<ComCvtServeDO> comCvtServeDOS = new ArrayList<>(); |
| | | List<ComCvtCategoryDO> categoryDOS = comCvtCategoryDAO.selectList(new QueryWrapper<ComCvtCategoryDO>().lambda().orderByDesc(ComCvtCategoryDO::getWeight)); |
| | | Map<String, Long> categoryMap = getCategoryMap(categoryDOS); |
| | | List<ComCvtBusinessDO> comCvtBusinessDOS; |
| | | if (null != communityId && communityId != 0) { |
| | | comCvtBusinessDOS = comCvtBusinessDAO.selectList(new QueryWrapper<ComCvtBusinessDO>().lambda().eq(ComCvtBusinessDO::getCommunityId, communityId)); |
| | | } else { |
| | | comCvtBusinessDOS = comCvtBusinessDAO.selectList(null); |
| | | } |
| | | Map<String, Long> businessMap = getBusinessMap(comCvtBusinessDOS); |
| | | list.forEach(comCvtServeExcelVO -> { |
| | | if (categoryMap.containsKey(comCvtServeExcelVO.getCategoryName()) && businessMap.containsKey(comCvtServeExcelVO.getBusinessName())) { |
| | | ComCvtServeDO comCvtServeDO = new ComCvtServeDO(); |
| | | BeanUtils.copyProperties(comCvtServeExcelVO, comCvtServeDO); |
| | | comCvtServeDO.setCategoryId(categoryMap.get(comCvtServeExcelVO.getCategoryName())); |
| | | comCvtServeDO.setBusinessId(businessMap.get(comCvtServeExcelVO.getBusinessName())); |
| | | //检查商家是否已有某服务 |
| | | if(!checkRepeat(comCvtServeDO)){ |
| | | comCvtServeDOS.add(comCvtServeDO); |
| | | }else{ |
| | | log.error(String.format("导入失败:商家【%s】下已有服务【%s】",comCvtServeExcelVO.getBusinessName(),comCvtServeExcelVO.getServiceName())); |
| | | } |
| | | } |
| | | }); |
| | | this.saveBatch(comCvtServeDOS); |
| | | return R.ok("共计导入服务数量:"+comCvtServeDOS.size()); |
| | | } |
| | | |
| | | //获取分类集合 |
| | | private Map<String, Long> getCategoryMap(List<ComCvtCategoryDO> categoryDOS) { |
| | | Map<String, Long> categoryMap = new HashMap<>(); |
| | | if (!ObjectUtils.isEmpty(categoryDOS)) { |
| | | categoryDOS.forEach(categoryDO -> { |
| | | categoryMap.put(categoryDO.getName(), categoryDO.getId()); |
| | | }); |
| | | } |
| | | return categoryMap; |
| | | } |
| | | |
| | | //获取商家集合 |
| | | private Map<String, Long> getBusinessMap(List<ComCvtBusinessDO> comCvtBusinessDOS) { |
| | | Map<String, Long> businessMap = new HashMap<>(); |
| | | if (!ObjectUtils.isEmpty(comCvtBusinessDOS)) { |
| | | comCvtBusinessDOS.forEach(businessDO -> { |
| | | businessMap.put(businessDO.getName(), businessDO.getId()); |
| | | }); |
| | | } |
| | | return businessMap; |
| | | } |
| | | |
| | | /** |
| | | * 检查服务是否重复 商家名称、分类名称,服务名称、服务价格、服务描述不能同时重复 |
| | | * @param comCvtServeDO |
| | | * @return |
| | | */ |
| | | private boolean checkRepeat(ComCvtServeDO comCvtServeDO){ |
| | | Integer count = comCvtServeDAO.selectCount(new QueryWrapper<ComCvtServeDO>().lambda() |
| | | .eq(ComCvtServeDO::getBusinessId,comCvtServeDO.getBusinessId()) |
| | | .and(wrapper->wrapper.eq(ComCvtServeDO::getCategoryId,comCvtServeDO.getCategoryId())) |
| | | .and(wrapper->wrapper.eq(ComCvtServeDO::getServiceName,comCvtServeDO.getServiceName())) |
| | | .and(wrapper->wrapper.eq(ComCvtServeDO::getServicePrice,comCvtServeDO.getServicePrice())) |
| | | .and(wrapper->wrapper.eq(ComCvtServeDO::getServiceDesc,comCvtServeDO.getServiceDesc())) |
| | | ); |
| | | return count>0 ? true : false; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngCarVO; |
| | | import com.panzhihua.service_community.dao.ComMngCarDAO; |
| | | import com.panzhihua.service_community.model.dos.ComMngCarDO; |
| | | import com.panzhihua.service_community.service.ComMngCarService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: |
| | | * @author: Null |
| | | * @date: 2021/3/16 14:33 |
| | | */ |
| | | @Service |
| | | public class ComMngCarServiceImpl extends ServiceImpl<ComMngCarDAO, ComMngCarDO> implements ComMngCarService { |
| | | |
| | | @Resource |
| | | private ComMngCarDAO comMngCarDAO; |
| | | |
| | | @Override |
| | | public R addComMngCarApplet(ComMngCarAppletDTO comCvtBusinessDTO) { |
| | | int count = comMngCarDAO.selectCount(new QueryWrapper<ComMngCarDO>().lambda().eq(ComMngCarDO::getPlateNum, comCvtBusinessDTO.getPlateNum())); |
| | | if (count > 0) { |
| | | return R.ok("车辆已存在"); |
| | | } |
| | | ComMngCarDO comMngCarDO = new ComMngCarDO(); |
| | | BeanUtils.copyProperties(comCvtBusinessDTO, comMngCarDO); |
| | | comMngCarDO.setCreateAt(new Date()); |
| | | boolean insert = this.save(comMngCarDO); |
| | | if (insert) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R userComMngCarList(Long userId) { |
| | | List<ComMngCarVO> comMngCarVOS = new ArrayList<>(); |
| | | List<ComMngCarDO> carDOS = comMngCarDAO.selectList(new QueryWrapper<ComMngCarDO>().lambda().eq(ComMngCarDO::getUserId,userId)); |
| | | carDOS.forEach(carDO->{ |
| | | ComMngCarVO carVO = new ComMngCarVO(); |
| | | BeanUtils.copyProperties(carDO,carVO); |
| | | comMngCarVOS.add(carVO); |
| | | }); |
| | | return R.ok(comMngCarVOS); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.ExcelHouseDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.BatchhouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructAreaVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructHouseVO; |
| | | import com.panzhihua.common.model.vos.user.CommunityUserInfoVO; |
| | | import com.panzhihua.service_community.dao.ComMngStructAreaDAO; |
| | | import com.panzhihua.service_community.dao.ComMngStructHouseDAO; |
| | | import com.panzhihua.service_community.dao.ComMngStructHouseUserDAO; |
| | | import com.panzhihua.service_community.model.dos.ComMngStructAreaDO; |
| | |
| | | private ComMngStructHouseDAO comMngStructHouseDAO; |
| | | @Resource |
| | | private ComMngStructHouseUserDAO comMngStructHouseUserDAO; |
| | | |
| | | @Resource |
| | | private ComMngStructAreaDAO comMngStructAreaDAO; |
| | | /** |
| | | * 房屋信息 |
| | | * |
| | |
| | | throw new RuntimeException("绑定房屋和人员关系失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R houseExport(Long areaId) { |
| | | ComMngStructAreaDO comMngStructAreaDO = comMngStructAreaDAO.selectById(areaId); |
| | | if (ObjectUtils.isEmpty(comMngStructAreaDO)) { |
| | | return R.fail("小区不存在"); |
| | | } |
| | | List<ExcelHouseDTO> houseDTOS = comMngStructHouseDAO.houseExport(comMngStructAreaDO.getAreaCode()); |
| | | return R.ok(houseDTOS); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.user.UserPhoneVO; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerMngDAO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerMngDO; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerMngService; |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComMngVolunteerMngVO> iPage = comMngVolunteerMngDAO.pageVolunteer(page, comMngVolunteerMngVO); |
| | | iPage.getRecords().forEach(record->{ |
| | | record.setPhone(SensitiveUtil.desensitizedPhoneNumber(record.getPhone())); |
| | | }); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | private ComPbServiceTeamService comPbServiceTeamService; |
| | | |
| | | /** |
| | | * 平台所有的党组织 |
| | | * 社区所有启用的党组织列表 |
| | | * @return 党组织集合 |
| | | */ |
| | | @PostMapping("listpartyorganization") |
| | |
| | | return R.ok(partyOrganizationVOS); |
| | | } |
| | | /** |
| | | * 社区所有党组织列表 |
| | | * @return 党组织集合 |
| | | */ |
| | | @PostMapping("listpartyorganizationAll") |
| | | public R listPartyOrganizationAll(@RequestParam("communityId") Long communityId){ |
| | | List<PartyOrganizationVO> partyOrganizationVOS=partyOrganizationService.listPartyOrganizationAll(communityId); |
| | | return R.ok(partyOrganizationVOS); |
| | | } |
| | | |
| | | /** |
| | | * 新增党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("addpartyorganization") |
| | | public R addPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO){ |
| | | return partyOrganizationService.addPartyOrganization(partyOrganizationVO); |
| | | |
| | | } |
| | | /** |
| | | * 编辑党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("updatepartyorganization") |
| | | public R updatePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO){ |
| | | return partyOrganizationService.updatePartyOrganization(partyOrganizationVO); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 启用,禁用党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("resetpartyorganization") |
| | | public R resetPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO){ |
| | | return partyOrganizationService.resetPartyOrganization(partyOrganizationVO); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("deletepartyorganization") |
| | | public R deletePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO){ |
| | | return partyOrganizationService.deletePartyOrganization(partyOrganizationVO); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 新增党员 |
| | | * @param partyBuildingMemberVO 党员基本信息 |
| | | * @return 新增结果 |
| | |
| | | "com_pb_activity a\n" + |
| | | "left join sys_user u on a.create_by=u.user_id \n" + |
| | | "where a.community_id=#{partyBuildingActivityVO.communityId}\n" + |
| | | " and a.`status` not in(5,6) \n"+ |
| | | "<if test='partyBuildingActivityVO.name != null and partyBuildingActivityVO.name.trim() != ""'>" + |
| | | "and a.name = #{partyBuildingActivityVO.name} \n" + |
| | | " </if> " + |
| | |
| | | // " </where>" + |
| | | // "</script>") |
| | | |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | "m.id,\n" + |
| | | "me.NAME,\n" + |
| | | "u.phone,\n" + |
| | | "m.create_at registrationTime \n" + |
| | | "FROM\n" + |
| | | "com_pb_activity_member m\n" + |
| | | "JOIN com_pb_member me ON m.member_id = me.id\n" + |
| | | "LEFT JOIN sys_user u ON me.id_card = u.id_card \n" + |
| | | "WHERE\n" + |
| | | "m.activity_id = #{pageActivityMembersVO.activityId} \n" + |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " m.id," + |
| | | " m.NAME," + |
| | | " u.phone," + |
| | | " m.create_at registrationTime" + |
| | | " FROM " + |
| | | " com_pb_activity_member m " + |
| | | " LEFT JOIN sys_user u ON m.user_id = u.user_id " + |
| | | "WHERE " + |
| | | "m.activity_id = #{pageActivityMembersVO.activityId} " + |
| | | "<if test='pageActivityMembersVO.name != null and pageActivityMembersVO.name.trim() != ""'>" + |
| | | "AND me.`name` = #{pageActivityMembersVO.name} \n" + |
| | | "AND m.`name` = #{pageActivityMembersVO.name} " + |
| | | " </if> " + |
| | | "<if test='pageActivityMembersVO.phone != null and pageActivityMembersVO.phone.trim() != ""'>" + |
| | | "AND u.phone = #{pageActivityMembersVO.phone}" + |
| | |
| | | "d.publish_at,\n" + |
| | | "d.content,\n" + |
| | | "d.cover,\n" + |
| | | "d.cover_mode,\n" + |
| | | "d.dyn_type,\n" + |
| | | "d.create_at \n" + |
| | | "FROM\n" + |
| | | "com_pb_dyn d\n" + |
| | |
| | | "<if test='partyBuildingComPbDynVO.communityId != null and partyBuildingComPbDynVO.communityId != 0'>" + |
| | | "and d.community_id = #{partyBuildingComPbDynVO.communityId} \n" + |
| | | " </if> " + |
| | | "<if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>" + |
| | | "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + |
| | | " </if> " + |
| | | "<if test='partyBuildingComPbDynVO.title != null and partyBuildingComPbDynVO.title.trim() != ""'>" + |
| | | "and d.title like concat(#{partyBuildingComPbDynVO.title},'%') \n" + |
| | | " </if> " + |
| | |
| | | @Select("select m.* from sys_user u join com_pb_member m on u.id_card=m.id_card where u.user_id=#{userId}") |
| | | ComPbMemberDO selectByUserId(Long userId); |
| | | |
| | | @Select("SELECT\n" + |
| | | "m.* \n" + |
| | | "FROM\n" + |
| | | "com_pb_member m\n" + |
| | | "JOIN sys_user u ON m.id_card = u.id_card \n" + |
| | | "LEFT JOIN com_pb_member_role r on m.id=r.member_id \n" + |
| | | "WHERE\n" + |
| | | "m.community_id =#{communityId} and r.id is null ") |
| | | List<ComPbMemberDO> selectListRegister(Long communityId); |
| | | @Select("select name from sys_user where user_id=#{createBy}") |
| | | String selectNameByUserId(Long createBy); |
| | | @Update("update sys_user u set u.is_partymember=0 where u.id_card=#{idCard}") |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyCommitteeVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbMemberDO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbMemberRoleDO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbServiceTeamDO; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | // "</script>") |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | "mr.id,\n" + |
| | | "m.NAME,\n" + |
| | | "u.phone,\n" + |
| | | "'党员' politicalOutlook,\n"+ |
| | | "m.photo_path,\n" + |
| | | "*,\n" + |
| | | "TIMESTAMPDIFF(\n" + |
| | | "YEAR,\n" + |
| | | "m.employment_time,\n" + |
| | | "DATE_FORMAT( NOW(), '%Y-%m-%d' )) partyAge,\n" + |
| | | "r.role_name ,\n" + |
| | | "mr.role_id \n"+ |
| | | "t.birth_time,\n" + |
| | | "DATE_FORMAT( NOW(), '%Y-%m-%d' )) age\n" + |
| | | "FROM\n" + |
| | | "com_pb_member_role mr\n" + |
| | | "JOIN com_pb_member m ON mr.member_id = m.id\n" + |
| | | "JOIN sys_role r ON mr.role_id = r.role_id \n" + |
| | | "LEFT JOIN sys_user u ON m.id_card = u.id_card\n" + |
| | | "com_pb_member_role t\n" + |
| | | "WHERE\n" + |
| | | "mr.community_id = #{partyCommitteeVO.communityId} \n" + |
| | | "<if test='partyCommitteeVO.name != null and partyCommitteeVO.name.trim() != ""'>" + |
| | | "AND m.`name` like concat(#{partyCommitteeVO.name},'%') \n" + |
| | | " </if> " + |
| | | "<if test='partyCommitteeVO.roleId != null and partyCommitteeVO.roleId != 0'>" + |
| | | "AND r.role_id =#{partyCommitteeVO.roleId}" + |
| | | " </if> " + |
| | | "t.community_id = #{partyCommitteeVO.communityId} \n" + |
| | | "</script>") |
| | | IPage<PartyCommitteeVO> pagePartyOrganization(Page page, @Param("partyCommitteeVO") PartyCommitteeVO partyCommitteeVO); |
| | | |
| | | @Select("select * from sys_user where phone=#{phone} and type=1") |
| | | SysUserVO getSysUserByPhone(@Param("phone")String phone); |
| | | |
| | | @Update("update sys_user u set u.phone=#{newphone} where u.phone=#{oldphone}") |
| | | void updateUserPhone(@Param("newphone")String newphone,@Param("oldphone")String oldphone); |
| | | |
| | | @Select("select * from com_pb_member_role where id=#{id}") |
| | | PartyCommitteeVO selectPartyCommitteeById(@Param("id")Long id); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbOrgDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | |
| | | **/ |
| | | @Mapper |
| | | public interface ComPbOrgDAO extends BaseMapper<ComPbOrgDO> { |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.ComPbServiceTeamVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyCommitteeVO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbServiceTeamDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | " </if> " + |
| | | "</script>") |
| | | IPage<ComPbServiceTeamVO> PageComPbServiceTeamDTO(Page page, @Param("pageComPbServiceTeamDTO") PageComPbServiceTeamDTO pageComPbServiceTeamDTO); |
| | | @Select("select * from com_pb_service_team where id=#{id}") |
| | | ComPbServiceTeamDO selectComPbServiceTeamById(@Param("id")Long id); |
| | | } |
| | |
| | | private Long memberId; |
| | | |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 头像图片路径 |
| | | */ |
| | | private String photoPath; |
| | | |
| | | /** |
| | | * 报名时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 动态分类:1-党建动态 2-党员帮扶 3-党员示范 |
| | | */ |
| | | private Integer dynType; |
| | | |
| | | /** |
| | | * 封面模式:1-小图展示 2-大图展示 |
| | | */ |
| | | private Integer coverMode; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 党员id |
| | | * 电话 |
| | | */ |
| | | private Long memberId; |
| | | private String phone; |
| | | |
| | | /** |
| | | * 党员身份id |
| | | /** |
| | | * 是否注册 |
| | | */ |
| | | private Long roleId; |
| | | private Integer isReg; |
| | | |
| | | /** |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 性别 |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 出生日期 |
| | | */ |
| | | private Date birthTime; |
| | | |
| | | /** |
| | | * 职位 |
| | | */ |
| | | private String position; |
| | | |
| | | /** |
| | | * 岗位职责 |
| | | */ |
| | | private String jobResponsibilities; |
| | | |
| | | /** |
| | | * 头像图片路径 |
| | | */ |
| | | private String photoPath; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | private Long communityId; |
| | | } |
| | |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | /** |
| | | * 状态 1 启用 2 禁用 |
| | | */ |
| | | private Integer status; |
| | | } |
| | |
| | | * 职位 |
| | | */ |
| | | private String job; |
| | | /** |
| | | * 岗位职责 |
| | | */ |
| | | private String jobResponsibilities; |
| | | |
| | | /** |
| | | * 照片 |
| | |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 电话 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 是否注册 |
| | | */ |
| | | private Integer isReg; |
| | | } |
| | |
| | | package com.panzhihua.service_dangjian.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyOrganizationVO; |
| | | |
| | | import java.util.List; |
| | |
| | | **/ |
| | | public interface PartyOrganizationService { |
| | | /** |
| | | * 平台所有党组织 |
| | | * 平台所有启用的党组织 |
| | | * @return 党组织集合 |
| | | */ |
| | | List<PartyOrganizationVO> listPartyOrganization(Long communityId); |
| | | /** |
| | | * 平台所有的党组织 |
| | | * @return 党组织集合 |
| | | */ |
| | | List<PartyOrganizationVO> listPartyOrganizationAll(Long communityId); |
| | | /** |
| | | * 新增党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 新增结果 |
| | | */ |
| | | R addPartyOrganization(PartyOrganizationVO partyOrganizationVO); |
| | | /** |
| | | * 编辑党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | R updatePartyOrganization(PartyOrganizationVO partyOrganizationVO); |
| | | |
| | | /** |
| | | * 启用,禁用党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | R resetPartyOrganization(PartyOrganizationVO partyOrganizationVO); |
| | | /** |
| | | * 删除党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | R deletePartyOrganization(PartyOrganizationVO partyOrganizationVO); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.partybuilding.PageActivityMembersVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingActivityVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_dangjian.dao.ComBpActivityDAO; |
| | | import com.panzhihua.service_dangjian.dao.ComPbActivityMemberDAO; |
| | | import com.panzhihua.service_dangjian.dao.ComPbMemberDAO; |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<PageActivityMembersVO> iPage = comPbActivityMemberDAO.pageActivityMembers(page, pageActivityMembersVO); |
| | | iPage.getRecords().forEach(record->{ |
| | | record.setPhone(SensitiveUtil.desensitizedPhoneNumber(record.getPhone())); |
| | | }); |
| | | Map<String,Object> map=new HashMap<>(3); |
| | | ComPbActivityDO comPbActivityDO = comBpActivityDAO.selectById(activityId); |
| | | map.put("page",iPage); |
| | |
| | | } |
| | | PartyBuildingActivityVO partyBuildingActivityVO = new PartyBuildingActivityVO(); |
| | | BeanUtils.copyProperties(comPbActivityDO, partyBuildingActivityVO); |
| | | List<ComPbActivityMemberDO> comPbActivityMemberDOS = comPbActivityMemberDAO.selectList(new QueryWrapper<ComPbActivityMemberDO>().lambda().eq(ComPbActivityMemberDO::getActivityId, id).orderByDesc(ComPbActivityMemberDO::getCreateAt)); |
| | | |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOS = new ArrayList<>(); |
| | | List<ComPbActivityMemberDO> comPbActivityMemberDOS = comPbActivityMemberDAO.selectList(new QueryWrapper<ComPbActivityMemberDO>().lambda().eq(ComPbActivityMemberDO::getActivityId, id).orderByDesc(ComPbActivityMemberDO::getCreateAt)); |
| | | if (!ObjectUtils.isEmpty(comPbActivityMemberDOS)) { |
| | | int size = comPbActivityMemberDOS.size(); |
| | | if (size>=6) { |
| | | comPbActivityMemberDOS = comPbActivityMemberDOS.subList(0,6); |
| | | } |
| | | comPbActivityMemberDOS.forEach(member->{ |
| | | PartyBuildingMemberVO partyBuildingMemberVO = new PartyBuildingMemberVO(); |
| | | BeanUtils.copyProperties(member, partyBuildingMemberVO); |
| | | partyBuildingMemberVO.setCreateAt(member.getCreateAt()); |
| | | partyBuildingMemberVOS.add(partyBuildingMemberVO); |
| | | }); |
| | | partyBuildingActivityVO.setParticipationActualNum(comPbActivityMemberDOS.size()); |
| | | }else{ |
| | | partyBuildingActivityVO.setParticipationActualNum(0); |
| | | } |
| | | //List<ComPbActivityMemberDO> comPbActivityMemberDOS = comPbActivityMemberDAO.selectList(new QueryWrapper<ComPbActivityMemberDO>().lambda().eq(ComPbActivityMemberDO::getActivityId, id).orderByDesc(ComPbActivityMemberDO::getCreateAt)); |
| | | /* List<PartyBuildingMemberVO> partyBuildingMemberVOS = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(comPbActivityMemberDOS)) { |
| | | List<Long> collect = comPbActivityMemberDOS.stream().map(ComPbActivityMemberDO::getMemberId).collect(Collectors.toList()); |
| | | int size = collect.size(); |
| | |
| | | partyBuildingActivityVO.setParticipationActualNum(size); |
| | | } else { |
| | | partyBuildingActivityVO.setParticipationActualNum(0); |
| | | } |
| | | }*/ |
| | | ComPbActivityMemberDO comPbActivityMemberDO=comPbActivityMemberDAO.selectByUserIdActivityId(id,userId); |
| | | if (ObjectUtils.isEmpty(comPbActivityMemberDO)) { |
| | | partyBuildingActivityVO.setIsSign(0); |
| | |
| | | @Override |
| | | public R listActivity(Long userId, Long communityId) { |
| | | List<ComActActivityVO> comActActivityVOS = new ArrayList<>(); |
| | | Long memberId=comPbActivityMemberDAO.selectMemberIdByUserId(userId,communityId); |
| | | /*Long memberId=comPbActivityMemberDAO.selectMemberIdByUserId(userId,communityId); |
| | | if (ObjectUtils.isEmpty(memberId)) { |
| | | return R.fail(); |
| | | } |
| | | List<ComPbActivityMemberDO> comPbActivityMemberDOS = comPbActivityMemberDAO.selectList(new QueryWrapper<ComPbActivityMemberDO>().lambda().eq(ComPbActivityMemberDO::getMemberId, memberId)); |
| | | }*/ |
| | | List<ComPbActivityMemberDO> comPbActivityMemberDOS = comPbActivityMemberDAO.selectList(new QueryWrapper<ComPbActivityMemberDO>().lambda().eq(ComPbActivityMemberDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comPbActivityMemberDOS)) { |
| | | return R.fail(); |
| | | } |
| | |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOS = new ArrayList<>(); |
| | | List<ComPbActivityMemberDO> comPbActivityMemberDOS = comPbActivityMemberDAO.selectList(new QueryWrapper<ComPbActivityMemberDO>().lambda().eq(ComPbActivityMemberDO::getActivityId, id).orderByDesc(ComPbActivityMemberDO::getCreateAt)); |
| | | if (!ObjectUtils.isEmpty(comPbActivityMemberDOS)) { |
| | | comPbActivityMemberDOS.forEach(member->{ |
| | | PartyBuildingMemberVO partyBuildingMemberVO = new PartyBuildingMemberVO(); |
| | | BeanUtils.copyProperties(member, partyBuildingMemberVO); |
| | | partyBuildingMemberVO.setCreateAt(member.getCreateAt()); |
| | | partyBuildingMemberVOS.add(partyBuildingMemberVO); |
| | | }); |
| | | } |
| | | /*if (!ObjectUtils.isEmpty(comPbActivityMemberDOS)) { |
| | | List<Long> collect = comPbActivityMemberDOS.stream().map(ComPbActivityMemberDO::getMemberId).collect(Collectors.toList()); |
| | | List<ComPbMemberDO> comPbMemberDOS = comPbMemberDAO.selectList(new QueryWrapper<ComPbMemberDO>().lambda().in(ComPbMemberDO::getId, collect)); |
| | | comPbMemberDOS.forEach(comPbMemberDO -> { |
| | |
| | | partyBuildingMemberVO.setCreateAt(comPbActivityMemberDO1.getCreateAt()); |
| | | partyBuildingMemberVOS.add(partyBuildingMemberVO); |
| | | }); |
| | | } |
| | | }*/ |
| | | return R.ok(partyBuildingMemberVOS); |
| | | } |
| | | |
| | |
| | | ComPbActivityMemberDO comPbActivityMemberDO1=new ComPbActivityMemberDO(); |
| | | comPbActivityMemberDO1.setActivityId(id); |
| | | comPbActivityMemberDO1.setMemberId(comPbMemberDO.getId()); |
| | | comPbActivityMemberDO1.setUserId(userId); |
| | | //添加参加活动的党员快照信息,防止党员信息删除后无法显示 |
| | | comPbActivityMemberDO1.setName(comPbMemberDO.getName()); |
| | | comPbActivityMemberDO1.setPhotoPath(comPbMemberDO.getPhotoPath()); |
| | | comPbActivityMemberDO1.setCreateAt(new Date()); |
| | | mum=comPbActivityMemberDAO.insert(comPbActivityMemberDO1); |
| | | } else { |
| | |
| | | import com.panzhihua.common.exceptions.PartyBuildingMemberException; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.utlis.RichTextUtil; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_dangjian.dao.*; |
| | | import com.panzhihua.service_dangjian.model.dos.*; |
| | | import com.panzhihua.service_dangjian.service.ComPbMemberService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<PartyBuildingMemberVO> iPage=comPbMemberDAO.pagePartyOrganization(page, pagePartyOrganizationVO); |
| | | iPage.getRecords().forEach(record->{ |
| | | record.setIdCard(SensitiveUtil.desensitizedIdNumber(record.getIdCard())); |
| | | }); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public R listPartyMember(Long communityId) { |
| | | // List<ComPbMemberDO> comPbMemberDOS = comPbMemberDAO.selectList(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getCommunityId,communityId)); |
| | | List<ComPbMemberDO> comPbMemberDOS = comPbMemberDAO.selectList(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getCommunityId,communityId)); |
| | | // 查询社区所有已经注册的党员 |
| | | // 排除掉已经成为党委的党员 |
| | | List<ComPbMemberDO> comPbMemberDOS = comPbMemberDAO.selectListRegister(communityId); |
| | | if (ObjectUtils.isEmpty(comPbMemberDOS)) { |
| | | return R.ok(new ArrayList<>()); |
| | | } |
| | | // List<ComPbMemberDO> comPbMemberDOS = comPbMemberDAO.selectListRegister(communityId); |
| | | // if (ObjectUtils.isEmpty(comPbMemberDOS)) { |
| | | // return R.ok(new ArrayList<>()); |
| | | // } |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOS=new ArrayList<>(); |
| | | comPbMemberDOS.forEach(comPbMemberDO -> { |
| | | PartyBuildingMemberVO partyBuildingMemberVO=new PartyBuildingMemberVO(); |
| | |
| | | */ |
| | | @Override |
| | | public R addPartyCommittee(PartyCommitteeVO partyCommitteeVO) { |
| | | Long partyMemberId = partyCommitteeVO.getPartyMemberId(); |
| | | if (null==partyMemberId||0==partyMemberId) { |
| | | return R.fail("党员id不能为空"); |
| | | } |
| | | ComPbMemberRoleDO comPbMemberRoleDO1 = comPbMemberRoleDAO.selectOne(new QueryWrapper<ComPbMemberRoleDO>().lambda().eq(ComPbMemberRoleDO::getMemberId, partyMemberId)); |
| | | if (!ObjectUtils.isEmpty(comPbMemberRoleDO1)) { |
| | | return R.fail("党员身份已经存在"); |
| | | } |
| | | ComPbMemberRoleDO comPbMemberRoleDO=new ComPbMemberRoleDO(); |
| | | comPbMemberRoleDO.setCommunityId(partyCommitteeVO.getCommunityId()); |
| | | comPbMemberRoleDO.setMemberId(partyMemberId); |
| | | comPbMemberRoleDO.setRoleId(partyCommitteeVO.getRoleId()); |
| | | BeanUtils.copyProperties(partyCommitteeVO,comPbMemberRoleDO); |
| | | comPbMemberRoleDO.setCreateAt(new Date()); |
| | | comPbMemberRoleDO.setUpdateAt(new Date()); |
| | | comPbMemberRoleDO.setIsReg(2); |
| | | SysUserVO sysUser = comPbMemberRoleDAO.getSysUserByPhone(partyCommitteeVO.getPhone()); |
| | | if(!ObjectUtils.isEmpty(sysUser)) { |
| | | comPbMemberRoleDO.setIsReg(1); |
| | | } |
| | | int insert = comPbMemberRoleDAO.insert(comPbMemberRoleDO); |
| | | if (insert>0) { |
| | | return R.ok(); |
| | |
| | | @Override |
| | | public R updatePartyCommittee(PartyCommitteeVO partyCommitteeVO) { |
| | | ComPbMemberRoleDO comPbMemberRoleDO=new ComPbMemberRoleDO(); |
| | | comPbMemberRoleDO.setCommunityId(partyCommitteeVO.getCommunityId()); |
| | | comPbMemberRoleDO.setMemberId(partyCommitteeVO.getPartyMemberId()); |
| | | comPbMemberRoleDO.setRoleId(partyCommitteeVO.getRoleId()); |
| | | comPbMemberRoleDO.setId(partyCommitteeVO.getId()); |
| | | BeanUtils.copyProperties(partyCommitteeVO,comPbMemberRoleDO); |
| | | ComPbMemberRoleDO comPbMemberRoleDOOld = comPbMemberRoleDAO.selectById(partyCommitteeVO.getId()); |
| | | comPbMemberRoleDO.setCreateAt(comPbMemberRoleDOOld.getCreateAt()); |
| | | comPbMemberRoleDO.setUpdateAt(new Date()); |
| | | comPbMemberRoleDO.setIsReg(2); |
| | | PartyCommitteeVO oldPartyCommitteeVO = comPbMemberRoleDAO.selectPartyCommitteeById(partyCommitteeVO.getId()); |
| | | String oldphone = oldPartyCommitteeVO.getPhone(); |
| | | SysUserVO sysUserOld = comPbMemberRoleDAO.getSysUserByPhone(oldphone); |
| | | String newphone=partyCommitteeVO.getPhone(); |
| | | SysUserVO sysUserNew = comPbMemberRoleDAO.getSysUserByPhone(newphone); |
| | | if(!ObjectUtils.isEmpty(sysUserOld)||!ObjectUtils.isEmpty(sysUserNew)) { |
| | | comPbMemberRoleDO.setIsReg(1); |
| | | } |
| | | if(!newphone.equals(oldphone)) { |
| | | comPbMemberRoleDAO.updateUserPhone(newphone, oldphone); |
| | | } |
| | | int update = comPbMemberRoleDAO.updateById(comPbMemberRoleDO); |
| | | if (update>0) { |
| | | return R.ok(); |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<PartyCommitteeVO> iPage=comPbMemberRoleDAO.pagePartyOrganization(page, partyCommitteeVO); |
| | | iPage.getRecords().forEach(record->{ |
| | | record.setPhone(SensitiveUtil.desensitizedPhoneNumber(record.getPhone())); |
| | | }); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | log.info("定时任务更新党建动态发布状态数量【{}】",num); |
| | | return R.ok(num); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.ComPbServiceTeamVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.service_dangjian.dao.ComPbMemberRoleDAO; |
| | | import com.panzhihua.service_dangjian.dao.ComPbServiceTeamDAO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbServiceTeamDO; |
| | | import com.panzhihua.service_dangjian.service.ComPbServiceTeamService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | public class ComPbServiceTeamServiceImpl implements ComPbServiceTeamService { |
| | | @Resource |
| | | private ComPbServiceTeamDAO comPbServiceTeamDAO; |
| | | @Resource |
| | | private ComPbMemberRoleDAO comPbMemberRoleDAO; |
| | | /** |
| | | * 新增服务团队人员 |
| | | * |
| | |
| | | public R addServiceTeam(ComPbServiceTeamDTO comPbServiceTeamDTO) { |
| | | ComPbServiceTeamDO comPbServiceTeamDO=new ComPbServiceTeamDO(); |
| | | BeanUtils.copyProperties(comPbServiceTeamDTO,comPbServiceTeamDO); |
| | | comPbServiceTeamDO.setIsReg(2); |
| | | SysUserVO sysUser = comPbMemberRoleDAO.getSysUserByPhone(comPbServiceTeamDTO.getPhone()); |
| | | if(!ObjectUtils.isEmpty(sysUser)) { |
| | | comPbServiceTeamDO.setIsReg(1); |
| | | } |
| | | int insert = comPbServiceTeamDAO.insert(comPbServiceTeamDO); |
| | | if (insert>0) { |
| | | return R.ok(); |
| | |
| | | public R putServiceTeam(ComPbServiceTeamDTO comPbServiceTeamDTO) { |
| | | ComPbServiceTeamDO comPbServiceTeamDO=new ComPbServiceTeamDO(); |
| | | BeanUtils.copyProperties(comPbServiceTeamDTO,comPbServiceTeamDO); |
| | | comPbServiceTeamDO.setIsReg(2); |
| | | ComPbServiceTeamDO oldComPbServiceTeam = comPbServiceTeamDAO.selectComPbServiceTeamById(comPbServiceTeamDTO.getId()); |
| | | String oldphone = oldComPbServiceTeam.getPhone(); |
| | | SysUserVO sysUserOld = comPbMemberRoleDAO.getSysUserByPhone(oldphone); |
| | | String newphone=comPbServiceTeamDTO.getPhone(); |
| | | SysUserVO sysUserNew = comPbMemberRoleDAO.getSysUserByPhone(newphone); |
| | | if(!ObjectUtils.isEmpty(sysUserOld)||!ObjectUtils.isEmpty(sysUserNew)) { |
| | | comPbServiceTeamDO.setIsReg(1); |
| | | } |
| | | if(!newphone.equals(oldphone)) { |
| | | comPbMemberRoleDAO.updateUserPhone(newphone, oldphone); |
| | | } |
| | | comPbServiceTeamDAO.updateById(comPbServiceTeamDO); |
| | | return R.ok(); |
| | | } |
| | |
| | | package com.panzhihua.service_dangjian.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyOrganizationVO; |
| | | import com.panzhihua.service_dangjian.dao.ComPbMemberDAO; |
| | | import com.panzhihua.service_dangjian.dao.ComPbOrgDAO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbMemberDO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbOrgDO; |
| | | import com.panzhihua.service_dangjian.service.PartyOrganizationService; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | **/ |
| | | @Service |
| | | public class PartyOrganizationServiceImpl implements PartyOrganizationService { |
| | | @Resource |
| | | private ComPbOrgDAO comPbOrgDAO; |
| | | /** |
| | | * 平台所有党组织 |
| | | * |
| | | * @return 党组织集合 |
| | | */ |
| | | @Override |
| | | public List<PartyOrganizationVO> listPartyOrganization(Long communityId) { |
| | | List<PartyOrganizationVO> partyOrganizationVOS=new ArrayList<>(); |
| | | List<ComPbOrgDO> comPbOrgDOS = comPbOrgDAO.selectList(new QueryWrapper<ComPbOrgDO>().lambda().eq(ComPbOrgDO::getCommunityId,communityId)); |
| | | if (!ObjectUtils.isEmpty(comPbOrgDOS)) { |
| | | comPbOrgDOS.forEach(comPbOrgDO -> { |
| | | PartyOrganizationVO partyOrganizationVO=new PartyOrganizationVO(); |
| | | partyOrganizationVO.setId(comPbOrgDO.getId()); |
| | | partyOrganizationVO.setName(comPbOrgDO.getName()); |
| | | partyOrganizationVOS.add(partyOrganizationVO); |
| | | }); |
| | | } |
| | | return partyOrganizationVOS; |
| | | } |
| | | @Resource |
| | | private ComPbOrgDAO comPbOrgDAO; |
| | | @Resource |
| | | private ComPbMemberDAO comPbMemberDAO; |
| | | |
| | | /** |
| | | * 社区所有启用的党组织列表 |
| | | * |
| | | * @return 党组织集合 |
| | | */ |
| | | @Override |
| | | public List<PartyOrganizationVO> listPartyOrganization(Long communityId) { |
| | | List<PartyOrganizationVO> partyOrganizationVOS = new ArrayList<>(); |
| | | List<ComPbOrgDO> comPbOrgDOS = comPbOrgDAO.selectList(new QueryWrapper<ComPbOrgDO>().lambda() |
| | | .eq(ComPbOrgDO::getCommunityId, communityId).eq(ComPbOrgDO::getStatus, 1)); |
| | | if (!ObjectUtils.isEmpty(comPbOrgDOS)) { |
| | | comPbOrgDOS.forEach(comPbOrgDO -> { |
| | | PartyOrganizationVO partyOrganizationVO = new PartyOrganizationVO(); |
| | | partyOrganizationVO.setId(comPbOrgDO.getId()); |
| | | partyOrganizationVO.setName(comPbOrgDO.getName()); |
| | | partyOrganizationVO.setStatus(comPbOrgDO.getStatus()); |
| | | partyOrganizationVOS.add(partyOrganizationVO); |
| | | }); |
| | | } |
| | | return partyOrganizationVOS; |
| | | } |
| | | |
| | | /** |
| | | * 社区所有党组织列表 |
| | | * |
| | | * @return 党组织集合 |
| | | */ |
| | | @Override |
| | | public List<PartyOrganizationVO> listPartyOrganizationAll(Long communityId) { |
| | | List<PartyOrganizationVO> partyOrganizationVOS = new ArrayList<>(); |
| | | List<ComPbOrgDO> comPbOrgDOS = comPbOrgDAO |
| | | .selectList(new QueryWrapper<ComPbOrgDO>().lambda().eq(ComPbOrgDO::getCommunityId, communityId)); |
| | | if (!ObjectUtils.isEmpty(comPbOrgDOS)) { |
| | | comPbOrgDOS.forEach(comPbOrgDO -> { |
| | | PartyOrganizationVO partyOrganizationVO = new PartyOrganizationVO(); |
| | | List<ComPbMemberDO> comPbMemberDOs = comPbMemberDAO.selectList( |
| | | new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getOrgId, comPbOrgDO.getId())); |
| | | partyOrganizationVO.setId(comPbOrgDO.getId()); |
| | | partyOrganizationVO.setName(comPbOrgDO.getName()); |
| | | partyOrganizationVO.setStatus(comPbOrgDO.getStatus()); |
| | | partyOrganizationVO.setCountPerson(comPbMemberDOs.size()); |
| | | partyOrganizationVOS.add(partyOrganizationVO); |
| | | }); |
| | | } |
| | | return partyOrganizationVOS; |
| | | } |
| | | |
| | | /** |
| | | * 新增党支部 |
| | | * |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | public R addPartyOrganization(PartyOrganizationVO partyOrganizationVO) { |
| | | ComPbOrgDO comPbOrgDO = new ComPbOrgDO(); |
| | | BeanUtils.copyProperties(partyOrganizationVO, comPbOrgDO); |
| | | comPbOrgDO.setLevel(1); |
| | | comPbOrgDO.setParentId(0L); |
| | | int insert = comPbOrgDAO.insert(comPbOrgDO); |
| | | if (insert > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑党支部 |
| | | * |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | @Override |
| | | public R updatePartyOrganization(PartyOrganizationVO partyOrganizationVO) { |
| | | ComPbOrgDO comPbOrgDO = new ComPbOrgDO(); |
| | | BeanUtils.copyProperties(partyOrganizationVO, comPbOrgDO); |
| | | comPbOrgDO.setLevel(1); |
| | | comPbOrgDO.setParentId(0L); |
| | | int insert = comPbOrgDAO.updateById(comPbOrgDO); |
| | | if (insert > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 启用,禁用党支部 |
| | | * |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | @Override |
| | | public R resetPartyOrganization(PartyOrganizationVO partyOrganizationVO) { |
| | | ComPbOrgDO comPbOrgDO = comPbOrgDAO.selectById(partyOrganizationVO.getId()); |
| | | if (ObjectUtils.isEmpty(comPbOrgDO)) { |
| | | return R.fail("没有此党支部"); |
| | | } |
| | | comPbOrgDO.setStatus(partyOrganizationVO.getStatus()); |
| | | int insert = comPbOrgDAO.updateById(comPbOrgDO); |
| | | if (insert > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 删除党支部 |
| | | * |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | | * @return 编辑结果 |
| | | */ |
| | | @Override |
| | | public R deletePartyOrganization(PartyOrganizationVO partyOrganizationVO) { |
| | | List<ComPbMemberDO> comPbMemberDOs = comPbMemberDAO.selectList( |
| | | new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getOrgId, partyOrganizationVO.getId())); |
| | | if (!CollectionUtils.isEmpty(comPbMemberDOs) && comPbMemberDOs.size() > 0) { |
| | | return R.fail("该党组织下已有党员,不能删除!"); |
| | | } |
| | | int insert = comPbOrgDAO.deleteById(partyOrganizationVO.getId()); |
| | | if (insert > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | } |
| | |
| | | "<if test='pageFeedBackDTO.nickName != null and pageFeedBackDTO.nickName.trim() != ""'>" + |
| | | "and u.nick_name=#{pageFeedBackDTO.nickName}\n" + |
| | | " </if> " + |
| | | "<if test='pageFeedBackDTO.phone != null and pageFeedBackDTO.phone.trim() != ""'>" + |
| | | "and u.phone=#{pageFeedBackDTO.phone}\n" + |
| | | " </if> " + |
| | | "join com_act c on u.community_id=c.community_id\n" + |
| | | "order by f.create_at desc\n" + |
| | | "</script>") |
| | |
| | | @Select("SELECT \n" + |
| | | "COUNT(DISTINCT u.user_id)allUser,\n" + |
| | | "(select COUNT(m.id) from com_mng_volunteer_mng m where m.community_id=#{communityId} and m.`state`=2)volunteerUser,\n" + |
| | | "COUNT(case when u.is_partymember=1 then u.user_id else null end )partymemberUser,\n" + |
| | | "COUNT(DISTINCT case when u.is_partymember=1 then u.user_id else null end )partymemberUser,\n" + |
| | | "COUNT(h.id)house\n" + |
| | | "FROM\n" + |
| | | "sys_user u\n" + |
| | |
| | | " </if> " + |
| | | "</script>") |
| | | List<EexcelUserDTO> selectExport(@Param("exportUserDTO") ExportUserDTO exportUserDTO); |
| | | |
| | | @Select("SELECT\n" + |
| | | "\t COUNT(a.id)\n" + |
| | | "FROM\n" + |
| | | "\t com_pb_member_role a \n" + |
| | | "WHERE\n" + |
| | | "\t a.phone = #{phone}") |
| | | Integer selectCountMemberRole(@Param("phone")String phone); |
| | | |
| | | @Select("SELECT\n" + |
| | | "\t COUNT(a.id)\n" + |
| | | "FROM\n" + |
| | | "\t com_pb_service_team a \n" + |
| | | "WHERE\n" + |
| | | "\t a.phone = #{phone}") |
| | | Integer selectCountTeam(@Param("phone")String phone); |
| | | |
| | | |
| | | @Update("update com_pb_member_role u set u.phone=#{newphone},is_reg=1 where u.phone=#{oldphone}") |
| | | void updateMemberRole(@Param("newphone")String newphone,@Param("oldphone")String oldphone); |
| | | @Update("update com_pb_service_team u set u.phone=#{newphone},is_reg=1 where u.phone=#{oldphone}") |
| | | void updateServiceTeam(@Param("newphone")String newphone,@Param("oldphone")String oldphone); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.utlis.IdCard; |
| | | import com.panzhihua.common.utlis.RealNameUtil; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_user.dao.*; |
| | | import com.panzhihua.service_user.model.dos.*; |
| | | import com.panzhihua.service_user.model.dtos.DataKanbanDTO; |
| | |
| | | SysUserDO sysUserDO = new SysUserDO(); |
| | | sysUserDO.setPhone(purePhoneNumber); |
| | | sysUserDO.setUserId(userId); |
| | | userDao.updateMemberRole(purePhoneNumber, purePhoneNumber); |
| | | userDao.updateServiceTeam(purePhoneNumber, purePhoneNumber); |
| | | int i = userDao.updateById(sysUserDO); |
| | | if (i > 0) { |
| | | return R.ok(); |
| | |
| | | }); |
| | | loginUserInfoVO.setRoles(set); |
| | | } |
| | | loginUserInfoVO.setIsmemberrole(2); |
| | | // 志愿者状态 |
| | | String phone = sysUserDO.getPhone(); |
| | | if (!ObjectUtils.isEmpty(phone)) { |
| | |
| | | }else{ |
| | | int state = comMngVolunteerMngVO.getState().intValue(); |
| | | loginUserInfoVO.setVolunteerStatus(state); |
| | | } |
| | | Integer countTeam = userDao.selectCountTeam(phone); |
| | | Integer selectCountMemberRole = userDao.selectCountMemberRole(phone); |
| | | if(countTeam!=null&&countTeam>0) { |
| | | loginUserInfoVO.setIsmemberrole(1); |
| | | }else if(selectCountMemberRole!=null&&selectCountMemberRole>0) { |
| | | loginUserInfoVO.setIsmemberrole(1); |
| | | } |
| | | } |
| | | return R.ok(loginUserInfoVO); |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<LoginUserInfoVO> iPage = userDao.pageUser(page, loginUserInfoVO); |
| | | iPage.getRecords().forEach(record->{ |
| | | record.setPhone(SensitiveUtil.desensitizedPhoneNumber(record.getPhone())); |
| | | record.setIdCard(SensitiveUtil.desensitizedIdNumber(record.getIdCard())); |
| | | }); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | } |
| | | Integer isRent = sysUserInputDO1.getIsRent(); |
| | | ComMngFamilyInfoVO comMngFamilyInfoVO=new ComMngFamilyInfoVO(); |
| | | comMngFamilyInfoVO.setIdCard(sysUserInputDO1.getIdCard()); |
| | | comMngFamilyInfoVO.setIdCard(SensitiveUtil.desensitizedIdNumber(sysUserInputDO1.getIdCard())); |
| | | comMngFamilyInfoVO.setName(name); |
| | | comMngFamilyInfoVO.setPhone(sysUserInputDO1.getPhone()); |
| | | comMngFamilyInfoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(sysUserInputDO1.getPhone())); |
| | | if (isRent.intValue()==0) { |
| | | comMngFamilyInfoVO.setRelationship("家人"); |
| | | }else{ |
| | |
| | | if (!ObjectUtils.isEmpty(comActVO)) { |
| | | loginUserInfoVO.setCommunityName(comActVO.getName()); |
| | | } |
| | | loginUserInfoVO.setIdCard(SensitiveUtil.desensitizedIdNumber(loginUserInfoVO.getIdCard())); |
| | | loginUserInfoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(loginUserInfoVO.getPhone())); |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | |
| | |
| | | SysUserDO sysUserDO=new SysUserDO(); |
| | | sysUserDO.setUserId(userPhoneVO.getUserId()); |
| | | sysUserDO.setPhone(newPhone); |
| | | userDao.updateMemberRole(newPhone, oldPhone); |
| | | userDao.updateServiceTeam(newPhone, oldPhone); |
| | | int update = userDao.updateById(sysUserDO); |
| | | if (update>0) { |
| | | |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | List<EexcelUserDTO> eexcelUserDTOS=userDao.selectExport(exportUserDTO); |
| | | return R.ok(eexcelUserDTOS); |
| | | } |
| | | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | // String encode = new BCryptPasswordEncoder().encode("lbsq123456"); |
| | | // System.out.println(encode); |
| | |
| | | import com.panzhihua.common.model.vos.MenuVO;
|
| | | import com.panzhihua.common.model.vos.R;
|
| | | import com.panzhihua.common.service.user.UserService;
|
| | |
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | |
|
| | | import org.springframework.data.redis.core.StringRedisTemplate;
|
| | | import org.springframework.data.redis.core.ValueOperations;
|
| | | import org.springframework.security.access.ConfigAttribute;
|