Merge remote-tracking branch 'origin/test_bak' into test_bak
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActFourMemberVO; |
| | | 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; |
| | | |
| | | /** |
| | | * (ComActFourMember)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-23 10:13:31 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"四长四员"}) |
| | | @RestController |
| | | @RequestMapping("comActFourMember") |
| | | public class ComActFourMemberApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询",response = ComActFourMemberVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | commonPage.setStatus(1); |
| | | return this.communityService.comActFourMemberSelectAll(commonPage); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyHelpVO; |
| | | import com.panzhihua.common.service.property.PropertyService; |
| | | 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; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * (ComPropertyHelp)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 16:43:12 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"一件求助人员"}) |
| | | @RestController |
| | | @RequestMapping("/comPropertyHelp") |
| | | public class ComPropertyHelpApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private PropertyService propertyService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询所有数据",response = ComPropertyVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.propertyService.comPropertyHelpSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "主键查询") |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Serializable id) { |
| | | return this.propertyService.comPropertyHelpSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyHelp 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation(value = "新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyHelpVO comPropertyHelp) { |
| | | comPropertyHelp.setCommunityId(this.getCommunityId()); |
| | | comPropertyHelp.setCreateTime(DateUtil.date()); |
| | | return this.propertyService.comPropertyHelpInsert(comPropertyHelp); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyHelp 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation(value = "修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyHelpVO comPropertyHelp) { |
| | | return this.propertyService.comPropertyHelpUpdate(comPropertyHelp); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation(value = "删除数据") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.propertyService.comPropertyHelpDelete(id); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public R pageArea(@RequestBody ComMngStructAreaVO comMngStructAreaVO) { |
| | | return communityService.pageArea(comMngStructAreaVO); |
| | | } |
| | | @ApiOperation(value = "新分页查询小区", response = ComMngVillageVO.class) |
| | | @PostMapping("pagevillage") |
| | | public R pageVillage(@RequestBody PageComMngVillageDTO pageComMngVillageDTO) { |
| | | return communityService.pageVillage(pageComMngVillageDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取社区动态", response = ComActDynVO.class) |
| | | @PostMapping("pagedynamic") |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Objects; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | 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.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductLevelInfoVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "分页查询便民服务商家", response = ComCvtBusinessVO.class) |
| | | @PostMapping("/business/area/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO) { |
| | |
| | | return communityService.pageComCvtBusinessByServiceArea(comCvtBusinessAppletsDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "查询便民服务商家详情", response = ComCvtBusinessDetailVO.class) |
| | | @GetMapping("/business/get") |
| | | public R getComCvtBusinessServeDetail(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtBusinessServeDetail(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取商家数量大于0的服务类型", response = ConvenientServiceCategoryVO.class) |
| | | @GetMapping("/service-category/suitable") |
| | | public R getSuitableServiceCategories(@RequestParam("communityId") Long communityId) { |
| | | if (Objects.isNull(communityId)) { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | return communityService.getSuitableServiceCategories(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取热门商家", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/merchant/popular") |
| | | public R getPopularMerchants(@RequestBody @Valid PagePopularMerchantDTO pagePopularMerchantDTO) { |
| | | return communityService.getPopularMerchants(pagePopularMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取服务类型下商家", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/merchant/classify") |
| | | public R getClassifyMerchants(@RequestBody @Valid PageClassifyMerchantDTO pageClassifyMerchantDTO) { |
| | | return communityService.getClassifyMerchants(pageClassifyMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "商家详情", response = ConvenientMerchantVO.class) |
| | | @GetMapping("/merchant/detail") |
| | | public R getMerchantDetail(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.getMerchantDetail(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取商家产品", response = ConvenientProductLevelInfoVO.class) |
| | | @GetMapping("/product/list") |
| | | public R getMerchantProduct(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.getMerchantProduct(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取产品详情", response = ConvenientProductVO.class) |
| | | @GetMapping("/product/detail") |
| | | public R getProductDetail(@RequestParam("productId") Long productId) { |
| | | return communityService.getProductDetail(productId); |
| | | } |
| | | |
| | | @ApiOperation(value = "商家分页搜索", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/merchant/search") |
| | | public R pageSearchMerchant(@RequestBody @Valid PageSearchDTO pageSearchDTO) { |
| | | return communityService.pageSearchMerchant(pageSearchDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "商品分页搜索", response = ConvenientProductVO.class) |
| | | @PostMapping("/product/search") |
| | | public R pageSearchProduct(@RequestBody @Valid PageSearchDTO pageSearchDTO) { |
| | | return communityService.pageSearchProduct(pageSearchDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "增加商家咨询量") |
| | | @GetMapping("/merchant/incr-consult") |
| | | public R incrMerchantConsult(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.consultMerchant(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "增加商家浏览量") |
| | | @GetMapping("/merchant/incr-view") |
| | | public R incrMerchantView(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.incrMerchantView(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "增加产品浏览量") |
| | | @GetMapping("/product/incr-view") |
| | | public R incrProductView(@RequestParam("productId") Long productId) { |
| | | return communityService.incrProductView(productId); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.DiscussVoteOptionDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | |
| | | if (ObjectUtils.isEmpty(discussOptions)) { |
| | | return R.fail("选项不能为空"); |
| | | } |
| | | if (discussOptions.size() < 2) { |
| | | return R.fail("请至少设置两个投票选项"); |
| | | } |
| | | //设置投票开始时间 nowDate |
| | | comActDiscussDTO.setStartTime(DateUtils.format(new Date(), DateUtils.ymdhms_format)); |
| | | } |
| | | String address = comActDiscussDTO.getAddress(); |
| | | if (ObjectUtils.isEmpty(address)) { |
| | |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | comActDiscussDTO.setUserId(userId); |
| | | comActDiscussDTO.setCommunityId(communityId); |
| | | comActDiscussDTO.setIsApplets(true); |
| | | comActDiscussDTO.setLoginUserInfo(loginUserInfo); |
| | | return communityService.addDiscuss(comActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-分页查询", response = ComActDiscussVO.class) |
| | | @PostMapping("pagediscuss") |
| | | public R pageDiscuss(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) { |
| | | if (Objects.isNull(pageComActDiscussDTO.getType())) { |
| | | return R.fail("查询类型不能为空"); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | pageComActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-投票") |
| | | @GetMapping("discussoptionuser") |
| | | @ApiImplicitParam(name = "id", value = "一起议选项主键", required = true) |
| | | public R addDiscussOptionUser(@RequestParam("id") Long id) { |
| | | if (null == id || 0 == id) { |
| | | @PostMapping("discussoptionuser") |
| | | public R addDiscussOptionUser(@RequestBody @Valid DiscussVoteOptionDTO discussVoteOptionDTO) { |
| | | List<Long> optionIds = discussVoteOptionDTO.getOptionIds(); |
| | | if (optionIds.isEmpty()) { |
| | | return R.fail("选项主键不能为空"); |
| | | } |
| | | ComActDiscussOptionUserDTO comActDiscussOptionUserDTO = new ComActDiscussOptionUserDTO(); |
| | | comActDiscussOptionUserDTO.setDiscussOptionId(id); |
| | | comActDiscussOptionUserDTO.setDiscussOptionIds(optionIds); |
| | | comActDiscussOptionUserDTO.setUserId(this.getUserId()); |
| | | // 议事投票计算积分 |
| | | AddComActIntegralUserDTO integralUserDTO = new AddComActIntegralUserDTO(id, |
| | | AddComActIntegralUserDTO.integralType.cyystp, this.getCommunityId(), this.getUserId()); |
| | | integralUserDTO.setIsComment(2); |
| | | communityService.addIntegralTradeAdmin(integralUserDTO); |
| | | optionIds.forEach(optionId -> { |
| | | // 议事投票计算积分 |
| | | AddComActIntegralUserDTO integralUserDTO = new AddComActIntegralUserDTO(optionId, |
| | | AddComActIntegralUserDTO.integralType.cyystp, this.getCommunityId(), this.getUserId()); |
| | | integralUserDTO.setIsComment(2); |
| | | communityService.addIntegralTradeAdmin(integralUserDTO); |
| | | }); |
| | | return communityService.addDiscussOptionUser(comActDiscussOptionUserDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-增加浏览量") |
| | | @PostMapping("discuss/increase-view-num") |
| | | public void increaseViewNum(@RequestParam("discussId") |
| | | @ApiParam(value = "一起议主键id", required = true) |
| | | Long discussId) { |
| | | communityService.increaseViewNum(discussId); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-公布/编辑投票结果") |
| | | @PostMapping("discuss/edit-result") |
| | | public R editDiscussResult(@RequestBody @Validated(PutGroup.class) ComActDiscussDTO comActDiscussDTO) { |
| | | comActDiscussDTO.setUserId(this.getUserId()); |
| | | return communityService.editDiscussResult(comActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-获取是否有发布权限", response = Boolean.class) |
| | | @GetMapping("discuss/permissions") |
| | | public R getDiscussPermissions() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | ComActDiscussDTO comActDiscussDTO = new ComActDiscussDTO(); |
| | | comActDiscussDTO.setLoginUserInfo(loginUserInfo); |
| | | comActDiscussDTO.setIsApplets(true); |
| | | comActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.getDiscussPermissions(comActDiscussDTO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: IdentityAuthApi 身份认证相关API |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 小程序端身份认证相关 |
| | | * @author: hans |
| | | * @date: 2021/09/01 16:00 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/identity-auth") |
| | | @Api(tags = {"身份认证"}) |
| | | public class IdentityAuthApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "查询社区身份认证方式", response = R.class) |
| | | @GetMapping("/mode") |
| | | public R getIdentityAuthMode(@RequestParam(value = "communityId") |
| | | @ApiParam(value = "社区id", required = true) |
| | | Long communityId, |
| | | @RequestParam(value = "identityAuthType") |
| | | @ApiParam(value = "身份认证类型", required = true) |
| | | Integer identityAuthType) { |
| | | return communityService.getIdentityAuthMode(communityId, identityAuthType); |
| | | } |
| | | |
| | | @ApiOperation(value = "身份认证获取EidToken接口") |
| | | @PostMapping("/getEidToken") |
| | | public R getEidToken(@RequestBody @Valid GetIdentityEidTokenDTO getIdentityEidTokenDTO) { |
| | | return communityService.getEidToken(getIdentityEidTokenDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增身份认证") |
| | | @PostMapping("/add") |
| | | public R addIdentityAuth(@RequestBody @Valid AddIdentityAuthDTO addIdentityAuthDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | addIdentityAuthDTO.setSubmitUserId(loginUserInfo.getUserId()); |
| | | addIdentityAuthDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.addIdentityAuth(addIdentityAuthDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询身份认证记录", response = IdentityAuthRecordDetailVO.class) |
| | | @PostMapping("/record/page") |
| | | public R queryRecordWithPage(@RequestBody @Valid PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO) { |
| | | pageIdentityAuthRecordDTO.setSubmitUserId(this.getUserId()); |
| | | return communityService.queryRecordWithPage(pageIdentityAuthRecordDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取身份认证详情", response = IdentityAuthRecordDetailVO.class) |
| | | @GetMapping("/detail") |
| | | public R retrieveIdentityAuthDetail(@RequestParam("authType") |
| | | @ApiParam(value = "身份认证类型(1.高龄认证 2.养老认证)", required = true, allowableValues = "1,2", example = "1") |
| | | Integer authType, |
| | | @RequestParam("identityAuthId") |
| | | @ApiParam(value = "身份认证id", required = true, example = "1") |
| | | Long identityAuthId) { |
| | | return communityService.retrieveIdentityAuthDetail(authType, identityAuthId); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.applets_backstage.config.MinioUtil; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ResetPasswordConvenientMerchantDTO; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | |
| | | 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.dtos.community.ComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientServiceCategoryDTO; |
| | | 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.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtCategoryVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "分页查询便民服务商家", response = ComCvtBusinessVO.class) |
| | | @PostMapping("/business/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessDTO pageComCvtBusinessDTO) { |
| | | return communityService.pageComCvtBusiness(pageComCvtBusinessDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "新增便民服务商家") |
| | | @PostMapping("/business/add") |
| | | public R addComCvtBusiness(@RequestBody ComCvtBusinessDTO comCvtBusinessDTO) { |
| | |
| | | return communityService.addComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区下拉列表", response = ComActVO.class) |
| | | @GetMapping("/community") |
| | | public R listCommunity() { |
| | | return communityService.listCommunityAll(); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "编辑便民服务商家") |
| | | @PutMapping("/business/put") |
| | | public R putComCvtBusiness(@RequestBody ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | return communityService.putComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "查询便民服务商家详情") |
| | | @GetMapping("/business/get") |
| | | public R getComCvtBusiness(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtBusiness(id); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "删除便民服务商家详情") |
| | | @DeleteMapping("/business/delete") |
| | | public R deleteComCvtBusiness(@RequestParam("id") Long id) { |
| | | return communityService.deleteComCvtBusiness(id); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "分页查询便民服务分类", response = ComCvtCategoryVO.class) |
| | | @PostMapping("/category/page") |
| | | public R pageComCvtCategory(@RequestBody PageComCvtCategoryDTO pageComCvtCategoryDTO) { |
| | | return communityService.pageComCvtCategory(pageComCvtCategoryDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "查询便民服务所有分类,下拉框", response = ComCvtCategoryVO.class) |
| | | @PostMapping("/category/all") |
| | | public R allComCvtCategory() { |
| | | return communityService.allComCvtCategory(); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "新增便民服务分类") |
| | | @PostMapping("/category/add") |
| | | public R pageComCvtCategory(@RequestBody ComCvtCategoryDTO comCvtCategoryDTO) { |
| | | return communityService.addComCvtCategory(comCvtCategoryDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "编辑便民服务分类") |
| | | @PutMapping("/category/put") |
| | | public R putComCvtCategory(@RequestBody ComCvtCategoryDTO comCvtCategoryDTO) { |
| | | return communityService.putComCvtCategory(comCvtCategoryDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "查询便民服务分类详情", response = ComCvtCategoryVO.class) |
| | | @GetMapping("/category/get") |
| | | public R getComCvtCategory(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtCategory(id); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "删除便民服务分类信息") |
| | | @DeleteMapping("/category/delete") |
| | | public R deleteComCvtCategory(@RequestParam("id") Long id) { |
| | | return communityService.deleteComCvtCategory(id); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "分页查询便民服务", response = ComCvtServeVO.class) |
| | | @PostMapping("/serve/page") |
| | | public R pageComCvtServe(@RequestBody PageComCvtServeDTO pageComCvtServeDTO) { |
| | | return communityService.pageComCvtServe(pageComCvtServeDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "新增便民服务") |
| | | @PostMapping("/serve/add") |
| | | public R addComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | |
| | | return communityService.addComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "编辑便民服务") |
| | | @PutMapping("/serve/put") |
| | | public R putComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | | return communityService.putComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "查询便民服务详情", response = ComCvtServeVO.class) |
| | | @GetMapping("/serve/get") |
| | | public R getComCvtServe(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtServe(id); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "删除便民服务信息") |
| | | @DeleteMapping("/serve/delete") |
| | | public R deleteComCvtServe(@RequestParam("id") Long id) { |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增便民服务分类") |
| | | @PostMapping("/service-category/add") |
| | | public R addServiceCategory(@RequestBody @Validated(AddGroup.class) ConvenientServiceCategoryDTO convenientServiceCategoryDTO) { |
| | | convenientServiceCategoryDTO.setCreatedBy(this.getUserId()); |
| | | return communityService.addServiceCategory(convenientServiceCategoryDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑便民服务分类") |
| | | @PutMapping("/service-category/put") |
| | | public R putServiceCategory(@RequestBody @Validated(PutGroup.class) ConvenientServiceCategoryDTO convenientServiceCategoryDTO) { |
| | | convenientServiceCategoryDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.putServiceCategory(convenientServiceCategoryDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除便民服务分类") |
| | | @DeleteMapping("/service-category/delete") |
| | | public R deleteServiceCategory(@RequestParam("categoryId") |
| | | @ApiParam(value = "便民服务分类id", required = true) |
| | | Long categoryId) { |
| | | return communityService.deleteServiceCategory(categoryId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务分类详情", response = ConvenientServiceCategoryVO.class) |
| | | @GetMapping("/service-category/get") |
| | | public R getServiceCategory(@RequestParam("categoryId") |
| | | @ApiParam(value = "便民服务分类id", required = true) |
| | | Long categoryId) { |
| | | return communityService.getServiceCategory(categoryId); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询便民服务分类", response = ConvenientServiceCategoryVO.class) |
| | | @PostMapping("/service-category/page") |
| | | public R pageServiceCategory(@RequestBody PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO) { |
| | | return communityService.pageServiceCategory(pageConvenientServiceCategoryDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增便民服务商家") |
| | | @PostMapping("/merchant/add") |
| | | public R addMerchant(@RequestBody @Validated(AddGroup.class) ConvenientMerchantDTO convenientMerchantDTO) { |
| | | convenientMerchantDTO.setCreatedBy(this.getUserId()); |
| | | return communityService.addMerchant(convenientMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑便民服务商家") |
| | | @PutMapping("/merchant/put") |
| | | public R putMerchant(@RequestBody @Validated(PutGroup.class) ConvenientMerchantDTO convenientMerchantDTO) { |
| | | convenientMerchantDTO.setUpdatedBy(this.getUserId()); |
| | | convenientMerchantDTO.setCreatedBy(this.getUserId()); |
| | | return communityService.putMerchant(convenientMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务商家详情", response = ConvenientMerchantVO.class) |
| | | @GetMapping("/merchant/get") |
| | | public R getMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.getMerchant(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除便民服务商家") |
| | | @DeleteMapping("/merchant/delete") |
| | | public R deleteMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.deleteMerchant(merchantId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询便民服务商家", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/merchant/page") |
| | | public R pageMerchant(@RequestBody PageConvenientMerchantDTO pageConvenientMerchantDTO) { |
| | | return communityService.pageMerchant(pageConvenientMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "禁用/启用便民服务商家") |
| | | @PutMapping("/merchant/disable-or-enable") |
| | | public R disableOrEnableMerchant(@RequestBody @Valid DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO) { |
| | | disableOrEnableConvenientMerchantDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.disableOrEnableMerchant(disableOrEnableConvenientMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "重置便民服务商家账号密码") |
| | | @PutMapping("/merchant/reset-password") |
| | | public R resetPasswordMerchant(@RequestBody @Valid ResetPasswordConvenientMerchantDTO resetPasswordConvenientMerchantDTO) { |
| | | resetPasswordConvenientMerchantDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.resetPasswordMerchant(resetPasswordConvenientMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区下拉列表", response = ComActVO.class) |
| | | @GetMapping("/community") |
| | | public R listCommunity() { |
| | | return communityService.listCommunityAll(); |
| | | } |
| | | |
| | | @ApiOperation(value = "所有服务分类", response = ConvenientServiceCategoryVO.class) |
| | | @GetMapping("/service-category/all") |
| | | public R getAllServiceCategories() { |
| | | return communityService.getAllServiceCategories(); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.auth.model.dos.LoginBody; |
| | | import com.panzhihua.auth.service.LoginService; |
| | |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 一键报警APP登录 |
| | | * @param account 账号 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginAlarmApp") |
| | | public R loginAlarmApp(@RequestParam("account") String account, @RequestParam("password") String password) { |
| | | LoginReturnsVO loginReturnVO = loginService.loginAlarmApp(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务商家后台登录 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginMerchantBackStage") |
| | | public R loginMerchantBackStage(@RequestParam("account") String account, @RequestParam("password") String password) { |
| | | LoginReturnVO loginReturnVO = loginService.loginMerchantBackStage(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | } |
| | |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginCgBackage(String account, String password); |
| | | |
| | | /** |
| | | * 一键报警APP登录 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnsVO loginAlarmApp(String account, String password); |
| | | |
| | | /** |
| | | * 便民服务商家后台登录 |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginMerchantBackStage(String account, String password); |
| | | } |
| | |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | @Override |
| | | public LoginReturnsVO loginAlarmApp(String account, String password) { |
| | | Authentication authentication = null; |
| | | authentication = |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_10", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnsVO loginReturnVO = new LoginReturnsVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | loginReturnVO.setUserId(loginUser.getUserId()); |
| | | loginReturnVO.setCommunityId(loginUser.getCommunityId()); |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | /** |
| | | * 便民服务商家后台登录 |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginMerchantBackStage(String account, String password) { |
| | | Authentication authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_10", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | | } |
| | | } |
| | |
| | | */ |
| | | public static final String ADMIN_SHOP_ROLE_KEY = "chaojiguanliyuan"; |
| | | /** |
| | | * 便民服务商户默认角色权限默认字符串 |
| | | */ |
| | | public static final String CONVENIENT_MERCHANT_ROLE_KEY = "convenient_merchant_platform"; |
| | | /** |
| | | * 首页商城是否展示(1.是 2.否) |
| | | */ |
| | | public static final Integer IS_SHOP_OPEN = 2; |
| | |
| | | * 高德地图获取天气key |
| | | */ |
| | | public static final String G_D_WEATHER_KEY = "02019a956b118ac7956c8539ab02b0f5"; |
| | | |
| | | /** |
| | | * 社区议事投票小程序身份验证参数默认key |
| | | */ |
| | | public static final String DISCUSS_IDENTITY_KEY = "DISCUSS_IDENTITY_"; |
| | | /** |
| | | * 常量 |
| | | */ |
| | | public static final Integer EIGHTY = 80; |
| | | /** |
| | | * 常量 |
| | | */ |
| | | public static final Integer NINETY = 90; |
| | | /** |
| | | * 常量 |
| | | */ |
| | | public static final Integer ONE_HUNDRED = 100; |
| | | } |
| | |
| | | public Long getAreaId() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long areaId = loginUserInfo.getAreaId(); |
| | | if (null == areaId || 0 == areaId) { |
| | | throw new ServiceException("用户未绑定社区"); |
| | | if (null == areaId) { |
| | | throw new ServiceException("用户未绑定小区"); |
| | | } |
| | | return areaId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @title: IdentityApprovalStatusEnum |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证审核状态枚举类 |
| | | * @author: hans |
| | | * @date: 2021/09/14 11:26 |
| | | */ |
| | | @Getter |
| | | public enum IdentityApprovalStatusEnum { |
| | | /** |
| | | * 待审核 |
| | | */ |
| | | PENDING_REVIEW(1), |
| | | /** |
| | | * 驳回 |
| | | */ |
| | | REFUSE(2), |
| | | /** |
| | | * 通过 |
| | | */ |
| | | PASS_THROUGH(3); |
| | | |
| | | private int status; |
| | | |
| | | IdentityApprovalStatusEnum(int status) { |
| | | this.status = status; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @title: IdentityAuthMethodEnum |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证方式枚举类 |
| | | * @author: hans |
| | | * @date: 2021/09/14 13:11 |
| | | */ |
| | | @Getter |
| | | public enum IdentityAuthMethodEnum { |
| | | /** |
| | | * 视频认证 |
| | | */ |
| | | VIDEO_AUTH(1), |
| | | /** |
| | | * 人脸核验 |
| | | */ |
| | | FACE_AUTH(2), |
| | | /** |
| | | * 线下认证 |
| | | */ |
| | | OFFLINE_AUTH(3); |
| | | |
| | | private int method; |
| | | |
| | | IdentityAuthMethodEnum(int method) { |
| | | this.method = method; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @title: IdentityAuthStatusEnum |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证认证状态枚举类 |
| | | * @author: hans |
| | | * @date: 2021/09/14 11:30 |
| | | */ |
| | | @Getter |
| | | public enum IdentityAuthStatusEnum { |
| | | /** |
| | | * 已认证 |
| | | */ |
| | | CERTIFIED(1), |
| | | /** |
| | | * 未认证 |
| | | */ |
| | | NOT_CERTIFIED(0); |
| | | |
| | | private int status; |
| | | |
| | | IdentityAuthStatusEnum(int status) { |
| | | this.status = status; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @title: IdentityAuthTypeEnum |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证类型枚举类 |
| | | * @author: hans |
| | | * @date: 2021/09/14 10:40 |
| | | */ |
| | | @Getter |
| | | public enum IdentityAuthTypeEnum { |
| | | /** |
| | | * 高龄认证 |
| | | */ |
| | | ELDER_AUTH(1), |
| | | /** |
| | | * 养老认证 |
| | | */ |
| | | PENSION_AUTH(2); |
| | | |
| | | private int type; |
| | | |
| | | IdentityAuthTypeEnum(int type) { |
| | | this.type = type; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @title: MerchantBusinessPeriod |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家营业周期枚举类 |
| | | * @author: hans |
| | | * @date: 2021/09/17 16:06 |
| | | */ |
| | | @Getter |
| | | public enum MerchantBusinessPeriod { |
| | | EVERY_DAY, WEEKDAY, WEEKEND |
| | | } |
| | |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入线下认证居民数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("100", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.ELDER_RECORD_ERROR_LIST; |
| | | |
| | | Map<String, String> dictMap = dictionaryR.getData().stream() |
| | | .collect(Collectors.toMap(BcDictionaryVO::getDictName, BcDictionaryVO::getDictValue)); |
| | | // Map<String,Integer> dictMap = new HashMap<>(); |
| | | // for(BcDictionaryVO vo : dictionaryR.getData()){ |
| | | // dictMap.put(vo.getDictName(),Integer.valueOf(vo.getDictValue())); |
| | | // } |
| | | String key = Constants.ELDER_RECORD_ERROR_LIST + communityId; |
| | | |
| | | int index = 2; |
| | | try { |
| | |
| | | continue; |
| | | } |
| | | vo.setAuthDate(DateUtil.parse(oneData.get(4).trim(), parsePatterns)); |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(5)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | setElderAuthMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的健在(是/否)有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAlive(isOk); |
| | | } else { |
| | | vo.setIsAlive(PopulHouseUseEnum.getCodeByName("否")); |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | setElderAuthMistake(oneData, mistake); |
| | | mistake.setMistake("认证期数不能为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setAuthPeriod(oneData.get(5)); |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setMark(oneData.get(6)); |
| | | } |
| | | |
| | | voList.add(vo); |
| | | index++; |
| | | } |
| | |
| | | log.info("业务层处理成功"); |
| | | List<ComElderAuthRecordImportMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComElderAuthRecordImportMistakeExcelVO.class); |
| | | // String errMsg = r.getMsg(); |
| | | // List<ComMngPopulationImportErrorVO> errorList = |
| | | // JSON.parseArray(errMsg,ComMngPopulationImportErrorVO.class); |
| | | // if(!errorList.isEmpty()){ |
| | | // populationImportErrorVOList.addAll(errorList); |
| | | // } |
| | | mistakes.addAll(list); |
| | | log.info("将错误数据存入redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | |
| | | vo.setPhone(map.get(2)); |
| | | vo.setNowAddress(map.get(3)); |
| | | vo.setAuthDate(map.get(4)); |
| | | vo.setIsAlive(map.get(5)); |
| | | vo.setAuthPeriod(map.get(5)); |
| | | vo.setMark(map.get(6)); |
| | | } |
| | | } |
| | |
| | | throw new ServiceException("100", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.ELDER_POPULATION_ERROR_LIST; |
| | | String key = Constants.ELDER_POPULATION_ERROR_LIST + communityId; |
| | | |
| | | Map<String, String> dictMap = dictionaryR.getData().stream() |
| | | .collect(Collectors.toMap(BcDictionaryVO::getDictName, BcDictionaryVO::getDictValue)); |
| | |
| | | throw new ServiceException("100", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.PENSION_POPULATION_ERROR_LIST; |
| | | String key = Constants.PENSION_POPULATION_ERROR_LIST + + communityId; |
| | | |
| | | Map<String, String> dictMap = dictionaryR.getData().stream() |
| | | .collect(Collectors.toMap(BcDictionaryVO::getDictName, BcDictionaryVO::getDictValue)); |
| | |
| | | throw new ServiceException("100", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.PENSION_RECORD_ERROR_LIST; |
| | | String key = Constants.PENSION_RECORD_ERROR_LIST + + communityId; |
| | | |
| | | Map<String, String> dictMap = dictionaryR.getData().stream() |
| | | .collect(Collectors.toMap(BcDictionaryVO::getDictName, BcDictionaryVO::getDictValue)); |
| | |
| | | continue; |
| | | } |
| | | vo.setAuthDate(DateUtil.parse(oneData.get(4).trim(), parsePatterns)); |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(5)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | setPensionAuthMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的健在(是/否)有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAlive(isOk); |
| | | } else { |
| | | vo.setIsAlive(PopulHouseUseEnum.getCodeByName("否")); |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | setPensionAuthMistake(oneData, mistake); |
| | | mistake.setMistake("认证期数不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setAuthPeriod(oneData.get(5)); |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setMark(oneData.get(6)); |
| | | } |
| | | |
| | | voList.add(vo); |
| | | index++; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import com.panzhihua.common.model.helper.sensitive.Sensitive; |
| | | import com.panzhihua.common.model.helper.sensitive.SensitiveStrategy; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: AddIdentityAuthDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增身份认证 |
| | | * @author: hans |
| | | * @date: 2021/09/03 9:43 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增身份认证参数") |
| | | @EncryptDecryptClass |
| | | public class AddIdentityAuthDTO { |
| | | |
| | | @ApiModelProperty(value = "认证类型(1.高龄认证 2.养老认证)", required = true, allowableValues = "1,2", example = "1") |
| | | @NotNull(message = "认证类型不能为空") |
| | | private Integer authType; |
| | | |
| | | @ApiModelProperty(value = "姓名", required = true, example = "张三") |
| | | @Sensitive(strategy = SensitiveStrategy.USERNAME) |
| | | @NotBlank(message = "姓名不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号", required = true, example = "511321199503241233") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | @EncryptDecryptField |
| | | @NotBlank(message = "身份证号码不能为空") |
| | | @Size(min = 18, max = 18, message = "请输入18位有效身份证号") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "现居住地址", required = true, example = "双流小区") |
| | | @NotBlank(message = "居住地址不能为空") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证视频url,视频认证时需传入", example = "http://test.video.html") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "用户eidToken,人脸核验时需传入") |
| | | private String eidToken; |
| | | |
| | | @ApiModelProperty(value = "提交用户", hidden = true) |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "人脸核身结果数据", hidden = true) |
| | | private String verificationResult; |
| | | |
| | | @ApiModelProperty(value = "身份认证方式 1.视频认证 2.人脸认证 3.线下认证", hidden = true) |
| | | private Integer authMethod = 1; |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private Long communityId; |
| | | } |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议新增编辑 |
| | | * @description: 议事投票新增编辑 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 15:34 |
| | | **/ |
| | | @Data |
| | | @ApiModel("一起议新增编辑") |
| | | @ApiModel("议事投票新增编辑") |
| | | public class ComActDiscussDTO { |
| | | @ApiModelProperty("主键") |
| | | @NotNull(message = "一起议id不能为空", groups = {PutGroup.class}) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("主题") |
| | | @NotBlank(groups = {AddGroup.class}, message = "主题不能为空") |
| | | private String discussSubject; |
| | | |
| | | @ApiModelProperty("类型 1 图文 2 投票") |
| | | @ApiModelProperty("类型 1 议事 2 投票") |
| | | @Min(value = 1, groups = {AddGroup.class}, message = "类型不能为空") |
| | | private Integer type; |
| | | |
| | |
| | | @ApiModelProperty("选项集合") |
| | | private List<ComActDiscussOptionDTO> discussOptions; |
| | | |
| | | @ApiModelProperty(value = "单张图片宽度") |
| | | private BigDecimal imgWidth; |
| | | |
| | | @ApiModelProperty(value = "单张图片高度") |
| | | private BigDecimal imgHeight; |
| | | |
| | | @ApiModelProperty(value = "投票开始时间(格式:yyyy-MM-dd HH:mm:ss)") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "投票结束时间(格式:yyyy-MM-dd HH:mm:ss)") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "是否可重复投票(1.是 2.否)") |
| | | private Integer isRepeat; |
| | | |
| | | @ApiModelProperty(value = "每人可投票数") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty(value = "是否是小程序用户", hidden = true) |
| | | private Boolean isApplets; |
| | | |
| | | @ApiModelProperty(value = "当前登录用户信息", hidden = true) |
| | | private LoginUserInfoVO loginUserInfo; |
| | | |
| | | @ApiModelProperty("投票结果") |
| | | @NotBlank(message = "投票结果不能为空", groups = {PutGroup.class}) |
| | | private String publishResult; |
| | | |
| | | /** |
| | | * 类型 1 议事 2 投票 |
| | | */ |
| | | public interface type{ |
| | | int ys = 1; |
| | | int tp = 2; |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 选项投票 |
| | |
| | | @ApiModel("选项投票") |
| | | public class ComActDiscussOptionUserDTO { |
| | | |
| | | @ApiModelProperty("一起议选项id") |
| | | private Long discussOptionId; |
| | | @ApiModelProperty("一起议选项id集合") |
| | | private List<Long> discussOptionIds; |
| | | |
| | | @ApiModelProperty("投票人id") |
| | | private Long userId; |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: DiscussVoteOptionDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 一起议投票请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/16 17:03 |
| | | */ |
| | | @Data |
| | | @ApiModel("一起议投票请求参数") |
| | | public class DiscussVoteOptionDTO { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @NotEmpty(message = "投票选项不能为空") |
| | | private List<Long> optionIds; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import com.panzhihua.common.model.helper.sensitive.Sensitive; |
| | | import com.panzhihua.common.model.helper.sensitive.SensitiveStrategy; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: GetIdentityEidTokenDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 获取身份认证人脸核验token参数 |
| | | * @author: hans |
| | | * @date: 2021/09/13 11:07 |
| | | */ |
| | | @Data |
| | | @ApiModel("获取身份认证人脸核验token参数") |
| | | @EncryptDecryptClass |
| | | public class GetIdentityEidTokenDTO { |
| | | |
| | | @ApiModelProperty(value = "认证类型(1.高龄认证 2.养老认证)", required = true, allowableValues = "1,2", example = "1") |
| | | @NotNull(message = "认证类型不能为空") |
| | | private Integer authType; |
| | | |
| | | @ApiModelProperty(value = "姓名", required = true, example = "张三") |
| | | @Sensitive(strategy = SensitiveStrategy.USERNAME) |
| | | @NotBlank(message = "姓名不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号", required = true, example = "511321199503241233") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | @EncryptDecryptField |
| | | @NotBlank(message = "身份证号码不能为空") |
| | | @Size(min = 18, max = 18, message = "请输入18位有效身份证号") |
| | | private String idCard; |
| | | } |
| | |
| | | public class PageComActDiscussCommentDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "账号") |
| | | private String account; |
| | |
| | | |
| | | @ApiModelProperty(value = "登录用户", required = true) |
| | | private Long loginUserId; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | } |
| | |
| | | @ApiModel("分页查询一起议") |
| | | public class PageComActDiscussDTO { |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty("主题") |
| | | private String subject; |
| | |
| | | |
| | | @ApiModelProperty("小程序使用 1 表示查询我的议题") |
| | | private Integer isMy; |
| | | |
| | | @ApiModelProperty("状态(1.未开始 2.进行中 3.待公布 4.已公布 5.已发布)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "类型: 1.议事 2.投票,小程序必须传入类型", allowableValues = "1,2") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "展示状态,小程序获取不同状态的投票列表 1.进行中 2.已结束", allowableValues = "1,2") |
| | | private Integer displayStatus; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证 3.线下认证)") |
| | | private String authMethod; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageIdentityAuthRecordDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询身份认证记录 |
| | | * @author: hans |
| | | * @date: 2021/09/03 9:39 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询身份认证记录参数") |
| | | @EncryptDecryptClass |
| | | public class PageIdentityAuthRecordDTO { |
| | | |
| | | @ApiModelProperty(value = "认证类型(1.高龄认证 2.养老认证)", required = true, allowableValues = "1,2", example = "1") |
| | | @NotNull(message = "认证类型不能为空") |
| | | private Integer authType; |
| | | |
| | | @ApiModelProperty(value = "当前页数", required = true, example = "1") |
| | | @NotNull(message = "分页参数不能为空") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "每页记录数", required = true, example = "10") |
| | | @NotNull(message = "分页参数不能为空") |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "提交用户", example = "1", hidden = true) |
| | | private Long submitUserId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Pattern; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.enums.MerchantBusinessPeriod; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑便民服务商家 |
| | | * @author: hans |
| | | * @date: 2021/09/15 17:18 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑便民服务商家") |
| | | public class ConvenientMerchantDTO { |
| | | |
| | | @ApiModelProperty("便民服务商家ID") |
| | | @NotNull(groups = {PutGroup.class}, message = "便民服务商家ID不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("商家名称") |
| | | @NotBlank(groups = {AddGroup.class}, message = "商家名称不能为空") |
| | | @Length(groups = {AddGroup.class}, max = 25, message = "商家名称最多支持25个字符") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("商家logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("联系人") |
| | | @NotBlank(groups = {AddGroup.class}, message = "联系人不能为空") |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("负责人身份证号") |
| | | @Pattern(groups = {AddGroup.class}, message = "请输入18位有效身份证号码", regexp = "(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("咨询电话") |
| | | @Pattern(groups = {AddGroup.class}, message = "咨询电话格式错误", regexp = "(1[3|4|5|7|8][0-9]\\d{8})|(\\d{3}-\\d{8}|\\d{4}-\\d{7})") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("商家地址") |
| | | @NotBlank(groups = {AddGroup.class}, message = "商家地址不能为空") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | @NotBlank(groups = {AddGroup.class}, message = "纬度不能为空") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | @NotBlank(groups = {AddGroup.class}, message = "经度不能为空") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("营业开始时间") |
| | | @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8") |
| | | @NotNull(groups = {AddGroup.class}, message = "营业开始时间不能为空") |
| | | private Date beginAt; |
| | | |
| | | @ApiModelProperty("营业截至时间") |
| | | @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8") |
| | | @NotNull(groups = {AddGroup.class}, message = "营业截至时间不能为空") |
| | | private Date endAt; |
| | | |
| | | @ApiModelProperty(value = "营业周期", allowableValues = "EVERY_DAY,WEEKDAY,WEEKEND") |
| | | @NotNull(groups = {AddGroup.class}, message = "营业周期不能为空") |
| | | private MerchantBusinessPeriod period; |
| | | |
| | | @ApiModelProperty("商家介绍") |
| | | @Size(max = 100) |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty("服务范围") |
| | | @NotEmpty(groups = {AddGroup.class}, message = "服务范围不能为空") |
| | | private List<Long> serviceIds; |
| | | |
| | | @ApiModelProperty("是否营业中,1.在营 0.已关闭") |
| | | @NotNull(groups = {AddGroup.class}, message = "是否营业不能为空") |
| | | private Integer businessStatus; |
| | | |
| | | @ApiModelProperty("管理账号") |
| | | @Pattern(groups = {AddGroup.class}, message = "请输入6-10位管理账号,由英文或数字组成", regexp = "^[0-9A-Za-z]{6,10}$") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("登陆密码") |
| | | // @Pattern(groups = {AddGroup.class}, message = "请输入8-12位登陆密码,由英文,数字和特殊符号组成", |
| | | // regexp = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[$@$!%*#?&])[A-Za-z\\d$@$!%*#?&]{8,12}$") |
| | | @Pattern(groups = {AddGroup.class}, message = "请输入8-12位登陆密码,由英文,数字和特殊符号组成", |
| | | regexp = "^(?=.*[A-Za-z])(?=(.*[\\d]){1,})(?=(.*[\\W]){1,})(?!.*\\s).{8,}$") |
| | | private String password; |
| | | |
| | | @ApiModelProperty(value = "所属社区id") |
| | | @NotNull(groups = {AddGroup.class}, message = "所属社区id不能为空") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | |
| | | public String getPeriod() { |
| | | return period.name(); |
| | | } |
| | | |
| | | public void setPeriod(MerchantBusinessPeriod period) { |
| | | this.period = period; |
| | | } |
| | | |
| | | public Boolean getBusinessStatus() { |
| | | return businessStatus.intValue() == 1; |
| | | } |
| | | |
| | | public void setBusinessStatus(Boolean businessStatus) { |
| | | this.businessStatus = businessStatus ? 1 : 0; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @title: ConvenientProductCategoryDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑产品分类 |
| | | * @author: hans |
| | | * @date: 2021/09/20 10:32 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑产品分类") |
| | | public class ConvenientProductCategoryDTO { |
| | | |
| | | @ApiModelProperty("分类ID") |
| | | @NotNull(groups = {PutGroup.class}, message = "分类id不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | @NotBlank(groups = {AddGroup.class}, message = "分类名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("权重") |
| | | @NotNull(groups = {AddGroup.class}, message = "权重不能为空") |
| | | private Integer weight; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ConvenientProductDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑便民服务商家后台产品 |
| | | * @author: hans |
| | | * @date: 2021/09/20 20:32 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑便民服务商家后台产品") |
| | | public class ConvenientProductDTO { |
| | | |
| | | @ApiModelProperty("产品ID") |
| | | @NotNull(groups = {PutGroup.class}, message = "产品ID不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("产品名称") |
| | | @NotBlank(groups = {AddGroup.class}, message = "产品名称不能为空") |
| | | @Length(groups = {AddGroup.class}, max = 20, message = "产品名称最多支持20个字符") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("产品介绍") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty("所属分类") |
| | | @NotNull(groups = {AddGroup.class}, message = "所属分类不能为空") |
| | | private Long categoryId; |
| | | |
| | | @ApiModelProperty("产品规格") |
| | | @NotEmpty(groups = {AddGroup.class}, message = "产品规格不能为空") |
| | | private List<ConvenientProductSpecificationDTO> productSpecificationDTOList; |
| | | |
| | | @ApiModelProperty("上架状态,1.上架 0.下架") |
| | | @NotNull(groups = {AddGroup.class}, message = "上架状态不能为空") |
| | | private Integer onShelf; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | |
| | | @ApiModelProperty(value = "所属商家", hidden = true) |
| | | private Long merchantId; |
| | | |
| | | public Boolean getOnShelf() { |
| | | return onShelf.intValue() == 1; |
| | | } |
| | | |
| | | public void setOnShelf(Boolean onShelf) { |
| | | this.onShelf = onShelf ? 1 : 0; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @title: ConvenientProductSpecificationDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑产品规格信息 |
| | | * @author: hans |
| | | * @date: 2021/09/20 20:46 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑产品规格信息") |
| | | public class ConvenientProductSpecificationDTO { |
| | | |
| | | @ApiModelProperty("规格ID") |
| | | @NotNull(message = "规格ID不能为空", groups = {PutGroup.class}) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("规格名称") |
| | | @NotBlank(message = "规格名称不能为空", groups = {AddGroup.class}) |
| | | @Max(6) |
| | | private String name; |
| | | |
| | | @ApiModelProperty("价格") |
| | | @NotNull(message = "价格不能为空", groups = {AddGroup.class}) |
| | | @Min(0) |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty("产品图片") |
| | | private String image; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientServiceCategoryDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑便民服务分类 |
| | | * @author: hans |
| | | * @date: 2021/09/16 9:49 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑便民服务分类") |
| | | public class ConvenientServiceCategoryDTO { |
| | | |
| | | @ApiModelProperty("分类ID") |
| | | @NotNull(groups = {PutGroup.class}, message = "分类id不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | @NotBlank(groups = {AddGroup.class}, message = "分类名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("分类图标") |
| | | @NotBlank(groups = {AddGroup.class}, message = "分类图标不能为空") |
| | | private String icon; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("权重") |
| | | @NotNull(groups = {AddGroup.class}, message = "权重不能为空") |
| | | private Integer weight; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: DeleteConvenientProductDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 删除便民服务商家后台产品请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/21 16:25 |
| | | */ |
| | | @Data |
| | | @ApiModel("删除便民服务商家后台产品请求参数") |
| | | public class DeleteConvenientProductDTO { |
| | | |
| | | @ApiModelProperty(value = "需要删除的产品id集合", required = true) |
| | | @NotEmpty(message = "产品id不能为空") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: DisableOrEnableConvenientMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 禁用/启用便民服务商家请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/16 15:34 |
| | | */ |
| | | @Data |
| | | @ApiModel("禁用/启用便民服务商家请求参数") |
| | | public class DisableOrEnableConvenientMerchantDTO { |
| | | |
| | | @ApiModelProperty(value = "处理类型(1.启用 2.禁用)", required = true, allowableValues = "1,2") |
| | | @NotNull(message = "处理类型不能为空") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "需要处理的id集合", required = true) |
| | | @NotEmpty(message = "处理id不能为空") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ExportMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 商家导出请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/23 15:23 |
| | | */ |
| | | @Data |
| | | @ApiModel("商家导出请求参数") |
| | | public class ExportMerchantDTO { |
| | | |
| | | @ApiModelProperty(value = "批量勾选时传参数组") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty("服务分类id") |
| | | private Long serviceId; |
| | | |
| | | @ApiModelProperty("营业状态(1.在营 0.已关闭)") |
| | | private Integer businessStatus; |
| | | |
| | | @ApiModelProperty("账号状态(1.启用 2.禁用)") |
| | | private Integer accountStatus; |
| | | |
| | | @ApiModelProperty(value = "服务分类id", hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: OnShelfOrOffShelfProductDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 上架/下架便民服务商家后台产品请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/21 16:42 |
| | | */ |
| | | @Data |
| | | @ApiModel("上架/下架便民服务商家后台产品请求参数") |
| | | public class OnShelfOrOffShelfProductDTO { |
| | | |
| | | @ApiModelProperty(value = "处理类型(1.上架 2.下架)", required = true, allowableValues = "1,2") |
| | | @NotNull(message = "处理类型不能为空") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "需要上架/下架的产品id集合", required = true) |
| | | @NotEmpty(message = "需要上架/下架的产品id不能为空") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageClassifyMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页获取服务类型下商家信息请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/22 16:45 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页获取服务类型下商家信息请求参数") |
| | | public class PageClassifyMerchantDTO { |
| | | |
| | | @ApiModelProperty(value = "商家服务分类id") |
| | | @NotNull(message = "商家服务分类id不能为空") |
| | | @Min(value = 1) |
| | | private Long serviceId; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | @NotNull(message = "社区id不能为空") |
| | | @Min(value = 1) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageSize; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageConvenientMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询便民服务商家请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/16 15:03 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询便民服务商家请求参数") |
| | | public class PageConvenientMerchantDTO { |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("服务分类id") |
| | | private Long serviceId; |
| | | |
| | | @ApiModelProperty("营业状态(1.在营 0.已关闭)") |
| | | private Integer businessStatus; |
| | | |
| | | @ApiModelProperty("账号状态(1.启用 2.禁用)") |
| | | private Integer accountStatus; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageSize; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageConvenientProductCategoryDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询产品分类请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/20 15:23 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询产品分类请求参数") |
| | | public class PageConvenientProductCategoryDTO { |
| | | |
| | | @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.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @title: PageConvenientProductDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询便民服务商家后台产品信息请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/21 16:12 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询便民服务商家后台产品信息请求参数") |
| | | public class PageConvenientProductDTO { |
| | | |
| | | @ApiModelProperty("产品名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("产品分类id") |
| | | private Long categoryId; |
| | | |
| | | @ApiModelProperty("上架状态(1.已上架 0.已下架)") |
| | | private Integer onShelf; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "所属商家", hidden = true) |
| | | private Long merchantId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageConvenientServiceCategoryDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询便民服务分类请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/16 10:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询便民服务分类请求参数") |
| | | public class PageConvenientServiceCategoryDTO { |
| | | |
| | | @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.convenient; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PagePopularMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询热门商家请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/22 16:29 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询热门商家请求参数") |
| | | public class PagePopularMerchantDTO { |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | @NotNull(message = "社区id不能为空") |
| | | @Min(value = 1) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageSize; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageSearchMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页搜索商家/商品信息请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/23 12:34 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页搜索商家/商品信息请求参数") |
| | | public class PageSearchDTO { |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | @NotBlank(message = "关键词不能为空") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | @NotNull(message = "社区id不能为空") |
| | | @Min(value = 1) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.convenient; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.Pattern; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ResetPasswordConvenientMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 重置便民服务商家账号密码请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/16 15:47 |
| | | */ |
| | | @Data |
| | | @ApiModel("重置便民服务商家账号密码请求参数") |
| | | public class ResetPasswordConvenientMerchantDTO { |
| | | |
| | | @ApiModelProperty(value = "需要处理的id集合", required = true) |
| | | @NotEmpty(message = "处理id不能为空") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty(value = "新密码", required = true) |
| | | @Pattern(groups = {AddGroup.class}, message = "请输入8-12位登陆密码,由英文,数字和特殊符号组成", |
| | | regexp = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[$@$!%*#?&])[A-Za-z\\d$@$!%*#?&]{8,12}$") |
| | | private String password; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.discuss; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * 议事投票公布结果请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("议事投票公布结果请求参数") |
| | | public class ComActDiscussDetailDTO { |
| | | |
| | | @ApiModelProperty("主键id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.discuss; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * 议事投票公布结果请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("议事投票公布结果请求参数") |
| | | public class ComActDiscussPublishResultDTO { |
| | | |
| | | @ApiModelProperty("议事投票id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("公布结果") |
| | | private String result; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("类型(1.新增公布结果 2.修改公布结果)") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 类型(1.新增公布结果 2.修改公布结果) |
| | | */ |
| | | public interface type{ |
| | | int add = 1; |
| | | int edit = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.elder; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * 高龄老人认证统计表头查询参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄老人认证统计表头查询参数") |
| | | public class ElderAuthStatisticHeaderDTO { |
| | | |
| | | @ApiModelProperty(value = "认证期数",required = true) |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.elder; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * title: PageElderAuthRecordsDTO 高龄老人认证记录分页查询参数 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 高龄老人认证记录分页查询参数 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/02 11:12 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄老人认证记录分页查询参数") |
| | | public class PageElderAuthStatisticDTO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数,默认1", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数,默认10", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "认证状态(1.已认证 2.未认证)") |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)") |
| | | private Integer personnelCategory; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.elder; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * title: PageElderAuthRecordsDTO 养老认证记录分页查询参数 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 高龄老人认证记录分页查询参数 |
| | | * |
| | | * @author lyq |
| | | * @date 2021/9/18 15:12 |
| | | */ |
| | | @Data |
| | | @ApiModel("养老认证记录分页查询参数") |
| | | public class PagePensionAuthStatisticDTO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数,默认1", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数,默认10", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "认证状态(1.已认证 2.未认证)") |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.elder; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @author lyq |
| | | * 标记高龄老人认证统计记录请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("标记高龄老人认证统计记录请求参数") |
| | | public class SignElderAuthStatisticDTO { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "标记内容") |
| | | private String mark; |
| | | |
| | | @ApiModelProperty(value = "操作用户id",hidden = true) |
| | | private Long userId; |
| | | } |
| | |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class CommonPage { |
| | |
| | | private Date statusEndTime; |
| | | @ApiModelProperty("编号") |
| | | private String serialNo; |
| | | @ApiModelProperty("小区id") |
| | | private Long areaId; |
| | | @ApiModelProperty("关键字") |
| | | private String keyword; |
| | | @ApiModelProperty("职务") |
| | | private String position; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.user; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Pattern; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientResetPasswordDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家修改密码 |
| | | * @author: hans |
| | | * @date: 2021/09/17 17:27 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家修改密码请求参数") |
| | | public class ConvenientResetPasswordDTO { |
| | | |
| | | @ApiModelProperty("旧密码") |
| | | @NotBlank(message = "旧密码不能为空") |
| | | private String oldPassword; |
| | | |
| | | @ApiModelProperty("新密码") |
| | | @Pattern(groups = {AddGroup.class}, message = "请输入8-12位登陆密码,由英文,数字和特殊符号组成", |
| | | regexp = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[$@$!%*#?&])[A-Za-z\\d$@$!%*#?&]{8,12}$") |
| | | private String newPassword; |
| | | } |
| | |
| | | private String refreshToken; |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class BuildingVO { |
| | | private String label; |
| | | private String value; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("业主委员会实体") |
| | | public class ComActCommiteeVO { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | @ApiModelProperty(value = "联系人") |
| | | private String contactName; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 小区id |
| | | */ |
| | | @ApiModelProperty(value = "小区id") |
| | | private Long areaId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("账号") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("密码") |
| | | private String password; |
| | | |
| | | @ApiModelProperty("权限id") |
| | | private Long roleId; |
| | | |
| | | @ApiModelProperty("小区名称") |
| | | private String areaName; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("评论人用户类型(1.小程序用户(其他均为后台用户))") |
| | | private Integer userType; |
| | | |
| | | @ApiModelProperty("回复量") |
| | | private Integer replyNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComActDiscussOptionUserVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 一起议投票记录详情 |
| | | * @author: hans |
| | | * @date: 2021/09/08 16:14 |
| | | */ |
| | | @Data |
| | | @ApiModel("一起议投票记录详情") |
| | | public class ComActDiscussOptionUserVO { |
| | | |
| | | @ApiModelProperty("投票记录主键id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("一起议选项id") |
| | | private Long discussOptionId; |
| | | |
| | | @ApiModelProperty("投票人id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("投票时间") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("一起议id") |
| | | private Long discussId; |
| | | |
| | | @ApiModelProperty("投票人昵称") |
| | | private String userNickName; |
| | | |
| | | @ApiModelProperty("投票人头像") |
| | | private String imageUrl; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | @ApiModelProperty("投票数量") |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty("投票总数量") |
| | | private Integer allNum; |
| | | |
| | | @ApiModelProperty("是否已经投票 1 是 0 否") |
| | | private Integer haveVote = 0; |
| | | |
| | | @ApiModelProperty("投票选项占比") |
| | | private BigDecimal percent; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @ApiModelProperty("主题") |
| | | private String discussSubject; |
| | | |
| | | @ApiModelProperty("类型 1 图文 2 投票") |
| | | @ApiModelProperty("类型 1 议事 2 投票") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("图片地址 多个用逗号隔开") |
| | |
| | | @ApiModelProperty("点赞数量") |
| | | private Integer signNum; |
| | | |
| | | @ApiModelProperty("浏览量") |
| | | private Integer viewsNum; |
| | | |
| | | @ApiModelProperty("发布人名字") |
| | | private String userName; |
| | | |
| | |
| | | @ApiModelProperty("用户类型 1 小程序 2 运营平台 3 社区平台 5 商家后台 6 网格综治APP 7 网格综治后台") |
| | | private Integer userType; |
| | | |
| | | @ApiModelProperty("状态(1.未开始 2.进行中 3.待公布 4.已公布 5.已发布)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("公布结果") |
| | | private String publishResult; |
| | | |
| | | @ApiModelProperty("公布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date publishAt; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date releaseAt; |
| | | |
| | | @ApiModelProperty("投票开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty("投票结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty("参与讨论人数") |
| | | private Integer joinNum; |
| | | |
| | | @ApiModelProperty("单张图片宽度") |
| | | private BigDecimal imgWidth; |
| | | |
| | | @ApiModelProperty("单张图片高度") |
| | | private BigDecimal imgHeight; |
| | | |
| | | @ApiModelProperty("是否可重复投票(1.是 2.否)") |
| | | private Integer isRepeat; |
| | | |
| | | @ApiModelProperty("每人票数") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty("议事投票评论列表") |
| | | private List<ComActDiscussCommentVO> discussCommentList; |
| | | |
| | | @ApiModelProperty("剩余可投票数") |
| | | private Integer remainingVotes; |
| | | |
| | | @ApiModelProperty("已投票记录列表") |
| | | private List<ComActDiscussOptionUserVO> comActDiscussOptionUserVOList; |
| | | |
| | | @ApiModelProperty("已参与投票人数") |
| | | private Integer votedPersonNum; |
| | | |
| | | /** |
| | | * 类型 1 议事 2 投票 |
| | | */ |
| | | public interface type{ |
| | | int ys = 1; |
| | | int tp = 2; |
| | | } |
| | | } |
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.Min; |
| | | import javax.validation.constraints.Pattern; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("四长四员实体") |
| | | public class ComActFourMemberVO { |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 职位 |
| | | */ |
| | | @ApiModelProperty(value = "职位") |
| | | private String position; |
| | | |
| | | /** |
| | | * 管辖区域 |
| | | */ |
| | | @ApiModelProperty(value = "管辖区域") |
| | | private String jurisdiction; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("账户") |
| | | @Pattern(groups = {AddGroup.class}, message = "【账户】2-20个字符,英文,数字", regexp = "^[0-9A-Za-z]{2,20}$") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("密码") |
| | | @Pattern(groups = {AddGroup.class}, message = "【密码】格式为6-16个字符,英文,数字,且必须包含英文和数字", |
| | | regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$") |
| | | private String password; |
| | | |
| | | @ApiModelProperty("用户名称") |
| | | @Pattern(groups = {AddGroup.class}, message = "【用户名称】2-16个字符,英文,中文,数字", regexp = "^[0-9A-Za-z\u4e00-\u9fa5]{2,16}$") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("角色") |
| | | @Min(value = 1, groups = {AddGroup.class}, message = "角色不能为空") |
| | | private Long roleId; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | @Pattern(groups = {AddGroup.class}, message = "【手机号】格式错误", regexp = "1[3|4|5|7|8][0-9]\\d{8}") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("状态 1 启用 2 禁用") |
| | | @Min(groups = {AddGroup.class}, value = 1, message = "账户状态不能为空") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("身份证号码") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("管辖区域内容") |
| | | private List<String> buildings; |
| | | |
| | | @ApiModelProperty("图片") |
| | | private String url; |
| | | |
| | | @ApiModelProperty("id数组") |
| | | private Integer[] ids; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "单张图片高度") |
| | | private BigDecimal imgHeight; |
| | | |
| | | @ApiModelProperty(value = "微心愿分配人id集合") |
| | | private List<Long> handleIds; |
| | | |
| | | @ApiModelProperty(value = "微心愿处理人id,多个以逗号隔开") |
| | | private String handleId; |
| | | } |
| | | |
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.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("社会组织实体参数") |
| | | public class ComActSocialOrgVO { |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value = "ID") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 单位名称 |
| | | */ |
| | | @ApiModelProperty(value = "单位名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 工商登记号 |
| | | */ |
| | | @ApiModelProperty(value = "工商登记号") |
| | | private String businessNumber; |
| | | |
| | | /** |
| | | * 成立时间 |
| | | */ |
| | | @ApiModelProperty(value = "成立时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date buildDate; |
| | | |
| | | /** |
| | | * 机构代码 |
| | | */ |
| | | @ApiModelProperty(value = "机构代码") |
| | | private String agencyCode; |
| | | |
| | | /** |
| | | * 微信公众号 |
| | | */ |
| | | @ApiModelProperty(value = "微信公众号") |
| | | private String weixinOfficialAccounts; |
| | | |
| | | /** |
| | | * 单位类别: 1 社会团体、2 民办非企业单位、3 基金会 |
| | | */ |
| | | @ApiModelProperty(value = "单位类别: 1 社会团体、2 民办非企业单位、3 基金会") |
| | | private Integer companyType; |
| | | |
| | | /** |
| | | * 注册资金(万元) |
| | | */ |
| | | @ApiModelProperty(value = "注册资金(万元)") |
| | | private Integer registFee; |
| | | |
| | | /** |
| | | * 资产总额(万元) |
| | | */ |
| | | @ApiModelProperty(value = "资产总额(万元)") |
| | | private Integer assetsTotal; |
| | | |
| | | /** |
| | | * 净资产(万元) |
| | | */ |
| | | @ApiModelProperty(value = "净资产(万元)") |
| | | private Integer assetsNet; |
| | | |
| | | /** |
| | | * 销售额(万元) |
| | | */ |
| | | @ApiModelProperty(value = "销售额(万元)") |
| | | private Double salesFee; |
| | | |
| | | /** |
| | | * 上年纳税额(万元) |
| | | */ |
| | | @ApiModelProperty(value = "上年纳税额(万元)") |
| | | private Double taxesLastYear; |
| | | |
| | | /** |
| | | * 职工人数(人) |
| | | */ |
| | | @ApiModelProperty(value = "职工人数(人)") |
| | | private Integer staffCount; |
| | | |
| | | /** |
| | | * 通讯地址 |
| | | */ |
| | | @ApiModelProperty(value = "通讯地址") |
| | | private String maillingAddr; |
| | | |
| | | /** |
| | | * 邮编 |
| | | */ |
| | | @ApiModelProperty(value = "邮编") |
| | | private String postCode; |
| | | |
| | | /** |
| | | * 官方网址 |
| | | */ |
| | | @ApiModelProperty(value = "官方网址") |
| | | private String officialUrl; |
| | | |
| | | /** |
| | | * 法人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "法人姓名") |
| | | private String corporationName; |
| | | |
| | | /** |
| | | * 法人性别0女1男 |
| | | */ |
| | | @ApiModelProperty(value = "法人性别0女1男") |
| | | private String corporationGen; |
| | | |
| | | /** |
| | | * 法人工作电话 |
| | | */ |
| | | @ApiModelProperty(value = "法人工作电话") |
| | | private String corporationOfficePhone; |
| | | |
| | | /** |
| | | * 法人职位 |
| | | */ |
| | | @ApiModelProperty(value = "法人职位") |
| | | private String corporationPosition; |
| | | |
| | | /** |
| | | * 法人手机 |
| | | */ |
| | | @ApiModelProperty(value = "法人手机") |
| | | private String corporationPhone; |
| | | |
| | | /** |
| | | * 法人邮箱 |
| | | */ |
| | | @ApiModelProperty(value = "法人邮箱") |
| | | private String corporationEmail; |
| | | |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "联系人姓名") |
| | | private String contactName; |
| | | |
| | | /** |
| | | * 联系人性别0女1男 |
| | | */ |
| | | @ApiModelProperty(value = "联系人性别0女1男") |
| | | private String contactGen; |
| | | |
| | | /** |
| | | * 联系人工作电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系人工作电话") |
| | | private String contactOfficePhone; |
| | | |
| | | /** |
| | | * 联系人职位 |
| | | */ |
| | | @ApiModelProperty(value = "联系人职位") |
| | | private String contactPosition; |
| | | |
| | | /** |
| | | * 联系人手机 |
| | | */ |
| | | @ApiModelProperty(value = "联系人手机") |
| | | private String contactPhone; |
| | | |
| | | /** |
| | | * 联系人邮箱 |
| | | */ |
| | | @ApiModelProperty(value = "联系人邮箱") |
| | | private String contactEmail; |
| | | |
| | | /** |
| | | * 业务范围/专业领域 |
| | | */ |
| | | @ApiModelProperty(value = "业务范围/专业领域") |
| | | private String businessScope; |
| | | |
| | | /** |
| | | * 运营情况及行业影响(含所获荣誉) |
| | | */ |
| | | @ApiModelProperty(value = "运营情况及行业影响(含所获荣誉)") |
| | | private String businessImpact; |
| | | |
| | | /** |
| | | * 附件(以逗号隔开) |
| | | */ |
| | | @ApiModelProperty(value = "附件(以逗号隔开)") |
| | | private String attachUrl; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | @ApiModelProperty(value = "更新人") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 登录用户id |
| | | */ |
| | | @ApiModelProperty(value = "登录用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("账号") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("密码") |
| | | private String password; |
| | | |
| | | @ApiModelProperty("权限id") |
| | | private Long roleId; |
| | | } |
| | |
| | | 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; |
| | |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "高龄津贴开始领取日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date receiveAllowanceBegin; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "创建用户") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "修改用户") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "标记", index = 12) |
| | | @ExcelProperty(value = "认证方式", index = 12) |
| | | private String authMethod; |
| | | |
| | | @ExcelProperty(value = "标记", index = 13) |
| | | private String mark; |
| | | |
| | | @ExcelProperty(value = "审核状态", index = 13) |
| | | @ExcelProperty(value = "审核状态", index = 14) |
| | | private String approvalStatus; |
| | | } |
| | |
| | | |
| | | @ExcelProperty(value = "认证身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String IdCard; |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 2) |
| | | private String phone; |
| | |
| | | @ExcelProperty(value = "认证时间", index = 4) |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "健在(是/否)", index = 5) |
| | | private Integer isAlive; |
| | | @ExcelProperty(value = "认证期数", index = 5) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "标记", index = 6) |
| | | private String mark; |
| | | |
| | | /** |
| | | * 年龄 |
| | |
| | | |
| | | @ExcelProperty(value = "认证身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String IdCard; |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 2) |
| | | private String phone; |
| | |
| | | @ExcelProperty(value = "认证时间", index = 4) |
| | | private String authDate; |
| | | |
| | | @ExcelProperty(value = "健在(是/否)", index = 5) |
| | | private String isAlive; |
| | | @ExcelProperty(value = "认证期数", index = 5) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "错误信息", index = 6) |
| | | @ExcelProperty(value = "标记", index = 6) |
| | | private String mark; |
| | | |
| | | @ExcelProperty(value = "错误信息", index = 7) |
| | | private String mistake; |
| | | |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "标记", index = 11) |
| | | @ExcelProperty(value = "认证方式", index = 11) |
| | | private String authMethod; |
| | | |
| | | |
| | | @ExcelProperty(value = "标记", index = 12) |
| | | private String mark; |
| | | |
| | | @ExcelProperty(value = "认证状态", index = 12) |
| | | @ExcelProperty(value = "认证状态", index = 13) |
| | | private String authStatus; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | |
| | | public class ComElderAuthRecordVO { |
| | | |
| | | @ApiModelProperty(value = "自增id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "高龄老人id") |
| | |
| | | |
| | | @ApiModelProperty(value = "提交用户id") |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证)") |
| | | private Integer authMethod; |
| | | |
| | | @ApiModelProperty(value = "提交用户姓名") |
| | | private String submitUserName; |
| | |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "审核时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date approvalDate; |
| | | |
| | | @ApiModelProperty(value = "标记") |
| | |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "本期认证总人数") |
| | | private Integer authAmount; |
| | | |
| | | @ApiModelProperty(value = "本期认证成功人数") |
| | | private Integer authSucceedAmount; |
| | | |
| | | @ApiModelProperty(value = "本期未认证人数") |
| | | private Integer authNoAmount; |
| | | |
| | | @ApiModelProperty(value = "待审核状态id集合列表") |
| | | private List<Long> nextIds; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | } |
| | |
| | | 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; |
| | |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "养老金开始领取日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date receiveAllowanceBegin; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "创建用户") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "修改用户") |
| | |
| | | |
| | | @ExcelProperty(value = "认证身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String IdCard; |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 2) |
| | | private String phone; |
| | |
| | | @ExcelProperty(value = "认证时间", index = 4) |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "健在(是/否)", index = 5) |
| | | private Integer isAlive; |
| | | @ExcelProperty(value = "认证期数", index = 5) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "标记", index = 6) |
| | | private String mark; |
| | | |
| | | /** |
| | | * 年龄 |
| | |
| | | |
| | | @ExcelProperty(value = "认证身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String IdCard; |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 2) |
| | | private String phone; |
| | |
| | | @ApiModelProperty(value = "养老金用户id") |
| | | private Long pensionerId; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证)") |
| | | private Integer authMethod; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("物业公司实体") |
| | | public class ComPropertyVO { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 简介 |
| | | */ |
| | | @ApiModelProperty(value = "简介") |
| | | private String introduction; |
| | | |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "联系人姓名") |
| | | private String contactName; |
| | | |
| | | /** |
| | | * 联系人手机 |
| | | */ |
| | | @ApiModelProperty(value = "联系人手机") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("账号") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("密码") |
| | | private String password; |
| | | |
| | | @ApiModelProperty("权限id") |
| | | private Long roleId; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("小区名称") |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty("小区id") |
| | | private Long areaId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import com.panzhihua.common.model.helper.sensitive.Sensitive; |
| | | import com.panzhihua.common.model.helper.sensitive.SensitiveStrategy; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: IdentityAuthRecordDetailVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证记录详情 |
| | | * @author: hans |
| | | * @date: 2021/09/03 15:32 |
| | | */ |
| | | @Data |
| | | @ApiModel("身份认证记录详情") |
| | | @EncryptDecryptClass |
| | | public class IdentityAuthRecordDetailVO { |
| | | |
| | | @ApiModelProperty(value = "自增id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | @Sensitive(strategy = SensitiveStrategy.USERNAME) |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "现居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "管辖社区") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ApiModelProperty(value = "认证状态(1.待审核 2.认证失败 3.已认证)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "认证视频url") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "驳回原因") |
| | | private String rejectReason; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class VillageVO { |
| | | private String value; |
| | | private String label; |
| | | List<BuildingVO> children; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientConsultationStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家咨询量 |
| | | * @author: hans |
| | | * @date: 2021/09/16 13:49 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家咨询量") |
| | | public class ConvenientConsultationStatisticsVO { |
| | | |
| | | private Long merchantId; |
| | | |
| | | private Integer totalConsultationNum; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.enums.MerchantBusinessPeriod; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientMerchantVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家信息 |
| | | * @author: hans |
| | | * @date: 2021/09/16 13:49 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家信息") |
| | | public class ConvenientMerchantVO { |
| | | |
| | | @ApiModelProperty("商家ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("商家名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("商家logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("联系人") |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("负责人身份证号码") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("咨询电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("商家地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("营业开始时间") |
| | | @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8") |
| | | private Date beginAt; |
| | | |
| | | @ApiModelProperty("营业截止时间") |
| | | @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8") |
| | | private Date endAt; |
| | | |
| | | @ApiModelProperty("营业周期") |
| | | private MerchantBusinessPeriod period; |
| | | |
| | | @ApiModelProperty("商家介绍") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty("营业状态") |
| | | private Integer businessStatus; |
| | | |
| | | @ApiModelProperty("总咨询量") |
| | | private Integer consultationVolume; |
| | | |
| | | @ApiModelProperty("月咨询量") |
| | | private Integer monthConsultationVolume; |
| | | |
| | | @ApiModelProperty("日咨询量") |
| | | private Integer dayConsultationVolume; |
| | | |
| | | @ApiModelProperty("总浏览量") |
| | | private Integer viewNum; |
| | | |
| | | @ApiModelProperty("月浏览量") |
| | | private Integer monthViewNum; |
| | | |
| | | @ApiModelProperty("日总浏览量") |
| | | private Integer dayViewNum; |
| | | |
| | | @ApiModelProperty("商家绑定账户") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("商家账户状态(1.启用 2.禁用)") |
| | | private Integer accountStatus; |
| | | |
| | | @ApiModelProperty("所属社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("所属社区名称") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty("服务范围,多个服务类型','拼接") |
| | | private String serviceScope; |
| | | |
| | | @ApiModelProperty("服务类型id列表") |
| | | private List<Long> serviceIds; |
| | | |
| | | @ApiModelProperty("该商家存有商品,最多返回两条") |
| | | private List<ConvenientProductVO> productVOList; |
| | | |
| | | public void setPeriod(String period) { |
| | | this.period = MerchantBusinessPeriod.valueOf(period); |
| | | } |
| | | |
| | | public void setBusinessStatus(Boolean businessStatus) { |
| | | this.businessStatus = businessStatus ? 1 : 0; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ConvenientProductCategoryVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 产品分类信息 |
| | | * @author: hans |
| | | * @date: 2021/09/20 11:08 |
| | | */ |
| | | @Data |
| | | @ApiModel("产品分类信息") |
| | | public class ConvenientProductCategoryVO { |
| | | |
| | | @ApiModelProperty("分类ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("权重") |
| | | private Integer weight; |
| | | |
| | | @ApiModelProperty("创建人") |
| | | private String createdBy; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createdAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientProductLevelInfoVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 商品层级信息VO |
| | | * @author: hans |
| | | * @date: 2021/09/23 9:55 |
| | | */ |
| | | @Data |
| | | @ApiModel("商品层级信息VO") |
| | | public class ConvenientProductLevelInfoVO { |
| | | |
| | | @ApiModelProperty("商品分类名称") |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty("该分类下商品") |
| | | private List<ConvenientProductVO> productVOList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientProductShelfVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家后台产品信息 |
| | | * @author: hans |
| | | * @date: 2021/09/20 21:23 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家后台产品信息") |
| | | public class ConvenientProductShelfVO { |
| | | |
| | | @ApiModelProperty("上架产品数量") |
| | | private Integer onShelfTotalNum; |
| | | |
| | | @ApiModelProperty("下架产品数量") |
| | | private Integer offShelfTotalNum; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ConvenientProductSpecificationVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 产品规格信息 |
| | | * @author: hans |
| | | * @date: 2021/09/20 20:43 |
| | | */ |
| | | @Data |
| | | @ApiModel("产品规格信息") |
| | | public class ConvenientProductSpecificationVO { |
| | | |
| | | @ApiModelProperty("规格ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("规格名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("价格") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty("产品图片") |
| | | private String image; |
| | | |
| | | @ApiModelProperty("规格所属产品ID") |
| | | private Long productId; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createdAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientProductVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家后台产品信息 |
| | | * @author: hans |
| | | * @date: 2021/09/20 21:23 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家后台产品信息") |
| | | public class ConvenientProductVO { |
| | | |
| | | @ApiModelProperty("产品ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("产品名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("产品图片") |
| | | private String image; |
| | | |
| | | @ApiModelProperty("产品介绍") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty("所属分类") |
| | | private Long categoryId; |
| | | |
| | | @ApiModelProperty("所属商家") |
| | | private Long merchantId; |
| | | |
| | | @ApiModelProperty("所属分类名称") |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty("产品规格") |
| | | private List<ConvenientProductSpecificationVO> productSpecificationVOList; |
| | | |
| | | @ApiModelProperty("上架状态,1.上架 0.下架") |
| | | private Integer onShelf; |
| | | |
| | | @ApiModelProperty("上架时间") |
| | | private Date onShelfAt; |
| | | |
| | | @ApiModelProperty("浏览量") |
| | | private Integer viewNum; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientServiceCategoryVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务分类信息 |
| | | * @author: hans |
| | | * @date: 2021/09/16 10:06 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务分类信息") |
| | | public class ConvenientServiceCategoryVO { |
| | | |
| | | @ApiModelProperty("分类ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("分类图标") |
| | | private String icon; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("权重") |
| | | private Integer weight; |
| | | |
| | | @ApiModelProperty("创建人") |
| | | private String createdBy; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createdAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientViewStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家浏览量 |
| | | * @author: hans |
| | | * @date: 2021/09/16 13:49 |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服务商家浏览量") |
| | | public class ConvenientViewStatisticsVO { |
| | | |
| | | private Long merchantId; |
| | | |
| | | private Integer totalViewNum; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ExportMerchantVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 商家导出VO |
| | | * @author: hans |
| | | * @date: 2021/09/23 15:41 |
| | | */ |
| | | @Data |
| | | public class ExportMerchantVO { |
| | | |
| | | private Long id; |
| | | |
| | | @ExcelProperty("商家名称") |
| | | private String name; |
| | | |
| | | @ExcelProperty("联系人") |
| | | private String contacts; |
| | | |
| | | @ExcelProperty("负责人身份证号") |
| | | private String idCard; |
| | | |
| | | @ExcelProperty("咨询电话") |
| | | private String phone; |
| | | |
| | | @ExcelProperty("商家地址") |
| | | private String address; |
| | | |
| | | @ExcelProperty("营业时间") |
| | | private String businessTime; |
| | | |
| | | @ExcelProperty("商家介绍") |
| | | private String introduction; |
| | | |
| | | @ExcelProperty("营业状态") |
| | | private String businessStatus; |
| | | |
| | | @ExcelProperty("总咨询量") |
| | | private Integer consultationVolume; |
| | | |
| | | @ExcelProperty("管理账号") |
| | | private String account; |
| | | |
| | | @ExcelProperty("账户状态") |
| | | private String accountStatus; |
| | | |
| | | @ExcelProperty("所属社区") |
| | | private String communityName; |
| | | |
| | | @ExcelProperty("服务范围") |
| | | private String serviceScope; |
| | | |
| | | public void setBusinessStatus(Boolean businessStatus) { |
| | | this.businessStatus = businessStatus ? "在营" : "已关闭"; |
| | | } |
| | | |
| | | public void setBusinessStatus(String businessStatus) { |
| | | this.businessStatus = businessStatus; |
| | | } |
| | | |
| | | public void setAccountStatus(Integer accountStatus) { |
| | | this.accountStatus = accountStatus.intValue() == 1 ? "启用" : "禁用"; |
| | | } |
| | | |
| | | public void setAccountStatus(String accountStatus) { |
| | | this.accountStatus = accountStatus; |
| | | } |
| | | |
| | | public void setBusinessTimeTime(String businessTime) { |
| | | if (businessTime.contains("EVERY_DAY")) { |
| | | this.businessTime = businessTime.replace("EVERY_DAY", "每天:"); |
| | | } else if (businessTime.contains("WEEKDAY")) { |
| | | this.businessTime = businessTime.replace("WEEKDAY", "周一至周五:"); |
| | | } else if (businessTime.contains("WEEKEND")) { |
| | | this.businessTime = businessTime.replace("WEEKEND", "周末:"); |
| | | } else { |
| | | this.businessTime = businessTime; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.elders; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @deprecated 高龄老人认证统计信息 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄老人认证统计信息") |
| | | public class ComEldersAuthStatisticHeaderVO { |
| | | |
| | | @ApiModelProperty(value = "本期总人数") |
| | | private Integer allCount; |
| | | |
| | | @ApiModelProperty(value = "本期认证成功总人数") |
| | | private Integer yesCount; |
| | | |
| | | @ApiModelProperty(value = "本期认证失败总人数") |
| | | private Integer noCount; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.elders; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @deprecated 高龄老人认证统计信息 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄老人认证统计信息") |
| | | @EncryptDecryptClass |
| | | public class ComEldersAuthStatisticVO { |
| | | |
| | | @ApiModelProperty(value = "认证记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "认证姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "认证用户手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "认证用户身份证") |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "性别(1.男 2.女 3.其他)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)") |
| | | private Integer personnelCategory; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证 3.线下认证)") |
| | | private Integer authMethod; |
| | | |
| | | @ApiModelProperty(value = "标记") |
| | | private String mark; |
| | | |
| | | @ApiModelProperty(value = "是否已认证(1.已认证 2.未认证)") |
| | | private Integer isAuth; |
| | | |
| | | @ApiModelProperty(value = "提交用户id") |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "提交用户名称") |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty(value = "审核人名称") |
| | | private String approvalName; |
| | | |
| | | @ApiModelProperty(value = "现居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证视频地址") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "审核状态(1.待审核 2.驳回 3.通过)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "审核人id") |
| | | private Long approverId; |
| | | |
| | | @ApiModelProperty(value = "审核时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date approvalDate; |
| | | |
| | | @ApiModelProperty(value = "认证用户生日") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.elders; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @deprecated 养老认证统计信息 |
| | | */ |
| | | @Data |
| | | @ApiModel("养老认证统计信息") |
| | | @EncryptDecryptClass |
| | | public class ComPensionAuthStatisticVO { |
| | | |
| | | @ApiModelProperty(value = "认证记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "认证姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "认证用户手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "认证用户身份证") |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "性别(1.男 2.女 3.其他)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证 3.线下认证)") |
| | | private Integer authMethod; |
| | | |
| | | @ApiModelProperty(value = "标记") |
| | | private String mark; |
| | | |
| | | @ApiModelProperty(value = "是否已认证(1.已认证 2.未认证)") |
| | | private Integer isAuth; |
| | | |
| | | @ApiModelProperty(value = "提交用户id") |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "提交用户名称") |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty(value = "审核人名称") |
| | | private String approvalName; |
| | | |
| | | @ApiModelProperty(value = "现居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证视频地址") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "审核状态(1.待审核 2.驳回 3.通过)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "审核人id") |
| | | private Long approverId; |
| | | |
| | | @ApiModelProperty(value = "审核时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date approvalDate; |
| | | |
| | | @ApiModelProperty(value = "认证用户生日") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.property; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | /** |
| | | * 位置信息 |
| | |
| | | * 处理时间 |
| | | */ |
| | | @ApiModelProperty(value = "处理时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date solveTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty("处理图片") |
| | | private String solveUrl; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @ApiModelProperty("经度") |
| | | private String longitude; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @ApiModelProperty("纬度") |
| | | private String latitude; |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "设备类型 1红外报警 2一键报警 ") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "街路巷id") |
| | | private Long villageId; |
| | | |
| | | @ApiModelProperty(value = "回显路径") |
| | | private String path; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.property; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("一件求助人员实体") |
| | | public class ComPropertyHelpVO { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | /** |
| | | * 照片 |
| | | */ |
| | | @ApiModelProperty(value = "照片") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 状态 0 禁用 1启用 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0 禁用 1启用") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.shop; |
| | | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: LoginMerchantUserInfoVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家登录信息 |
| | | * @author: hans |
| | | * @date: 2021/09/17 18:46 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "便民服务商家登录信息") |
| | | public class LoginMerchantUserInfoVO extends LoginUserInfoVO { |
| | | @ApiModelProperty("用户商铺信息") |
| | | private ConvenientMerchantVO merchantInfo; |
| | | } |
| | |
| | | @ApiModelProperty(value = "用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = "身份证") |
| | | private String idCard; |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date lastLoginTime; |
| | | |
| | | @ApiModelProperty("用户类型(用户类型 1 小程序 2 运营平台 3 社区平台 5 商家后台 6 网格综治APP 7 网格综治后台 8大屏 9城管后台 10一键报警app)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("是否是志愿者(0.否 1.是)") |
| | | private Integer isVolunteer; |
| | | |
| | | @ApiModelProperty("是否是党员(0.否 1.是)") |
| | | private Integer isPartymember; |
| | | |
| | | /** |
| | | * 用户类型(用户类型 1 小程序 2 运营平台 3 社区平台 5 商家后台 6 网格综治APP 7 网格综治后台 8大屏 9城管后台 10一键报警app) |
| | | */ |
| | | public interface type{ |
| | | int xcx = 1; |
| | | int yyht = 2; |
| | | int sqht = 3; |
| | | } |
| | | |
| | | /** |
| | | * 是否枚举(0.否 1.是) |
| | | */ |
| | | public interface isOk{ |
| | | int yes = 1; |
| | | int no = 0; |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/loginCgBackage") |
| | | R loginCgBackage(@RequestParam("account") String account, @RequestParam("password") String password); |
| | | |
| | | /** |
| | | * 一键报警APP登录 |
| | | * @param account 账号 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginAlarmApp") |
| | | R loginAlarmApp(@RequestParam("account") String account, @RequestParam("password") String password); |
| | | |
| | | /** |
| | | * 便民服务商家后台登录 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginMerchantBackStage") |
| | | R loginMerchantBackStage(@RequestParam("account") String account, @RequestParam("password") String password); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO; |
| | | import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO; |
| | | import com.panzhihua.common.model.dtos.community.AddComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.CancelRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComExServicemanDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarSaveDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseEditAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngRealCompanyBelongsDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComOpsHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportHandleDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportRectifyDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordPageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwRotaPageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwRotaSaveDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwSafetyWorkEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.DisabledPersonsDTO; |
| | | import com.panzhihua.common.model.dtos.community.EditComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthAddByFamilyDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthElderlyDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthFeedbackAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportComMngCarExcelDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportRealAssetsExcelDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportRealCompanyExcelDTO; |
| | | import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; |
| | | import com.panzhihua.common.model.dtos.community.GrantRewardDTO; |
| | | import com.panzhihua.common.model.dtos.community.KeyPersonInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComEldersRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngCarDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngRealAssetsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngRealCompanyDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComOpsHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComStreetDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthElderlyDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthHistoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageQuestnaireAnswerDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageQuestnaireDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageQuestnaireSubDetailsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticAgeGenderDTO; |
| | |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DeleteConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.OnShelfOrOffShelfProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ResetPasswordConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoActivityDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoClassifyDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.EditEasyPhotoActivityDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.ComActIntegralCommunityRankDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.EditComActIntegralRuleDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralRuleDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralTradeDTO; |
| | | import com.panzhihua.common.model.dtos.community.questnaire.StatisticsSummaryDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.dtos.community.reserve.AddReserveAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.CancelReserveRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveStatusDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.EditReserveAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.MakeHandleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeHandleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletSettlementAdminDTO; |
| | |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngVillageListExportAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.PageComMngVillagePopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.PageComMngVillagePopulationHouseDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.AddComActNeighborCircleAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.AddNeighborCircleTopicAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.AddNeighborCircleTopicAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborAddBrowseAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleDetailAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleTopicAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCommentAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCommentReplyAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborFabulousAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborForwardAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborReplyAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.DeleteNeighborCircleAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.DetailNeighborAllCommentByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.DetailNeighborCommentReplyByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopAddressDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopCartDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopEditNubCartDTO; |
| | |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyActivity; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.EditComActQuestnaireVo; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.neighbor.AddNeighborCircleAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ChangeCommentReplyStatusByAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ChangeCommentStatusByAdminVO; |
| | |
| | | /** |
| | | * 议事投票-详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @param discussDetailDTO |
| | | * 请求参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @PostMapping("detaildiscuss") |
| | | R detailDiscuss(@RequestParam("id") Long id); |
| | | R detailDiscuss(@RequestBody ComActDiscussDetailDTO discussDetailDTO); |
| | | |
| | | /** |
| | | * 分页查询评论下回复列表 |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return 回复列表 |
| | | */ |
| | | @PostMapping("discussCommentReplyAdmin") |
| | | R discussCommentReplyAdmin(@RequestBody ComActDiscussDetailDTO discussDetailDTO); |
| | | |
| | | /** |
| | | * 议事投票-删除 |
| | |
| | | R pageDiscuss(@RequestBody PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 议事投票-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @PostMapping("pagediscussAdmin") |
| | | R pageDiscussAdmin(@RequestBody PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-查看 |
| | | * |
| | | * @param id |
| | |
| | | */ |
| | | @PostMapping("detaildiscusscomment") |
| | | R detailDiscussComment(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 议事投票评论详情 |
| | | * @param pageComActDiscussCommentDTO 请求参数 |
| | | * @return 议事投票详情 |
| | | */ |
| | | @PostMapping("detaildiscusscommentAdmin") |
| | | R detailDiscussCommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-置顶 |
| | |
| | | */ |
| | | @PostMapping("pagediscusscomment") |
| | | R pageDiscussComment(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @PostMapping("pagediscusscommentAdmin") |
| | | R pageDiscussCommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-分页查询 小程序 |
| | |
| | | R getElderAuthRecordsByIds(@RequestBody List<Long> ids); |
| | | |
| | | /** |
| | | * 导出高龄认证记录 exportElderAuthRecordsStatistic 导出高龄认证记录 |
| | | * 导出高龄认证统计记录 exportElderAuthRecordsStatistic |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/authRecords/statistic/export") |
| | | R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthStatisticDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 分页查询养老金人员认证记录 pagePensionAuthRecords 分页查询养老金人员认证记录 |
| | |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/statistic/export") |
| | | R exportPensionAuthRecordsStatistic(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/authtype") |
| | | R communityPensionAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) setPensionAuthType 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PutMapping("/elders/pensionAuthRecords/authType/{type}") |
| | | R setPensionAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type); |
| | | |
| | | /** |
| | | * 小程序-查询疫苗分类列表 |
| | |
| | | * @param eldersAuthTypeQueryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/elders/authtype") |
| | | @PostMapping("/elders/authType") |
| | | R communityElderAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | |
| | | R editSysConfValue(@RequestParam("communityId") Long communityId,@RequestParam("status") Integer status); |
| | | |
| | | /** |
| | | * 议事投票后台公布结果 |
| | | * @param publishResultDTO 请求参数 |
| | | * @return 公布结果 |
| | | */ |
| | | @PostMapping("publishResultAdmin") |
| | | R publishResultAdmin(@RequestBody ComActDiscussPublishResultDTO publishResultDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论/回复删除 |
| | | * @param id 评论/回复id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("deleteDiscussCommentAdmin") |
| | | R deleteDiscussCommentAdmin(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 查询社区可发布议事投票权限配置 |
| | | * @param communityId 社区id |
| | | * @return 社区可发布议事投票权限配置 |
| | | */ |
| | | @GetMapping("discussJurisdictionGet") |
| | | R discussJurisdictionGet(@RequestParam("communityId") Long communityId,@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | * @param communityId 社区id |
| | | * @param value 需要设置的参数值 |
| | | * @return 设置结果 |
| | | */ |
| | | @GetMapping("discussJurisdictionSet") |
| | | R discussJurisdictionSet(@RequestParam("communityId") Long communityId, @RequestParam("value") String value); |
| | | |
| | | /** |
| | | * 议事投票检测状态定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @GetMapping("timedTaskDiscussInspectStatus") |
| | | R timedTaskDiscussInspectStatus(); |
| | | |
| | | /** |
| | | * 一起议增加浏览量 |
| | | * @param discussId 一起议主键id |
| | | */ |
| | | @PostMapping("discuss/increase-view-num") |
| | | void increaseViewNum(@RequestParam("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 定时任务每半小时执行一次将一起议浏览量写入到表中 |
| | | */ |
| | | @PostMapping("discuss/write-view-num") |
| | | R timedTaskWriteDiscussViewNumToTable(); |
| | | |
| | | /** |
| | | * 公布/编辑一起议投票结果 |
| | | * @param comActDiscussDTO |
| | | * @return 请求结果 |
| | | */ |
| | | @PostMapping("discuss/edit-result") |
| | | R editDiscussResult(@RequestBody ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 定时任务扫描高龄认证记录信息 |
| | | * @return 执行结果 |
| | | */ |
| | |
| | | */ |
| | | @GetMapping("/reserve/list") |
| | | R reserveListApplets(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 查询社区高龄认证方式(1.视频认证 2.人脸核验) |
| | | * @param eldersAuthTypeQueryDTO 请求参数 |
| | | * @return 社区高龄认证方式(1.视频认证 2.人脸核验) |
| | | */ |
| | | @PostMapping("/elders/new/authtype") |
| | | R communityEldersAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | | * 设置当前社区高龄认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | */ |
| | | @PutMapping("/elders/new/authType/{type}") |
| | | R setEldersAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type); |
| | | |
| | | /** |
| | | * 新增身份认证 |
| | | * @param addIdentityAuthDTO 新增身份认证请求参数 |
| | | * @return 新增结果结果 |
| | | */ |
| | | @PostMapping("/identity-auth/add") |
| | | R addIdentityAuth(@RequestBody AddIdentityAuthDTO addIdentityAuthDTO); |
| | | |
| | | /** |
| | | * 分页查询身份认证记录 |
| | | * @param pageIdentityAuthRecordDTO 分页查询身份认证记录参数 |
| | | * @return 身份认证记录列表 |
| | | */ |
| | | @PostMapping("/identity-auth/record/page") |
| | | R queryRecordWithPage(@RequestBody PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取身份认证详情 |
| | | * @param authType 认证类型 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | @GetMapping("/identity-auth/detail") |
| | | R retrieveIdentityAuthDetail(@RequestParam("authType") Integer authType, |
| | | @RequestParam("identityAuthId") Long identityAuthId); |
| | | |
| | | /** |
| | | * 获取身份认证方式 |
| | | * @param communityId |
| | | * @param identityAuthType |
| | | * @return 认证方式 |
| | | */ |
| | | @GetMapping("/identity-auth/mode") |
| | | R getIdentityAuthMode(@RequestParam(value = "communityId") Long communityId, |
| | | @RequestParam(value = "identityAuthType") Integer identityAuthType); |
| | | |
| | | /** |
| | | * 获取身份认证人脸核验token |
| | | * @param getIdentityEidTokenDTO |
| | | * @return token |
| | | */ |
| | | @PostMapping("/identity-auth/getEidToken") |
| | | R getEidToken(@RequestBody GetIdentityEidTokenDTO getIdentityEidTokenDTO); |
| | | |
| | | /** |
| | | * 一起议获取是否有发布权 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("discuss/permissions") |
| | | R getDiscussPermissions(@RequestBody ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | @PostMapping("/elders/auth/statistic/page") |
| | | R pageAuthStatisticAdmin(@RequestBody PageElderAuthStatisticDTO pageElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @PostMapping("/elders/auth/statistic/sign") |
| | | R signAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-统计表头数据 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计表头数据 |
| | | */ |
| | | @PostMapping("/elders/auth/header/statistic") |
| | | R getAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | /** |
| | | * 养老认证统计-分页查询 |
| | | * @param pensionAuthStatisticDTO 请求参数 |
| | | * @return 养老认证统列表 |
| | | */ |
| | | @PostMapping("/elders/pension/auth/statistic/page") |
| | | R pagePensionAuthStatisticAdmin(@RequestBody PagePensionAuthStatisticDTO pensionAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证记标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @PostMapping("/elders/pension/auth/statistic/sign") |
| | | R signPensionAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证表头统计 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计结果 |
| | | */ |
| | | @PostMapping("/elders/pension/auth/header/statistic") |
| | | R getPensionAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comActSocialOrg/queryAll") |
| | | R comActSocialOrgSelectAll(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActSocialOrg 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comActSocialOrg") |
| | | R comActSocialOrgInsert(@RequestBody ComActSocialOrgVO comActSocialOrg); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActSocialOrg 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comActSocialOrg/update") |
| | | R comActSocialOrgUpdate(@RequestBody ComActSocialOrgVO comActSocialOrg); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comActSocialOrg/del") |
| | | R comActSocialOrgDelete(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comActCommittee/queryAll") |
| | | R comActCommitteeSelectAll(@RequestBody CommonPage commonPage); |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActCommittee 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comActCommittee") |
| | | R comActCommitteeInsert(@RequestBody ComActCommiteeVO comActCommittee); |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActCommittee 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comActCommittee/update") |
| | | R comActCommitteeUpdate(@RequestBody ComActCommiteeVO comActCommittee); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comActCommittee/del") |
| | | R comActCommitteeDelete(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comProperty/queryAll") |
| | | R comPropertySelectAll(@RequestBody CommonPage commonPage); |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comProperty") |
| | | R comPropertyInsert(@RequestBody ComPropertyVO comPropertyVO); |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comProperty/update") |
| | | R comPropertyUpdate(@RequestBody ComPropertyVO comPropertyVO); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comProperty/del") |
| | | R comPropertyDelete(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comActFourMember/queryAll") |
| | | R comActFourMemberSelectAll(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comActFourMember/{id}") |
| | | R comActFourMemberSelectOne(@PathVariable("id") Integer id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActFourMember 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comActFourMember") |
| | | R comActFourMemberInsert(@RequestBody ComActFourMemberVO comActFourMember); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActFourMember 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comActFourMember/update") |
| | | R comActFourMemberUpdate(@RequestBody ComActFourMemberVO comActFourMember); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param comActFourMember 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/comActFourMember/del") |
| | | R comActFourMemberDelete(@RequestBody ComActFourMemberVO comActFourMember); |
| | | |
| | | /** |
| | | * 楼栋查询 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/building/query") |
| | | R comActFourMemberQueryBuilding(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 查询房屋二级级联菜单 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @PostMapping("/common/data/population/second/list") |
| | | R getSecondHouseAddress(@RequestBody CascadeHouseDTO cascadeHouseDTO); |
| | | |
| | | /** |
| | | * 微心愿处理人列表 |
| | | * @param communityId 社区id |
| | | * @param type 处理人类型(1.后台用户 2.党员 3.志愿者) |
| | | * @return 处理人列表 |
| | | */ |
| | | @GetMapping("/wish/handle/list/admin") |
| | | R wishHandleListAdmin(@RequestParam(value = "communityId") Long communityId,@RequestParam("type") Integer type); |
| | | |
| | | /** |
| | | * 便民服务新增分类 |
| | | * @param convenientServiceCategoryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/service-category/add") |
| | | R addServiceCategory(@RequestBody ConvenientServiceCategoryDTO convenientServiceCategoryDTO); |
| | | |
| | | /** |
| | | * 便民服务分类编辑 |
| | | * @param convenientServiceCategoryDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/convenient/service-category/put") |
| | | R putServiceCategory(@RequestBody ConvenientServiceCategoryDTO convenientServiceCategoryDTO); |
| | | |
| | | /** |
| | | * 便民服务分类删除 |
| | | * @param categoryId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/convenient/service-category/delete") |
| | | R deleteServiceCategory(@RequestParam("categoryId") Long categoryId, @RequestParam("operator") Long operator); |
| | | |
| | | /** |
| | | * 获取便民服务分类详情 |
| | | * @param categoryId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/service-category/get") |
| | | R getServiceCategory(@RequestParam("categoryId") Long categoryId); |
| | | |
| | | /** |
| | | * 分页查询便民服务分类 |
| | | * @param pageConvenientServiceCategoryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/service-category/page") |
| | | R pageServiceCategory(@RequestBody PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO); |
| | | |
| | | /** |
| | | * 便民服务新增商家 |
| | | * @param convenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/merchant/add") |
| | | R addMerchant(@RequestBody ConvenientMerchantDTO convenientMerchantDTO); |
| | | |
| | | /** |
| | | * 编辑便民服务商家 |
| | | * @param convenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/convenient/merchant/put") |
| | | R putMerchant(@RequestBody ConvenientMerchantDTO convenientMerchantDTO); |
| | | |
| | | /** |
| | | * 删除便民服务商家 |
| | | * @param merchantId |
| | | * @param operator |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/convenient/merchant/delete") |
| | | R deleteMerchant(@RequestParam("merchantId") Long merchantId, @RequestParam("operator") Long operator); |
| | | |
| | | /** |
| | | * 分页查询便民服务商家 |
| | | * @param pageConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/merchant/page") |
| | | R pageMerchant(@RequestBody PageConvenientMerchantDTO pageConvenientMerchantDTO); |
| | | |
| | | /** |
| | | * 获取便民服务商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/merchant/get") |
| | | R getMerchant(@RequestParam("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 禁用/启用便民服务商家 |
| | | * @param disableOrEnableConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/convenient/merchant/disable-or-enable") |
| | | R disableOrEnableMerchant(@RequestBody DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO); |
| | | |
| | | /** |
| | | * 重置便民服务商家账号密码 |
| | | * @param resetPasswordConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/convenient/merchant/reset-password") |
| | | R resetPasswordMerchant(@RequestBody ResetPasswordConvenientMerchantDTO resetPasswordConvenientMerchantDTO); |
| | | |
| | | /** |
| | | * 获取所有便民服务分类 |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/service-category/all") |
| | | R getAllServiceCategories(); |
| | | |
| | | /** |
| | | * 获取用户便民服务商家详情 |
| | | * @param account 商家绑定账号 |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/getUserMerchantInfoByAccount") |
| | | R<ConvenientMerchantVO> getUserMerchantInfoByAccount(@RequestParam("account") String account); |
| | | |
| | | /** |
| | | * 获取商便民服务商家信息 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/merchantInfo") |
| | | R<ConvenientMerchantVO> getUserConvenientMerchantInfo(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 新增便民服务产品分类信息 |
| | | * @param convenientProductCategoryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/product-category/add") |
| | | R addProductCategory(@RequestBody ConvenientProductCategoryDTO convenientProductCategoryDTO); |
| | | |
| | | /** |
| | | * 编辑便民服务产品分类信息 |
| | | * @param convenientProductCategoryDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/convenient/product-category/put") |
| | | R putProductCategory(@RequestBody ConvenientProductCategoryDTO convenientProductCategoryDTO); |
| | | |
| | | /** |
| | | * 删除便民服务产品分类信息 |
| | | * @param categoryId |
| | | * @param operator |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/convenient/product-category/delete") |
| | | R deleteProductCategory(@RequestParam("categoryId") Long categoryId, @RequestParam("operator") Long operator); |
| | | |
| | | /** |
| | | * 获取便民服务产品分类详情 |
| | | * @param categoryId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/product-category/get") |
| | | R getProductCategory(@RequestParam("categoryId") Long categoryId); |
| | | |
| | | /** |
| | | * 分页查询便民服务产品分类信息 |
| | | * @param pageConvenientProductCategoryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/product-category/page") |
| | | R pageProductCategory(@RequestBody PageConvenientProductCategoryDTO pageConvenientProductCategoryDTO); |
| | | |
| | | /** |
| | | * 便民服务商家后台新增产品 |
| | | * @param convenientProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/product/add") |
| | | R addProduct(@RequestBody ConvenientProductDTO convenientProductDTO); |
| | | |
| | | /** |
| | | * 便民服务商家后台编辑产品 |
| | | * @param convenientProductDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/convenient/product/put") |
| | | R putProduct(@RequestBody ConvenientProductDTO convenientProductDTO); |
| | | |
| | | /** |
| | | * 便民服务商家后台获取产品详情 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/product/get") |
| | | R getProduct(@RequestParam("productId") Long productId); |
| | | |
| | | /** |
| | | * 便民服务商家后台分页获取产品信息 |
| | | * @param pageConvenientProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/product/page") |
| | | R pageProduct(@RequestBody PageConvenientProductDTO pageConvenientProductDTO); |
| | | |
| | | /** |
| | | * 便民服务商家后台删除产品信息 |
| | | * @param deleteConvenientProductDTO |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/convenient/product/delete") |
| | | R deleteProduct(@RequestBody DeleteConvenientProductDTO deleteConvenientProductDTO); |
| | | |
| | | /** |
| | | * 便民服务商家后台上架/下架产品 |
| | | * @param onShelfOrOffShelfProductDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/convenient/product/onShelf-or-offShelf") |
| | | R onShelfOrOffShelfProduct(@RequestBody OnShelfOrOffShelfProductDTO onShelfOrOffShelfProductDTO); |
| | | |
| | | /** |
| | | * 获取所有产品分类 |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/product-category/all") |
| | | R getAllProductCategory(); |
| | | |
| | | /** |
| | | * 获取该社区商家数量大于0的分类 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/service-category/suitable") |
| | | R getSuitableServiceCategories(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 获取该社区下的热门商家 |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/merchant/popular") |
| | | R getPopularMerchants(@RequestBody PagePopularMerchantDTO pagePopularMerchantDTO); |
| | | |
| | | /** |
| | | * 分页获取服务类型下商家信息 |
| | | * @param pageClassifyMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/merchant/classify") |
| | | R getClassifyMerchants(@RequestBody PageClassifyMerchantDTO pageClassifyMerchantDTO); |
| | | |
| | | /** |
| | | * 获取商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/merchant/detail") |
| | | R getMerchantDetail(@RequestParam("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 获取商家产品 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/product/list") |
| | | R getMerchantProduct(@RequestParam("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 获取产品详情 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/product/detail") |
| | | R getProductDetail(@RequestParam("productId") Long productId); |
| | | |
| | | /** |
| | | * 搜索商家信息 |
| | | * @param pageSearchDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/merchant/search") |
| | | R pageSearchMerchant(@RequestBody PageSearchDTO pageSearchDTO); |
| | | |
| | | /** |
| | | * 搜索商品信息 |
| | | * @param pageSearchDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/product/search") |
| | | R pageSearchProduct(@RequestBody PageSearchDTO pageSearchDTO); |
| | | |
| | | /** |
| | | * 增加商家店铺咨询量 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/merchant/consult") |
| | | R consultMerchant(@RequestParam("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 增加产品浏览量 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/product/incr-view") |
| | | R incrProductView(@RequestParam("productId") Long productId); |
| | | |
| | | /** |
| | | * 获取商家导出数据 |
| | | * @param exportMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/merchant/export") |
| | | R exportMerchant(@RequestBody ExportMerchantDTO exportMerchantDTO); |
| | | |
| | | /** |
| | | * 增加商家店铺浏览量 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/merchant/incr-view") |
| | | R incrMerchantView(@RequestParam("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 定时任务每隔半小时将商家浏览量和咨询量总值计入指定商家数据中 |
| | | * @return |
| | | */ |
| | | @PostMapping("/convenient/timedTaskWriteDataToMerchantJobHandler") |
| | | R timedTaskWriteDataToMerchantJobHandler(); |
| | | |
| | | /** |
| | | * 获取商家上下架产品数量 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/product/shelf-num") |
| | | R getProductShelfNum(@RequestParam("merchantId") Long merchantId); |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmSettingVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyEquipmentVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; |
| | | import com.panzhihua.common.model.vos.property.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 物业接口 |
| | |
| | | */ |
| | | @GetMapping("/comPropertyAlarmSetting") |
| | | R comPropertyAlarmSettingSelectOne(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comPropertyHelp/queryAll") |
| | | R comPropertyHelpSelectAll(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comPropertyHelp/{id}") |
| | | R comPropertyHelpSelectOne(@PathVariable("id") Serializable id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyHelp 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comPropertyHelp") |
| | | R comPropertyHelpInsert(@RequestBody ComPropertyHelpVO comPropertyHelp); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyHelp 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comPropertyHelp/update") |
| | | R comPropertyHelpUpdate(@RequestBody ComPropertyHelpVO comPropertyHelp); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comPropertyHelp/del") |
| | | R comPropertyHelpDelete(@RequestParam("id") Long id); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | */ |
| | | @PostMapping("changepassword") |
| | | R changePassword(@RequestBody ChangePasswordVO changePasswordVO); |
| | | |
| | | /** |
| | | * 重置密码用户登录密码默认admin123456 |
| | | * |
| | | * @param userId |
| | | * 新密码 |
| | | * @return 修改结果 |
| | | */ |
| | | @GetMapping("resetPassword") |
| | | R resetPassword(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 批量重置密码用户登录密码默认admin123456 |
| | | * |
| | | * @param userIds |
| | | * 新密码 |
| | | * @return 修改结果 |
| | | */ |
| | | @GetMapping("resetPasswordPatch") |
| | | R resetPasswordPatch(@RequestParam("userIds") Long[] userIds); |
| | | |
| | | /** |
| | | * 某社区后台人员查询 |
| | |
| | | */ |
| | | @PostMapping("adduserbackstage") |
| | | R addUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO); |
| | | |
| | | /** |
| | | * 新增社区后台物业,社会组织,业主委员会账户 |
| | | * |
| | | * @param administratorsUserVO |
| | | * 账户信息 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("adduserbackstageproperty") |
| | | R addUserBackstageProperty(@RequestBody AdministratorsUserVO administratorsUserVO); |
| | | |
| | | /** |
| | | * 编辑运营、社区后台账户 |
| | |
| | | */ |
| | | @GetMapping("getUserListByCommunityId") |
| | | R getUserListByCommunityId(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 检查当前用户是否是社区工作人员 |
| | | * @param phone |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("checkIsTeam") |
| | | R checkCurrentUserIsTeam(@RequestParam("phone") String phone, @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 便民服务新增商家账号 |
| | | * @param convenientMerchantDTO |
| | | * @return 商家用户id |
| | | */ |
| | | @PostMapping("insertMerchantAccount") |
| | | R addConvenientMerchantUser(@RequestBody ConvenientMerchantDTO convenientMerchantDTO); |
| | | |
| | | /** |
| | | * 修改便民服务商家绑定账号 |
| | | * @param userId |
| | | * @param account |
| | | * @return |
| | | */ |
| | | @PutMapping("putMerchantUserAccount") |
| | | R putUserAccount(@RequestParam("userId") Long userId, @RequestParam("account") String account); |
| | | |
| | | /** |
| | | * 禁用/启用便民服务商家用户 |
| | | * @param disableOrEnableConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("disableOrEnableMerchantUsers") |
| | | R disableOrEnableMerchantUsers(@RequestBody DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO); |
| | | } |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.panzhihua.common.constants.Constants; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | |
| | | return age - 1; |
| | | } |
| | | |
| | | /** |
| | | * 根据身份证号判断年龄段 |
| | | * @param idCard 身份证号 |
| | | * @return 年龄段(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上) |
| | | */ |
| | | public static int getAgeCategory(String idCard){ |
| | | int nub = -1; |
| | | int age = 0; |
| | | try { |
| | | age = IdcardUtil.getAgeByIdCard(idCard); |
| | | }catch (Exception e){ |
| | | return -1; |
| | | } |
| | | if (age >= Constants.EIGHTY && age < Constants.NINETY) { |
| | | nub = 1; |
| | | }else if (age >= Constants.NINETY && age < Constants.ONE_HUNDRED){ |
| | | nub = 2; |
| | | }else if (age >= Constants.ONE_HUNDRED){ |
| | | nub = 3; |
| | | } |
| | | return nub; |
| | | } |
| | | |
| | | public static int getAgeFromBirthTimes(long birthTimeLong) { |
| | | Date date = new Date(birthTimeLong * 1000l); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | |
| | | public static SimpleDateFormat ymdhm_format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | public static DateTimeFormatter format_ymd_String = DateTimeFormatter.ofPattern("yyMMdd"); |
| | | public static SimpleDateFormat yyyyMM_format = new SimpleDateFormat("yyyy-MM"); |
| | | public static SimpleDateFormat format_yyymmdd = new SimpleDateFormat("yyyyMMdd"); |
| | | private static DateTimeFormatter format_ymdhmssss = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"); |
| | | private static DateTimeFormatter format_ymds = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | private static DateTimeFormatter format_yms = DateTimeFormatter.ofPattern("yyyyMM"); |
| | | |
| | | /** |
| | | * 将日期对象格式化成指定的字符串格式 |
| | |
| | | // System.out.println(getFirstDayOfMonthString()); |
| | | // System.out.println(getDayOfMonthString()); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前年月字符串 |
| | | * @return 年月字符串 |
| | | */ |
| | | public static String getCurrentDateString_YYYY_MM() { |
| | | String nowtime = getCurrentDate().format(format_yms); |
| | | return nowtime; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActCommiteeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | 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; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"业主委员会"}) |
| | | @RestController |
| | | @RequestMapping("/comActCommittee") |
| | | public class ComActCommitteeApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "业主委员会列表",response = ComActCommiteeVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return this.communityService.comActCommitteeSelectAll(commonPage); |
| | | } |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActCommiteeVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增业主委员会") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActCommiteeVO comActCommiteeVO) { |
| | | comActCommiteeVO.setCommunityId(this.getCommunityId()); |
| | | return this.communityService.comActCommitteeInsert(comActCommiteeVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActCommiteeVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改业主委员会") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActCommiteeVO comActCommiteeVO) { |
| | | return this.communityService.comActCommitteeUpdate(comActCommiteeVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除业主委员会") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.communityService.comActCommitteeDelete(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActFourMemberVO; |
| | | 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; |
| | | |
| | | /** |
| | | * (ComActFourMember)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-23 10:13:31 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"四长四员"}) |
| | | @RestController |
| | | @RequestMapping("comActFourMember") |
| | | public class ComActFourMemberApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询",response = ComActFourMemberVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return this.communityService.comActFourMemberSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value ="通过主键查询单条数据") |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return this.communityService.comActFourMemberSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActFourMember 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation(value ="新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActFourMemberVO comActFourMember) { |
| | | comActFourMember.setCommunityId(this.getCommunityId()); |
| | | return this.communityService.comActFourMemberInsert(comActFourMember); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActFourMember 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation(value ="修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActFourMemberVO comActFourMember) { |
| | | return this.communityService.comActFourMemberUpdate(comActFourMember); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param comActFourMember 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation(value ="删除数据") |
| | | @PostMapping("del") |
| | | public R delete(@RequestBody ComActFourMemberVO comActFourMember) { |
| | | return this.communityService.comActFourMemberDelete(comActFourMember); |
| | | } |
| | | |
| | | /** |
| | | * 楼栋列表 |
| | | */ |
| | | @ApiOperation("楼栋列表") |
| | | @GetMapping("/building") |
| | | public R building(){ |
| | | return communityService.comActFourMemberQueryBuilding(this.getCommunityId()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | 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; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"社会组织"}) |
| | | @RestController |
| | | @RequestMapping("/comActSocialOrg") |
| | | public class ComActSocialOrgApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "社会组织列表",response = ComActSocialOrgVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return this.communityService.comActSocialOrgSelectAll(commonPage); |
| | | } |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActSocialOrg 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增社会组织") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActSocialOrgVO comActSocialOrg) { |
| | | comActSocialOrg.setCommunityId(this.getCommunityId()); |
| | | return this.communityService.comActSocialOrgInsert(comActSocialOrg); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActSocialOrg 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改社会组织") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActSocialOrgVO comActSocialOrg) { |
| | | return this.communityService.comActSocialOrgUpdate(comActSocialOrg); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除社会组织") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.communityService.comActSocialOrgDelete(id); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; |
| | | import com.panzhihua.common.service.property.PropertyService; |
| | | import com.panzhihua.community_backstage.util.MyAESUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.json.JSONObject; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.crypto.BadPaddingException; |
| | | import javax.crypto.IllegalBlockSizeException; |
| | | import javax.crypto.NoSuchPaddingException; |
| | | import java.security.InvalidKeyException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("comPropertyAlarm") |
| | | @Api(tags = "物业报警api") |
| | | public class ComPropertyAlarmApi extends BaseController { |
| | | private static final String key="nahankeji1234567"; |
| | | |
| | | @Resource |
| | | private PropertyService propertyService; |
| | | |
| | |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询",response = ComPropertyAlarmVO.class) |
| | | @PostMapping("queryAll/noToken") |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(2L); |
| | | return propertyService.comPropertyAlarmSelectAll(commonPage); |
| | |
| | | return propertyService.comPropertyAlarmInsert(comPropertyAlarmVO); |
| | | } |
| | | |
| | | // /** |
| | | // * 无验证新增数据 |
| | | // * |
| | | // * @param str 加密json |
| | | // * @return 新增结果 |
| | | // */ |
| | | // @ApiOperation(value = "无验证新增数据") |
| | | // @GetMapping("/noToken") |
| | | // public R insertNoAuth(String str) { |
| | | // if(!str.isEmpty()){ |
| | | // try { |
| | | // String result= MyAESUtil.Decrypt(str.replaceAll(" ", "+"), key); |
| | | // if(!result.isEmpty()){ |
| | | // ComPropertyAlarmVO comPropertyAlarmVO=JSON.parseObject(result,ComPropertyAlarmVO.class); |
| | | // if(comPropertyAlarmVO!=null){ |
| | | // return propertyService.comPropertyAlarmInsert(comPropertyAlarmVO); |
| | | // } |
| | | // } |
| | | // } catch (Exception e) { |
| | | // return R.fail("验证失败"); |
| | | // } |
| | | // |
| | | // } |
| | | // return R.fail("数据异常"); |
| | | // } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActCommiteeVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | 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; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"物业公司"}) |
| | | @RestController |
| | | @RequestMapping("/comProperty") |
| | | public class ComPropertyApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "物业公司列表",response = ComPropertyVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return this.communityService.comPropertySelectAll(commonPage); |
| | | } |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增物业公司") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyVO comPropertyVO) { |
| | | comPropertyVO.setCommunityId(this.getCommunityId()); |
| | | return this.communityService.comPropertyInsert(comPropertyVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改物业公司") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyVO comPropertyVO) { |
| | | return this.communityService.comPropertyUpdate(comPropertyVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除物业公司") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.communityService.comPropertyDelete(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyHelpVO; |
| | | import com.panzhihua.common.service.property.PropertyService; |
| | | 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; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * (ComPropertyHelp)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 16:43:12 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"一件求助人员"}) |
| | | @RestController |
| | | @RequestMapping("/comPropertyHelp") |
| | | public class ComPropertyHelpApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private PropertyService propertyService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询所有数据",response = ComPropertyVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.propertyService.comPropertyHelpSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "主键查询") |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Serializable id) { |
| | | return this.propertyService.comPropertyHelpSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyHelp 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation(value = "新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyHelpVO comPropertyHelp) { |
| | | comPropertyHelp.setCommunityId(this.getCommunityId()); |
| | | comPropertyHelp.setCreateTime(DateUtil.date()); |
| | | return this.propertyService.comPropertyHelpInsert(comPropertyHelp); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyHelp 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation(value = "修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyHelpVO comPropertyHelp) { |
| | | return this.propertyService.comPropertyHelpUpdate(comPropertyHelp); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation(value = "删除数据") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.propertyService.comPropertyHelpDelete(id); |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "后台列表接口",response = ComPropertyRepairVO.class) |
| | | @PostMapping("/queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | if(this.getAreaId()!=null&&this.getAreaId()!=0L){ |
| | | commonPage.setAreaId(this.getAreaId()); |
| | | } |
| | | return this.propertyService.comPropertyRepairSelectAll(commonPage); |
| | | } |
| | | |
| | |
| | | BASE64Encoder encoder = new BASE64Encoder(); |
| | | return encoder.encode(data); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询微心愿处理人列表接口") |
| | | @GetMapping("wish/handle/list") |
| | | @ApiImplicitParam(name = "type", value = "处理人类型(1.后台用户 2.党员 3.志愿者)", required = true) |
| | | public R wishHandleListAdmin(@RequestParam("type") Integer type) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | return communityService.wishHandleListAdmin(loginUserInfo.getCommunityId(),type); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | 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.ComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | 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.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtCategoryVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | |
| | | @Resource |
| | | private MinioUtil minioUtil; |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "分页查询便民服务商家", response = ComCvtBusinessVO.class) |
| | | @PostMapping("/business/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessDTO pageComCvtBusinessDTO) { |
| | |
| | | return communityService.pageComCvtBusiness(pageComCvtBusinessDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "新增便民服务商家") |
| | | @PostMapping("/business/add") |
| | | public R addComCvtBusiness(@RequestBody @Validated(AddGroup.class) ComCvtBusinessDTO comCvtBusinessDTO) { |
| | |
| | | return communityService.addComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "社区下拉列表", response = ComActVO.class) |
| | | @GetMapping("/community") |
| | | public R listCommunity() { |
| | | return communityService.listCommunityAll(); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "编辑便民服务商家") |
| | | @PutMapping("/business/put") |
| | | public R putComCvtBusiness(@Validated(AddGroup.class) @RequestBody ComCvtBusinessDTO comCvtBusinessDTO) { |
| | | return communityService.putComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "查询便民服务商家详情") |
| | | @GetMapping("/business/get") |
| | | public R getComCvtBusiness(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtBusiness(id); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "删除便民服务商家详情") |
| | | @DeleteMapping("/business/delete") |
| | | public R deleteComCvtBusiness(@RequestParam("id") Long id) { |
| | | return communityService.deleteComCvtBusiness(id); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "分页查询便民服务", response = ComCvtServeVO.class) |
| | | @PostMapping("/serve/page") |
| | | public R pageComCvtServe(@RequestBody PageComCvtServeDTO pageComCvtServeDTO) { |
| | | return communityService.pageComCvtServe(pageComCvtServeDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "查询便民服务所有分类,下拉框", response = ComCvtCategoryVO.class) |
| | | @PostMapping("/category/all") |
| | | public R allComCvtCategory() { |
| | | return communityService.allComCvtCategory(); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "新增便民服务") |
| | | @PostMapping("/serve/add") |
| | | public R addComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | |
| | | return communityService.addComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "编辑便民服务") |
| | | @PutMapping("/serve/put") |
| | | public R putComCvtServe(@RequestBody ComCvtServeDTO comCvtServeDTO) { |
| | | return communityService.putComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "查询便民服务详情", response = ComCvtServeVO.class) |
| | | @GetMapping("/serve/get") |
| | | public R getComCvtServe(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtServe(id); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "删除便民服务信息") |
| | | @DeleteMapping("/serve/delete") |
| | | public R deleteComCvtServe(@RequestParam("id") Long id) { |
| | | return communityService.deleteComCvtServe(id); |
| | | } |
| | | |
| | | @Deprecated |
| | | @ApiOperation(value = "下载模板-便民服务") |
| | | @GetMapping(value = "/serve/download/template") |
| | | public R downloadTemplate(HttpServletResponse response) throws IOException, SftpException { |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询便民服务商家", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/merchant/page") |
| | | public R pageMerchant(@RequestBody PageConvenientMerchantDTO pageConvenientMerchantDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | pageConvenientMerchantDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.pageMerchant(pageConvenientMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务商家详情", response = ConvenientMerchantVO.class) |
| | | @GetMapping("/merchant/get") |
| | | public R getMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.getMerchant(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "所有服务分类", response = ConvenientServiceCategoryVO.class) |
| | | @GetMapping("/service-category/all") |
| | | public R getAllServiceCategories() { |
| | | return communityService.getAllServiceCategories(); |
| | | } |
| | | |
| | | @ApiOperation(value = "便民服务商家导出") |
| | | @PostMapping("/merchant/export") |
| | | public R exportMerchant(@RequestBody ExportMerchantDTO exportMerchantDTO) { |
| | | String url = excelUrl; |
| | | String name = "便民服务商家.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r = communityService.exportMerchant(exportMerchantDTO); |
| | | if (R.isOk(r)) { |
| | | List<ExportMerchantVO> exportMerchantVOList = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExportMerchantVO.class); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | 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, ExportMerchantVO.class).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("便民服务商家导出").build(); |
| | | excelWriter.write(exportMerchantVOList, 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 + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return R.fail("未查询到数据"); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 15:30 |
| | | **/ |
| | | @Slf4j |
| | | @Api(tags = {"一起议"}) |
| | | @Api(tags = {"议事投票"}) |
| | | @RestController |
| | | @RequestMapping("/") |
| | | public class DiscussApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "一起议-新增") |
| | | @ApiOperation(value = "议事投票-新增-") |
| | | @PostMapping("discuss") |
| | | public R addDiscuss(@RequestBody @Validated(AddGroup.class) ComActDiscussDTO comActDiscussDTO) { |
| | | Integer type = comActDiscussDTO.getType(); |
| | | String voteTitle = comActDiscussDTO.getVoteTitle(); |
| | | List<ComActDiscussOptionDTO> discussOptions = comActDiscussDTO.getDiscussOptions(); |
| | | if (type.equals(2)) { |
| | | if (ObjectUtils.isEmpty(voteTitle)) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | comActDiscussDTO.setUserId(loginUserInfo.getUserId()); |
| | | comActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | if (comActDiscussDTO.getType().equals(ComActDiscussDTO.type.tp)) { |
| | | if (ObjectUtils.isEmpty(comActDiscussDTO.getVoteTitle())) { |
| | | return R.fail("投票标题不能为空"); |
| | | } |
| | | if (ObjectUtils.isEmpty(discussOptions)) { |
| | | if (ObjectUtils.isEmpty(comActDiscussDTO.getDiscussOptions())) { |
| | | return R.fail("选项不能为空"); |
| | | } |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | comActDiscussDTO.setUserId(userId); |
| | | comActDiscussDTO.setCommunityId(communityId); |
| | | return communityService.addDiscuss(comActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-详情", response = ComActDiscussVO.class) |
| | | @GetMapping("discuss") |
| | | public R detailDiscuss(@RequestParam("id") Long id) { |
| | | return communityService.detailDiscuss(id); |
| | | @ApiOperation(value = "议事投票-编辑-") |
| | | @PostMapping("editDiscuss") |
| | | public R editDiscuss(@RequestBody @Validated(AddGroup.class) ComActDiscussDTO comActDiscussDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | comActDiscussDTO.setUserId(loginUserInfo.getUserId()); |
| | | comActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | if (comActDiscussDTO.getType().equals(ComActDiscussDTO.type.tp)) { |
| | | if (ObjectUtils.isEmpty(comActDiscussDTO.getVoteTitle())) { |
| | | return R.fail("投票标题不能为空"); |
| | | } |
| | | if (ObjectUtils.isEmpty(comActDiscussDTO.getDiscussOptions())) { |
| | | return R.fail("选项不能为空"); |
| | | } |
| | | } |
| | | return communityService.editDiscuss(comActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-删除") |
| | | @ApiOperation(value = "议事投票-详情-", response = ComActDiscussVO.class) |
| | | @PostMapping("discussDetail") |
| | | public R detailDiscuss(@RequestBody ComActDiscussDetailDTO discussDetailDTO) { |
| | | return communityService.detailDiscuss(discussDetailDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-分页查询评论下回复列表-", response = ComActDiscussCommentVO.class) |
| | | @PostMapping("discuss/commment/reply") |
| | | public R discussCommentReplyAdmin(@RequestBody ComActDiscussDetailDTO discussDetailDTO) { |
| | | return communityService.discussCommentReplyAdmin(discussDetailDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-删除-") |
| | | @DeleteMapping("discuss") |
| | | public R deleteDiscuss(@RequestParam("id") Long id) { |
| | | return communityService.deleteDiscuss(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-回复") |
| | | @PostMapping("discusscomment") |
| | | @ApiOperation(value = "议事投票-回复-") |
| | | @PostMapping("addDiscussComment") |
| | | public R addDiscussComment(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO) { |
| | | String comment = comActDiscussCommentDTO.getComment(); |
| | | if (ObjectUtils.isEmpty(comment)) { |
| | |
| | | } |
| | | Long discussId = comActDiscussCommentDTO.getDiscussId(); |
| | | if (null == discussId || 0 == discussId) { |
| | | return R.fail("一起议主键不能为空"); |
| | | return R.fail("议事投票主键不能为空"); |
| | | } |
| | | comActDiscussCommentDTO.setUserId(this.getUserId()); |
| | | return communityService.addDiscussComment(comActDiscussCommentDTO); |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-分页查询", response = ComActDiscussVO.class) |
| | | @ApiOperation(value = "议事投票-分页查询-", response = ComActDiscussVO.class) |
| | | @PostMapping("pagediscuss") |
| | | public R pageDiscuss(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) { |
| | | pageComActDiscussDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.pageDiscuss(pageComActDiscussDTO); |
| | | return communityService.pageDiscussAdmin(pageComActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-查看", response = ComActDiscussCommentVO.class) |
| | | @ApiOperation(value = "议事投票-评论详情", response = ComActDiscussCommentVO.class) |
| | | @GetMapping("discusscomment") |
| | | public R detailDiscussComment(@RequestParam("id") Long id) { |
| | | return communityService.detailDiscussComment(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-置顶") |
| | | @ApiOperation(value = "议事投票-评论详情-改版后", response = ComActDiscussCommentVO.class) |
| | | @PostMapping("discusscomment") |
| | | public R detailDiscussCommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | return communityService.detailDiscussCommentAdmin(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-评论-置顶-") |
| | | @GetMapping("discusscommenttop") |
| | | public R putDiscussCommentTop(@RequestParam("id") Long id) { |
| | | return communityService.putDiscussCommentTop(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-回复") |
| | | @ApiOperation(value = "议事投票-评论-回复-") |
| | | @PostMapping("discusscommentback") |
| | | public R addDiscussCommentBack(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO) { |
| | | String comment = comActDiscussCommentDTO.getComment(); |
| | |
| | | return communityService.addDiscussCommentBack(comActDiscussCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-分页查询", response = ComActDiscussCommentVO.class) |
| | | @ApiOperation(value = "议事投票-评论列表分页查询-", response = ComActDiscussCommentVO.class) |
| | | @PostMapping("pagediscusscomment") |
| | | public R pageDiscussComment(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | Long id = pageComActDiscussCommentDTO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("一起议主键不能为空"); |
| | | return R.fail("议事投票主键不能为空"); |
| | | } |
| | | return communityService.pageDiscussComment(pageComActDiscussCommentDTO); |
| | | return communityService.pageDiscussCommentAdmin(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-公布结果/修改公布结果-") |
| | | @PostMapping("publishResult") |
| | | public R publishResult(@RequestBody ComActDiscussPublishResultDTO publishResultDTO) { |
| | | String result = publishResultDTO.getResult(); |
| | | if (ObjectUtils.isEmpty(result)) { |
| | | return R.fail("公布的结果不能为空"); |
| | | } |
| | | Long id = publishResultDTO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("议事投票id不能为空"); |
| | | } |
| | | publishResultDTO.setUserId(this.getUserId()); |
| | | return communityService.publishResultAdmin(publishResultDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-评论/回复删除-") |
| | | @DeleteMapping("discuss/comment/del") |
| | | public R deleteDiscussCommentAdmin(@RequestParam("id") Long id) { |
| | | return communityService.deleteDiscussCommentAdmin(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区可发布议事投票权限配置") |
| | | @GetMapping("discuss/jurisdiction/get") |
| | | public R discussJurisdictionGet() { |
| | | return communityService.discussJurisdictionGet(this.getCommunityId(),this.getUserId()); |
| | | } |
| | | |
| | | @PutMapping("/discuss/jurisdiction/set/{value}") |
| | | @ApiOperation(value = "设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员)") |
| | | public R discussJurisdictionSet(@PathVariable("value") String value) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.discussJurisdictionSet(this.getCommunityId(), value); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.listen.ComMngPopulationDrugExcelListen; |
| | | import com.panzhihua.common.listen.ComPensionAuthRecordImportExcelListen; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticHeaderVO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.*; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-分页查询高龄老人认证记录", response = ComElderAuthRecordVO.class) |
| | | @ApiOperation(value = "高龄认证-分页查询高龄老人认证记录---", response = ComElderAuthRecordVO.class) |
| | | @PostMapping("/authRecords/page") |
| | | public R pageElderAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-根据高龄认证记录id查询详情", response = ComElderAuthRecordVO.class) |
| | | @ApiOperation(value = "高龄认证-根据高龄认证记录id查询详情---", response = ComElderAuthRecordVO.class) |
| | | @GetMapping("/authRecords/detail") |
| | | public R detailElderAuthRecords(@RequestParam(value = "authRecordId") Long authRecordId) { |
| | | return communityService.detailElderAuthRecords(authRecordId); |
| | |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-高龄认证审核") |
| | | @ApiOperation(value = "高龄认证-高龄认证审核---") |
| | | @PostMapping("/authRecords/examine") |
| | | public R examineElderAuthRecords(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO) { |
| | | comElderAuthRecordVO.setApproverId(this.getUserId()); |
| | | return communityService.examineElderAuthRecords(comElderAuthRecordVO); |
| | | } |
| | | |
| | |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-高龄认证标记") |
| | | @ApiOperation(value = "高龄认证-高龄认证标记---") |
| | | @PostMapping("/authRecords/sign") |
| | | public R signElderAuthRecords(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO) { |
| | | return communityService.signElderAuthRecords(comElderAuthRecordVO); |
| | |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-高龄认证导出") |
| | | @ApiOperation(value = "高龄认证-高龄认证导出---") |
| | | @PostMapping("/authRecords/export") |
| | | public R exportElderAuthRecords(@RequestBody List<Long> ids) { |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-下载模板-线下认证居民导入") |
| | | @ApiOperation(value = "高龄认证统计-下载模板-线下认证居民导入---") |
| | | @GetMapping("/authRecords/uderLine/export") |
| | | public R exportUnderLineElderAuthRecords() { |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | List<List<String>> list = new ArrayList<>(); |
| | | list = headDataFilling(); |
| | | list = headDataFilling(true); |
| | | EasyExcel.write(fileName).head(list).sheet("高龄线下认证居民导入模板").doWrite(null); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-excel导入线下认证居民") |
| | | @ApiOperation(value = "下载导入失败高龄认证数据---") |
| | | @PostMapping("/download/error/authRecords") |
| | | public R downloadErrorAuthRecord(@RequestParam(value = "key") String key) { |
| | | List<ComElderAuthRecordImportMistakeExcelVO> list = new ArrayList<>(); |
| | | Boolean isExits = stringRedisTemplate.hasKey(key); |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | if (isExits) { |
| | | String json = valueOperations.get(key); |
| | | list = JSONArray.parseArray(json, ComElderAuthRecordImportMistakeExcelVO.class); |
| | | } |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "高龄认证记录导入错误数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | 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, ComElderAuthRecordImportMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("高龄认证记录导入错误数据").build(); |
| | | excelWriter.write(list, 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(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-excel导入线下认证居民---") |
| | | @PostMapping(value = "/authRecords/uderLine/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R importUnderLineElderAuthRecords(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-导出高龄认证统计") |
| | | @ApiOperation(value = "高龄认证统计-导出高龄认证统计---") |
| | | @PostMapping(value = "/authRecords/statistic/export") |
| | | public R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | public R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthStatisticDTO pageElderAuthRecordsDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | pageElderAuthRecordsDTO.setCommunityId(communityId); |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | |
| | | * @author txb |
| | | * @date 2021/9/07 14:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-分页查询养老金人员认证记录", response = ComPensionAuthRecordVO.class) |
| | | @ApiOperation(value = "养老认证-分页查询养老金人员认证记录---", response = ComPensionAuthRecordVO.class) |
| | | @PostMapping("/pensionAuthRecords/page") |
| | | public R pagePensionAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-根据养老认证记录id查询详情", response = ComPensionAuthRecordVO.class) |
| | | @ApiOperation(value = "养老认证-根据养老认证记录id查询详情---", response = ComPensionAuthRecordVO.class) |
| | | @GetMapping("/pensionAuthRecords/detail") |
| | | public R detailPensionAuthRecords(@RequestParam(value = "authRecordId") Long authRecordId) { |
| | | return communityService.detailPensionAuthRecords(authRecordId); |
| | |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-养老认证审核") |
| | | @ApiOperation(value = "养老认证-养老认证审核---") |
| | | @PostMapping("/pensionAuthRecords/examine") |
| | | public R examinePensionAuthRecords(@RequestBody ComPensionAuthRecordVO comPensionAuthRecordVO) { |
| | | return communityService.examinePensionAuthRecords(comPensionAuthRecordVO); |
| | |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-养老认证标记") |
| | | @ApiOperation(value = "养老认证-养老认证标记---") |
| | | @PostMapping("/pensionAuthRecords/sign") |
| | | public R signPensionAuthRecords(@RequestBody ComPensionAuthRecordVO comPensionAuthRecordVO) { |
| | | return communityService.signPensionAuthRecords(comPensionAuthRecordVO); |
| | |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-养老认证导出") |
| | | @ApiOperation(value = "养老认证-养老认证导出---") |
| | | @PostMapping("/pensionAuthRecords/export") |
| | | public R exportPensionAuthRecords(@RequestBody List<Long> ids) { |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-下载模板-线下认证居民导入") |
| | | @ApiOperation(value = "养老认证统计-下载模板-线下认证居民导入---") |
| | | @GetMapping("/pensionAuthRecords/uderLine/export") |
| | | public R exportUnderLinePensionAuthRecords() { |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | List<List<String>> list = new ArrayList<>(); |
| | | list = headDataFilling(); |
| | | list = headDataFilling(false); |
| | | EasyExcel.write(fileName).head(list).sheet("养老线下认证居民导入模板").doWrite(null); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-excel导入线下认证居民") |
| | | @ApiOperation(value = "养老认证统计-excel导入线下认证居民---") |
| | | @PostMapping(value = "/pensionAuthRecords/uderLine/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R importUnderLinePensionAuthRecords(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-导出养老认证统计") |
| | | @ApiOperation(value = "下载导入失败养老认证数据---") |
| | | @PostMapping("/download/error/pensionAuthRecords") |
| | | public R downloadErrorPensionPopulation(@RequestParam(value = "key") String key) { |
| | | List<ComPensionAuthRecordImportMistakeExcelVO> list = new ArrayList<>(); |
| | | Boolean isExits = stringRedisTemplate.hasKey(key); |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | if (isExits) { |
| | | String json = valueOperations.get(key); |
| | | list = JSONArray.parseArray(json, ComPensionAuthRecordImportMistakeExcelVO.class); |
| | | } |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "养老认证记录导入错误数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | 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, ComPensionAuthRecordImportMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("养老认证记录导入错误数据").build(); |
| | | excelWriter.write(list, 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(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-导出养老认证统计---") |
| | | @PostMapping(value = "/pensionAuthRecords/statistic/export") |
| | | public R exportPensionAuthRecordsStatistic(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | |
| | | } |
| | | } |
| | | |
| | | private List<List<String>> headDataFilling() { |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @ApiOperation(value = "查询社区养老认证方式---", response = R.class) |
| | | @GetMapping("/pensionAuthRecords/authtype") |
| | | public R communityPensionAuthType() { |
| | | Long communityId = this.getCommunityId(); |
| | | EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO = new EldersAuthTypeQueryDTO(); |
| | | eldersAuthTypeQueryDTO.setCommunityId(communityId); |
| | | return communityService.communityPensionAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | | @PutMapping("/pensionAuthRecords/authType/{type}") |
| | | @ApiOperation(value = "设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验)---", response = R.class) |
| | | R setPensionAuthType(@PathVariable("type") Integer type) { |
| | | if (type != 1 && type != 2) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.setPensionAuthType(this.getCommunityId(), type); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区高龄认证方式---", response = R.class) |
| | | @GetMapping("/authType") |
| | | public R communityAuthType() { |
| | | Long communityId = this.getCommunityId(); |
| | | EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO = new EldersAuthTypeQueryDTO(); |
| | | eldersAuthTypeQueryDTO.setCommunityId(communityId); |
| | | return communityService.communityElderAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | | @PutMapping("/authType/{type}") |
| | | @ApiOperation(value = "设置当前社区高龄认证方式:核验类型(1.视频认证 2.人脸核验)---", response = R.class) |
| | | public R setAuthType(@PathVariable("type") Integer type) { |
| | | if (type != 1 && type != 2) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.setEldersAuthType(this.getCommunityId(), type); |
| | | } |
| | | |
| | | /** |
| | | * 表头构建 |
| | | * @param isBigAge 是否是高龄认证 |
| | | * @return 表头数据 |
| | | */ |
| | | private List<List<String>> headDataFilling(Boolean isBigAge) { |
| | | List<List<String>> list = new ArrayList<List<String>>(); |
| | | List<String> head0 = new ArrayList<String>(); |
| | | head0.add("认证姓名"); |
| | |
| | | List<String> head3 = new ArrayList<String>(); |
| | | head3.add("现居住地址"); |
| | | List<String> head4 = new ArrayList<String>(); |
| | | head4.add("认证时间"); |
| | | head4.add("认证时间(年/月/日 如:2021/1/1)"); |
| | | List<String> head5 = new ArrayList<String>(); |
| | | head5.add("健在(是/否)"); |
| | | if(isBigAge){ |
| | | head5.add("认证期数(年月 注:月份小于10,需要在月数前加0 如:202101)"); |
| | | }else{ |
| | | head5.add("认证期数(即认证年份,2021)"); |
| | | } |
| | | |
| | | List<String> head6 = new ArrayList<String>(); |
| | | head6.add("标记(备注信息)"); |
| | | |
| | | list.add(head0); |
| | | list.add(head1); |
| | |
| | | list.add(head3); |
| | | list.add(head4); |
| | | list.add(head5); |
| | | list.add(head6); |
| | | return list; |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-分页查询高龄老人认证统计记录---",response = ComEldersAuthStatisticVO.class) |
| | | @PostMapping("/auth/statistic/page") |
| | | public R pageAuthStatisticAdmin(@RequestBody PageElderAuthStatisticDTO pageElderAuthStatisticDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | pageElderAuthStatisticDTO.setCommunityId(communityId); |
| | | return communityService.pageAuthStatisticAdmin(pageElderAuthStatisticDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-标记高龄老人认证统计记录---") |
| | | @PostMapping("/auth/statistic/sign") |
| | | public R signAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO) { |
| | | signElderAuthStatisticDTO.setUserId(this.getUserId()); |
| | | return communityService.signAuthStatisticAdmin(signElderAuthStatisticDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-表头统计---",response = ComEldersAuthStatisticHeaderVO.class) |
| | | @PostMapping(value = "/auth/header/statistic") |
| | | public R getAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO) { |
| | | statisticHeaderDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.getAuthHeaderStatisticAdmin(statisticHeaderDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-分页查询养老认证统计记录---",response = ComEldersAuthStatisticVO.class) |
| | | @PostMapping("/pensionAuthRecords/statistic/page") |
| | | public R pagePensionAuthStatisticAdmin(@RequestBody PagePensionAuthStatisticDTO pensionAuthStatisticDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | pensionAuthStatisticDTO.setCommunityId(communityId); |
| | | return communityService.pagePensionAuthStatisticAdmin(pensionAuthStatisticDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-标记养老认证统计记录---") |
| | | @PostMapping("/pensionAuthRecords/statistic/sign") |
| | | public R signPensionAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO) { |
| | | signElderAuthStatisticDTO.setUserId(this.getUserId()); |
| | | return communityService.signPensionAuthStatisticAdmin(signElderAuthStatisticDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-表头统计---",response = ComEldersAuthStatisticHeaderVO.class) |
| | | @PostMapping(value = "/pension/auth/header/statistic") |
| | | public R getPensionAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO) { |
| | | statisticHeaderDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.getPensionAuthHeaderStatisticAdmin(statisticHeaderDTO); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.LoginReturnsVO; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | R r = tokenService.loginCgBackage(account, password); |
| | | return r; |
| | | } |
| | | @ApiOperation(value = "一键报警APP登录",response = LoginReturnsVO.class) |
| | | @PostMapping("alarm/login") |
| | | public R alarmLogin(@RequestBody LoginBody loginBody){ |
| | | String account = loginBody.getAccount(); |
| | | String password = loginBody.getPassword(); |
| | | boolean empty = ObjectUtils.isEmpty(account); |
| | | boolean empty1 = ObjectUtils.isEmpty(password); |
| | | if (empty || empty1) { |
| | | return R.fail("账户密码不能为空"); |
| | | } |
| | | R r = tokenService.loginAlarmApp(account, password); |
| | | return r; |
| | | } |
| | | |
| | | } |
| | |
| | | private List<List<String>> headElderDataFilling() { |
| | | List<List<String>> list = new ArrayList<List<String>>(); |
| | | List<String> head0 = new ArrayList<String>(); |
| | | head0.add("姓名"); |
| | | head0.add("*姓名"); |
| | | List<String> head1 = new ArrayList<String>(); |
| | | head1.add("身份证(性别和年龄自动根据身份证号识别)"); |
| | | head1.add("*身份证(性别和年龄自动根据身份证号识别)"); |
| | | List<String> head2 = new ArrayList<String>(); |
| | | head2.add("民族"); |
| | | List<String> head3 = new ArrayList<String>(); |
| | |
| | | List<String> head11 = new ArrayList<String>(); |
| | | head11.add("房屋用途(住宅/公寓/宿舍/仓库/其他)"); |
| | | List<String> head12 = new ArrayList<String>(); |
| | | head12.add("控状态(常规/关注/管控)"); |
| | | head12.add("管控状态(常规/关注/管控)"); |
| | | List<String> head13 = new ArrayList<String>(); |
| | | head13.add("联系方式"); |
| | | List<String> head14 = new ArrayList<String>(); |
| | |
| | | List<String> head21 = new ArrayList<String>(); |
| | | head21.add("*健在(是/否)"); |
| | | List<String> head22 = new ArrayList<String>(); |
| | | head22.add("*高龄津贴开始领取时间(年-月-日)"); |
| | | head22.add("高龄津贴开始领取时间(年-月-日)"); |
| | | List<String> head23 = new ArrayList<String>(); |
| | | head23.add("*现居住地址"); |
| | | List<String> head24 = new ArrayList<String>(); |
| | |
| | | private List<List<String>> headPensionDataFilling() { |
| | | List<List<String>> list = new ArrayList<List<String>>(); |
| | | List<String> head0 = new ArrayList<String>(); |
| | | head0.add("姓名"); |
| | | head0.add("*姓名"); |
| | | List<String> head1 = new ArrayList<String>(); |
| | | head1.add("身份证(性别和年龄自动根据身份证号识别)"); |
| | | head1.add("*身份证(性别和年龄自动根据身份证号识别)"); |
| | | List<String> head2 = new ArrayList<String>(); |
| | | head2.add("民族"); |
| | | List<String> head3 = new ArrayList<String>(); |
| | |
| | | List<String> head4 = new ArrayList<String>(); |
| | | head4.add("是否租住"); |
| | | List<String> head5 = new ArrayList<String>(); |
| | | head5.add("*街/路/巷"); |
| | | head5.add("*街/路/巷(社区内无住所可填写社区街路巷地址)"); |
| | | List<String> head6 = new ArrayList<String>(); |
| | | head6.add("*小区号(政府对于每个小区都有特定编号)"); |
| | | head6.add("*小区号(政府对于每个小区都有特定编号)(社区内无住所可填写社区街路巷号)"); |
| | | List<String> head7 = new ArrayList<String>(); |
| | | head7.add("楼排号"); |
| | | List<String> head8 = new ArrayList<String>(); |
| | |
| | | List<String> head11 = new ArrayList<String>(); |
| | | head11.add("房屋用途(住宅/公寓/宿舍/仓库/其他)"); |
| | | List<String> head12 = new ArrayList<String>(); |
| | | head12.add("控状态(常规/关注/管控)"); |
| | | head12.add("管控状态(常规/关注/管控)"); |
| | | List<String> head13 = new ArrayList<String>(); |
| | | head13.add("联系方式"); |
| | | List<String> head14 = new ArrayList<String>(); |
| | |
| | | List<String> head21 = new ArrayList<String>(); |
| | | head21.add("*健在(是/否)"); |
| | | List<String> head22 = new ArrayList<String>(); |
| | | head22.add("*养老金开始领取时间(年-月-日)"); |
| | | head22.add("养老金开始领取时间(年-月-日)"); |
| | | List<String> head23 = new ArrayList<String>(); |
| | | head23.add("*现居住地址"); |
| | | List<String> head24 = new ArrayList<String>(); |
| | |
| | | return communityService.getCascadeHouseAddress(cascadeHouseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询房屋二级级联菜单 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @ApiOperation(value = "房屋级联菜单查询") |
| | | @PostMapping("/second/list") |
| | | public R getSecondHouseAddress(@RequestBody CascadeHouseDTO cascadeHouseDTO) { |
| | | cascadeHouseDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.getSecondHouseAddress(cascadeHouseDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询实有房屋列表", response = ComMngPopulationHouseAdminVO.class) |
| | | @PostMapping("/pageHouse") |
| | | public R pageHouse(@RequestBody ComMngPopulationHouseAdminDTO populationHouseAdminDTO) { |
| | |
| | | return userService.changePassword(changePasswordVO); |
| | | } |
| | | |
| | | @ApiOperation("重置密码") |
| | | @GetMapping("resetPassword") |
| | | public R resetPassword(@RequestParam("userId") Long userId){ |
| | | return userService.resetPassword(userId); |
| | | } |
| | | |
| | | @ApiOperation("批量重置密码") |
| | | @GetMapping("resetPasswordPatch") |
| | | public R resetPasswordPatch(@RequestParam("userIds") Long[] userId){ |
| | | return userService.resetPasswordPatch(userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户菜单获取", response = SysMenuVO.class) |
| | | @GetMapping("listmenu") |
| | | public R listmenu() { |
New file |
| | |
| | | package com.panzhihua.community_backstage.util; |
| | | |
| | | import sun.misc.BASE64Decoder; |
| | | import sun.misc.BASE64Encoder; |
| | | |
| | | import javax.crypto.Cipher; |
| | | import javax.crypto.spec.SecretKeySpec; |
| | | |
| | | public class MyAESUtil { |
| | | |
| | | // 加密 |
| | | public static String Encrypt(String sSrc, String sKey) throws Exception { |
| | | if (sKey == null) { |
| | | System.out.print("Key为空null"); |
| | | return null; |
| | | } |
| | | // 判断Key是否为16位 |
| | | if (sKey.length() != 16) { |
| | | System.out.print("Key长度不是16位"); |
| | | return null; |
| | | } |
| | | byte[] raw = sKey.getBytes("utf-8"); |
| | | SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); |
| | | Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式" |
| | | cipher.init(Cipher.ENCRYPT_MODE, skeySpec); |
| | | byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8")); |
| | | return new BASE64Encoder().encode(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。 |
| | | } |
| | | |
| | | // 解密 |
| | | public static String Decrypt(String sSrc, String sKey) throws Exception { |
| | | try { |
| | | // 判断Key是否正确 |
| | | if (sKey == null) { |
| | | System.out.print("Key为空null"); |
| | | return null; |
| | | } |
| | | // 判断Key是否为16位 |
| | | if (sKey.length() != 16) { |
| | | System.out.print("Key长度不是16位"); |
| | | return null; |
| | | } |
| | | byte[] raw = sKey.getBytes("utf-8"); |
| | | SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); |
| | | Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); |
| | | cipher.init(Cipher.DECRYPT_MODE, skeySpec); |
| | | byte[] encrypted1 = new BASE64Decoder().decodeBuffer(sSrc);//先用base64解密 |
| | | try { |
| | | byte[] original = cipher.doFinal(encrypted1); |
| | | String originalString = new String(original,"utf-8"); |
| | | return originalString; |
| | | } catch (Exception e) { |
| | | System.out.println(e.toString()); |
| | | return null; |
| | | } |
| | | } catch (Exception ex) { |
| | | System.out.println(ex.toString()); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "新批量文件上传接口") |
| | | @PostMapping(value = "/uploadimages", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @PostMapping(value = "/uploadsimages", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R ossUploads(@RequestParam MultipartFile[] files, HttpServletRequest request) { |
| | | try { |
| | | List<String> urlList = new ArrayList<>(); |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.ComActCommiteeVO; |
| | | import com.panzhihua.service_community.entity.ComActCommittee; |
| | | import com.panzhihua.service_community.service.ComActCommitteeService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComActCommittee)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 13:55:44 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActCommittee") |
| | | public class ComActCommitteeApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComActCommitteeService comActCommitteeService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comActCommitteeService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Serializable id) { |
| | | return R.ok(this.comActCommitteeService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActCommittee 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActCommiteeVO comActCommittee) { |
| | | return this.comActCommitteeService.insert(comActCommittee); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActCommittee 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActCommiteeVO comActCommittee) { |
| | | return this.comActCommitteeService.update(comActCommittee); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.comActCommitteeService.delete(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.ComActFourMemberVO; |
| | | import com.panzhihua.service_community.entity.ComActFourMember; |
| | | import com.panzhihua.service_community.service.ComActFourMemberService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComActFourMember)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-23 10:13:31 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActFourMember") |
| | | public class ComActFourMemberApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComActFourMemberService comActFourMemberService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comActFourMemberService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return this.comActFourMemberService.get(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActFourMember 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActFourMemberVO comActFourMember) { |
| | | return this.comActFourMemberService.insert(comActFourMember); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActFourMember 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActFourMemberVO comActFourMember) { |
| | | return this.comActFourMemberService.update(comActFourMember); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param comActFourMember 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("del") |
| | | public R delete(@RequestBody ComActFourMemberVO comActFourMember) { |
| | | return this.comActFourMemberService.delete(comActFourMember); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.service_community.entity.ComActSocialOrg; |
| | | import com.panzhihua.service_community.service.ComActSocialOrgService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 社会组织(ComActSocialOrg)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 10:45:31 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActSocialOrg") |
| | | public class ComActSocialOrgApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComActSocialOrgService comActSocialOrgService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comActSocialOrgService.pageList(commonPage); |
| | | } |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActSocialOrg 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActSocialOrgVO comActSocialOrg) { |
| | | return this.comActSocialOrgService.insert(comActSocialOrg); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActSocialOrg 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActSocialOrgVO comActSocialOrg) { |
| | | return this.comActSocialOrgService.update(comActSocialOrg); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.comActSocialOrgService.delete(id); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.service_community.dao.ComMngBuildingDAO; |
| | | import com.panzhihua.service_community.model.dos.ComMngBuildingDO; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | private ComMngPopulationHouseUserService comMngPopulationHouseUserService; |
| | | @Resource |
| | | private ComMngPopulationService comMngPopulationService; |
| | | @Resource |
| | | private ComMngBuildingDAO comMngBuildingDAO; |
| | | |
| | | /** |
| | | * 新增实有房屋 |
| | |
| | | return comMngVillageService.getGridVillageListExport(villageListAppDTO); |
| | | } |
| | | |
| | | @GetMapping("/building/query") |
| | | public R queryBuilding(@RequestParam("communityId")Long communityId){ |
| | | return R.ok(comMngBuildingDAO.select(communityId)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.service_community.entity.ComProperty; |
| | | import com.panzhihua.service_community.service.ComPropertyService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComProperty)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 10:46:52 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comProperty") |
| | | public class ComPropertyApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComPropertyService comPropertyService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comPropertyService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comProperty 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyVO comProperty) { |
| | | return this.comPropertyService.insert(comProperty); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comProperty 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyVO comProperty) { |
| | | return this.comPropertyService.update(comProperty); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.comPropertyService.delete(id); |
| | | } |
| | | } |
| | |
| | | public R getCascadeHouseAddress(@RequestBody CascadeHouseDTO cascadeHouseDTO) { |
| | | return comMngPopulationHouseService.getCascadeHouseAddress(cascadeHouseDTO); |
| | | } |
| | | /** |
| | | * 查询房屋二级级联菜单 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @PostMapping("/population/second/list") |
| | | public R getSecondHouseAddress(@RequestBody CascadeHouseDTO cascadeHouseDTO) { |
| | | return comMngPopulationHouseService.getSecondHouseAddress(cascadeHouseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询房屋列表 |
| | |
| | | public R easyPhotoNoHandleList(@RequestParam("communityId") Long communityId) { |
| | | return comActEasyPhotoService.easyPhotoNoHandleList(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 微心愿处理人列表 |
| | | * @param communityId 社区id |
| | | * @param type 处理人类型(1.后台用户 2.党员 3.志愿者) |
| | | * @return 处理人列表 |
| | | */ |
| | | @GetMapping("wish/handle/list/admin") |
| | | public R wishHandleListAdmin(@RequestParam(value = "communityId") Long communityId,@RequestParam("type") Integer type){ |
| | | return R.ok(comActMicroWishService.wishHandleListAdmin(communityId,type)); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DeleteConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.OnShelfOrOffShelfProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ResetPasswordConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.service_community.service.ComCvtBusinessService; |
| | | import com.panzhihua.service_community.service.ComCvtCategoryService; |
| | | import com.panzhihua.service_community.service.ComCvtServeService; |
| | | import com.panzhihua.service_community.service.ConvenientMerchantService; |
| | | import com.panzhihua.service_community.service.ConvenientProductCategoryService; |
| | | import com.panzhihua.service_community.service.ConvenientProductService; |
| | | import com.panzhihua.service_community.service.ConvenientServiceCategoryService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private ComCvtServeService comCvtServeService; |
| | | |
| | | @Resource |
| | | private ConvenientServiceCategoryService convenientServiceCategoryService; |
| | | |
| | | @Resource |
| | | private ConvenientMerchantService convenientMerchantService; |
| | | |
| | | @Resource |
| | | private ConvenientProductCategoryService convenientProductCategoryService; |
| | | |
| | | @Resource |
| | | private ConvenientProductService convenientProductService; |
| | | |
| | | /** |
| | | * 社区后台分页查询便民服务商家 |
| | |
| | | @RequestParam(value = "communityId", required = false) Long communityId) { |
| | | return comCvtServeService.listSaveConvenientServeExcelVO(list, communityId); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务新增分类 |
| | | * @param convenientServiceCategoryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/service-category/add") |
| | | public R addServiceCategory(@RequestBody ConvenientServiceCategoryDTO convenientServiceCategoryDTO) { |
| | | return convenientServiceCategoryService.addServiceCategory(convenientServiceCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务分类编辑 |
| | | * @param convenientServiceCategoryDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/service-category/put") |
| | | public R putServiceCategory(@RequestBody ConvenientServiceCategoryDTO convenientServiceCategoryDTO) { |
| | | return convenientServiceCategoryService.putServiceCategory(convenientServiceCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务分类删除 |
| | | * @param categoryId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/service-category/delete") |
| | | public R deleteServiceCategory(@RequestParam("categoryId") Long categoryId, @RequestParam("operator") Long operator) { |
| | | return convenientServiceCategoryService.deleteServiceCategoryById(categoryId, operator); |
| | | } |
| | | |
| | | /** |
| | | * 获取便民服务分类详情 |
| | | * @param categoryId |
| | | * @return |
| | | */ |
| | | @GetMapping("/service-category/get") |
| | | public R getServiceCategory(@RequestParam("categoryId") Long categoryId) { |
| | | return convenientServiceCategoryService.getServiceCategoryById(categoryId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询便民服务分类 |
| | | * @param pageConvenientServiceCategoryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/service-category/page") |
| | | public R pageServiceCategory(@RequestBody PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO) { |
| | | return convenientServiceCategoryService.pageServiceCategory(pageConvenientServiceCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务新增商家 |
| | | * @param convenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/add") |
| | | public R addMerchant(@RequestBody ConvenientMerchantDTO convenientMerchantDTO) { |
| | | return convenientMerchantService.addMerchant(convenientMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑便民服务商家 |
| | | * @param convenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/merchant/put") |
| | | public R putMerchant(@RequestBody ConvenientMerchantDTO convenientMerchantDTO) { |
| | | return convenientMerchantService.putMerchant(convenientMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除便民服务商家 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/merchant/delete") |
| | | public R deleteMerchant(@RequestParam("merchantId") Long merchantId, @RequestParam("operator") Long operator) { |
| | | return convenientMerchantService.deleteMerchant(merchantId, operator); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询便民服务商家 运营后台 |
| | | * @param pageConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/page") |
| | | public R pageMerchant(@RequestBody PageConvenientMerchantDTO pageConvenientMerchantDTO) { |
| | | return convenientMerchantService.pageMerchant(pageConvenientMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 获取便民服务商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/merchant/get") |
| | | public R getMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return convenientMerchantService.getMerchant(merchantId); |
| | | } |
| | | |
| | | /** |
| | | * 禁用/启用便民服务商家 |
| | | * @param disableOrEnableConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/merchant/disable-or-enable") |
| | | public R disableOrEnableMerchant(@RequestBody DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO) { |
| | | return convenientMerchantService.disableOrEnableMerchant(disableOrEnableConvenientMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 重置便民服务商家账号密码 |
| | | * @param resetPasswordConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/merchant/reset-password") |
| | | public R resetPasswordMerchant(@RequestBody ResetPasswordConvenientMerchantDTO resetPasswordConvenientMerchantDTO) { |
| | | return convenientMerchantService.resetPasswordMerchant(resetPasswordConvenientMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 获取所有便民服务分类 |
| | | * @return |
| | | */ |
| | | @GetMapping("/service-category/all") |
| | | public R getAllServiceCategories() { |
| | | return convenientServiceCategoryService.getAllServiceCategories(); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户便民服务商家详情 |
| | | * @param account 商家绑定账号 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getUserMerchantInfoByAccount") |
| | | public R<ConvenientMerchantVO> getUserMerchantInfoByAccount(@RequestParam("account") String account) { |
| | | return convenientMerchantService.getUserMerchantInfoByAccount(account); |
| | | } |
| | | |
| | | /** |
| | | * 获取商便民服务商家信息 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/merchantInfo") |
| | | public R<ConvenientMerchantVO> getUserConvenientMerchantInfo(@RequestParam("userId") Long userId) { |
| | | return convenientMerchantService.getUserConvenientMerchantInfo(userId); |
| | | } |
| | | |
| | | /** |
| | | * 新增便民服务产品分类信息 |
| | | * @param convenientProductCategoryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/product-category/add") |
| | | public R addProductCategory(@RequestBody ConvenientProductCategoryDTO convenientProductCategoryDTO) { |
| | | return convenientProductCategoryService.addProductCategory(convenientProductCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑便民服务产品分类信息 |
| | | * @param convenientProductCategoryDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/product-category/put") |
| | | public R putProductCategory(@RequestBody ConvenientProductCategoryDTO convenientProductCategoryDTO) { |
| | | return convenientProductCategoryService.putProductCategory(convenientProductCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除便民服务产品分类信息 |
| | | * @param categoryId |
| | | * @param operator |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/product-category/delete") |
| | | public R deleteProductCategory(@RequestParam("categoryId") Long categoryId, @RequestParam("operator") Long operator) { |
| | | return convenientProductCategoryService.deleteProductCategory(categoryId, operator); |
| | | } |
| | | |
| | | /** |
| | | * 获取便民服务产品分类详情 |
| | | * @param categoryId |
| | | * @return |
| | | */ |
| | | @GetMapping("/product-category/get") |
| | | public R getProductCategory(@RequestParam("categoryId") Long categoryId) { |
| | | return convenientProductCategoryService.getProductCategory(categoryId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询便民服务产品分类信息 |
| | | * @param pageConvenientProductCategoryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/product-category/page") |
| | | public R pageProductCategory(@RequestBody PageConvenientProductCategoryDTO pageConvenientProductCategoryDTO) { |
| | | return convenientProductCategoryService.pageProductCategory(pageConvenientProductCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务商家后台新增产品 |
| | | * @param convenientProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/product/add") |
| | | public R addProduct(@RequestBody ConvenientProductDTO convenientProductDTO) { |
| | | return convenientProductService.addProduct(convenientProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务商家后台编辑产品 |
| | | * @param convenientProductDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/product/put") |
| | | public R putProduct(@RequestBody ConvenientProductDTO convenientProductDTO) { |
| | | return convenientProductService.putProduct(convenientProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务商家后台获取产品详情 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @GetMapping("/product/get") |
| | | public R getProduct(@RequestParam("productId") Long productId) { |
| | | return convenientProductService.getProduct(productId); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务商家后台分页获取产品信息 |
| | | * @param pageConvenientProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/product/page") |
| | | public R pageProduct(@RequestBody PageConvenientProductDTO pageConvenientProductDTO) { |
| | | return convenientProductService.pageProduct(pageConvenientProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务商家后台删除产品信息 |
| | | * @param deleteConvenientProductDTO |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/product/delete") |
| | | public R deleteProduct(@RequestBody DeleteConvenientProductDTO deleteConvenientProductDTO) { |
| | | return convenientProductService.deleteProduct(deleteConvenientProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务商家后台上架/下架产品 |
| | | * @param onShelfOrOffShelfProductDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/product/onShelf-or-offShelf") |
| | | public R onShelfOrOffShelfProduct(@RequestBody OnShelfOrOffShelfProductDTO onShelfOrOffShelfProductDTO) { |
| | | return convenientProductService.onShelfOrOffShelfProduct(onShelfOrOffShelfProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 获取所有产品分类 |
| | | * @return |
| | | */ |
| | | @GetMapping("/product-category/all") |
| | | public R getAllProductCategory() { |
| | | return convenientProductCategoryService.getAllProductCategory(); |
| | | } |
| | | |
| | | /** |
| | | * 获取该社区商家数量大于0的分类 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/service-category/suitable") |
| | | public R getSuitableServiceCategories(@RequestParam("communityId") Long communityId) { |
| | | return convenientServiceCategoryService.getSuitableServiceCategories(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 获取该社区下的热门商家 |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/popular") |
| | | public R getPopularMerchants(@RequestBody PagePopularMerchantDTO pagePopularMerchantDTO) { |
| | | return convenientMerchantService.getPopularMerchants(pagePopularMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页获取服务类型下商家信息 |
| | | * @param pageClassifyMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/classify") |
| | | public R getClassifyMerchants(@RequestBody PageClassifyMerchantDTO pageClassifyMerchantDTO) { |
| | | return convenientMerchantService.getClassifyMerchants(pageClassifyMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 小程序获取商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/merchant/detail") |
| | | public R getMerchantDetail(@RequestParam("merchantId") Long merchantId) { |
| | | return convenientMerchantService.getMerchantDetail(merchantId); |
| | | } |
| | | |
| | | /** |
| | | * 小程序获取商家产品 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/product/list") |
| | | public R getMerchantProduct(@RequestParam("merchantId") Long merchantId) { |
| | | return convenientProductService.getMerchantProduct(merchantId); |
| | | } |
| | | |
| | | /** |
| | | * 获取产品详情 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @GetMapping("/product/detail") |
| | | public R getProductDetail(@RequestParam("productId") Long productId) { |
| | | return convenientProductService.getProduct(productId); |
| | | } |
| | | |
| | | /** |
| | | * 搜索商家信息 |
| | | * @param pageSearchDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/search") |
| | | public R pageSearchMerchant(@RequestBody PageSearchDTO pageSearchDTO) { |
| | | return convenientMerchantService.pageSearchMerchant(pageSearchDTO); |
| | | } |
| | | |
| | | /** |
| | | * 搜索商品信息 |
| | | * @param pageSearchDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/product/search") |
| | | public R pageSearchProduct(@RequestBody PageSearchDTO pageSearchDTO) { |
| | | return convenientProductService.pageSearchProduct(pageSearchDTO); |
| | | } |
| | | |
| | | /** |
| | | * 增加商家店铺咨询量 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/merchant/consult") |
| | | public R consultMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return convenientMerchantService.consultMerchant(merchantId); |
| | | } |
| | | |
| | | /** |
| | | * 增加商家店铺浏览量 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/merchant/incr-view") |
| | | public R incrMerchantView(@RequestParam("merchantId") Long merchantId) { |
| | | return convenientMerchantService.incrMerchantView(merchantId); |
| | | } |
| | | |
| | | /** |
| | | * 增加产品浏览量 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @GetMapping("/product/incr-view") |
| | | public R incrProductView(@RequestParam("productId") Long productId) { |
| | | return convenientProductService.incrProductView(productId); |
| | | } |
| | | |
| | | /** |
| | | * 获取商家导出数据 |
| | | * @param exportMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/export") |
| | | public R exportMerchant(@RequestBody ExportMerchantDTO exportMerchantDTO) { |
| | | return convenientMerchantService.exportMerchant(exportMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务每隔半小时将商家浏览量和咨询量总值计入指定商家数据中 |
| | | * @return |
| | | */ |
| | | @PostMapping("/timedTaskWriteDataToMerchantJobHandler") |
| | | public R timedTaskWriteDataToMerchantJobHandler() { |
| | | return convenientMerchantService.timedTaskWriteDataToMerchantJobHandler(); |
| | | } |
| | | |
| | | /** |
| | | * 获取商家上下架产品数量 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/product/shelf-num") |
| | | public R getProductShelfNum(@RequestParam("merchantId") Long merchantId) { |
| | | return convenientProductService.getProductShelfNum(merchantId); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 14:52 |
| | | **/ |
| | |
| | | private ComActDiscussService comActDiscussService; |
| | | |
| | | /** |
| | | * 一起议-新增 |
| | | * 议事投票-新增 |
| | | * |
| | | * @param comActDiscussDTO |
| | | * 新增参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return ComActDiscussVO |
| | | * 议事投票-编辑 |
| | | * @param comActDiscussDTO 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("detaildiscuss") |
| | | public R detailDiscuss(@RequestParam("id") Long id) { |
| | | return comActDiscussService.detailDiscuss(id); |
| | | @PostMapping("editdiscuss") |
| | | public R editDiscuss(@RequestBody ComActDiscussDTO comActDiscussDTO) { |
| | | return comActDiscussService.editDiscuss(comActDiscussDTO); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-删除 |
| | | * 议事投票-详情 |
| | | * |
| | | * @param discussDetailDTO |
| | | * 请求参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @PostMapping("detaildiscuss") |
| | | public R detailDiscuss(@RequestBody ComActDiscussDetailDTO discussDetailDTO) { |
| | | return comActDiscussService.detailDiscuss(discussDetailDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询评论下回复列表 |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return 回复列表 |
| | | */ |
| | | @PostMapping("discussCommentReplyAdmin") |
| | | public R discussCommentReplyAdmin(@RequestBody ComActDiscussDetailDTO discussDetailDTO) { |
| | | return comActDiscussService.discussCommentReplyAdmin(discussDetailDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-删除 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-回复 |
| | | * 议事投票-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 评论内容 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-分页查询 |
| | | * 议事投票-分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-查看 |
| | | * 议事投票-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @PostMapping("pagediscussAdmin") |
| | | public R pageDiscussAdmin(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) { |
| | | return comActDiscussService.pageDiscussAdmin(pageComActDiscussDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论-查看 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-置顶 |
| | | * 议事投票评论详情 |
| | | * @param pageComActDiscussCommentDTO 请求参数 |
| | | * @return 议事投票详情 |
| | | */ |
| | | @PostMapping("detaildiscusscommentAdmin") |
| | | public R detailDiscusscommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | return comActDiscussService.detailDiscussCommentAdmin(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论-置顶 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-回复 |
| | | * 议事投票-评论-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 回复内容 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 |
| | | * 议事投票-评论-分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-分页查询 小程序 |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @PostMapping("pagediscusscommentAdmin") |
| | | public R pageDiscussCommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | return comActDiscussService.pageDiscussCommentAdmin(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-点赞、取消点赞 |
| | | * 议事投票-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 操作类型 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 小程序 |
| | | * 议事投票-评论-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-详情 小程序 |
| | | * 议事投票-详情 小程序 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-投票 |
| | | * 议事投票-投票 |
| | | * |
| | | * @param comActDiscussOptionUserDTO |
| | | * 投票信息 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-点赞、取消点赞 |
| | | * 议事投票-评论-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 评论点赞 |
| | |
| | | return comActDiscussService.putDiscussCommentUser(comActDiscussUserDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票后台公布结果 |
| | | * @param publishResultDTO 请求参数 |
| | | * @return 公布结果 |
| | | */ |
| | | @PostMapping("publishResultAdmin") |
| | | public R publishResultAdmin(@RequestBody ComActDiscussPublishResultDTO publishResultDTO) { |
| | | return comActDiscussService.publishResultAdmin(publishResultDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论/回复删除 |
| | | * @param id 评论/回复id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("deleteDiscussCommentAdmin") |
| | | public R deleteDiscussCommentAdmin(@RequestParam("id") Long id) { |
| | | return comActDiscussService.deleteDiscussCommentAdmin(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区可发布议事投票权限配置 |
| | | * @param communityId 社区id |
| | | * @return 社区可发布议事投票权限配置 |
| | | */ |
| | | @GetMapping("discussJurisdictionGet") |
| | | public R discussJurisdictionGet(@RequestParam("communityId") Long communityId,@RequestParam("userId") Long userId) { |
| | | return comActDiscussService.discussJurisdictionGet(communityId,userId); |
| | | } |
| | | |
| | | /** |
| | | * 设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | * @param communityId 社区id |
| | | * @param value 需要设置的参数值 |
| | | * @return 设置结果 |
| | | */ |
| | | @GetMapping("discussJurisdictionSet") |
| | | public R discussJurisdictionSet(@RequestParam("communityId") Long communityId,@RequestParam("value") String value) { |
| | | return comActDiscussService.discussJurisdictionSet(communityId,value); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票检测状态定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @GetMapping("timedTaskDiscussInspectStatus") |
| | | public R timedTaskDiscussInspectStatus() { |
| | | return comActDiscussService.timedTaskDiscussInspectStatus(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 一起议增加浏览量 |
| | | * @param discussId 一起议主键id |
| | | */ |
| | | @PostMapping("discuss/increase-view-num") |
| | | public void increaseViewNum(@RequestParam("discussId") Long discussId) { |
| | | comActDiscussService.increaseViewNum(discussId); |
| | | } |
| | | |
| | | /** |
| | | * 公布/编辑一起议投票结果 |
| | | * @param comActDiscussDTO |
| | | * @return 请求结果 |
| | | */ |
| | | @PostMapping("discuss/edit-result") |
| | | public R editDiscussResult(@RequestBody ComActDiscussDTO comActDiscussDTO) { |
| | | return comActDiscussService.editDiscussResult(comActDiscussDTO); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务每半小时执行一次将一起议浏览量写入到表中 |
| | | */ |
| | | @PostMapping("discuss/write-view-num") |
| | | public R timedTaskWriteDiscussViewNumToTable() { |
| | | return comActDiscussService.writeDiscussViewNumToTable(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议获取是否有发布权 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("discuss/permissions") |
| | | public R getDiscussPermissions(@RequestBody ComActDiscussDTO comActDiscussDTO) { |
| | | return comActDiscussService.getDiscussPermissions(comActDiscussDTO); |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_community.model.dos.ComEldersAuthElderlyDO; |
| | | import com.panzhihua.service_community.service.*; |
| | |
| | | private ComElderAuthRecordsService comElderAuthRecordsService; |
| | | @Resource |
| | | private ComPensionAuthRecordService comPensionAuthRecordService; |
| | | @Resource |
| | | private ComPensionAuthHistoryRecordService comPensionAuthHistoryRecordService; |
| | | |
| | | @PostMapping("/getAuth") |
| | | public R getAuth(@RequestParam("authUserId") Long authUserId) { |
| | |
| | | * @param eldersAuthTypeQueryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/authtype") |
| | | R communityElderAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | @PostMapping("/authType") |
| | | public R elderAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | return eldersAuthService.communityAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/authRecords/statistic/export") |
| | | public R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO){ |
| | | public R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthStatisticDTO pageElderAuthRecordsDTO){ |
| | | return comElderAuthRecordsService.exportElderAuthRecordsStatistic(pageElderAuthRecordsDTO); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) setPensionAuthType 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PutMapping("/pensionAuthRecords/authType/{type}") |
| | | public R setPensionAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type) { |
| | | return comPensionAuthRecordService.setPensionAuthType(communityId, type); |
| | | } |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PostMapping("/pensionAuthRecords/authtype") |
| | | public R communityPensionAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | return comPensionAuthRecordService.communityPensionAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务每月1号0点统计高龄老人本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | |
| | | return comPensionAuthRecordService.timedTaskPensionAuthStatisticsJobHandler(); |
| | | } |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PutMapping("/new/authType/{type}") |
| | | public R setAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type) { |
| | | return eldersAuthService.setAuthType(communityId, type); |
| | | } |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PostMapping("/new/authtype") |
| | | public R communityAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | return eldersAuthService.getAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | @PostMapping("/auth/statistic/page") |
| | | public R pageAuthStatisticAdmin(@RequestBody PageElderAuthStatisticDTO pageElderAuthStatisticDTO) { |
| | | return eldersAuthService.pageAuthStatisticAdmin(pageElderAuthStatisticDTO); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @PostMapping("/auth/statistic/sign") |
| | | public R signAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO) { |
| | | return eldersAuthService.signAuthStatisticAdmin(signElderAuthStatisticDTO); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-统计表头数据 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计表头数据 |
| | | */ |
| | | @PostMapping("/auth/header/statistic") |
| | | public R getAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO) { |
| | | return eldersAuthService.getAuthHeaderStatisticAdmin(statisticHeaderDTO); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证统计-分页查询 |
| | | * @param pensionAuthStatisticDTO 请求参数 |
| | | * @return 养老认证统列表 |
| | | */ |
| | | @PostMapping("/pension/auth/statistic/page") |
| | | public R pagePensionAuthStatisticAdmin(@RequestBody PagePensionAuthStatisticDTO pensionAuthStatisticDTO) { |
| | | return comPensionAuthHistoryRecordService.pagePensionAuthStatisticAdmin(pensionAuthStatisticDTO); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证记标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @PostMapping("/pension/auth/statistic/sign") |
| | | public R signPensionAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO) { |
| | | return comPensionAuthHistoryRecordService.signPensionAuthStatisticAdmin(signElderAuthStatisticDTO); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证表头统计 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计结果 |
| | | */ |
| | | @PostMapping("/pension/auth/header/statistic") |
| | | public R getPensionAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO) { |
| | | return comPensionAuthHistoryRecordService.getPensionAuthHeaderStatisticAdmin(statisticHeaderDTO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import static com.panzhihua.common.enums.IdentityAuthMethodEnum.FACE_AUTH; |
| | | import static com.panzhihua.common.enums.IdentityAuthTypeEnum.ELDER_AUTH; |
| | | import static com.panzhihua.common.enums.IdentityAuthTypeEnum.PENSION_AUTH; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isBlank; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.SysConfVO; |
| | | import com.panzhihua.common.utlis.TencentUtils; |
| | | import com.panzhihua.service_community.dao.ComElderAuthElderliesDAO; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthPensionerDAO; |
| | | import com.panzhihua.service_community.dao.SysConfMapper; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthElderliesDO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthPensionerDO; |
| | | import com.panzhihua.service_community.model.dos.SysConfDO; |
| | | import com.panzhihua.service_community.service.ComElderAuthRecordsService; |
| | | import com.panzhihua.service_community.service.ComPensionAuthRecordService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: IdentityAuthApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证相关api |
| | | * @author: hans |
| | | * @date: 2021/09/01 18:06 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/identity-auth") |
| | | public class IdentityAuthApi { |
| | | |
| | | private static final String ELDER_AUTH_TYPE_PREFIX = "ELDER_AUTH_TYPE_"; |
| | | private static final String PENSION_AUTH_TYPE_PREFIX = "PENSION_AUTH_TYPE_"; |
| | | |
| | | @Resource |
| | | private ComElderAuthRecordsService comElderAuthRecordsService; |
| | | @Resource |
| | | private ComPensionAuthRecordService comPensionAuthRecordService; |
| | | @Resource |
| | | private SysConfMapper sysConfDao; |
| | | @Resource |
| | | private ComElderAuthElderliesDAO comElderAuthElderliesDAO; |
| | | @Resource |
| | | private ComPensionAuthPensionerDAO comPensionAuthPensionerDAO; |
| | | |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | | /** |
| | | * 新增身份认证 |
| | | * @param addIdentityAuthDTO 新增身份认证请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | public R addIdentityAuth(@RequestBody AddIdentityAuthDTO addIdentityAuthDTO) { |
| | | String eidToken = addIdentityAuthDTO.getEidToken(); |
| | | boolean isEidTokenBlank = isBlank(eidToken); |
| | | if (!Boolean.logicalXor(isEidTokenBlank, isBlank(addIdentityAuthDTO.getAuthVideo()))) { |
| | | return R.fail("缺少认证参数"); |
| | | } |
| | | if (!isEidTokenBlank) { |
| | | String result = TencentUtils.getEidResult(eidToken); |
| | | JSONObject object = JSON.parseObject(result); |
| | | if (object == null) { |
| | | return R.fail("人脸信息与所填信息不符,请检查所填写信息"); |
| | | } |
| | | JSONObject textObject = object.getJSONObject("Text"); |
| | | String code = textObject.getString("ErrCode"); |
| | | if (!code.equals("0")) { |
| | | log.error("人脸核验失败,错误原因:" + textObject.toJSONString()); |
| | | return R.fail("人脸信息与所填信息不符,请检查所填写信息"); |
| | | } |
| | | addIdentityAuthDTO.setAuthMethod(FACE_AUTH.getMethod()); |
| | | addIdentityAuthDTO.setVerificationResult(object.toJSONString()); |
| | | } |
| | | int authType = addIdentityAuthDTO.getAuthType().intValue(); |
| | | if (authType == ELDER_AUTH.getType()) { |
| | | return comElderAuthRecordsService.addElderAuth(addIdentityAuthDTO); |
| | | } else if (authType == PENSION_AUTH.getType()) { |
| | | return comPensionAuthRecordService.addPensionAuth(addIdentityAuthDTO); |
| | | } else { |
| | | return R.fail("请核对需要认证的类型"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 分页查询身份认证记录 |
| | | * @param pageIdentityAuthRecordDTO 分页查询身份认证记录参数 |
| | | * @return 身份认证记录列表 |
| | | */ |
| | | @PostMapping("/record/page") |
| | | public R queryRecordWithPage(@RequestBody PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO) { |
| | | int authType = pageIdentityAuthRecordDTO.getAuthType().intValue(); |
| | | if (authType == ELDER_AUTH.getType()) { |
| | | return comElderAuthRecordsService.queryRecordWithPage(pageIdentityAuthRecordDTO); |
| | | } else if (authType == PENSION_AUTH.getType()) { |
| | | return comPensionAuthRecordService.queryRecordWithPage(pageIdentityAuthRecordDTO); |
| | | } else { |
| | | return R.fail("请核对需要查询的身份认证类型"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取身份认证详情 |
| | | * @param authType 认证类型 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | public R retrieveIdentityAuthDetail(@RequestParam("authType") Integer authType, |
| | | @RequestParam("identityAuthId") Long identityAuthId) { |
| | | if (authType.intValue() == ELDER_AUTH.getType()) { |
| | | return comElderAuthRecordsService.retrieveElderAuthDetail(identityAuthId); |
| | | } else if (authType.intValue() == PENSION_AUTH.getType()) { |
| | | return comPensionAuthRecordService.retrievePensionAuthDetail(identityAuthId); |
| | | } else { |
| | | return R.fail("请核对认证类型"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取身份认证方式 |
| | | * @param communityId |
| | | * @param identityAuthType |
| | | * @return 认证方式 |
| | | */ |
| | | @GetMapping("/mode") |
| | | public R getIdentityAuthMode(@RequestParam(value = "communityId") Long communityId, |
| | | @RequestParam(value = "identityAuthType") Integer identityAuthType) { |
| | | String identityCode; |
| | | if (identityAuthType.intValue() == ELDER_AUTH.getType()) { |
| | | //高龄认证 |
| | | identityCode = ELDER_AUTH_TYPE_PREFIX + communityId; |
| | | } else if (identityAuthType.intValue() == PENSION_AUTH.getType()) { |
| | | //养老认证 |
| | | identityCode = PENSION_AUTH_TYPE_PREFIX + communityId; |
| | | } else { |
| | | return R.fail("身份认证类型错误"); |
| | | } |
| | | SysConfDO sysConfDO = sysConfDao.selectOne(new QueryWrapper<SysConfDO>() |
| | | .lambda().eq(SysConfDO::getCode, identityCode).eq(SysConfDO::getCommunityId, communityId)); |
| | | if (nonNull(sysConfDO)) { |
| | | SysConfVO sysConfVO = new SysConfVO(); |
| | | BeanUtils.copyProperties(sysConfDO, sysConfVO); |
| | | return R.ok(sysConfVO.getValue()); |
| | | } |
| | | return R.fail("获取失败!"); |
| | | } |
| | | |
| | | /** |
| | | * 获取身份认证人脸核验token |
| | | * @param getIdentityEidTokenDTO |
| | | * @return token |
| | | */ |
| | | @PostMapping("/getEidToken") |
| | | public R getEidToken(@RequestBody GetIdentityEidTokenDTO getIdentityEidTokenDTO) { |
| | | int isExist; |
| | | String idCard; |
| | | try { |
| | | idCard = AESUtil.encrypt128(getIdentityEidTokenDTO.getIdCard(), aesKey); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("加密失败【{}】", e.getMessage()); |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | if (getIdentityEidTokenDTO.getAuthType().intValue() == ELDER_AUTH.getType()) { |
| | | //高龄认证 |
| | | isExist = comElderAuthElderliesDAO.selectCount(new QueryWrapper<ComElderAuthElderliesDO>() |
| | | .lambda().eq(ComElderAuthElderliesDO::getName, getIdentityEidTokenDTO.getName()) |
| | | .eq(ComElderAuthElderliesDO::getIdCard, idCard)); |
| | | } else if (getIdentityEidTokenDTO.getAuthType().intValue() == PENSION_AUTH.getType()) { |
| | | //养老认证 |
| | | isExist = comPensionAuthPensionerDAO.selectCount(new QueryWrapper<ComPensionAuthPensionerDO>() |
| | | .lambda().eq(ComPensionAuthPensionerDO::getName, getIdentityEidTokenDTO.getName()) |
| | | .eq(ComPensionAuthPensionerDO::getIdCard, idCard)); |
| | | } else { |
| | | return R.fail("请核对身份认证类型"); |
| | | } |
| | | if (isExist <= 0) { |
| | | return R.fail("该人员未在社区报道无法认证"); |
| | | } |
| | | // 获取EidToken |
| | | return R.ok(TencentUtils.getEidToken(getIdentityEidTokenDTO.getName(), getIdentityEidTokenDTO.getIdCard())); |
| | | } |
| | | } |
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.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActCommiteeVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComActCommittee; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * (ComActCommittee)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 13:55:43 |
| | | */ |
| | | @Mapper |
| | | public interface ComActCommitteeDao extends BaseMapper<ComActCommittee> { |
| | | /** |
| | | * 分页查询 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComActCommiteeVO> pageList(Page page, @Param("commonPage")CommonPage commonPage); |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("" + |
| | | "SELECT\n" + |
| | | "u.`name` userName,\n" + |
| | | "IFNULL(u.`nick_name`,'社区管理员') as userNickName,\n" + |
| | | "u.`image_url`,\n" + |
| | | "u.phone,\n" + |
| | | "c.`comment`,\n" + |
| | | "c.`parent_id`,\n" + |
| | | "c.`is_author`,\n" + |
| | | "c.`is_topping`,\n" + |
| | | "COUNT( cu.id ) num,\n" + |
| | | "c.create_at,\n" + |
| | | "c.id \n" + |
| | | "FROM\n" + |
| | | "com_act_discuss_comment c\n" + |
| | | "JOIN sys_user u ON c.user_id = u.user_id\n" + |
| | | "LEFT JOIN com_act_discuss_comment_user cu on c.id=cu.disscuss_comment_id\n" + |
| | | "WHERE\n" + |
| | | "FIND_IN_SET(\n" + |
| | | "\tc.id,\n" + |
| | | "getChildren ( #{id} )) and c.parent_id !=0 \n" + |
| | | "GROUP BY c.id\n" + |
| | | "ORDER BY\n" + |
| | | "create_at desc") |
| | | List<ComActDiscussCommentVO> selectChilds(Long id); |
| | | // @Select("" + |
| | | // "SELECT\n" + |
| | | // "u.`name` userName,\n" + |
| | | // "IFNULL(u.`nick_name`,'社区管理员') as userNickName,\n" + |
| | | // "u.`image_url`,\n" + |
| | | // "u.phone,\n" + |
| | | // "c.`comment`,\n" + |
| | | // "c.`parent_id`,\n" + |
| | | // "c.`is_author`,\n" + |
| | | // "c.`is_topping`,\n" + |
| | | // "COUNT( cu.id ) num,\n" + |
| | | // "c.create_at,\n" + |
| | | // "c.id \n" + |
| | | // "FROM\n" + |
| | | // "com_act_discuss_comment c\n" + |
| | | // "JOIN sys_user u ON c.user_id = u.user_id\n" + |
| | | // "LEFT JOIN com_act_discuss_comment_user cu on c.id=cu.disscuss_comment_id\n" + |
| | | // "WHERE\n" + |
| | | // "FIND_IN_SET(\n" + |
| | | // "\tc.id,\n" + |
| | | // "getChildren ( #{id} )) and c.parent_id !=0 \n" + |
| | | // "GROUP BY c.id\n" + |
| | | // "ORDER BY\n" + |
| | | // "create_at desc") |
| | | |
| | | /** |
| | | * 获取子评论 |
| | | * @param parentId |
| | | * @return |
| | | */ |
| | | List<ComActDiscussCommentVO> selectChilds(@Param("parentId") Long parentId); |
| | | |
| | | /** |
| | | * 该评论下所有回复内容 |
| | | * @param page 分页参数 |
| | | * @param id 评论id |
| | | * @return 回复列表 |
| | | */ |
| | | IPage<ComActDiscussCommentVO> getDiscussCommentList(Page page, @Param("id") Long id); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Select("select type,name,phone,image_url,nick_name from sys_user where user_id=#{userId}") |
| | | LoginUserInfoVO selectUserByUserId(Long userId); |
| | | |
| | | @Select("<script> " + "select t.* from (" + "SELECT " + "d.id, " + "d.`discuss_subject`, " + "d.type, " |
| | | + "COUNT( DISTINCT c.id ) commentNum, " + "u.name userName, " + "u.nick_name userNickName, " + "d.create_at " |
| | | + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id " |
| | | + "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id " |
| | | + " where d.community_id=#{pageComActDiscussDTO.communityId}" |
| | | + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | | + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + " </if> " |
| | | + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} " |
| | | + "AND #{pageComActDiscussDTO.end} " + " </if> " + "GROUP BY " + "d.id" + ")t order by t.create_at desc " |
| | | + "</script>") |
| | | // @Select("<script> " + "select t.* from (" + "SELECT " + "d.id, " + "d.`discuss_subject`, " + "d.type, " |
| | | // + "COUNT( DISTINCT c.id ) commentNum, " + "u.name userName, " + "u.nick_name userNickName, " + "d.create_at " |
| | | // + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id " |
| | | // + "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id " |
| | | // + " where d.community_id=#{pageComActDiscussDTO.communityId}" |
| | | // + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | | // + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} " |
| | | // + "AND #{pageComActDiscussDTO.end} " + " </if> " + "GROUP BY " + "d.id" + ")t order by t.create_at desc " |
| | | // + "</script>") |
| | | IPage<ComActDiscussVO> pageDiscuss(Page page, |
| | | @Param("pageComActDiscussDTO") PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | IPage<ComActDiscussVO> pageDiscussAdmin(Page page, |
| | | @Param("pageComActDiscussDTO") PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | @Select("<script> " + "select * from (" + "SELECT " + "u.`name` userName, " + "u.nick_name userNickName, " |
| | | + "u.phone, " + "c.`comment`, " + "c.`parent_id`, " + "COUNT(DISTINCT cu.id ) num, " + "c.create_at, " |
| | |
| | | IPage<ComActDiscussCommentVO> pageDiscussComment(Page page, |
| | | @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | @Select("<script> " + "select t.* from (" + "SELECT " + "d.id, " + "d.vote_title, " |
| | | + "if(d.address is null or d.address='null',a.name,d.address )address, " + "d.photo_pah, " |
| | | + "d.`discuss_subject`, " + "d.type, " + "u.type as userType, " + "COUNT( DISTINCT c.id ) commentNum, " |
| | | + "COUNT( DISTINCT du.id ) signNum, " + "if(u.type=1,u.name,a.name) userName, " |
| | | + "if(u.type=1,u.nick_name,a.name) userNickName, " + "<if test='pageComActDiscussDTO.loginUserId != null '>" |
| | | + "if(du.id is not null,1,0) haveSign, " + "if(ou.id is not null,1,0) haveVote, " + " </if> " + "u.image_url, " |
| | | + "d.create_at " + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id " |
| | | + "JOIN com_act a ON d.community_id = a.community_id " |
| | | + "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id " |
| | | + "LEFT JOIN com_act_discuss_option do ON d.id = do.discuss_id " |
| | | + "LEFT JOIN com_act_discuss_user du ON d.id = du.discuss_id " |
| | | + "<if test='pageComActDiscussDTO.loginUserId != null '>" |
| | | + "LEFT JOIN com_act_discuss_option_user ou on do.id=ou.discuss_option_id and ou.user_id=#{pageComActDiscussDTO.loginUserId} " |
| | | + " </if> " + " where d.community_id=#{pageComActDiscussDTO.communityId}" |
| | | + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | | + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + " </if> " |
| | | + "<if test='pageComActDiscussDTO.userId != null and pageComActDiscussDTO.userId !=0 '>" |
| | | + " and d.`user_id` = #{pageComActDiscussDTO.userId} " + " </if> " |
| | | + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} " |
| | | + "AND #{pageComActDiscussDTO.end} " + " </if> " + "GROUP BY " + "d.id" + ")t order by t.create_at desc " |
| | | + "</script>") |
| | | /** |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | IPage<ComActDiscussCommentVO> pageDiscussCommentAdmin(Page page, |
| | | @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 默认查询评论下两条回复信息 |
| | | * @param commentId 评论id |
| | | * @return 回复列表 |
| | | */ |
| | | List<ComActDiscussCommentVO> getDiscussCommentReplyList(@Param("commentId") Long commentId); |
| | | |
| | | |
| | | // @Select("<script> " + "select t.* from (" + "SELECT " + "d.id, " + "d.vote_title, " |
| | | // + "if(d.address is null or d.address='null',a.name,d.address )address, " + "d.photo_pah, " |
| | | // + "d.`discuss_subject`, " + "d.type, " + "d.end_time, " + "d.status, " + "d.views_num, " + "d.join_num, " |
| | | // + "d.fabulous_num as signNum, " + "d.comment_num as commentNum, " + "d.release_at, " + "u.type as userType, " |
| | | // + "if(u.type=1,u.name,a.name) userName, " |
| | | // + "if(u.type=1,u.nick_name,a.name) userNickName, " + "<if test='pageComActDiscussDTO.loginUserId != null '>" |
| | | // + "if(du.id is not null,1,0) haveSign, " + "if(ou.id is not null,1,0) haveVote, " + " </if> " + "u.image_url, " |
| | | // + "d.create_at " + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id " |
| | | // + "JOIN com_act a ON d.community_id = a.community_id " |
| | | // + "LEFT JOIN com_act_discuss_option do ON d.id = do.discuss_id " |
| | | // + "LEFT JOIN com_act_discuss_user du ON d.id = du.discuss_id " |
| | | // + "<if test='pageComActDiscussDTO.loginUserId != null '>" |
| | | // + "LEFT JOIN com_act_discuss_option_user ou on do.id=ou.discuss_option_id and ou.user_id=#{pageComActDiscussDTO.loginUserId} " |
| | | // + " </if> " + " where d.community_id=#{pageComActDiscussDTO.communityId}" + " and d.is_del = 2" |
| | | // + "<if test='pageComActDiscussDTO.type != null '>" |
| | | // + " and d.`type` = #{pageComActDiscussDTO.type} " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | | // + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.userId != null and pageComActDiscussDTO.userId !=0 '>" |
| | | // + " and d.`user_id` = #{pageComActDiscussDTO.userId} " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} " |
| | | // + "AND #{pageComActDiscussDTO.end} " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.displayStatus != null and pageComActDiscussDTO.displayStatus == 1'>" |
| | | // + " and d.`end_time` > now() " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.displayStatus != null and pageComActDiscussDTO.displayStatus == 2'>" |
| | | // + " and d.`end_time` < now() " + " </if> " |
| | | // + "GROUP BY " + "d.id" + ")t order by t.create_at desc " |
| | | // + "</script>") |
| | | IPage<ComActDiscussVO> pageDiscussApplets(Page page, |
| | | @Param("pageComActDiscussDTO") PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | @Select("<script> " + "select * from (" + "SELECT " + "u.`name` userName, " + "IFNULL(u.`nick_name`,'社区管理员') as userNickName, " |
| | | + "u.`image_url`, " + "u.phone, " + "u.type as userType, " + "c.`comment`, " + "c.`parent_id`, " |
| | | + "c.`is_author`, " + "c.`is_topping`, " + "COUNT( cu.id ) num, " + "c.create_at, " + "c.id " + "FROM " |
| | | + "com_act_discuss_comment c " + "JOIN sys_user u ON c.user_id = u.user_id " |
| | | + "JOIN com_act_discuss d ON c.discuss_id = d.id " |
| | | + "<if test='pageComActDiscussCommentDTO.name != null and pageComActDiscussCommentDTO.name.trim() != ""'>" |
| | | + "AND u.`name` LIKE concat( #{pageComActDiscussCommentDTO.name}, '%' ) " + " </if> " |
| | | + "<if test='pageComActDiscussCommentDTO.account != null and pageComActDiscussCommentDTO.account.trim() != ""'>" |
| | | + "AND u.phone LIKE concat( #{pageComActDiscussCommentDTO.account}, '%' ) " + " </if> " |
| | | + "LEFT JOIN com_act_discuss_comment_user cu ON c.id = cu.disscuss_comment_id " |
| | | + " where c.discuss_id=#{pageComActDiscussCommentDTO.id} and parent_id=0 " |
| | | + "<if test='pageComActDiscussCommentDTO.comment != null and pageComActDiscussCommentDTO.comment.trim() != ""'>" |
| | | + " and c.`comment` LIKE concat( '%', #{pageComActDiscussCommentDTO.comment" + "}, '%' ) " + " </if> " |
| | | + "GROUP BY " + "c.id " + ")t order by t.is_topping desc , t.create_at desc" + "</script>") |
| | | // @Select("<script> " + "select * from (" + "SELECT " + "u.`name` userName, " + "IFNULL(u.`nick_name`,'社区管理员') as userNickName, " |
| | | // + "u.`image_url`, " + "u.phone, " + "u.type as userType, " + "c.`comment`, " + "c.`parent_id`, " |
| | | // + "c.`is_author`, " + "c.`is_topping`, " + "COUNT( cu.id ) num, " + "c.create_at, " + "c.id " + "FROM " |
| | | // + "com_act_discuss_comment c " + "JOIN sys_user u ON c.user_id = u.user_id " |
| | | // + "JOIN com_act_discuss d ON c.discuss_id = d.id " |
| | | // + "<if test='pageComActDiscussCommentDTO.name != null and pageComActDiscussCommentDTO.name.trim() != ""'>" |
| | | // + "AND u.`name` LIKE concat( #{pageComActDiscussCommentDTO.name}, '%' ) " + " </if> " |
| | | // + "<if test='pageComActDiscussCommentDTO.account != null and pageComActDiscussCommentDTO.account.trim() != ""'>" |
| | | // + "AND u.phone LIKE concat( #{pageComActDiscussCommentDTO.account}, '%' ) " + " </if> " |
| | | // + "LEFT JOIN com_act_discuss_comment_user cu ON c.id = cu.disscuss_comment_id " |
| | | // + " where c.discuss_id=#{pageComActDiscussCommentDTO.id} and parent_id=0 and c.is_del = 2" |
| | | // + "<if test='pageComActDiscussCommentDTO.comment != null and pageComActDiscussCommentDTO.comment.trim() != ""'>" |
| | | // + " and c.`comment` LIKE concat( '%', #{pageComActDiscussCommentDTO.comment" + "}, '%' ) " + " </if> " |
| | | // + "GROUP BY " + "c.id " + ")t order by t.is_topping desc , t.create_at desc" + "</script>") |
| | | IPage<ComActDiscussCommentVO> pageDiscussCommentApplets(Page page, |
| | | @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | |
| | | + ",( SELECT count( id ) FROM com_act_discuss_option_user WHERE discuss_option_id = c.id ) AS num " + " FROM " |
| | | + " com_act_discuss_option AS c " + " WHERE c.discuss_id = #{discussId}" + " ORDER BY " + " num DESC") |
| | | List<ComActDiscussOptionVO> getScreenDiscussOptionList(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 添加议事投票评论数 |
| | | * @param discussId 议事投票 |
| | | * @param num 添加数量 |
| | | */ |
| | | void addCommentCount(@Param("discussId") Long discussId,@Param("num") Integer num); |
| | | |
| | | /** |
| | | * 更新一起议主题状态 |
| | | * @param discussId |
| | | * @param status |
| | | */ |
| | | void updateStatusById(@Param("discussId") Long discussId, @Param("status") int status); |
| | | |
| | | /** |
| | | * 增加评论总数和参与讨论总数 |
| | | * @param discussId 一起议主键id |
| | | * @param isFirstComment 是否首次参与 |
| | | */ |
| | | void incrCommentAndJoinNumById(@Param("discussId") Long discussId, @Param("isFirstComment") boolean isFirstComment); |
| | | |
| | | /** |
| | | * 一起议点赞/取消点赞 增加/减少点赞总数 |
| | | * @param discussId 一起议主键id |
| | | * @param isIncr 是否是新增 |
| | | */ |
| | | void incrOrDecrFabulousNumByType(@Param("discussId") Long discussId, @Param("isIncr") Boolean isIncr); |
| | | |
| | | /** |
| | | * 批量更新浏览量 |
| | | * @param needDealMap id-viewNum参数合集 |
| | | * @return |
| | | */ |
| | | int batchUpdateViewNum(@Param("needDealMap") HashMap<Long, Integer> needDealMap); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussOptionDO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | |
| | | List<ComActDiscussOptionVO> getDiscussOptionList(@Param("discussId") Long discussId); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionUserVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussOptionUserDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | |
| | | @Select("select count(id) from com_act_discuss_option_user where discuss_option_id = #{discussOptionId} and user_id = #{userId}") |
| | | int selectHaveVotes(@Param("discussOptionId") Long discussOptionId, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询用户当天当前投票栏目下已投次数 |
| | | * @param discussId 一起议主键id |
| | | * @param userId 用户id |
| | | * @return 总数 |
| | | */ |
| | | int selectVotedVotesInToday(@Param("discussId") Long discussId, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询当前投票主题下的记录 最多6条用于展示 |
| | | * @param discussId 一起议主键id |
| | | * @return |
| | | */ |
| | | List<ComActDiscussOptionUserVO> selectVotedRecords(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 查询当前投票主题参与人数 |
| | | * @param discussId 一起议主键id |
| | | * @return |
| | | */ |
| | | int selectVotedPersonNum(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 批量插入投票记录 |
| | | * @param comActDiscussOptionUserDOList |
| | | * @return |
| | | */ |
| | | int batchInsert(@Param("comActDiscussOptionUserDOList") List<ComActDiscussOptionUserDO> comActDiscussOptionUserDOList); |
| | | } |
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.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActCommiteeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActFourMemberVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComActFourMember; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * (ComActFourMember)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-23 10:13:30 |
| | | */ |
| | | @Mapper |
| | | public interface ComActFourMemberDao extends BaseMapper<ComActFourMember> { |
| | | /** |
| | | * 分页查询 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComActFourMemberVO> pageList(Page page, @Param("commonPage")CommonPage commonPage); |
| | | ComActFourMemberVO getById(Integer id); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | "w.finish_at, " + |
| | | "w.aim_num, " + |
| | | "w.img_height, " + |
| | | "w.handle_id, " + |
| | | "w.create_at " + |
| | | "FROM " + |
| | | "com_act_micro_wish w " + |
| | |
| | | "w.evaluate_at, " + |
| | | "w.img_width, " + |
| | | "w.img_height, " + |
| | | "w.handle_id, " + |
| | | "w.evaluate " + |
| | | "FROM " + |
| | | "com_act_micro_wish w " + |
| | |
| | | "ORDER BY camw.create_at desc "+ |
| | | " </script>") |
| | | IPage<MicroListVO> getScreenMicroList(Page page, @Param("microListDTO") ScreenMicroListDTO microListDTO); |
| | | |
| | | /** |
| | | * 微心愿处理人列表 |
| | | * @param communityId 社区id |
| | | * @param type 处理人类型(1.后台用户 2.党员 3.志愿者) |
| | | * @return 处理人列表 |
| | | */ |
| | | List<SysUserVO> getWishHandleListAdmin(@Param("type") Integer type,@Param("communityId") Long communityId); |
| | | |
| | | SysUserVO getUserByUserId(@Param("userId") Long userId); |
| | | } |
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.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComActSocialOrg; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 社会组织(ComActSocialOrg)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 10:45:30 |
| | | */ |
| | | @Mapper |
| | | public interface ComActSocialOrgDao extends BaseMapper<ComActSocialOrg> { |
| | | /** |
| | | * 分页查询 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComActSocialOrgVO> pageList(Page page, @Param("commonPage")CommonPage commonPage); |
| | | } |
| | |
| | | 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.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordStatisticExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationCommunityTagsDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | 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.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordStatisticExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordVO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | void updateAll(@Param("comElderAuthRecordsDOS") List<ComElderAuthRecordsDO> comElderAuthRecordsDOS); |
| | | |
| | | List<ComElderAuthRecordStatisticExcleVO> exportElderAuthRecordsStatistic(@Param("pageElderAuthRecordsDTO") PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | List<ComElderAuthRecordStatisticExcleVO> exportElderAuthRecordsStatistic(@Param("pageElderAuthRecordsDTO") PageElderAuthStatisticDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 分页查询高龄认证记录 |
| | | * @param page 分页参数 |
| | | * @param pageIdentityAuthRecordDTO |
| | | * @return |
| | | */ |
| | | IPage<IdentityAuthRecordDetailVO> queryRecordWithPage(@Param("page") Page page, @Param("pageIdentityAuthRecordDTO") PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取身份认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return ComElderAuthRecordVO |
| | | */ |
| | | IdentityAuthRecordDetailVO findById(@Param("identityAuthId") Long identityAuthId); |
| | | /** |
| | | * 查询社区待审核高龄认证记录id集合 |
| | | * @param communityId 社区id |
| | | * @param authRecordId 需要排除的详情id |
| | | * @return 待审核高龄认证记录id集合 |
| | | */ |
| | | List<Long> getNextIds(@Param("communityId") Long communityId,@Param("authRecordId") Long authRecordId); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticHeaderVO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | IPage<ComEldersAuthHistoryRecordVO> findByPage(Page page, |
| | | @Param("pageComEldersAuthHistoryRecordDTO") PageComEldersAuthHistoryRecordDTO pageComEldersAuthHistoryRecordDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | IPage<ComEldersAuthStatisticVO> pageAuthStatisticAdmin(Page page, |
| | | @Param("pageElderAuthStatisticDTO") PageElderAuthStatisticDTO pageElderAuthStatisticDTO); |
| | | |
| | | ComEldersAuthStatisticHeaderVO getAuthHeaderStatisticAdmin(@Param("statisticHeaderDTO") ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.VillageVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | |
| | | public interface ComMngBuildingDAO extends BaseMapper<ComMngBuildingDO> { |
| | | @Select("select street_id,act_id,village_id,name from com_mng_building") |
| | | List<ComMngBuildingDO> findAllBuilding(); |
| | | |
| | | List<String> find(String ids); |
| | | |
| | | List<VillageVO> select(Long id); |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; |
| | | import com.panzhihua.common.model.vos.community.VillageVO; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | void updateAll(@Param("populationList") List<ComMngPopulationDO> populationList); |
| | | |
| | | /** |
| | | * 房屋二级联动 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<VillageVO> getSecondHouseAddress(Long communityId); |
| | | } |
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.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticHeaderVO; |
| | | import com.panzhihua.common.model.vos.elders.ComPensionAuthStatisticVO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthHistoryRecordDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021-09-18 15:07:12 |
| | | * @deprecated 养老认证历史记录表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComPensionAuthHistoryRecordMapper extends BaseMapper<ComPensionAuthHistoryRecordDO> { |
| | | |
| | | /** |
| | | * 养老认证统计-分页查询 |
| | | * @param pensionAuthStatisticDTO 请求参数 |
| | | * @return 养老认证统列表 |
| | | */ |
| | | IPage<ComPensionAuthStatisticVO> pageAuthStatisticAdmin(Page page, |
| | | @Param("pensionAuthStatisticDTO") PagePensionAuthStatisticDTO pensionAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证表头统计 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计结果 |
| | | */ |
| | | ComEldersAuthStatisticHeaderVO getAuthHeaderStatisticAdmin(@Param("statisticHeaderDTO") ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordStatisticExcleVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | 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.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthRecordDO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordDAO |
| | |
| | | void updateAll(@Param("comPensionAuthRecordDOS") List<ComPensionAuthRecordDO> comPensionAuthRecordDOS); |
| | | |
| | | List<ComPensionAuthRecordStatisticExcleVO> exportPensionAuthRecordsStatistic(@Param("pageElderAuthRecordsDTO") PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 分页查询养老认证记录 |
| | | * @param page 分页参数 |
| | | * @param pageIdentityAuthRecordDTO |
| | | * @return |
| | | */ |
| | | IPage<IdentityAuthRecordDetailVO> queryRecordWithPage(@Param("page") Page page, @Param("pageIdentityAuthRecordDTO") PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取养老认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return ComPensionAuthRecordVO |
| | | */ |
| | | IdentityAuthRecordDetailVO findById(@Param("identityAuthId") Long identityAuthId); |
| | | } |
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.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComProperty; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * (ComProperty)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 10:46:51 |
| | | */ |
| | | @Mapper |
| | | public interface ComPropertyDao extends BaseMapper<ComProperty> { |
| | | /** |
| | | * 分页查询 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComPropertyVO> pageList(Page page, @Param("commonPage") CommonPage commonPage); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientConsultationStatisticsVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ConvenientConsultationStatisticsDO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ConvenientConsultationStatisticsDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家咨询量统计DAO |
| | | * @author: hans |
| | | * @date: 2021/09/23 13:55 |
| | | */ |
| | | @Mapper |
| | | public interface ConvenientConsultationStatisticsDAO extends BaseMapper<ConvenientConsultationStatisticsDO> { |
| | | |
| | | /** |
| | | * 创建当天统计数据 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | int createTodayStatistic(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 增加当天浏览量 |
| | | * @param merchantId |
| | | * @param nowDate |
| | | * @return |
| | | */ |
| | | int incrConsultationNum(@Param("merchantId") Long merchantId, @Param("nowDate") String nowDate); |
| | | |
| | | /** |
| | | * 获取月咨询量 |
| | | * @param merchantId |
| | | * @param moth |
| | | * @return |
| | | */ |
| | | int selectMonthConsultationVolume(@Param("merchantId") Long merchantId, @Param("moth") String moth); |
| | | |
| | | /** |
| | | * 获取当天咨询量 |
| | | * @param merchantId |
| | | * @param day |
| | | * @return |
| | | */ |
| | | int selectDayConsultationVolume(@Param("merchantId") Long merchantId, @Param("day") String day); |
| | | |
| | | /** |
| | | * 获取商家总咨询量 |
| | | * @return |
| | | */ |
| | | List<ConvenientConsultationStatisticsVO> selectSumForConsultationNum(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientConsultationStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ConvenientMerchantDO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ConvenientMerchantDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家DAO |
| | | * @author: hans |
| | | * @date: 2021/09/16 16:13 |
| | | */ |
| | | @Mapper |
| | | public interface ConvenientMerchantDAO extends BaseMapper<ConvenientMerchantDO> { |
| | | /** |
| | | * 删除便民服务商家 |
| | | * @param merchantId |
| | | * @param operator |
| | | * @return |
| | | */ |
| | | int deleteMerchantById(@Param("merchantId") Long merchantId, @Param("operator") Long operator); |
| | | |
| | | /** |
| | | * 分页查询便民服务商家 运营后台 |
| | | * @param page 分页参数 |
| | | * @param pageConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | IPage<ConvenientMerchantVO> pageMerchant(@Param("page") Page page, |
| | | @Param("pageConvenientMerchantDTO") PageConvenientMerchantDTO pageConvenientMerchantDTO); |
| | | |
| | | /** |
| | | * 查询商家信息 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | ConvenientMerchantVO selectMerchantById(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 获取社区下热门商家 |
| | | * |
| | | * @param page |
| | | * @param communityId |
| | | * @param currentMon |
| | | * @return |
| | | */ |
| | | IPage<ConvenientMerchantVO> getPopularMerchants(@Param("page") Page page, @Param("communityId") Long communityId, @Param("currentMon") String currentMon); |
| | | |
| | | /** |
| | | * 获取指定类型的商家 |
| | | * @param page |
| | | * @param pageClassifyMerchantDTO |
| | | * @param currentMon |
| | | * @return |
| | | */ |
| | | IPage<ConvenientMerchantVO> getClassifyMerchants(@Param("page") Page page, @Param("pageClassifyMerchantDTO") PageClassifyMerchantDTO pageClassifyMerchantDTO, @Param("currentMon") String currentMon); |
| | | |
| | | /** |
| | | * 获取商家详情 |
| | | * @param merchantId |
| | | * @param currentMon |
| | | * @return |
| | | */ |
| | | ConvenientMerchantVO getMerchantDetail(@Param("merchantId") Long merchantId, @Param("currentMon") String currentMon); |
| | | |
| | | /** |
| | | * 分页搜索商家信息 |
| | | * @param page |
| | | * @param pageSearchDTO |
| | | * @param currentMon |
| | | * @return |
| | | */ |
| | | IPage<ConvenientMerchantVO> pageSearchMerchant(@Param("page") Page page, @Param("pageSearchDTO") PageSearchDTO pageSearchDTO, @Param("currentMon") String currentMon); |
| | | |
| | | /** |
| | | * 根据查询条件获取商家导出数据 |
| | | * @param exportMerchantDTO |
| | | * @return |
| | | */ |
| | | List<ExportMerchantVO> exportMerchantBySearch(@Param("exportMerchantDTO") ExportMerchantDTO exportMerchantDTO); |
| | | |
| | | /** |
| | | * 批量更新商家咨询量 |
| | | * @param consultationVOList |
| | | * @return |
| | | */ |
| | | int batchUpdateMerchantConsultationNum(@Param("consultationVOList") List<ConvenientConsultationStatisticsVO> consultationVOList); |
| | | |
| | | /** |
| | | * 批量更新商家浏览量 |
| | | * @param viewVOList |
| | | * @return |
| | | */ |
| | | int batchUpdateMerchantViewNum(@Param("viewVOList") List<ConvenientViewStatisticsVO> viewVOList); |
| | | |
| | | /** |
| | | * 根据指定id获取商家导出数据 |
| | | * @param needExportIds |
| | | * @return |
| | | */ |
| | | List<ExportMerchantVO> exportMerchantByIds(@Param("needExportIds") List<Long> needExportIds); |
| | | } |
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.convenient.PageConvenientProductCategoryDTO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductCategoryVO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductCategoryDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ConvenientProductCategoryDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务产品分类DAO |
| | | * @author: hans |
| | | * @date: 2021/09/20 16:16 |
| | | */ |
| | | @Mapper |
| | | public interface ConvenientProductCategoryDAO extends BaseMapper<ConvenientProductCategoryDO> { |
| | | |
| | | /** |
| | | * 分页查询便民服务产品分类 |
| | | * @param page 分页参数 |
| | | * @param pageConvenientProductCategoryDTO |
| | | * @return 产品分类详情 |
| | | */ |
| | | IPage<ConvenientProductCategoryVO> pageProductCategory(@Param("page") Page page, @Param("pageConvenientProductCategoryDTO") PageConvenientProductCategoryDTO pageConvenientProductCategoryDTO); |
| | | |
| | | /** |
| | | * 查询所有分类 |
| | | * @return |
| | | */ |
| | | List<ConvenientProductCategoryVO> selectAllCategories(); |
| | | } |
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.convenient.PageConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductSpecificationVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ConvenientProductDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家后台产品DAO |
| | | * @author: hans |
| | | * @date: 2021/09/21 21:35 |
| | | */ |
| | | @Mapper |
| | | public interface ConvenientProductDAO extends BaseMapper<ConvenientProductDO> { |
| | | |
| | | /** |
| | | * 分页查询产品 |
| | | * |
| | | * @param page |
| | | * @param pageConvenientProductDTO |
| | | * @return |
| | | */ |
| | | IPage<ConvenientProductVO> pageProduct(@Param("page") Page page, @Param("pageConvenientProductDTO") PageConvenientProductDTO pageConvenientProductDTO); |
| | | |
| | | /** |
| | | * 批量删除产品 |
| | | * @param needDelIds |
| | | * @return |
| | | */ |
| | | int batchDeleteByIds(@Param("needDelIds") List<Long> needDelIds); |
| | | |
| | | /** |
| | | * 批量上架 |
| | | * @param needDealIds |
| | | * @param updatedBy |
| | | * @param saleStatus |
| | | * @return |
| | | */ |
| | | int batchOnShelfOrOffShelfByIds(@Param("needDealIds") List<Long> needDealIds, @Param("updatedBy") Long updatedBy, @Param("saleStatus") boolean saleStatus); |
| | | |
| | | /** |
| | | * 小程序获取商家产品 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | List<ConvenientProductVO> getMerchantProduct(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 获取产品规格 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | List<ConvenientProductSpecificationVO> getProductSpecifications(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 分页搜索产品信息 |
| | | * @param page |
| | | * @param pageSearchDTO |
| | | * @return |
| | | */ |
| | | IPage<ConvenientProductVO> pageSearchProduct(@Param("page") Page page, @Param("pageSearchDTO") PageSearchDTO pageSearchDTO); |
| | | |
| | | /** |
| | | * 增加产品浏览量 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | int incrProductView(@Param("productId") Long productId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductSpecificationDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ConvenientProductSpecificationDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务产品分类DAO |
| | | * @author: hans |
| | | * @date: 2021/09/21 21:56 |
| | | */ |
| | | @Mapper |
| | | public interface ConvenientProductSpecificationDAO extends BaseMapper<ConvenientProductSpecificationDO> { |
| | | |
| | | /** |
| | | * 批量插入产品规格 |
| | | * @param productSpecificationDOList |
| | | * @return |
| | | */ |
| | | int batchInsert(@Param("productSpecificationDOList") List<ConvenientProductSpecificationDO> productSpecificationDOList); |
| | | |
| | | /** |
| | | * 删除传入ID以外的关联 |
| | | * @param notNeedDelIds |
| | | * @return |
| | | */ |
| | | int deleteLoseRelationSpecifications(@Param("notNeedDelIds") List<Long> notNeedDelIds); |
| | | |
| | | /** |
| | | * 通过产品ID删除相关规格 |
| | | * @param needDelProductIds |
| | | * @return |
| | | */ |
| | | int batchDeleteByProductIds(@Param("needDelProductIds") List<Long> needDelProductIds); |
| | | } |
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.convenient.PageConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientServiceCategoryDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ConvenientServiceCategoryDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务分类DAO |
| | | * @author: hans |
| | | * @date: 2021/09/16 10:55 |
| | | */ |
| | | @Mapper |
| | | public interface ConvenientServiceCategoryDAO extends BaseMapper<ConvenientServiceCategoryDO> { |
| | | /** |
| | | * 分页查询便民服务分类 |
| | | * @param page 分页参数 |
| | | * @param pageConvenientServiceCategoryDTO |
| | | * @return 服务分类详情 |
| | | */ |
| | | IPage<ConvenientServiceCategoryVO> pageServiceCategory(@Param("page") Page page, @Param("pageConvenientServiceCategoryDTO") |
| | | PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO); |
| | | |
| | | /** |
| | | * 创建商家服务类型关系 |
| | | * @param merchantId |
| | | * @param serviceId |
| | | * @param name |
| | | * @param createdBy |
| | | * @return |
| | | */ |
| | | int createMerchantServiceRelation(@Param("merchantId") Long merchantId, @Param("serviceId") Long serviceId, |
| | | @Param("name") String name, @Param("createdBy") Long createdBy); |
| | | |
| | | /** |
| | | * 删除商家服务类型关系 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | int deleteMerchantServiceRelation(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 获取商家服务范围 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | String selectServiceScopeByMerchantId(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 获取商家服务类型 |
| | | * @param merchantId |
| | | * @return serviceIds |
| | | */ |
| | | List<Long> selectServiceIdsForMerchant(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 查看服务分类是否被引用 |
| | | * @param categoryId |
| | | * @return |
| | | */ |
| | | int checkCategoryIsUsing(@Param("categoryId") Long categoryId); |
| | | |
| | | /** |
| | | * 获取该社区商家数量大于0的分类 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<ConvenientServiceCategoryVO> selectSuitableServiceCategories(@Param("communityId") Long communityId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ConvenientViewStatisticsDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ConvenientViewStatisticsDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家浏览量统计DAO |
| | | * @author: hans |
| | | * @date: 2021/09/23 16:53 |
| | | */ |
| | | @Mapper |
| | | public interface ConvenientViewStatisticsDAO extends BaseMapper<ConvenientViewStatisticsDO> { |
| | | |
| | | /** |
| | | * 创建当天统计数据 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | int createTodayStatistic(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 增加当天浏览量 |
| | | * @param merchantId |
| | | * @param nowDate |
| | | * @return |
| | | */ |
| | | int incrViewNum(@Param("merchantId") Long merchantId, @Param("nowDate") String nowDate); |
| | | |
| | | /** |
| | | * 获取月浏览量 |
| | | * @param merchantId |
| | | * @param moth |
| | | * @return |
| | | */ |
| | | int selectMonthViewNum(@Param("merchantId") Long merchantId, @Param("moth") String moth); |
| | | |
| | | /** |
| | | * 获取当天浏览量 |
| | | * @param merchantId |
| | | * @param day |
| | | * @return |
| | | */ |
| | | int selectDayViewNum(@Param("merchantId") Long merchantId, @Param("day") String day); |
| | | |
| | | /** |
| | | * 获取商家总浏览量 |
| | | * @return |
| | | */ |
| | | List<ConvenientViewStatisticsVO> selectSumForViewNum(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (ComActCommittee)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 13:55:43 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class ComActCommittee implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -95815418574862374L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | @ApiModelProperty(value = "联系人") |
| | | private String contactName; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 小区id |
| | | */ |
| | | @ApiModelProperty(value = "小区id") |
| | | private Long areaId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "社区Id") |
| | | private Long communityId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (ComActFourMember)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-23 10:13:30 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class ComActFourMember implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 905771115750112478L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 职位 |
| | | */ |
| | | @ApiModelProperty(value = "职位") |
| | | private String position; |
| | | |
| | | /** |
| | | * 管辖区域 |
| | | */ |
| | | @ApiModelProperty(value = "管辖区域") |
| | | private String jurisdiction; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "管辖区域内容") |
| | | private String jurisdictionContent; |
| | | |
| | | @ApiModelProperty(value = "照片") |
| | | private String url; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 社会组织(ComActSocialOrg)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 10:45:21 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("社会组织") |
| | | public class ComActSocialOrg implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 597028379524285428L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value = "ID") |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 单位名称 |
| | | */ |
| | | @ApiModelProperty(value = "单位名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 工商登记号 |
| | | */ |
| | | @ApiModelProperty(value = "工商登记号") |
| | | private String businessNumber; |
| | | |
| | | /** |
| | | * 成立时间 |
| | | */ |
| | | @ApiModelProperty(value = "成立时间") |
| | | private Date buildDate; |
| | | |
| | | /** |
| | | * 机构代码 |
| | | */ |
| | | @ApiModelProperty(value = "机构代码") |
| | | private String agencyCode; |
| | | |
| | | /** |
| | | * 微信公众号 |
| | | */ |
| | | @ApiModelProperty(value = "微信公众号") |
| | | private String weixinOfficialAccounts; |
| | | |
| | | /** |
| | | * 单位类别: 1 社会团体、2 民办非企业单位、3 基金会 |
| | | */ |
| | | @ApiModelProperty(value = "单位类别: 1 社会团体、2 民办非企业单位、3 基金会") |
| | | private Integer companyType; |
| | | |
| | | /** |
| | | * 注册资金(万元) |
| | | */ |
| | | @ApiModelProperty(value = "注册资金(万元)") |
| | | private Integer registFee; |
| | | |
| | | /** |
| | | * 资产总额(万元) |
| | | */ |
| | | @ApiModelProperty(value = "资产总额(万元)") |
| | | private Integer assetsTotal; |
| | | |
| | | /** |
| | | * 净资产(万元) |
| | | */ |
| | | @ApiModelProperty(value = "净资产(万元)") |
| | | private Integer assetsNet; |
| | | |
| | | /** |
| | | * 销售额(万元) |
| | | */ |
| | | @ApiModelProperty(value = "销售额(万元)") |
| | | private Double salesFee; |
| | | |
| | | /** |
| | | * 上年纳税额(万元) |
| | | */ |
| | | @ApiModelProperty(value = "上年纳税额(万元)") |
| | | private Double taxesLastYear; |
| | | |
| | | /** |
| | | * 职工人数(人) |
| | | */ |
| | | @ApiModelProperty(value = "职工人数(人)") |
| | | private Integer staffCount; |
| | | |
| | | /** |
| | | * 通讯地址 |
| | | */ |
| | | @ApiModelProperty(value = "通讯地址") |
| | | private String maillingAddr; |
| | | |
| | | /** |
| | | * 邮编 |
| | | */ |
| | | @ApiModelProperty(value = "邮编") |
| | | private String postCode; |
| | | |
| | | /** |
| | | * 官方网址 |
| | | */ |
| | | @ApiModelProperty(value = "官方网址") |
| | | private String officialUrl; |
| | | |
| | | /** |
| | | * 法人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "法人姓名") |
| | | private String corporationName; |
| | | |
| | | /** |
| | | * 法人性别0女1男 |
| | | */ |
| | | @ApiModelProperty(value = "法人性别0女1男") |
| | | private String corporationGen; |
| | | |
| | | /** |
| | | * 法人工作电话 |
| | | */ |
| | | @ApiModelProperty(value = "法人工作电话") |
| | | private String corporationOfficePhone; |
| | | |
| | | /** |
| | | * 法人职位 |
| | | */ |
| | | @ApiModelProperty(value = "法人职位") |
| | | private String corporationPosition; |
| | | |
| | | /** |
| | | * 法人手机 |
| | | */ |
| | | @ApiModelProperty(value = "法人手机") |
| | | private String corporationPhone; |
| | | |
| | | /** |
| | | * 法人邮箱 |
| | | */ |
| | | @ApiModelProperty(value = "法人邮箱") |
| | | private String corporationEmail; |
| | | |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "联系人姓名") |
| | | private String contactName; |
| | | |
| | | /** |
| | | * 联系人性别0女1男 |
| | | */ |
| | | @ApiModelProperty(value = "联系人性别0女1男") |
| | | private String contactGen; |
| | | |
| | | /** |
| | | * 联系人工作电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系人工作电话") |
| | | private String contactOfficePhone; |
| | | |
| | | /** |
| | | * 联系人职位 |
| | | */ |
| | | @ApiModelProperty(value = "联系人职位") |
| | | private String contactPosition; |
| | | |
| | | /** |
| | | * 联系人手机 |
| | | */ |
| | | @ApiModelProperty(value = "联系人手机") |
| | | private String contactPhone; |
| | | |
| | | /** |
| | | * 联系人邮箱 |
| | | */ |
| | | @ApiModelProperty(value = "联系人邮箱") |
| | | private String contactEmail; |
| | | |
| | | /** |
| | | * 业务范围/专业领域 |
| | | */ |
| | | @ApiModelProperty(value = "业务范围/专业领域") |
| | | private String businessScope; |
| | | |
| | | /** |
| | | * 运营情况及行业影响(含所获荣誉) |
| | | */ |
| | | @ApiModelProperty(value = "运营情况及行业影响(含所获荣誉)") |
| | | private String businessImpact; |
| | | |
| | | /** |
| | | * 附件(以逗号隔开) |
| | | */ |
| | | @ApiModelProperty(value = "附件(以逗号隔开)") |
| | | private String attachUrl; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | @ApiModelProperty(value = "更新人") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Date updateAt; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 登录用户id |
| | | */ |
| | | @ApiModelProperty(value = "登录用户id") |
| | | private Long userId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (ComProperty)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 10:46:50 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class ComProperty implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 860578600976051156L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 简介 |
| | | */ |
| | | @ApiModelProperty(value = "简介") |
| | | private String introduction; |
| | | |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "联系人姓名") |
| | | private String contactName; |
| | | |
| | | /** |
| | | * 联系人手机 |
| | | */ |
| | | @ApiModelProperty(value = "联系人手机") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | private Date createTime; |
| | | |
| | | private Long areaId; |
| | | |
| | | } |
| | |
| | | * 用户主键 |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 回复量 |
| | | */ |
| | | private Integer replyNum; |
| | | |
| | | /** |
| | | * 是否删除(1.是 2.否) |
| | | */ |
| | | private Integer isDel; |
| | | |
| | | /** |
| | | * 是否删除枚举(1.是 2.否) |
| | | */ |
| | | public interface isDelete{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 14:48 |
| | | **/ |
| | |
| | | private String discussSubject; |
| | | |
| | | /** |
| | | * 类型 1 图文 2 投票 |
| | | * 类型 1 议事 2 投票 |
| | | */ |
| | | private Integer type; |
| | | |
| | |
| | | */ |
| | | private String voteTitle; |
| | | |
| | | /** |
| | | * 是否可重复投票(1.是 2.否) |
| | | */ |
| | | private Integer isRepeat; |
| | | |
| | | /** |
| | | * 每人票数 |
| | | */ |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 单张图片宽度 |
| | | */ |
| | | private BigDecimal imgWidth; |
| | | |
| | | /** |
| | | * 单张图片高度 |
| | | */ |
| | | private BigDecimal imgHeight; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 评论数 |
| | | */ |
| | | private Integer commentNum; |
| | | |
| | | /** |
| | | * 点赞数 |
| | | */ |
| | | private Integer fabulousNum; |
| | | |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewsNum; |
| | | |
| | | /** |
| | | * 参与人数 |
| | | */ |
| | | private Integer joinNum; |
| | | |
| | | /** |
| | | * 状态(1.未开始 2.进行中 3.待公布 4.已公布 5.已发布) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否已删除(1.是 2.否) |
| | | */ |
| | | private Integer isDel; |
| | | |
| | | /** |
| | | * 公布结果 |
| | | */ |
| | | private String publishResult; |
| | | |
| | | /** |
| | | * 公布时间 |
| | | */ |
| | | private Date publishAt; |
| | | |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | private Date releaseAt; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 公布人id |
| | | */ |
| | | private Long publishBy; |
| | | |
| | | /** |
| | | * 类型 1 议事 2 投票 |
| | | */ |
| | | public interface type{ |
| | | int ys = 1; |
| | | int tp = 2; |
| | | } |
| | | |
| | | /** |
| | | * 是否枚举(1.是 2.否) |
| | | */ |
| | | public interface isOk{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | |
| | | /** |
| | | * 状态(1.未开始 2.进行中 3.待公布 4.已公布 5.已发布) |
| | | */ |
| | | public interface status{ |
| | | int wks = 1; |
| | | int jxz = 2; |
| | | int dgb = 3; |
| | | int ygb = 4; |
| | | int yfb = 5; |
| | | } |
| | | |
| | | } |
| | |
| | | * 投票时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 一起议id |
| | | */ |
| | | private Long discussId; |
| | | } |
| | |
| | | private BigDecimal imgHeight; |
| | | |
| | | /** |
| | | * 处理人id,多个以逗号隔开 |
| | | */ |
| | | private String handleId; |
| | | |
| | | /** |
| | | * 状态 1待审核 2待分配 3进行中 4已驳回 5待确认6 已完成 7集心中 |
| | | */ |
| | | public interface status{ |
| | |
| | | private String idCard; |
| | | |
| | | /** |
| | | * 性别 |
| | | * 性别(1.男 2.女 3.其他) |
| | | */ |
| | | private String sex; |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 年龄 |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * title: ComElderAuthRecordsDO 社区政务》高龄老人认证》认证记录表实体类 |
| | |
| | | private Long submitUserId; |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | * 人脸核验结果数据 |
| | | */ |
| | | private String verificationResult; |
| | | |
| | | /** |
| | | * 认证视频 |
| | | */ |
| | | private String authVideo; |
| | | |
| | | /** |
| | | * 现居地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 审核人员 |
| | |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 审核状态(1.待审核 2.驳回 3.通过) |
| | | */ |
| | | public interface approvalStatus{ |
| | | int dsh = 1; |
| | | int bh = 2; |
| | | int tg = 3; |
| | | } |
| | | |
| | | /** |
| | | * 认证状态(1.已认证 0.未认证) |
| | | */ |
| | | public interface authStatus{ |
| | | int yrz = 1; |
| | | int wrz = 0; |
| | | } |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | public interface authMethod{ |
| | | int sprz = 1; |
| | | int rlrz = 2; |
| | | int xxrz = 3; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComElderAuthRecordsDO{" + |
| | | "id=" + id + |
| | | ", elderliesId=" + elderliesId + |
| | | ", authPeriod=" + authPeriod + |
| | | ", submitUserId=" + submitUserId + |
| | | ", authVideo=" + authVideo + |
| | | ", address=" + address + |
| | | ", approverId=" + approverId + |
| | | ", approvalStatus=" + approvalStatus + |
| | | ", approvalDate=" + approvalDate + |
| | | ", mark=" + mark + |
| | | ", rejectReason=" + rejectReason + |
| | | ", authStatus=" + authStatus + |
| | | ", authDate=" + authDate + |
| | | ", createAt=" + createAt + |
| | | ", updateAt=" + updateAt + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 高龄人口id |
| | | */ |
| | | private Long elderliesId; |
| | | |
| | | /** |
| | | * 认证期数 |
| | | */ |
| | | private String authPeriod; |
| | | |
| | | /** |
| | | * 提交用户id |
| | | */ |
| | | private Long submitUserId; |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | * 人脸核验结果数据 |
| | | */ |
| | | private String verificationResult; |
| | | |
| | | /** |
| | | * 标记 |
| | | */ |
| | | private String mark; |
| | | |
| | | /** |
| | | * 是否健在 |
| | | */ |
| | | private Integer isAlive; |
| | | |
| | | /** |
| | | * 人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上) |
| | | */ |
| | | private Integer personnelCategory; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女 3.其他) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 认证时间 |
| | | */ |
| | | private Date authDate; |
| | | |
| | | /** |
| | | * 审核时间 |
| | | */ |
| | | private Date approvalDate; |
| | | |
| | | /** |
| | | * 审核id |
| | | */ |
| | | private Long approverId; |
| | | |
| | | /** |
| | | * 本月是否已认证(1.是 2.否) |
| | | */ |
| | | public interface isAuth{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | } |
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; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021-09-18 15:07:12 |
| | | * @deprecated 养老认证历史记录表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_pension_auth_history_record") |
| | | public class ComPensionAuthHistoryRecordDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 老人用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | | private String idCard; |
| | | |
| | | /** |
| | | * 出生年月 |
| | | */ |
| | | private String brithday; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 户籍地 |
| | | */ |
| | | private String domicile; |
| | | |
| | | /** |
| | | * 本月是否已认证(1.是 2.否) |
| | | */ |
| | | private Integer isAuth; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 养老人口id |
| | | */ |
| | | private Long elderliesId; |
| | | |
| | | /** |
| | | * 认证期数 |
| | | */ |
| | | private String authPeriod; |
| | | |
| | | /** |
| | | * 提交用户id |
| | | */ |
| | | private Long submitUserId; |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | * 人脸核验结果数据 |
| | | */ |
| | | private String verificationResult; |
| | | |
| | | /** |
| | | * 标记 |
| | | */ |
| | | private String mark; |
| | | |
| | | /** |
| | | * 是否健在(1.是 0.否) |
| | | */ |
| | | private Integer isAlive; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女 3.其他) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 认证成功记录id |
| | | */ |
| | | private Long authId; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 认证时间 |
| | | */ |
| | | private Date authDate; |
| | | |
| | | /** |
| | | * 审核时间 |
| | | */ |
| | | private Date approvalDate; |
| | | |
| | | /** |
| | | * 审核人员id |
| | | */ |
| | | private Long approverId; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComPensionAuthHistoryRecordDO{" + |
| | | "id=" + id + |
| | | ", userId=" + userId + |
| | | ", name=" + name + |
| | | ", idCard=" + idCard + |
| | | ", brithday=" + brithday + |
| | | ", age=" + age + |
| | | ", domicile=" + domicile + |
| | | ", isAuth=" + isAuth + |
| | | ", createAt=" + createAt + |
| | | ", communityId=" + communityId + |
| | | ", elderliesId=" + elderliesId + |
| | | ", authPeriod=" + authPeriod + |
| | | ", submitUserId=" + submitUserId + |
| | | ", authMethod=" + authMethod + |
| | | ", verificationResult=" + verificationResult + |
| | | ", mark=" + mark + |
| | | ", isAlive=" + isAlive + |
| | | ", sex=" + sex + |
| | | ", authId=" + authId + |
| | | ", phone=" + phone + |
| | | ", authDate=" + authDate + |
| | | ", approvalDate=" + approvalDate + |
| | | ", approverId=" + approverId + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 性别 |
| | | */ |
| | | private String sex; |
| | | private Integer sex; |
| | | /** |
| | | * 年龄 |
| | | */ |
| | |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 是否枚举(1.是 0.否) |
| | | */ |
| | | public interface isOk{ |
| | | int yes = 1; |
| | | int no = 0; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComPensionAuthPensionerDO{" + |
| | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | |
| | | *提交用户id |
| | | */ |
| | | private Long submitUserId; |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | *认证期数 |
| | | */ |
| | | private String authPeriod; |
| | | |
| | | /** |
| | | * 人脸核验结果数据 |
| | | */ |
| | | private String verificationResult; |
| | | |
| | | /** |
| | | * 认证视频 |
| | | */ |
| | | private String authVideo; |
| | | /** |
| | | *审核人员 |
| | | * 现居地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | *审核人员id |
| | | */ |
| | | private Long approverId; |
| | | /** |
| | |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | *审核状态(1.待审核 2.驳回 3.通过) |
| | | */ |
| | | public interface approvalStatus{ |
| | | int dsh = 1; |
| | | int bh = 2; |
| | | int tg = 3; |
| | | } |
| | | |
| | | /** |
| | | *认证状态(1.已认证 0.未认证) |
| | | */ |
| | | public interface authStatus{ |
| | | int rez = 1; |
| | | int wrz = 0; |
| | | } |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | public interface authMethod{ |
| | | int sprz = 1; |
| | | int rlrz = 2; |
| | | int xxrz = 3; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientConsultationStatisticsDO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家咨询量统计DO |
| | | * @author: hans |
| | | * @date: 2021/09/23 13:56 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_convenient_consultation_statistics") |
| | | public class ConvenientConsultationStatisticsDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 商家id |
| | | */ |
| | | private Long merchantId; |
| | | /** |
| | | * 统计日期 |
| | | */ |
| | | private Date statisticDate; |
| | | /** |
| | | * 咨询量 |
| | | */ |
| | | private Integer consultationVolume; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientMerchantDO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家DO |
| | | * @author: hans |
| | | * @date: 2021/09/16 16:04 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_convenient_merchants") |
| | | public class ConvenientMerchantDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 商家名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | /** |
| | | * 社区名称 |
| | | */ |
| | | private String communityName; |
| | | /** |
| | | * 商家logo |
| | | */ |
| | | private String logo; |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | private String contacts; |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | | private String idCard; |
| | | /** |
| | | * 咨询电话 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 商家地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | private String lat; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | private String lon; |
| | | /** |
| | | * 营业开始时间 |
| | | */ |
| | | private Date beginAt; |
| | | /** |
| | | * 营业截止时间 |
| | | */ |
| | | private Date endAt; |
| | | /** |
| | | * 营业周期 |
| | | */ |
| | | private String period; |
| | | /** |
| | | * 商家介绍 |
| | | */ |
| | | private String introduction; |
| | | /** |
| | | * 营业状态 |
| | | */ |
| | | private Boolean businessStatus; |
| | | /** |
| | | * 商家绑定用户id |
| | | */ |
| | | private Long userId; |
| | | /** |
| | | * 咨询量 |
| | | */ |
| | | private Integer consultationVolume; |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | private Long updatedBy; |
| | | } |
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; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ConvenientProductCategoryDO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务产品分类DO |
| | | * @author: hans |
| | | * @date: 2021/09/20 16:12 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_convenient_product_categories") |
| | | public class ConvenientProductCategoryDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 权重 |
| | | */ |
| | | private Integer weight; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | private Long updatedBy; |
| | | } |
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; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ConvenientProductDO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家DO |
| | | * @author: hans |
| | | * @date: 2021/09/16 21:01 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_convenient_products") |
| | | public class ConvenientProductDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 产品名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 产品分类id |
| | | */ |
| | | private Long categoryId; |
| | | /** |
| | | * 产品所属商家 |
| | | */ |
| | | private Long merchantId; |
| | | /** |
| | | * 是否上架 |
| | | */ |
| | | private Boolean onShelf; |
| | | /** |
| | | * 产品介绍 |
| | | */ |
| | | private String introduction; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | private Long updatedBy; |
| | | } |
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; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ConvenientProductSpecificationDO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务产品分类DO |
| | | * @author: hans |
| | | * @date: 2021/09/21 22:08 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_convenient_product_specifications") |
| | | public class ConvenientProductSpecificationDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 规格名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 价格 |
| | | */ |
| | | private BigDecimal price; |
| | | /** |
| | | * 产品规格图片 |
| | | */ |
| | | private String image; |
| | | /** |
| | | * 所属产品ID |
| | | */ |
| | | private Long productId; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientServiceCategoryDO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务分类DO |
| | | * @author: hans |
| | | * @date: 2021/09/16 10:35 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_convenient_service_categories") |
| | | public class ConvenientServiceCategoryDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 分类图标 |
| | | */ |
| | | private String icon; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 权重 |
| | | */ |
| | | private Integer weight; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ConvenientViewStatisticsDO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家浏览量统计DO |
| | | * @author: hans |
| | | * @date: 2021/09/23 16:54 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_convenient_view_statistics") |
| | | public class ConvenientViewStatisticsDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 商家id |
| | | */ |
| | | private Long merchantId; |
| | | /** |
| | | * 统计日期 |
| | | */ |
| | | private Date statisticDate; |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActCommiteeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.service_community.entity.ComActCommittee; |
| | | |
| | | /** |
| | | * (ComActCommittee)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 13:55:44 |
| | | */ |
| | | public interface ComActCommitteeService extends IService<ComActCommittee> { |
| | | /** |
| | | * 分页查询 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param comActCommiteeVO |
| | | * @return |
| | | */ |
| | | R insert(ComActCommiteeVO comActCommiteeVO); |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param comActCommiteeVO |
| | | * @return |
| | | */ |
| | | R update(ComActCommiteeVO comActCommiteeVO); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R delete(Long id); |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 14:50 |
| | | **/ |
| | | public interface ComActDiscussService { |
| | | /** |
| | | * 一起议-新增 |
| | | * 议事投票-新增 |
| | | * |
| | | * @param comActDiscussDTO |
| | | * 新增参数 |
| | |
| | | R addDiscuss(ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return ComActDiscussVO |
| | | * 议事投票-编辑 |
| | | * @param comActDiscussDTO 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | R detailDiscuss(Long id); |
| | | R editDiscuss(ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-删除 |
| | | * 议事投票-详情 |
| | | * |
| | | * @param discussDetailDTO |
| | | * 请求参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | R detailDiscuss(ComActDiscussDetailDTO discussDetailDTO); |
| | | |
| | | /** |
| | | * 议事投票-删除 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R deleteDiscuss(Long id); |
| | | |
| | | /** |
| | | * 一起议-回复 |
| | | * 议事投票-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 评论内容 |
| | |
| | | R addDiscussComment(ComActDiscussCommentDTO comActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-分页查询 |
| | | * 议事投票-分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | R pageDiscuss(PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-查看 |
| | | * 议事投票-后台分页查询 |
| | | * @param pageComActDiscussDTO 请求参数 |
| | | * @return 议事投票列表 |
| | | */ |
| | | R pageDiscussAdmin(PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-查看 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R detailDiscusscomment(Long id); |
| | | |
| | | /** |
| | | * 一起议-评论-置顶 |
| | | * 议事投票评论详情 |
| | | * @param pageComActDiscussCommentDTO 请求参数 |
| | | * @return 议事投票详情 |
| | | */ |
| | | R detailDiscussCommentAdmin(PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-置顶 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R putDiscussCommentTop(Long id); |
| | | |
| | | /** |
| | | * 一起议-评论-回复 |
| | | * 议事投票-评论-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 回复内容 |
| | |
| | | R addDiscussCommentBack(ComActDiscussCommentDTO comActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 |
| | | * 议事投票-评论-分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | |
| | | R pageDiscussComment(PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-分页查询 小程序 |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | R pageDiscussCommentAdmin(PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | R pageDiscussApplets(PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-点赞、取消点赞 |
| | | * 议事投票-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 操作类型 |
| | |
| | | R putDiscussUser(ComActDiscussUserDTO comActDiscussUserDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 小程序 |
| | | * 议事投票-评论-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页参数 |
| | |
| | | R pageDiscussCommentApplets(PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-详情 小程序 |
| | | * 议事投票-详情 小程序 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R detailDiscussApplets(Long id, Long userId); |
| | | |
| | | /** |
| | | * 一起议-投票 |
| | | * 议事投票-投票 |
| | | * |
| | | * @param comActDiscussOptionUserDTO |
| | | * 投票信息 |
| | |
| | | R addDiscussOptionUser(ComActDiscussOptionUserDTO comActDiscussOptionUserDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-点赞、取消点赞 |
| | | * 议事投票-评论-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 评论点赞 |
| | |
| | | R putDiscussCommentUser(ComActDiscussCommentUserDTO comActDiscussUserDTO); |
| | | |
| | | /** |
| | | * 工作大屏-一起议列表 |
| | | * 工作大屏-议事投票列表 |
| | | * |
| | | * @param discussListDTO |
| | | * 请求参数 |
| | | * @return 一起议列表 |
| | | * @return 议事投票列表 |
| | | */ |
| | | R getScreenDiscussList(ScreenDiscussListDTO discussListDTO); |
| | | |
| | | /** |
| | | * 议事投票后台公布结果 |
| | | * @param publishResultDTO 请求参数 |
| | | * @return 公布结果 |
| | | */ |
| | | R publishResultAdmin(ComActDiscussPublishResultDTO publishResultDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论/回复删除 |
| | | * @param id 评论/回复id |
| | | * @return 删除结果 |
| | | */ |
| | | R deleteDiscussCommentAdmin(Long id); |
| | | |
| | | /** |
| | | * 分页查询评论下回复列表 |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return 回复列表 |
| | | */ |
| | | R discussCommentReplyAdmin(ComActDiscussDetailDTO discussDetailDTO); |
| | | |
| | | /** |
| | | * 查询社区可发布议事投票权限配置 |
| | | * @param communityId 社区id |
| | | * @return 社区可发布议事投票权限配置 |
| | | */ |
| | | R discussJurisdictionGet(Long communityId,Long userId); |
| | | |
| | | /** |
| | | * 设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | * @param communityId 社区id |
| | | * @param value 需要设置的参数值 |
| | | * @return 设置结果 |
| | | */ |
| | | R discussJurisdictionSet(Long communityId,String value); |
| | | |
| | | /** |
| | | * 议事投票检测状态定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskDiscussInspectStatus(); |
| | | |
| | | /** |
| | | * 一起议增加浏览量 |
| | | * @param discussId |
| | | */ |
| | | void increaseViewNum(Long discussId); |
| | | |
| | | /** |
| | | * 将redis中前一天浏览量写入表中 |
| | | * @return 执行结果 |
| | | */ |
| | | R writeDiscussViewNumToTable(); |
| | | |
| | | /** |
| | | * 公布/编辑一起议投票结果 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | R editDiscussResult(ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议获取是否有发布权 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | R getDiscussPermissions(ComActDiscussDTO comActDiscussDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.community.ComActFourMemberVO; |
| | | import com.panzhihua.service_community.entity.ComActFourMember; |
| | | |
| | | /** |
| | | * (ComActFourMember)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-23 10:13:31 |
| | | */ |
| | | public interface ComActFourMemberService extends IService<ComActFourMember> { |
| | | /** |
| | | * 分页查询 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param comActFourMemberVO |
| | | * @return |
| | | */ |
| | | R insert(ComActFourMemberVO comActFourMemberVO); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param comActFourMemberVO |
| | | * @return |
| | | */ |
| | | R update(ComActFourMemberVO comActFourMemberVO); |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | R delete(ComActFourMemberVO comActFourMemberVO); |
| | | |
| | | R get(Integer id); |
| | | } |
| | |
| | | R timedTaskActMicroWishAll(); |
| | | |
| | | R getScreenMicroList(ScreenMicroListDTO microListDTO); |
| | | |
| | | /** |
| | | * 微心愿处理人列表 |
| | | * @param communityId 社区id |
| | | * @param type 处理人类型(1.后台用户 2.党员 3.志愿者) |
| | | * @return 处理人列表 |
| | | */ |
| | | R wishHandleListAdmin(Long communityId,Integer type); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.service_community.entity.ComActSocialOrg; |
| | | |
| | | /** |
| | | * 社会组织(ComActSocialOrg)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 10:45:30 |
| | | */ |
| | | public interface ComActSocialOrgService extends IService<ComActSocialOrg> { |
| | | /** |
| | | * 分页查询 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | |
| | | /** |
| | | * id查询详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R selectById(Long id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param comActSocialOrgVO |
| | | * @return |
| | | */ |
| | | R insert(ComActSocialOrgVO comActSocialOrgVO); |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param comActSocialOrgVO |
| | | * @return |
| | | */ |
| | | R update(ComActSocialOrgVO comActSocialOrgVO); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R delete(Long id); |
| | | } |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordVO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | 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; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R exportElderAuthRecordsStatistic(PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | R exportElderAuthRecordsStatistic(PageElderAuthStatisticDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 定时任务每月1号0点统计高龄老人本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskElderAuthStatisticsJobHandler(); |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param addIdentityAuthDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addElderAuth(AddIdentityAuthDTO addIdentityAuthDTO); |
| | | |
| | | /** |
| | | * 分页查询高龄认证记录 |
| | | * @param pageIdentityAuthRecordDTO 查询参数 |
| | | * @return 高龄认证记录列表 |
| | | */ |
| | | R queryRecordWithPage(PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取高龄认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | R retrieveElderAuthDetail(Long identityAuthId); |
| | | } |
| | |
| | | R getCascadeHouseAddress(CascadeHouseDTO cascadeHouseDTO); |
| | | |
| | | /** |
| | | * 查询二级房屋级联菜单 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | R getSecondHouseAddress(CascadeHouseDTO cascadeHouseDTO); |
| | | |
| | | /** |
| | | * 分页查询房屋列表 |
| | | * |
| | | * @param populationHouseAdminDTO |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthHistoryRecordDO; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021-09-18 15:07:12 |
| | | * @deprecated 养老认证历史记录表服务类 |
| | | */ |
| | | public interface ComPensionAuthHistoryRecordService extends IService<ComPensionAuthHistoryRecordDO> { |
| | | |
| | | /** |
| | | * 养老认证统计-分页查询 |
| | | * @param pensionAuthStatisticDTO 请求参数 |
| | | * @return 养老认证统列表 |
| | | */ |
| | | R pagePensionAuthStatisticAdmin(PagePensionAuthStatisticDTO pensionAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证记标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | R signPensionAuthStatisticAdmin(SignElderAuthStatisticDTO signElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证表头统计 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计结果 |
| | | */ |
| | | R getPensionAuthHeaderStatisticAdmin(ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthRecordDO; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | 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; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordService |
| | |
| | | R exportPensionAuthRecordsStatistic(PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) setPensionAuthType 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | R setPensionAuthType(Long communityId, Integer type); |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | R communityPensionAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | | * 定时任务每年3月1号0点统计养老认证本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskPensionAuthStatisticsJobHandler(); |
| | | /** |
| | | * 新增养老认证 |
| | | * @param addIdentityAuthDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addPensionAuth(AddIdentityAuthDTO addIdentityAuthDTO); |
| | | |
| | | /** |
| | | * 分页查询养老认证记录 |
| | | * @param pageIdentityAuthRecordDTO 查询参数 |
| | | * @return 养老认证记录列表 |
| | | */ |
| | | R queryRecordWithPage(PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取养老认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | R retrievePensionAuthDetail(Long identityAuthId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.service_community.entity.ComProperty; |
| | | |
| | | /** |
| | | * (ComProperty)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 10:46:51 |
| | | */ |
| | | public interface ComPropertyService extends IService<ComProperty> { |
| | | /** |
| | | * 分页查询 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | |
| | | /** |
| | | * id查询详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R selectById(Long id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param comPropertyVO |
| | | * @return |
| | | */ |
| | | R insert(ComPropertyVO comPropertyVO); |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param comPropertyVO |
| | | * @return |
| | | */ |
| | | R update(ComPropertyVO comPropertyVO); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R delete(Long id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ResetPasswordConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientMerchantDO; |
| | | |
| | | /** |
| | | * @title: ConvenientMerchantService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家服务类 |
| | | * @author: hans |
| | | * @date: 2021/09/16 16:02 |
| | | */ |
| | | public interface ConvenientMerchantService extends IService<ConvenientMerchantDO> { |
| | | /** |
| | | * 便民服务新增商家 |
| | | * @param convenientMerchantDTO |
| | | * @return 新增结果 |
| | | */ |
| | | R addMerchant(ConvenientMerchantDTO convenientMerchantDTO); |
| | | |
| | | /** |
| | | * 编辑便民服务商家 |
| | | * @param convenientMerchantDTO |
| | | * @return |
| | | */ |
| | | R putMerchant(ConvenientMerchantDTO convenientMerchantDTO); |
| | | |
| | | /** |
| | | * 删除便民服务商家 |
| | | * @param merchantId 商家id |
| | | * @param operator 操作人员 |
| | | * @return |
| | | */ |
| | | R deleteMerchant(Long merchantId, Long operator); |
| | | |
| | | /** |
| | | * 分页查询便民服务商家 |
| | | * @param pageConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | R pageMerchant(PageConvenientMerchantDTO pageConvenientMerchantDTO); |
| | | |
| | | /** |
| | | * 获取便民服务商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | R getMerchant(Long merchantId); |
| | | |
| | | /** |
| | | * 禁用/启用便民服务商家 |
| | | * @param disableOrEnableConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | R disableOrEnableMerchant(DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO); |
| | | |
| | | /** |
| | | * 重置便民服务商家账号密码 |
| | | * @param resetPasswordConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | R resetPasswordMerchant(ResetPasswordConvenientMerchantDTO resetPasswordConvenientMerchantDTO); |
| | | |
| | | /** |
| | | * 获取用户便民服务商家详情 |
| | | * @param account 商家绑定账号 |
| | | * @return |
| | | */ |
| | | R<ConvenientMerchantVO> getUserMerchantInfoByAccount(String account); |
| | | |
| | | /** |
| | | * 获取商便民服务商家信息 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R<ConvenientMerchantVO> getUserConvenientMerchantInfo(Long userId); |
| | | |
| | | /** |
| | | * 获取该社区下的热门商家 |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | | */ |
| | | R getPopularMerchants(PagePopularMerchantDTO pagePopularMerchantDTO); |
| | | |
| | | /** |
| | | * 分页获取服务类型下商家信息 |
| | | * @param pageClassifyMerchantDTO |
| | | * @return |
| | | */ |
| | | R getClassifyMerchants(PageClassifyMerchantDTO pageClassifyMerchantDTO); |
| | | |
| | | /** |
| | | * 小程序获取商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | R getMerchantDetail(Long merchantId); |
| | | |
| | | /** |
| | | * 搜索商家信息 |
| | | * @param pageSearchDTO |
| | | * @return |
| | | */ |
| | | R pageSearchMerchant(PageSearchDTO pageSearchDTO); |
| | | |
| | | /** |
| | | * 增加商家店铺咨询量 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | R consultMerchant(Long merchantId); |
| | | |
| | | /** |
| | | * 增加商家店铺浏览量 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | R incrMerchantView(Long merchantId); |
| | | |
| | | /** |
| | | * 获取商家导出数据 |
| | | * @param exportMerchantDTO |
| | | * @return |
| | | */ |
| | | R exportMerchant(ExportMerchantDTO exportMerchantDTO); |
| | | |
| | | /** |
| | | * 定时任务每隔半小时将商家浏览量和咨询量总值计入指定商家数据中 |
| | | * @return |
| | | */ |
| | | R timedTaskWriteDataToMerchantJobHandler(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductCategoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductCategoryDO; |
| | | |
| | | /** |
| | | * @title: ConvenientProductCategoryService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务产品服务类 |
| | | * @author: hans |
| | | * @date: 2021/09/20 15:36 |
| | | */ |
| | | public interface ConvenientProductCategoryService extends IService<ConvenientProductCategoryDO> { |
| | | |
| | | /** |
| | | * 新增便民服务产品分类信息 |
| | | * @param convenientProductCategoryDTO |
| | | * @return |
| | | */ |
| | | R addProductCategory(ConvenientProductCategoryDTO convenientProductCategoryDTO); |
| | | |
| | | /** |
| | | * 编辑便民服务产品分类信息 |
| | | * @param convenientProductCategoryDTO |
| | | * @return |
| | | */ |
| | | R putProductCategory(ConvenientProductCategoryDTO convenientProductCategoryDTO); |
| | | |
| | | /** |
| | | * 删除便民服务产品分类信息 |
| | | * @param categoryId |
| | | * @param operator |
| | | * @return |
| | | */ |
| | | R deleteProductCategory(Long categoryId, Long operator); |
| | | |
| | | /** |
| | | * 获取便民服务产品分类详情 |
| | | * @param categoryId |
| | | * @return |
| | | */ |
| | | R getProductCategory(Long categoryId); |
| | | |
| | | /** |
| | | * 分页查询便民服务产品分类信息 |
| | | * @param pageConvenientProductCategoryDTO |
| | | * @return |
| | | */ |
| | | R pageProductCategory(PageConvenientProductCategoryDTO pageConvenientProductCategoryDTO); |
| | | |
| | | /** |
| | | * 获取所有产品分类 |
| | | * @return |
| | | */ |
| | | R getAllProductCategory(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DeleteConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.OnShelfOrOffShelfProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductDO; |
| | | |
| | | /** |
| | | * @title: ConvenientProductService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家后台产品服务类 |
| | | * @author: hans |
| | | * @date: 2021/09/21 21:02 |
| | | */ |
| | | public interface ConvenientProductService extends IService<ConvenientProductDO> { |
| | | |
| | | /** |
| | | * 便民服务商家后台新增产品 |
| | | * @param convenientProductDTO |
| | | * @return |
| | | */ |
| | | R addProduct(ConvenientProductDTO convenientProductDTO); |
| | | |
| | | /** |
| | | * 便民服务商家后台编辑产品 |
| | | * @param convenientProductDTO |
| | | * @return |
| | | */ |
| | | R putProduct(ConvenientProductDTO convenientProductDTO); |
| | | |
| | | /** |
| | | * 便民服务商家后台获取产品详情 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | R getProduct(Long productId); |
| | | |
| | | /** |
| | | * 便民服务商家后台分页获取产品信息 |
| | | * @param pageConvenientProductDTO |
| | | * @return |
| | | */ |
| | | R pageProduct(PageConvenientProductDTO pageConvenientProductDTO); |
| | | |
| | | /** |
| | | * 便民服务商家后台删除产品信息 |
| | | * @param deleteConvenientProductDTO |
| | | * @return |
| | | */ |
| | | R deleteProduct(DeleteConvenientProductDTO deleteConvenientProductDTO); |
| | | |
| | | /** |
| | | * 便民服务商家后台上架/下架产品 |
| | | * @param onShelfOrOffShelfProductDTO |
| | | * @return |
| | | */ |
| | | R onShelfOrOffShelfProduct(OnShelfOrOffShelfProductDTO onShelfOrOffShelfProductDTO); |
| | | |
| | | /** |
| | | * 小程序获取商家产品 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | R getMerchantProduct(Long merchantId); |
| | | |
| | | /** |
| | | * 搜索商品信息 |
| | | * @param pageSearchDTO |
| | | * @return |
| | | */ |
| | | R pageSearchProduct(PageSearchDTO pageSearchDTO); |
| | | |
| | | /** |
| | | * 增加产品浏览量 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | R incrProductView(Long productId); |
| | | |
| | | /** |
| | | * 获取商家上下架产品数量 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | R getProductShelfNum(Long merchantId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ConvenientServiceCategoryDO; |
| | | |
| | | /** |
| | | * @title: ConvenientServiceCategoryService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务分类服务类 |
| | | * @author: hans |
| | | * @date: 2021/09/16 10:31 |
| | | */ |
| | | public interface ConvenientServiceCategoryService extends IService<ConvenientServiceCategoryDO> { |
| | | /** |
| | | * 便民服务新增分类 |
| | | * @param convenientServiceCategoryDTO |
| | | * @return 新增结果 |
| | | */ |
| | | R addServiceCategory(ConvenientServiceCategoryDTO convenientServiceCategoryDTO); |
| | | |
| | | /** |
| | | * 便民服务分类编辑 |
| | | * @param convenientServiceCategoryDTO |
| | | * @return 修改结果 |
| | | */ |
| | | R putServiceCategory(ConvenientServiceCategoryDTO convenientServiceCategoryDTO); |
| | | |
| | | /** |
| | | * 便民服务分类删除 |
| | | * @param categoryId 便民服务分类id |
| | | * @param operator 操作人员 |
| | | * @return 删除结果 |
| | | */ |
| | | R deleteServiceCategoryById(Long categoryId, Long operator); |
| | | |
| | | /** |
| | | * 获取便民服务分类详情 |
| | | * @param categoryId 便民服务分类id |
| | | * @return 分类详情 |
| | | */ |
| | | R getServiceCategoryById(Long categoryId); |
| | | |
| | | /** |
| | | * 分页查询便民服务分类 |
| | | * @param pageConvenientServiceCategoryDTO |
| | | * @return 分类详情 |
| | | */ |
| | | R pageServiceCategory(PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO); |
| | | |
| | | /** |
| | | * 获取所有便民服务分类 |
| | | * @return |
| | | */ |
| | | R getAllServiceCategories(); |
| | | |
| | | /** |
| | | * 获取该社区商家数量大于0的分类 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R getSuitableServiceCategories(Long communityId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; |
| | |
| | | */ |
| | | R timedTaskEldersRecordAuthJobHandler(); |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) setPensionAuthType 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | */ |
| | | R setAuthType(Long communityId, Integer type); |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | */ |
| | | R getAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | R pageAuthStatisticAdmin(PageElderAuthStatisticDTO pageElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | R signAuthStatisticAdmin(SignElderAuthStatisticDTO signElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-统计表头数据 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计表头数据 |
| | | */ |
| | | R getAuthHeaderStatisticAdmin(ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActCommiteeVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.entity.ComActCommittee; |
| | | import com.panzhihua.service_community.dao.ComActCommitteeDao; |
| | | import com.panzhihua.service_community.entity.ComActSocialOrg; |
| | | import com.panzhihua.service_community.service.ComActCommitteeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * (ComActCommittee)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 13:55:44 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActCommitteeServiceImpl extends ServiceImpl<ComActCommitteeDao, ComActCommittee> implements ComActCommitteeService { |
| | | @Resource |
| | | private ComActCommitteeDao comActCommitteeDao; |
| | | @Resource |
| | | private UserService userService; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return R.ok(this.comActCommitteeDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R insert(ComActCommiteeVO comActCommiteeVO) { |
| | | if(comActCommiteeVO!=null){ |
| | | ComActCommittee comActCommittee=new ComActCommittee(); |
| | | BeanUtils.copyProperties(comActCommiteeVO,comActCommittee); |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setType(3); |
| | | administratorsUserVO.setAccount(comActCommiteeVO.getAccount()); |
| | | administratorsUserVO.setPassword(comActCommiteeVO.getPassword()); |
| | | administratorsUserVO.setRoleId(comActCommiteeVO.getRoleId()); |
| | | administratorsUserVO.setCommunityId(comActCommiteeVO.getCommunityId()); |
| | | administratorsUserVO.setAreaId(comActCommiteeVO.getAreaId()); |
| | | R r=userService.addUserBackstageProperty(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | comActCommittee.setUserId(Long.parseLong(r.getData().toString())); |
| | | comActCommittee.setCreateTime(DateUtil.date()); |
| | | this.comActCommitteeDao.insert(comActCommittee); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R update(ComActCommiteeVO comActCommiteeVO) { |
| | | if(comActCommiteeVO!=null){ |
| | | ComActCommittee comActCommittee=new ComActCommittee(); |
| | | BeanUtils.copyProperties(comActCommiteeVO,comActCommittee); |
| | | this.comActCommitteeDao.updateById(comActCommittee); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R delete(Long id) { |
| | | ComActCommittee comActCommittee=comActCommitteeDao.selectById(id); |
| | | if(comActCommittee!=null){ |
| | | if(comActCommittee.getUserId()!=null){ |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comActCommittee.getUserId()); |
| | | administratorsUserVO.setCommunityId(comActCommittee.getCommunityId()); |
| | | userService.deleteUserBackstage(administratorsUserVO); |
| | | this.comActCommitteeDao.deleteById(id); |
| | | return R.ok(); |
| | | |
| | | } |
| | | } |
| | | return R.fail("用户账号错误"); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isBlank; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.connection.StringRedisConnection; |
| | | import org.springframework.data.redis.core.RedisCallback; |
| | | import org.springframework.data.redis.core.SetOperations; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionUserVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussVO; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.SysConfVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.DiscussListVO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.service_community.dao.ComActDiscussCommentDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussCommentUserDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussOptionDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussOptionUserDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussUserDAO; |
| | | import com.panzhihua.service_community.dao.SysConfMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussCommentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussCommentUserDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussOptionDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussOptionUserDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussUserDO; |
| | | import com.panzhihua.service_community.model.dos.SysConfDO; |
| | | import com.panzhihua.service_community.service.ComActDiscussOptionService; |
| | | import com.panzhihua.service_community.service.ComActDiscussService; |
| | | import com.panzhihua.service_community.service.SysConfService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 14:51 |
| | | **/ |
| | | @Service |
| | | @Slf4j |
| | | public class ComActDiscussServiceImpl implements ComActDiscussService { |
| | | |
| | | private static final String DISCUSS_VIEW_NUM_PREFIX = "DISCUSS_VIEW_NUM"; |
| | | private static final String INCR_VIEW_DISCUSS_IDS_KEY = "INCR_VIEW_DISCUSS_IDS"; |
| | | private static final long DISCUSS_EXPIRE_TIME = 2678400L; |
| | | |
| | | @Resource |
| | | private ComActDiscussCommentDAO comActDiscussCommentDAO; |
| | | @Resource |
| | |
| | | private ComActDiscussCommentUserDAO comActDiscussCommentUserDAO; |
| | | @Resource |
| | | private ComActDiscussOptionService comActDiscussOptionService; |
| | | @Resource |
| | | private SysConfMapper sysConfDao; |
| | | @Resource |
| | | private SysConfService sysConfService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | /** |
| | | * 一起议-新增 |
| | | * 议事投票-新增 |
| | | * |
| | | * @param comActDiscussDTO |
| | | * 新增参数 |
| | | * @param comActDiscussDTO 新增参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addDiscuss(ComActDiscussDTO comActDiscussDTO) { |
| | | if (!checkCurrentUserDiscussIdentity(comActDiscussDTO)) { |
| | | return R.fail("权限验证失败,请确认是否有发布权限"); |
| | | } |
| | | ComActDiscussDO comActDiscussDO = new ComActDiscussDO(); |
| | | BeanUtils.copyProperties(comActDiscussDTO, comActDiscussDO); |
| | | ComActVO comActVO = comActDiscussDAO.selectCommunity(comActDiscussDTO.getCommunityId()); |
| | | Integer type = comActDiscussDTO.getType(); |
| | | Date nowDate = new Date(); |
| | | if (type.equals(ComActDiscussDO.type.tp)) {//判断是投票,需要转义时间 |
| | | Date startTime = DateUtils.stringToDate(comActDiscussDTO.getStartTime(), DateUtils.ymdhms_format); |
| | | Date endTime = DateUtils.stringToDate(comActDiscussDTO.getEndTime(), DateUtils.ymdhms_format); |
| | | comActDiscussDO.setStartTime(startTime); |
| | | comActDiscussDO.setEndTime(endTime); |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.wks); |
| | | //根据时间判断状态是否开始 |
| | | if (startTime != null && startTime.getTime() <= nowDate.getTime()) { |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.jxz); |
| | | comActDiscussDO.setReleaseAt(nowDate); |
| | | } |
| | | } else { |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.yfb); |
| | | } |
| | | String address = comActDiscussDO.getAddress(); |
| | | if (ObjectUtils.isEmpty(address)) { |
| | | //查询社区地址 |
| | | ComActVO comActVO = comActDiscussDAO.selectCommunity(comActDiscussDTO.getCommunityId()); |
| | | comActDiscussDO.setAddress(comActVO.getAddress()); |
| | | } |
| | | int insert = comActDiscussDAO.insert(comActDiscussDO); |
| | | if (insert > 0) { |
| | | ComActDiscussDO comActDiscussDO1 = comActDiscussDAO.selectOne(new QueryWrapper<ComActDiscussDO>().lambda() |
| | | .eq(ComActDiscussDO::getDiscussSubject, comActDiscussDTO.getDiscussSubject()) |
| | | .eq(ComActDiscussDO::getUserId, comActDiscussDTO.getUserId()) |
| | | .last(" order by create_at desc limit 1 ")); |
| | | Long comActDiscussDO1Id = comActDiscussDO1.getId(); |
| | | Integer type = comActDiscussDTO.getType(); |
| | | //如果是投票,需要把投票的选项存储 |
| | | if (type.equals(2)) { |
| | | Long comActDiscussDO1Id = comActDiscussDO.getId(); |
| | | List<ComActDiscussOptionDTO> discussOptions = comActDiscussDTO.getDiscussOptions(); |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = new ArrayList<>(); |
| | | discussOptions.forEach(s -> { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return ComActDiscussVO |
| | | * 小程序用户验证是否拥有发布权限 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R detailDiscuss(Long id) { |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(id); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("一起议不存在"); |
| | | private boolean checkCurrentUserDiscussIdentity(ComActDiscussDTO comActDiscussDTO) { |
| | | //小程序用户验证是否拥有发布权限 |
| | | boolean checkResult = true; |
| | | Boolean isApplets = comActDiscussDTO.getIsApplets(); |
| | | if (nonNull(isApplets) && isApplets) { |
| | | String discussIdentityPrefix = "DISCUSS_IDENTITY_"; |
| | | Long communityId = comActDiscussDTO.getCommunityId(); |
| | | R sysConfValue = sysConfService.getSysConfValue(discussIdentityPrefix + communityId, communityId); |
| | | String discussIdentityConfig = (String) sysConfValue.getData(); |
| | | if (isBlank(discussIdentityConfig)) { |
| | | checkResult = false; |
| | | } else { |
| | | List<String> currentUserRoles = new ArrayList<>(); |
| | | List<String> sysAllowedRoles = Arrays.asList(discussIdentityConfig.split(",")); |
| | | LoginUserInfoVO loginUserInfo = comActDiscussDTO.getLoginUserInfo(); |
| | | if (loginUserInfo.getIsPartymember() == 1) { |
| | | currentUserRoles.add("2"); |
| | | } |
| | | if (loginUserInfo.getIsVolunteer().intValue() == 1) { |
| | | currentUserRoles.add("3"); |
| | | } |
| | | R isTeamResult = userService.checkCurrentUserIsTeam(loginUserInfo.getPhone(), loginUserInfo.getCommunityId()); |
| | | if (R.isOk(isTeamResult) && (Boolean) isTeamResult.getData()) { |
| | | currentUserRoles.add("4"); |
| | | } |
| | | if (currentUserRoles.isEmpty()) { |
| | | checkResult = false; |
| | | } |
| | | boolean result = sysAllowedRoles.stream().anyMatch(role -> currentUserRoles.contains(role)); |
| | | if (!result) { |
| | | checkResult = false; |
| | | } |
| | | } |
| | | } |
| | | ComActDiscussVO comActDiscussVO = new ComActDiscussVO(); |
| | | BeanUtils.copyProperties(comActDiscussDO, comActDiscussVO); |
| | | Integer integer = comActDiscussCommentDAO.selectCount( |
| | | new QueryWrapper<ComActDiscussCommentDO>().lambda().eq(ComActDiscussCommentDO::getDiscussId, id)); |
| | | comActDiscussVO.setCommentNum(integer); |
| | | Integer integer1 = comActDiscussUserDAO |
| | | .selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, id)); |
| | | comActDiscussVO.setSignNum(integer1); |
| | | Integer type = comActDiscussVO.getType(); |
| | | if (type.equals(2)) { |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList( |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | List<ComActDiscussOptionVO> comActDiscussOptionVOS = new ArrayList<>(); |
| | | comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> { |
| | | Long discussOptionDOId = comActDiscussOptionDO.getId(); |
| | | Integer selectCount = |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>().lambda() |
| | | .eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | ComActDiscussOptionVO comActDiscussOptionVO = new ComActDiscussOptionVO(); |
| | | BeanUtils.copyProperties(comActDiscussOptionDO, comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | | comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS); |
| | | } |
| | | Long userId = comActDiscussDO.getUserId(); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId); |
| | | comActDiscussVO.setUserName(loginUserInfoVO.getName()); |
| | | |
| | | return R.ok(comActDiscussVO); |
| | | return checkResult; |
| | | } |
| | | |
| | | /** |
| | | * 一起议-删除 |
| | | * 议事投票-编辑 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return 删除结果 |
| | | * @param comActDiscussDTO 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @Override |
| | | public R deleteDiscuss(Long id) { |
| | | int delete = comActDiscussDAO.deleteById(id); |
| | | if (delete > 0) { |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R editDiscuss(ComActDiscussDTO comActDiscussDTO) { |
| | | Long comActDiscussDO1Id = comActDiscussDTO.getId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(comActDiscussDO1Id); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | if (!comActDiscussDO.getStatus().equals(ComActDiscussDO.status.wks) && !comActDiscussDO.getStatus().equals(ComActDiscussDO.status.yfb)) { |
| | | return R.fail("该状态不可修改"); |
| | | } |
| | | Integer type = comActDiscussDO.getType(); |
| | | Integer isRepeat = comActDiscussDO.getIsRepeat(); |
| | | BeanUtils.copyProperties(comActDiscussDTO, comActDiscussDO); |
| | | comActDiscussDO.setType(type); |
| | | comActDiscussDO.setIsRepeat(isRepeat); |
| | | Date nowDate = new Date(); |
| | | if (type.equals(ComActDiscussDO.type.tp)) {//判断是投票,需要转义时间 |
| | | Date startTime = DateUtils.stringToDate(comActDiscussDTO.getStartTime(), DateUtils.ymdhms_format); |
| | | Date endTime = DateUtils.stringToDate(comActDiscussDTO.getEndTime(), DateUtils.ymdhms_format); |
| | | comActDiscussDO.setStartTime(startTime); |
| | | comActDiscussDO.setEndTime(endTime); |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.wks); |
| | | //根据时间判断状态是否开始 |
| | | if (startTime != null && startTime.getTime() <= nowDate.getTime()) { |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.jxz); |
| | | comActDiscussDO.setReleaseAt(nowDate); |
| | | } |
| | | } else { |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.yfb); |
| | | } |
| | | comActDiscussDO.setUpdateAt(new Date()); |
| | | int insert = comActDiscussDAO.updateById(comActDiscussDO); |
| | | if (insert > 0) { |
| | | //如果是投票,需要把投票的选项存储 |
| | | if (type.equals(2)) { |
| | | comActDiscussOptionService.remove(new QueryWrapper<ComActDiscussOptionDO>().lambda() |
| | | .eq(ComActDiscussOptionDO::getDiscussId, comActDiscussDO1Id)); |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = new ArrayList<>(); |
| | | comActDiscussDTO.getDiscussOptions().forEach(s -> { |
| | | ComActDiscussOptionDO comActDiscussOptionDO = new ComActDiscussOptionDO(); |
| | | comActDiscussOptionDO.setDiscussId(comActDiscussDO1Id); |
| | | comActDiscussOptionDO.setOptionContent(s.getOptionContent()); |
| | | comActDiscussOptionDO.setOptionUrl(s.getOptionUrl()); |
| | | comActDiscussOptionDOS.add(comActDiscussOptionDO); |
| | | }); |
| | | comActDiscussOptionService.saveBatch(comActDiscussOptionDOS); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-回复 |
| | | * 议事投票-详情 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 评论内容 |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @Override |
| | | public R detailDiscuss(ComActDiscussDetailDTO discussDetailDTO) { |
| | | Long id = discussDetailDTO.getId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(id); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | ComActDiscussVO comActDiscussVO = new ComActDiscussVO(); |
| | | BeanUtils.copyProperties(comActDiscussDO, comActDiscussVO); |
| | | comActDiscussVO.setSignNum(comActDiscussDO.getFabulousNum()); |
| | | Integer type = comActDiscussVO.getType(); |
| | | if (type.equals(ComActDiscussVO.type.tp)) { |
| | | //查询选项列表 |
| | | List<ComActDiscussOptionVO> comActDiscussOptionList = comActDiscussOptionDAO.getDiscussOptionList(id); |
| | | comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionList); |
| | | } |
| | | Long userId = comActDiscussDO.getUserId(); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId); |
| | | comActDiscussVO.setUserName(loginUserInfoVO.getName()); |
| | | comActDiscussVO.setUserNickName(loginUserInfoVO.getNickName()); |
| | | |
| | | //分页查询评论列表 |
| | | PageComActDiscussCommentDTO pageComActDiscussCommentDTO = new PageComActDiscussCommentDTO(); |
| | | BeanUtils.copyProperties(discussDetailDTO, pageComActDiscussCommentDTO); |
| | | IPage<ComActDiscussCommentVO> discussComments = comActDiscussDAO.pageDiscussCommentAdmin(new Page<>(pageComActDiscussCommentDTO.getPageNum(), pageComActDiscussCommentDTO.getPageSize()), pageComActDiscussCommentDTO); |
| | | discussComments.getRecords().forEach(comment -> { |
| | | if (comment.getReplyNum() > 0) { |
| | | List<ComActDiscussCommentVO> childList = comActDiscussDAO.getDiscussCommentReplyList(comment.getId()); |
| | | if (!childList.isEmpty()) { |
| | | comment.setComActDiscussCommentVOList(childList); |
| | | } |
| | | } |
| | | }); |
| | | comActDiscussVO.setDiscussCommentList(discussComments.getRecords()); |
| | | return R.ok(comActDiscussVO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-删除 |
| | | * |
| | | * @param id 主键 |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public R deleteDiscuss(Long id) { |
| | | ComActDiscussDO comActDiscussDO = new ComActDiscussDO(); |
| | | comActDiscussDO.setId(id); |
| | | comActDiscussDO.setIsDel(ComActDiscussDO.isOk.yes); |
| | | if (comActDiscussDAO.updateById(comActDiscussDO) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO 评论内容 |
| | | * @return 回复结果 |
| | | */ |
| | | @Override |
| | |
| | | Long discussId = comActDiscussCommentDTO.getDiscussId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(discussId); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("一起议不存在"); |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | Long currentUser = comActDiscussCommentDTO.getUserId(); |
| | | //判断当前用户是否参与过评论 |
| | | int currentUserCommentCount = comActDiscussCommentDAO.selectCount(new QueryWrapper<ComActDiscussCommentDO>() |
| | | .lambda().eq(ComActDiscussCommentDO::getDiscussId, discussId).eq(ComActDiscussCommentDO::getUserId, currentUser)); |
| | | |
| | | ComActDiscussCommentDO comActDiscussCommentDO = new ComActDiscussCommentDO(); |
| | | BeanUtils.copyProperties(comActDiscussCommentDTO, comActDiscussCommentDO); |
| | | Long userId = comActDiscussCommentDTO.getUserId(); |
| | | Long userId1 = comActDiscussDO.getUserId(); |
| | | if (userId.equals(userId1)) { |
| | | Long discussUser = comActDiscussDO.getUserId(); |
| | | if (currentUser.equals(discussUser)) { |
| | | comActDiscussCommentDO.setIsAuthor(1); |
| | | } |
| | | int insert = comActDiscussCommentDAO.insert(comActDiscussCommentDO); |
| | | if (insert > 0) { |
| | | // comActDiscussDAO.addCommentCount(discussId, 1); |
| | | //评论成功,评论总数+1 |
| | | //若首次参与评论,参与讨论人数+1 |
| | | if (currentUserCommentCount > 0) { |
| | | comActDiscussDAO.incrCommentAndJoinNumById(discussId, false); |
| | | } else { |
| | | comActDiscussDAO.incrCommentAndJoinNumById(discussId, true); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-分页查询 |
| | | * 议事投票-分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | | * @param pageComActDiscussDTO 查询参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @Override |
| | | public R pageDiscuss(PageComActDiscussDTO pageComActDiscussDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = pageComActDiscussDTO.getPageNum(); |
| | | Long pageSize = pageComActDiscussDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActDiscussVO> iPage = comActDiscussDAO.pageDiscuss(page, pageComActDiscussDTO); |
| | | IPage<ComActDiscussVO> iPage = comActDiscussDAO.pageDiscuss(new Page<>(pageComActDiscussDTO.getPageNum(), pageComActDiscussDTO.getPageSize()), pageComActDiscussDTO); |
| | | return R.ok(iPage); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-查看 |
| | | * 议事投票-后台分页查询 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @param pageComActDiscussDTO 请求参数 |
| | | * @return 议事投票列表 |
| | | */ |
| | | @Override |
| | | public R pageDiscussAdmin(PageComActDiscussDTO pageComActDiscussDTO) { |
| | | return R.ok(comActDiscussDAO.pageDiscussAdmin(new Page<>(pageComActDiscussDTO.getPageNum(), pageComActDiscussDTO.getPageSize()), pageComActDiscussDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论-查看 |
| | | * |
| | | * @param id 主键 |
| | | * @return 详情 ComActDiscussCommentVO |
| | | */ |
| | | @Override |
| | |
| | | comActDiscussCommentVO.setParentId(parentId); |
| | | } |
| | | Integer count = comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, id)); |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, id)); |
| | | comActDiscussCommentVO.setNum(count); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(comActDiscussCommentDO.getUserId()); |
| | | comActDiscussCommentVO.setUserName(loginUserInfoVO.getName()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-置顶 |
| | | * 议事投票评论详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @param pageComActDiscussCommentDTO 请求参数 |
| | | * @return 议事投票详情 |
| | | */ |
| | | @Override |
| | | public R detailDiscussCommentAdmin(PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | Long id = pageComActDiscussCommentDTO.getId(); |
| | | ComActDiscussCommentDO comActDiscussCommentDO = comActDiscussCommentDAO.selectById(id); |
| | | if (ObjectUtils.isEmpty(comActDiscussCommentDO)) { |
| | | return R.fail("评论不存在"); |
| | | } |
| | | ComActDiscussCommentVO comActDiscussCommentVO = new ComActDiscussCommentVO(); |
| | | Long parentId = comActDiscussCommentDO.getParentId(); |
| | | if (parentId.intValue() == 0) { |
| | | // 一级评论 |
| | | BeanUtils.copyProperties(comActDiscussCommentDO, comActDiscussCommentVO); |
| | | } else { |
| | | ComActDiscussCommentDO comActDiscussCommentDO1 = comActDiscussCommentDAO.selectById(parentId); |
| | | BeanUtils.copyProperties(comActDiscussCommentDO1, comActDiscussCommentVO); |
| | | comActDiscussCommentVO.setCommentBack(comActDiscussCommentDO.getComment()); |
| | | comActDiscussCommentVO.setTimeBack(comActDiscussCommentDO.getCreateAt()); |
| | | comActDiscussCommentVO.setParentId(parentId); |
| | | } |
| | | Integer count = comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, id)); |
| | | comActDiscussCommentVO.setNum(count); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(comActDiscussCommentDO.getUserId()); |
| | | comActDiscussCommentVO.setUserName(loginUserInfoVO.getName()); |
| | | comActDiscussCommentVO.setPhone(loginUserInfoVO.getPhone()); |
| | | comActDiscussCommentVO.setImageUrl(loginUserInfoVO.getImageUrl()); |
| | | |
| | | //查询该评论下所有回复内容 |
| | | IPage<ComActDiscussCommentVO> discussCommentList = comActDiscussCommentDAO.getDiscussCommentList(new Page(pageComActDiscussCommentDTO.getPageNum(), pageComActDiscussCommentDTO.getPageSize()), pageComActDiscussCommentDTO.getId()); |
| | | if (!discussCommentList.getRecords().isEmpty()) { |
| | | comActDiscussCommentVO.setComActDiscussCommentVOList(discussCommentList.getRecords()); |
| | | } |
| | | return R.ok(comActDiscussCommentVO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论-置顶 |
| | | * |
| | | * @param id 主键 |
| | | * @return 置顶结果 |
| | | */ |
| | | @Override |
| | |
| | | ComActDiscussCommentDO comActDiscussCommentDO1 = new ComActDiscussCommentDO(); |
| | | comActDiscussCommentDO1.setIsTopping(0); |
| | | comActDiscussCommentDAO.update(comActDiscussCommentDO1, |
| | | new UpdateWrapper<ComActDiscussCommentDO>().lambda().eq(ComActDiscussCommentDO::getDiscussId, discussId)); |
| | | new UpdateWrapper<ComActDiscussCommentDO>().lambda().eq(ComActDiscussCommentDO::getDiscussId, discussId)); |
| | | comActDiscussCommentDO1.setIsTopping(1); |
| | | comActDiscussCommentDO1.setId(id); |
| | | int update = comActDiscussCommentDAO.updateById(comActDiscussCommentDO1); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-回复 |
| | | * 议事投票-评论-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 回复内容 |
| | | * @param comActDiscussCommentDTO 回复内容 |
| | | * @return 回复结果 |
| | | */ |
| | | @Override |
| | |
| | | Long discussId = comActDiscussCommentDO.getDiscussId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(discussId); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("一起议不存在"); |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | Long userId = comActDiscussDO.getUserId(); |
| | | Long userId1 = comActDiscussCommentDTO.getUserId(); |
| | | Long parentId = comActDiscussCommentDO.getParentId(); |
| | | if (parentId.intValue() != 0) { |
| | | return R.fail("二级评论不能回复"); |
| | | } |
| | | Long currentUser = comActDiscussCommentDTO.getUserId(); |
| | | //判断当前用户是否参与过评论/回复 |
| | | int currentUserCommentCount = comActDiscussCommentDAO.selectCount(new QueryWrapper<ComActDiscussCommentDO>() |
| | | .lambda().eq(ComActDiscussCommentDO::getDiscussId, discussId).eq(ComActDiscussCommentDO::getUserId, currentUser)); |
| | | Long discussUser = comActDiscussDO.getUserId(); |
| | | ComActDiscussCommentDO comActDiscussCommentDO1 = new ComActDiscussCommentDO(); |
| | | comActDiscussCommentDO1.setDiscussId(discussId); |
| | | comActDiscussCommentDO1.setComment(comActDiscussCommentDTO.getComment()); |
| | | comActDiscussCommentDO1.setUserId(comActDiscussCommentDTO.getUserId()); |
| | | comActDiscussCommentDO1.setParentId(id); |
| | | if (userId.equals(userId1)) { |
| | | if (discussUser.equals(currentUser)) { |
| | | comActDiscussCommentDO1.setIsAuthor(1); |
| | | } |
| | | int insert = comActDiscussCommentDAO.insert(comActDiscussCommentDO1); |
| | | if (insert > 0) { |
| | | // comActDiscussDAO.addCommentCount(discussId, 1); |
| | | //回复成功,评论总数+1 |
| | | //若首次参与评论,参与讨论人数+1 |
| | | if (currentUserCommentCount > 0) { |
| | | comActDiscussDAO.incrCommentAndJoinNumById(discussId, false); |
| | | } else { |
| | | comActDiscussDAO.incrCommentAndJoinNumById(discussId, true); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 |
| | | * 议事投票-评论-分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @param pageComActDiscussCommentDTO 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @Override |
| | | public R pageDiscussComment(PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = pageComActDiscussCommentDTO.getPageNum(); |
| | | Long pageSize = pageComActDiscussCommentDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActDiscussCommentVO> iPage = comActDiscussDAO.pageDiscussComment(page, pageComActDiscussCommentDTO); |
| | | IPage<ComActDiscussCommentVO> iPage = comActDiscussDAO.pageDiscussComment(new Page<>(pageComActDiscussCommentDTO.getPageNum(), pageComActDiscussCommentDTO.getPageSize()), pageComActDiscussCommentDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-分页查询 小程序 |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | | * @param pageComActDiscussCommentDTO 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @Override |
| | | public R pageDiscussCommentAdmin(PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | IPage<ComActDiscussCommentVO> iPage = comActDiscussDAO.pageDiscussCommentAdmin(new Page<>(pageComActDiscussCommentDTO.getPageNum(), pageComActDiscussCommentDTO.getPageSize()), pageComActDiscussCommentDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussDTO 查询参数 |
| | | * @return ComActDiscussVO 分页 |
| | | */ |
| | | @Override |
| | |
| | | records.forEach(comActDiscussVO -> { |
| | | Integer type = comActDiscussVO.getType(); |
| | | Long id = comActDiscussVO.getId(); |
| | | String viewNumKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, id.toString()); |
| | | if (stringRedisTemplate.hasKey(viewNumKey)) { |
| | | ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue(); |
| | | comActDiscussVO.setViewsNum(Integer.parseInt(opsForValue.get(viewNumKey))); |
| | | } |
| | | if (type.equals(2)) { |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList( |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | List<ComActDiscussOptionVO> comActDiscussOptionVOS = new ArrayList<>(); |
| | | List<Integer> votes = new ArrayList<>(); |
| | | comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> { |
| | | Long discussOptionDOId = comActDiscussOptionDO.getId(); |
| | | Integer selectCount = |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>() |
| | | .lambda().eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>() |
| | | .lambda().eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | ComActDiscussOptionVO comActDiscussOptionVO = new ComActDiscussOptionVO(); |
| | | BeanUtils.copyProperties(comActDiscussOptionDO, comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | |
| | | if (loginUserId != null) { |
| | | // 判断选项是否已投票 |
| | | int haveVote = |
| | | comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId); |
| | | comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId); |
| | | votes.add(haveVote); |
| | | comActDiscussOptionVO.setHaveVote(haveVote > 0 ? 1 : 0); |
| | | } |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | | fillThePercentAndSort(comActDiscussOptionVOS); |
| | | checkDiscussStatusIsCorrect(comActDiscussVO); |
| | | comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS); |
| | | //填充剩余可投票数 |
| | | if (loginUserId != null && !loginUserId.equals(0L)) { |
| | | if (comActDiscussVO.getIsRepeat().intValue() == 1) { |
| | | //可重复投票 |
| | | int votedVotesInToday = comActDiscussOptionUserDAO.selectVotedVotesInToday(id, loginUserId); |
| | | int remainingVotes = comActDiscussVO.getCount().intValue() - votedVotesInToday; |
| | | comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0); |
| | | } else { |
| | | //不可重复投票 |
| | | int alreadyVotedVotes = votes.stream().mapToInt(Integer::intValue).sum(); |
| | | int remainingVotes = comActDiscussVO.getCount().intValue() - alreadyVotedVotes; |
| | | comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0); |
| | | } |
| | | } |
| | | //填充投票记录列表 |
| | | List<ComActDiscussOptionUserVO> comActDiscussOptionUserVOList = comActDiscussOptionUserDAO |
| | | .selectVotedRecords(comActDiscussVO.getId()); |
| | | comActDiscussVO.setComActDiscussOptionUserVOList(comActDiscussOptionUserVOList); |
| | | //填充已参与投票人数 |
| | | int votedPersonNum = comActDiscussOptionUserDAO.selectVotedPersonNum(comActDiscussVO.getId()); |
| | | comActDiscussVO.setVotedPersonNum(votedPersonNum); |
| | | } |
| | | |
| | | if (loginUserId != null) { |
| | | Integer integer = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda() |
| | | .eq(ComActDiscussUserDO::getDiscussId, comActDiscussVO.getId()) |
| | | .eq(ComActDiscussUserDO::getUserId, loginUserId)); |
| | | .eq(ComActDiscussUserDO::getDiscussId, comActDiscussVO.getId()) |
| | | .eq(ComActDiscussUserDO::getUserId, loginUserId)); |
| | | if (integer > 0) { |
| | | comActDiscussVO.setHaveSign(1); |
| | | } else { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-点赞、取消点赞 |
| | | * 判断discuss状态是否正确 |
| | | * @param comActDiscussVO |
| | | */ |
| | | private void checkDiscussStatusIsCorrect(ComActDiscussVO comActDiscussVO) { |
| | | //判断discuss状态是否正确 |
| | | boolean isIncorrectStatus = comActDiscussVO.getEndTime().before(new Date()) && |
| | | (comActDiscussVO.getStatus().intValue() == 1 || comActDiscussVO.getStatus().intValue() == 2); |
| | | if (isIncorrectStatus) { |
| | | comActDiscussVO.setStatus(3); |
| | | comActDiscussDAO.updateStatusById(comActDiscussVO.getId(), 3); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 操作类型 |
| | | * @param comActDiscussUserDTO 操作类型 |
| | | * @return 操作结果 |
| | | */ |
| | | @Override |
| | |
| | | int num = 0; |
| | | ComActDiscussUserDO comActDiscussUserDO = new ComActDiscussUserDO(); |
| | | BeanUtils.copyProperties(comActDiscussUserDTO, comActDiscussUserDO); |
| | | if (type.intValue() == 1) { |
| | | boolean isIncr = type.intValue() == 1; |
| | | if (isIncr) { |
| | | num = comActDiscussUserDAO.insert(comActDiscussUserDO); |
| | | } else { |
| | | num = comActDiscussUserDAO.delete(new QueryWrapper<ComActDiscussUserDO>().lambda() |
| | | .eq(ComActDiscussUserDO::getUserId, comActDiscussUserDTO.getUserId()) |
| | | .eq(ComActDiscussUserDO::getDiscussId, comActDiscussUserDTO.getDiscussId())); |
| | | .eq(ComActDiscussUserDO::getUserId, comActDiscussUserDTO.getUserId()) |
| | | .eq(ComActDiscussUserDO::getDiscussId, comActDiscussUserDTO.getDiscussId())); |
| | | } |
| | | if (num > 0) { |
| | | //点赞成功 总数+1 || 取消点赞成功 总数-1 |
| | | comActDiscussDAO.incrOrDecrFabulousNumByType(comActDiscussUserDTO.getDiscussId(), isIncr); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 小程序 |
| | | * 议事投票-评论-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页参数 |
| | | * @param pageComActDiscussCommentDTO 分页参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @Override |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActDiscussCommentVO> iPage = |
| | | comActDiscussDAO.pageDiscussCommentApplets(page, pageComActDiscussCommentDTO); |
| | | comActDiscussDAO.pageDiscussCommentApplets(page, pageComActDiscussCommentDTO); |
| | | List<ComActDiscussCommentVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActDiscussCommentVO -> { |
| | |
| | | comActDiscussCommentVOList.forEach(comActDiscussCommentVO1 -> { |
| | | Long parentId = comActDiscussCommentVO1.getParentId(); |
| | | List<ComActDiscussCommentVO> collect = comActDiscussCommentVOS.stream() |
| | | .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId)) |
| | | .collect(Collectors.toList()); |
| | | .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId)) |
| | | .collect(Collectors.toList()); |
| | | if (!ObjectUtils.isEmpty(collect)) { |
| | | String userName = collect.get(0).getUserName(); |
| | | String userNickName = collect.get(0).getUserNickName(); |
| | |
| | | comActDiscussCommentVO1.setUserNickNameBack(userNickName); |
| | | } |
| | | List<ComActDiscussCommentVO> collect1 = records.stream() |
| | | .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId)) |
| | | .collect(Collectors.toList()); |
| | | .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId)) |
| | | .collect(Collectors.toList()); |
| | | if (!ObjectUtils.isEmpty(collect1)) { |
| | | ComActDiscussCommentVO comActDiscussCommentVOFirst = collect1.get(0); |
| | | String userName = comActDiscussCommentVOFirst.getUserName(); |
| | |
| | | comActDiscussCommentVO1.setUserNickNameBack(userNickName); |
| | | } |
| | | if (pageComActDiscussCommentDTO.getLoginUserId() != null |
| | | && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) { |
| | | && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) { |
| | | Integer integer = comActDiscussCommentUserDAO |
| | | .selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, |
| | | comActDiscussCommentVO1.getId()) |
| | | .eq(ComActDiscussCommentUserDO::getUserId, |
| | | pageComActDiscussCommentDTO.getLoginUserId())); |
| | | .selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, |
| | | comActDiscussCommentVO1.getId()) |
| | | .eq(ComActDiscussCommentUserDO::getUserId, |
| | | pageComActDiscussCommentDTO.getLoginUserId())); |
| | | if (integer > 0) { |
| | | comActDiscussCommentVO1.setHaveSign(1); |
| | | } else { |
| | |
| | | comActDiscussCommentVO.setComActDiscussCommentVOList(comActDiscussCommentVOList); |
| | | } |
| | | if (pageComActDiscussCommentDTO.getLoginUserId() != null |
| | | && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) { |
| | | && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) { |
| | | Integer integer = |
| | | comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentVO.getId()) |
| | | .eq(ComActDiscussCommentUserDO::getUserId, pageComActDiscussCommentDTO.getLoginUserId())); |
| | | comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentVO.getId()) |
| | | .eq(ComActDiscussCommentUserDO::getUserId, pageComActDiscussCommentDTO.getLoginUserId())); |
| | | if (integer > 0) { |
| | | comActDiscussCommentVO.setHaveSign(1); |
| | | } else { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-详情 小程序 |
| | | * 议事投票-详情 小程序 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @param loginUserId |
| | | * 登录用户主键 |
| | | * @param id 主键 |
| | | * @param loginUserId 登录用户主键 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @Override |
| | | public R detailDiscussApplets(Long id, Long loginUserId) { |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(id); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("一起议不存在"); |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | ComActDiscussVO comActDiscussVO = new ComActDiscussVO(); |
| | | BeanUtils.copyProperties(comActDiscussDO, comActDiscussVO); |
| | | Integer integer = comActDiscussCommentDAO.selectCount( |
| | | new QueryWrapper<ComActDiscussCommentDO>().lambda().eq(ComActDiscussCommentDO::getDiscussId, id)); |
| | | comActDiscussVO.setCommentNum(integer); |
| | | Integer integer1 = comActDiscussUserDAO |
| | | .selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, id)); |
| | | comActDiscussVO.setSignNum(integer1); |
| | | comActDiscussVO.setSignNum(comActDiscussDO.getFabulousNum()); |
| | | Integer type = comActDiscussVO.getType(); |
| | | if (type.equals(2)) { |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList( |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | List<ComActDiscussOptionVO> comActDiscussOptionVOS = new ArrayList<>(); |
| | | ArrayList<Integer> votes = new ArrayList<>(); |
| | | comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> { |
| | | Long discussOptionDOId = comActDiscussOptionDO.getId(); |
| | | Integer selectCount = |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>().lambda() |
| | | .eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>().lambda() |
| | | .eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | ComActDiscussOptionVO comActDiscussOptionVO = new ComActDiscussOptionVO(); |
| | | BeanUtils.copyProperties(comActDiscussOptionDO, comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | | if (loginUserId != null && !loginUserId.equals(0L)) { |
| | | // 判断选项是否已投票 |
| | | int haveVote = |
| | | comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId); |
| | | comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId); |
| | | votes.add(haveVote); |
| | | comActDiscussOptionVO.setHaveVote(haveVote > 0 ? 1 : 0); |
| | | } |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | | fillThePercentAndSort(comActDiscussOptionVOS); |
| | | comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS); |
| | | //填充剩余可投票数 |
| | | if (loginUserId != null && !loginUserId.equals(0L)) { |
| | | if (comActDiscussVO.getIsRepeat().intValue() == 1) { |
| | | //可重复投票 |
| | | int votedVotesInToday = comActDiscussOptionUserDAO.selectVotedVotesInToday(id, loginUserId); |
| | | int remainingVotes = comActDiscussVO.getCount().intValue() - votedVotesInToday; |
| | | comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0); |
| | | } else { |
| | | //不可重复投票 |
| | | int alreadyVotedVotes = votes.stream().mapToInt(Integer::intValue).sum(); |
| | | int remainingVotes = comActDiscussVO.getCount().intValue() - alreadyVotedVotes; |
| | | comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0); |
| | | } |
| | | } |
| | | checkDiscussStatusIsCorrect(comActDiscussVO); |
| | | //填充投票记录列表 |
| | | List<ComActDiscussOptionUserVO> comActDiscussOptionUserVOList = comActDiscussOptionUserDAO |
| | | .selectVotedRecords(comActDiscussVO.getId()); |
| | | comActDiscussVO.setComActDiscussOptionUserVOList(comActDiscussOptionUserVOList); |
| | | //填充已参与投票人数 |
| | | int votedPersonNum = comActDiscussOptionUserDAO.selectVotedPersonNum(comActDiscussVO.getId()); |
| | | comActDiscussVO.setVotedPersonNum(votedPersonNum); |
| | | } |
| | | Long userId = comActDiscussDO.getUserId(); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId); |
| | |
| | | comActDiscussVO.setHaveSign(comActDiscussVO1.getHaveSign()); |
| | | comActDiscussVO.setHaveVote(comActDiscussVO1.getHaveVote()); |
| | | } |
| | | |
| | | String viewNumKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, id.toString()); |
| | | if (stringRedisTemplate.hasKey(viewNumKey)) { |
| | | ValueOperations opsForValue = stringRedisTemplate.opsForValue(); |
| | | int viewNum = Integer.parseInt((String) opsForValue.get(viewNumKey)); |
| | | comActDiscussVO.setViewsNum(viewNum); |
| | | } |
| | | return R.ok(comActDiscussVO); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-投票 |
| | | * 计算投票占比以及排序 |
| | | * @param comActDiscussOptionVOS |
| | | */ |
| | | private void fillThePercentAndSort(List<ComActDiscussOptionVO> comActDiscussOptionVOS) { |
| | | //填充总票数 |
| | | int allSum = comActDiscussOptionVOS.stream().mapToInt(ComActDiscussOptionVO::getNum).sum(); |
| | | comActDiscussOptionVOS.forEach(option -> { |
| | | if (allSum == 0) { |
| | | option.setPercent(new BigDecimal(0)); |
| | | } else { |
| | | //占比 |
| | | BigDecimal percent = BigDecimal.valueOf(option.getNum()).divide(BigDecimal.valueOf(allSum), 2, RoundingMode.HALF_UP) |
| | | .multiply(BigDecimal.valueOf(100)).setScale(0); |
| | | option.setPercent(percent); |
| | | } |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-投票 |
| | | * |
| | | * @param comActDiscussOptionUserDTO |
| | | * 投票信息 |
| | | * @param comActDiscussOptionUserDTO 投票信息 |
| | | * @return 投票结果 |
| | | */ |
| | | @Override |
| | | public R addDiscussOptionUser(ComActDiscussOptionUserDTO comActDiscussOptionUserDTO) { |
| | | Long discussOptionId = comActDiscussOptionUserDTO.getDiscussOptionId(); |
| | | List<Long> discussOptionIds = comActDiscussOptionUserDTO.getDiscussOptionIds(); |
| | | Long discussOptionId = discussOptionIds.get(0); |
| | | Long userId = comActDiscussOptionUserDTO.getUserId(); |
| | | ComActDiscussOptionDO comActDiscussOptionDO = comActDiscussOptionDAO.selectById(discussOptionId); |
| | | if (ObjectUtils.isEmpty(comActDiscussOptionDO)) { |
| | |
| | | // QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, discussId)); |
| | | // List<Long> longList=comActDiscussOptionDOS.stream().map(comActDiscussOptionDO1 -> |
| | | // comActDiscussOptionDO1.getId()).collect(Collectors.toList()); |
| | | Integer integer = comActDiscussOptionUserDAO.selectCount( |
| | | new QueryWrapper<ComActDiscussOptionUserDO>().lambda().eq(ComActDiscussOptionUserDO::getUserId, userId) |
| | | .eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionId)); |
| | | if (integer > 0) { |
| | | return R.fail("不要重复投票"); |
| | | Long discussId = comActDiscussOptionDO.getDiscussId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(comActDiscussOptionDO.getDiscussId()); |
| | | if (isNull(comActDiscussOptionDO)) { |
| | | return R.fail("投票主题不存在"); |
| | | } |
| | | ComActDiscussOptionUserDO comActDiscussOptionUserDO = new ComActDiscussOptionUserDO(); |
| | | comActDiscussOptionUserDO.setUserId(userId); |
| | | comActDiscussOptionUserDO.setDiscussOptionId(discussOptionId); |
| | | int insert = comActDiscussOptionUserDAO.insert(comActDiscussOptionUserDO); |
| | | if (insert > 0) { |
| | | boolean isRepeat = comActDiscussDO.getIsRepeat().intValue() == 1; |
| | | int usableVoteVotes = comActDiscussDO.getCount().intValue(); |
| | | int currentVoteNum = discussOptionIds.size(); |
| | | if (isRepeat) { |
| | | //可重复投票 |
| | | int votedVotesInToday = comActDiscussOptionUserDAO.selectVotedVotesInToday(discussId, userId); |
| | | if (usableVoteVotes <= votedVotesInToday || currentVoteNum > usableVoteVotes - votedVotesInToday) { |
| | | return R.fail("票数不足"); |
| | | } |
| | | } else { |
| | | //不可重复投票 |
| | | int alreadyVotedVotes = comActDiscussOptionUserDAO.selectCount( |
| | | new QueryWrapper<ComActDiscussOptionUserDO>().lambda().eq(ComActDiscussOptionUserDO::getUserId, userId) |
| | | .eq(ComActDiscussOptionUserDO::getDiscussId, discussId)); |
| | | if (usableVoteVotes <= alreadyVotedVotes || currentVoteNum > usableVoteVotes - alreadyVotedVotes) { |
| | | return R.fail("票数不足"); |
| | | } |
| | | } |
| | | List<ComActDiscussOptionUserDO> comActDiscussOptionUserDOList = new ArrayList<>(); |
| | | discussOptionIds.forEach(optionId -> { |
| | | ComActDiscussOptionUserDO comActDiscussOptionUserDO = new ComActDiscussOptionUserDO(); |
| | | comActDiscussOptionUserDO.setUserId(userId); |
| | | comActDiscussOptionUserDO.setDiscussOptionId(optionId); |
| | | comActDiscussOptionUserDO.setDiscussId(discussId); |
| | | comActDiscussOptionUserDOList.add(comActDiscussOptionUserDO); |
| | | }); |
| | | int result = comActDiscussOptionUserDAO.batchInsert(comActDiscussOptionUserDOList); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-点赞、取消点赞 |
| | | * 议事投票-评论-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussCommentUserDTO |
| | | * 评论点赞 |
| | | * @param comActDiscussCommentUserDTO 评论点赞 |
| | | * @return 点赞结果 |
| | | */ |
| | | @Override |
| | | public R putDiscussCommentUser(ComActDiscussCommentUserDTO comActDiscussCommentUserDTO) { |
| | | ComActDiscussCommentDO comActDiscussCommentDO = |
| | | comActDiscussCommentDAO.selectById(comActDiscussCommentUserDTO.getId()); |
| | | comActDiscussCommentDAO.selectById(comActDiscussCommentUserDTO.getId()); |
| | | if (ObjectUtils.isEmpty(comActDiscussCommentDO)) { |
| | | return R.fail("评论不存在"); |
| | | } |
| | |
| | | num = comActDiscussCommentUserDAO.insert(comActDiscussCommentUserDO); |
| | | } else { |
| | | num = comActDiscussCommentUserDAO.delete(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getUserId, comActDiscussCommentUserDTO.getUserId()) |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentUserDTO.getId())); |
| | | .eq(ComActDiscussCommentUserDO::getUserId, comActDiscussCommentUserDTO.getUserId()) |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentUserDTO.getId())); |
| | | } |
| | | if (num > 0) { |
| | | return R.ok(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 工作大屏-一起议列表 |
| | | * 工作大屏-议事投票列表 |
| | | * |
| | | * @param discussListDTO |
| | | * 请求参数 |
| | | * @return 一起议列表 |
| | | * @param discussListDTO 请求参数 |
| | | * @return 议事投票列表 |
| | | */ |
| | | @Override |
| | | public R getScreenDiscussList(ScreenDiscussListDTO discussListDTO) { |
| | | IPage<DiscussListVO> discussListVOIPage = comActDiscussDAO |
| | | .getScreenDiscussList(new Page(discussListDTO.getPageNum(), discussListDTO.getPageSize()), discussListDTO); |
| | | .getScreenDiscussList(new Page(discussListDTO.getPageNum(), discussListDTO.getPageSize()), discussListDTO); |
| | | if (!discussListVOIPage.getRecords().isEmpty()) { |
| | | discussListVOIPage.getRecords().forEach(discussListVO -> { |
| | | // 查询评论数量和点赞数量 |
| | | Integer integer = comActDiscussCommentDAO.selectCount(new QueryWrapper<ComActDiscussCommentDO>() |
| | | .lambda().eq(ComActDiscussCommentDO::getDiscussId, discussListVO.getId())); |
| | | .lambda().eq(ComActDiscussCommentDO::getDiscussId, discussListVO.getId())); |
| | | discussListVO.setCommentCount(integer); |
| | | Integer integer1 = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda() |
| | | .eq(ComActDiscussUserDO::getDiscussId, discussListVO.getId())); |
| | | .eq(ComActDiscussUserDO::getDiscussId, discussListVO.getId())); |
| | | discussListVO.setFabulousCount(integer1); |
| | | |
| | | if (discussListVO.getType().equals(ScreenDiscussListDTO.type.tp)) {// 投票 |
| | | List<ComActDiscussOptionVO> discussOptionList = |
| | | comActDiscussDAO.getScreenDiscussOptionList(discussListVO.getId()); |
| | | comActDiscussDAO.getScreenDiscussOptionList(discussListVO.getId()); |
| | | if (!discussOptionList.isEmpty()) { |
| | | discussListVO.setDiscussOptionList(discussOptionList); |
| | | } |
| | |
| | | } |
| | | return R.ok(discussListVOIPage); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票后台公布结果 |
| | | * |
| | | * @param publishResultDTO 请求参数 |
| | | * @return 公布结果 |
| | | */ |
| | | @Override |
| | | public R publishResultAdmin(ComActDiscussPublishResultDTO publishResultDTO) { |
| | | ComActDiscussDO discussDO = comActDiscussDAO.selectById(publishResultDTO.getId()); |
| | | if (discussDO == null) { |
| | | return R.fail("议事投票记录不存在"); |
| | | } |
| | | Date nowDate = new Date(); |
| | | if (publishResultDTO.getType().equals(ComActDiscussPublishResultDTO.type.add)) { |
| | | if (!discussDO.getStatus().equals(ComActDiscussDO.status.dgb)) { |
| | | return R.fail("该议事投票不是待公布状态,不可公布结果操作"); |
| | | } |
| | | discussDO.setStatus(ComActDiscussDO.status.ygb); |
| | | } |
| | | discussDO.setPublishAt(nowDate); |
| | | discussDO.setPublishResult(publishResultDTO.getResult()); |
| | | discussDO.setUpdateAt(nowDate); |
| | | discussDO.setPublishBy(publishResultDTO.getUserId()); |
| | | if (comActDiscussDAO.updateById(discussDO) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论/回复删除 |
| | | * |
| | | * @param id 评论/回复id |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public R deleteDiscussCommentAdmin(Long id) { |
| | | ComActDiscussCommentDO discussCommentDO = comActDiscussCommentDAO.selectById(id); |
| | | if (discussCommentDO == null) { |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | if (discussCommentDO.getIsDel().equals(ComActDiscussCommentDO.isDelete.yes)) { |
| | | return R.fail("该记录已被删除"); |
| | | } |
| | | discussCommentDO.setIsDel(ComActDiscussCommentDO.isDelete.yes); |
| | | if (comActDiscussCommentDAO.updateById(discussCommentDO) > 0) { |
| | | ComActDiscussDO discussDO = comActDiscussDAO.selectById(discussCommentDO.getDiscussId()); |
| | | if (discussDO != null) { |
| | | if (discussDO.getCommentNum() > 0) { |
| | | if (discussCommentDO.getParentId().equals(0L)) { |
| | | Integer count = comActDiscussCommentDAO.selectCount(new QueryWrapper<ComActDiscussCommentDO>().lambda() |
| | | .eq(ComActDiscussCommentDO::getParentId, id).eq(ComActDiscussCommentDO::getIsDel, ComActDiscussCommentDO.isDelete.no)); |
| | | if (count != null && count > 0 && discussDO.getCommentNum() > count) { |
| | | discussDO.setCommentNum(discussDO.getCommentNum() - count); |
| | | } else { |
| | | discussDO.setCommentNum(discussDO.getCommentNum() - 1); |
| | | } |
| | | comActDiscussDAO.updateById(discussDO); |
| | | } else { |
| | | discussDO.setCommentNum(discussDO.getCommentNum() - 1); |
| | | comActDiscussDAO.updateById(discussDO); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询评论下回复列表 |
| | | * |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return 回复列表 |
| | | */ |
| | | @Override |
| | | public R discussCommentReplyAdmin(ComActDiscussDetailDTO discussDetailDTO) { |
| | | return R.ok(comActDiscussCommentDAO.getDiscussCommentList(new Page(discussDetailDTO.getPageNum(), discussDetailDTO.getPageSize()), discussDetailDTO.getId())); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区可发布议事投票权限配置 |
| | | * |
| | | * @param communityId 社区id |
| | | * @return 社区可发布议事投票权限配置 |
| | | */ |
| | | @Override |
| | | public R discussJurisdictionGet(Long communityId, Long userId) { |
| | | List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId) |
| | | .eq(SysConfDO::getCode,Constants.DISCUSS_IDENTITY_KEY + communityId) |
| | | .orderByDesc(SysConfDO::getCreateAt)); |
| | | if (confDOList == null || confDOList.size() == 0) { |
| | | SysConfDO sysConfDO = new SysConfDO(); |
| | | sysConfDO.setCode(Constants.DISCUSS_IDENTITY_KEY + communityId); |
| | | sysConfDO.setName("社区议事投票小程序身份验证参数"); |
| | | sysConfDO.setValue("");// 社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | sysConfDO.setDescription("社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员)"); |
| | | sysConfDO.setCommunityId(communityId); |
| | | sysConfDO.setCreateBy(userId); |
| | | int inserted = sysConfDao.insert(sysConfDO); |
| | | if (inserted != 1) { |
| | | throw new ServiceException("添加社区议事投票小程序身份验证参数失败"); |
| | | } |
| | | confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId) |
| | | .orderByDesc(SysConfDO::getCreateAt)); |
| | | } |
| | | if (confDOList != null && confDOList.size() > 0) { |
| | | SysConfDO latest = confDOList.get(0); |
| | | SysConfVO sysConfVO = new SysConfVO(); |
| | | BeanUtils.copyProperties(latest, sysConfVO); |
| | | return R.ok(sysConfVO.getValue()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | * |
| | | * @param communityId 社区id |
| | | * @param value 需要设置的参数值 |
| | | * @return 设置结果 |
| | | */ |
| | | @Override |
| | | public R discussJurisdictionSet(Long communityId, String value) { |
| | | List<SysConfDO> authConf = |
| | | sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>().eq(SysConfDO::getCommunityId, communityId) |
| | | .eq(SysConfDO::getCode, Constants.DISCUSS_IDENTITY_KEY + communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | if (authConf != null && authConf.size() > 0) { |
| | | SysConfDO first = authConf.get(0); |
| | | first.setValue(value); |
| | | int updated = sysConfDao.updateById(first); |
| | | if (updated == 1) { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票检测状态定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | public R timedTaskDiscussInspectStatus() { |
| | | Date nowDate = new Date(); |
| | | //查询已过开始时间未开始投票列表 |
| | | List<ComActDiscussDO> wksDiscussList = comActDiscussDAO.selectList(new QueryWrapper<ComActDiscussDO>().lambda() |
| | | .eq(ComActDiscussDO::getType, ComActDiscussDO.type.tp).eq(ComActDiscussDO::getIsDel, ComActDiscussDO.isOk.no) |
| | | .eq(ComActDiscussDO::getStatus,ComActDiscussDO.status.wks).le(ComActDiscussDO::getStartTime, nowDate)); |
| | | wksDiscussList.forEach(wksDiscuss -> { |
| | | wksDiscuss.setStatus(ComActDiscussDO.status.jxz); |
| | | wksDiscuss.setUpdateAt(nowDate); |
| | | wksDiscuss.setReleaseAt(nowDate); |
| | | comActDiscussDAO.updateById(wksDiscuss); |
| | | }); |
| | | |
| | | //查询已过结束时间未结束的投票列表 |
| | | List<ComActDiscussDO> jxzDiscussList = comActDiscussDAO.selectList(new QueryWrapper<ComActDiscussDO>().lambda() |
| | | .eq(ComActDiscussDO::getType, ComActDiscussDO.type.tp).eq(ComActDiscussDO::getIsDel, ComActDiscussDO.isOk.no) |
| | | .eq(ComActDiscussDO::getStatus,ComActDiscussDO.status.jxz).le(ComActDiscussDO::getEndTime, nowDate)); |
| | | jxzDiscussList.forEach(jxzDiscuss -> { |
| | | jxzDiscuss.setStatus(ComActDiscussDO.status.dgb); |
| | | jxzDiscuss.setUpdateAt(nowDate); |
| | | comActDiscussDAO.updateById(jxzDiscuss); |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议增加浏览量 |
| | | * @param discussId 一起议主键id |
| | | */ |
| | | @Override |
| | | public void increaseViewNum(Long discussId) { |
| | | String incrKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, discussId.toString()); |
| | | Boolean isExist = stringRedisTemplate.hasKey(incrKey); |
| | | ValueOperations opsForValue = stringRedisTemplate.opsForValue(); |
| | | if (isExist) { |
| | | opsForValue.increment(incrKey); |
| | | } else { |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(discussId); |
| | | if (nonNull(comActDiscussDO)) { |
| | | stringRedisTemplate.executePipelined((RedisCallback<Object>) redisConnection -> { |
| | | StringRedisConnection stringRedisConnection = (StringRedisConnection) redisConnection; |
| | | Integer nowViewNum = Math.addExact(comActDiscussDO.getViewsNum().intValue(), 1); |
| | | stringRedisConnection.set(incrKey, nowViewNum.toString()); |
| | | stringRedisConnection.expire(incrKey, DISCUSS_EXPIRE_TIME); |
| | | stringRedisConnection.sAdd(INCR_VIEW_DISCUSS_IDS_KEY, discussId.toString()); |
| | | stringRedisConnection.expire(INCR_VIEW_DISCUSS_IDS_KEY, DISCUSS_EXPIRE_TIME); |
| | | return null; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 公布/编辑一起议投票结果 |
| | | * @param comActDiscussDTO |
| | | * @return 请求结果 |
| | | */ |
| | | @Override |
| | | public R editDiscussResult(ComActDiscussDTO comActDiscussDTO) { |
| | | if (isNull(comActDiscussDTO.getId()) || isNull(comActDiscussDTO.getPublishResult())) { |
| | | return R.fail("缺少参数!"); |
| | | } |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(comActDiscussDTO.getId()); |
| | | if (isNull(comActDiscussDO)) { |
| | | return R.fail("当前一起议主题不存在!"); |
| | | } |
| | | if (!comActDiscussDTO.getUserId().equals(comActDiscussDO.getUserId())) { |
| | | return R.fail("只能公布或编辑自己发布的主题!"); |
| | | } |
| | | comActDiscussDO.setPublishResult(comActDiscussDTO.getPublishResult()); |
| | | comActDiscussDO.setStatus(4); |
| | | int result = comActDiscussDAO.updateById(comActDiscussDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("网络错误,请重试!"); |
| | | } |
| | | |
| | | /** |
| | | * 一起议获取是否有发布权 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getDiscussPermissions(ComActDiscussDTO comActDiscussDTO) { |
| | | return R.ok(checkCurrentUserDiscussIdentity(comActDiscussDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 将redis中浏览量写入表中 |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | public R writeDiscussViewNumToTable() { |
| | | try { |
| | | if (stringRedisTemplate.hasKey(INCR_VIEW_DISCUSS_IDS_KEY)) { |
| | | SetOperations opsForSet = stringRedisTemplate.opsForSet(); |
| | | Set<String> needWriteDiscussIdSet = opsForSet.members(INCR_VIEW_DISCUSS_IDS_KEY); |
| | | |
| | | //组装viewNum key |
| | | List<String> viewNumKeys = new ArrayList<>(); |
| | | Iterator<String> iterator = needWriteDiscussIdSet.iterator(); |
| | | while (iterator.hasNext()) { |
| | | viewNumKeys.add(String.join("_", DISCUSS_VIEW_NUM_PREFIX, iterator.next())); |
| | | } |
| | | |
| | | ValueOperations opsForValue = stringRedisTemplate.opsForValue(); |
| | | List<String> viewNumList = opsForValue.multiGet(viewNumKeys); |
| | | |
| | | //待处理集合,以key-value/discussId-viewNum 存放 |
| | | HashMap<Long, Integer> needDealMap = new HashMap<>(); |
| | | for (String discussId : needWriteDiscussIdSet) { |
| | | try { |
| | | needDealMap.put(Long.parseLong(discussId), Integer.parseInt(viewNumList.get(0))); |
| | | viewNumList.remove(0); |
| | | } catch (IndexOutOfBoundsException e) { |
| | | //数据存在异常了,跳过,继续执行正确的 |
| | | continue; |
| | | } |
| | | } |
| | | int result = comActDiscussDAO.batchUpdateViewNum(needDealMap); |
| | | if (result <= 0) { |
| | | return R.fail("处理失败"); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("写入浏览量失败【{}】", e.getMessage()); |
| | | return R.fail("处理失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActFourMemberVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.dao.ComMngBuildingDAO; |
| | | import com.panzhihua.service_community.entity.ComActCommittee; |
| | | import com.panzhihua.service_community.entity.ComActFourMember; |
| | | import com.panzhihua.service_community.dao.ComActFourMemberDao; |
| | | import com.panzhihua.service_community.model.dos.ComMngBuildingDO; |
| | | import com.panzhihua.service_community.service.ComActFourMemberService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * (ComActFourMember)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-23 10:13:31 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActFourMemberServiceImpl extends ServiceImpl<ComActFourMemberDao, ComActFourMember> implements ComActFourMemberService { |
| | | @Resource |
| | | private ComActFourMemberDao comActFourMemberDao; |
| | | @Resource |
| | | private ComMngBuildingDAO comMngBuildingDAO; |
| | | @Resource |
| | | private UserService userService; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return R.ok(comActFourMemberDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(ComActFourMemberVO comActFourMemberVO) { |
| | | if(comActFourMemberVO!=null&&comActFourMemberVO.getJurisdiction()!=null){ |
| | | ComActFourMember comActFourMember=new ComActFourMember(); |
| | | List<String> jurisdictionList=comMngBuildingDAO.find(comActFourMemberVO.getJurisdiction()); |
| | | if(!jurisdictionList.isEmpty()&&jurisdictionList.size()==jurisdictionList.stream().distinct().collect(Collectors.toList()).size()){ |
| | | comActFourMember.setJurisdictionContent(JSON.toJSONString(jurisdictionList)); |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | BeanUtils.copyProperties(comActFourMemberVO,administratorsUserVO); |
| | | administratorsUserVO.setType(3); |
| | | R r=userService.addUserBackstageProperty(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | comActFourMemberVO.setUserId(Long.parseLong(r.getData().toString())); |
| | | comActFourMemberVO.setCreateTime(DateUtil.date()); |
| | | BeanUtils.copyProperties(comActFourMemberVO,comActFourMember); |
| | | this.comActFourMemberDao.insert(comActFourMember); |
| | | return R.ok(); |
| | | } |
| | | return R.fail("手机号或账户已存在"); |
| | | } |
| | | return R.fail("绑定管辖区域不能为空或重复"); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R update(ComActFourMemberVO comActFourMemberVO) { |
| | | if(comActFourMemberVO!=null){ |
| | | if(comActFourMemberVO.getIds()!=null){ |
| | | for(Integer id:comActFourMemberVO.getIds()){ |
| | | ComActFourMember comActFourMember=new ComActFourMember(); |
| | | ComActFourMember comActFourMemberBase=this.comActFourMemberDao.selectById(id); |
| | | if(comActFourMemberBase!=null){ |
| | | comActFourMember.setId(comActFourMemberBase.getId()); |
| | | comActFourMember.setUserId(comActFourMemberBase.getUserId()); |
| | | } |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | BeanUtils.copyProperties(comActFourMemberVO,administratorsUserVO); |
| | | userService.putUserBackstage(administratorsUserVO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | else { |
| | | ComActFourMember comActFourMember=new ComActFourMember(); |
| | | ComActFourMember comActFourMemberBase=this.comActFourMemberDao.selectById(comActFourMemberVO.getId()); |
| | | if(comActFourMemberBase!=null){ |
| | | comActFourMember.setId(comActFourMemberBase.getId()); |
| | | comActFourMember.setUserId(comActFourMemberBase.getUserId()); |
| | | } |
| | | if(comActFourMemberVO.getJurisdiction()!=null){ |
| | | List<String> jurisdictionList=comMngBuildingDAO.find(comActFourMemberVO.getJurisdiction()); |
| | | if(!jurisdictionList.isEmpty()&&jurisdictionList.size()==jurisdictionList.stream().distinct().collect(Collectors.toList()).size()){ |
| | | comActFourMember.setJurisdictionContent(JSON.toJSONString(jurisdictionList)); |
| | | } |
| | | else { |
| | | return R.fail("绑定管辖区域不能为空或重复"); |
| | | } |
| | | } |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | BeanUtils.copyProperties(comActFourMemberVO,administratorsUserVO); |
| | | R r=userService.putUserBackstage(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | BeanUtils.copyProperties(comActFourMemberVO,comActFourMember); |
| | | this.comActFourMemberDao.updateById(comActFourMember); |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败"); |
| | | } |
| | | |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R delete(ComActFourMemberVO comActFourMemberVO) { |
| | | if(comActFourMemberVO.getIds()!=null){ |
| | | for(Integer id: comActFourMemberVO.getIds()){ |
| | | ComActFourMember comActFourMember=comActFourMemberDao.selectById(id); |
| | | if(comActFourMember!=null){ |
| | | if(comActFourMember.getUserId()!=null){ |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comActFourMember.getUserId()); |
| | | administratorsUserVO.setCommunityId(comActFourMember.getCommunityId()); |
| | | userService.deleteUserBackstage(administratorsUserVO); |
| | | this.comActFourMemberDao.deleteById(id); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | else { |
| | | ComActFourMember comActFourMember=comActFourMemberDao.selectById(comActFourMemberVO.getId()); |
| | | if(comActFourMember!=null){ |
| | | if(comActFourMember.getUserId()!=null){ |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comActFourMember.getUserId()); |
| | | administratorsUserVO.setCommunityId(comActFourMember.getCommunityId()); |
| | | userService.deleteUserBackstage(administratorsUserVO); |
| | | this.comActFourMemberDao.deleteById(comActFourMemberVO.getId()); |
| | | return R.ok(); |
| | | |
| | | } |
| | | } |
| | | return R.fail("用户账号错误"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public R get(Integer id) { |
| | | return R.ok(comActFourMemberDao.getById(id)); |
| | | } |
| | | } |
| | |
| | | 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.google.common.base.Joiner; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishFeedbackVO; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishDAO; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishFeedbackMapper; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishOperationRecordMapper; |
| | |
| | | } |
| | | } |
| | | comActMicroWishVO1.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone())); |
| | | //查询处理人 |
| | | comActMicroWishVO1.setResponsibleName(this.getWishHandleName(comActMicroWishVO1.getHandleId())); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | |
| | | if(!idList.isEmpty()){ |
| | | comActMicroWishVO.setIdList(idList); |
| | | } |
| | | //查询处理人 |
| | | comActMicroWishVO.setResponsibleName(this.getWishHandleName(comActMicroWishVO.getHandleId())); |
| | | return R.ok(comActMicroWishVO); |
| | | } |
| | | |
| | |
| | | comActMicroWishDO.setResponsibleId(responsibleId); |
| | | comActMicroWishDO.setStatus(3);//进行中 |
| | | comActMicroWishDO.setForm(1); |
| | | if(comActMicroWishVO.getHandleIds() != null && comActMicroWishVO.getHandleIds().size() > 0){ |
| | | comActMicroWishDO.setHandleId(Joiner.on(",").join(comActMicroWishVO.getHandleIds())); |
| | | } |
| | | //添加操作记录 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.fp); |
| | | comActMicroWishOperationRecordDO.setContent("分配心愿"); |
| | |
| | | comActMicroWishDO.setResponsibleId(responsibleId); |
| | | comActMicroWishDO.setStatus(3);//待确认 |
| | | comActMicroWishDO.setForm(2); |
| | | if(comActMicroWishVO.getHandleIds() != null && comActMicroWishVO.getHandleIds().size() > 0){ |
| | | comActMicroWishDO.setHandleId(Joiner.on(",").join(comActMicroWishVO.getHandleIds())); |
| | | } |
| | | //添加操作记录 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.fp); |
| | | comActMicroWishOperationRecordDO.setContent("分配心愿"); |
| | |
| | | } |
| | | return R.ok(microListVOIPage); |
| | | } |
| | | |
| | | /** |
| | | * 微心愿处理人列表 |
| | | * @param communityId 社区id |
| | | * @param type 处理人类型(1.后台用户 2.党员 3.志愿者) |
| | | * @return 处理人列表 |
| | | */ |
| | | @Override |
| | | public R wishHandleListAdmin(Long communityId,Integer type){ |
| | | return R.ok(comActMicroWishDAO.getWishHandleListAdmin(type,communityId)); |
| | | } |
| | | |
| | | /** |
| | | * 拼接处理人 |
| | | * @param handleId 处理人id字符串 |
| | | * @return 处理人名称 |
| | | */ |
| | | private String getWishHandleName(String handleId){ |
| | | StringBuffer sb = new StringBuffer(); |
| | | if(StringUtils.isNotEmpty(handleId)){ |
| | | String []handleIds = handleId.split(","); |
| | | if(handleIds.length > 0){ |
| | | for (String id : handleIds) { |
| | | SysUserVO user = comActMicroWishDAO.getUserByUserId(Long.parseLong(id)); |
| | | if(user != null){ |
| | | if(user.getType().equals(SysUserVO.type.xcx)){ |
| | | if(user.getIsPartymember().equals(SysUserVO.isOk.yes)){ |
| | | sb.append(user.getName() + "(党员),"); |
| | | }else if(user.getIsVolunteer().equals(SysUserVO.isOk.yes)){ |
| | | sb.append(user.getName() + "(志愿者),"); |
| | | }else{ |
| | | sb.append(user.getName()); |
| | | } |
| | | }else if(user.getType().equals(SysUserVO.type.sqht)){ |
| | | sb.append(user.getName() + "(后台用户),"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | String result = sb.toString(); |
| | | if(result.length() > 0){ |
| | | result = result.substring(0,result.length()-1); |
| | | } |
| | | return result; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.entity.ComActSocialOrg; |
| | | import com.panzhihua.service_community.dao.ComActSocialOrgDao; |
| | | import com.panzhihua.service_community.service.ComActSocialOrgService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 社会组织(ComActSocialOrg)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-17 10:45:30 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActSocialOrgServiceImpl extends ServiceImpl<ComActSocialOrgDao, ComActSocialOrg> implements ComActSocialOrgService { |
| | | @Resource |
| | | private ComActSocialOrgDao comActSocialOrgDao; |
| | | @Resource |
| | | private UserService userService; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return R.ok(comActSocialOrgDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | |
| | | @Override |
| | | public R selectById(Long id) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R insert(ComActSocialOrgVO comActSocialOrgVO) { |
| | | if(comActSocialOrgVO!=null){ |
| | | ComActSocialOrg comActSocialOrg=new ComActSocialOrg(); |
| | | BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg); |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setType(3); |
| | | administratorsUserVO.setAccount(comActSocialOrgVO.getAccount()); |
| | | administratorsUserVO.setPassword(comActSocialOrgVO.getPassword()); |
| | | administratorsUserVO.setRoleId(comActSocialOrgVO.getRoleId()); |
| | | administratorsUserVO.setCommunityId(comActSocialOrg.getCommunityId()); |
| | | administratorsUserVO.setName(comActSocialOrgVO.getContactName()); |
| | | administratorsUserVO.setPhone(comActSocialOrgVO.getContactPhone()); |
| | | R r=userService.addUserBackstageProperty(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | comActSocialOrg.setUserId(Long.parseLong(r.getData().toString())); |
| | | comActSocialOrg.setCreateAt(DateUtil.date()); |
| | | this.comActSocialOrgDao.insert(comActSocialOrg); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R update(ComActSocialOrgVO comActSocialOrgVO) { |
| | | if(comActSocialOrgVO!=null){ |
| | | ComActSocialOrg comActSocialOrg=new ComActSocialOrg(); |
| | | BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg); |
| | | this.comActSocialOrgDao.updateById(comActSocialOrg); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R delete(Long id) { |
| | | ComActSocialOrg comActSocialOrg=comActSocialOrgDao.selectById(id); |
| | | if(comActSocialOrg!=null){ |
| | | if(comActSocialOrg.getUserId()!=null){ |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comActSocialOrg.getUserId()); |
| | | administratorsUserVO.setCommunityId(comActSocialOrg.getCommunityId()); |
| | | userService.deleteUserBackstage(administratorsUserVO); |
| | | this.comActSocialOrgDao.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail("用户账号错误"); |
| | | } |
| | | } |
| | |
| | | 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.google.common.base.Joiner; |
| | | import com.panzhihua.common.enums.*; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComElderAuthRecordsService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import static com.panzhihua.common.enums.IdentityApprovalStatusEnum.PASS_THROUGH; |
| | | import static com.panzhihua.common.enums.IdentityApprovalStatusEnum.PENDING_REVIEW; |
| | | import static com.panzhihua.common.enums.IdentityAuthMethodEnum.FACE_AUTH; |
| | | import static com.panzhihua.common.enums.IdentityAuthStatusEnum.CERTIFIED; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | 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.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordStatisticExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordVO; |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComElderAuthElderliesDAO; |
| | | import com.panzhihua.service_community.dao.ComElderAuthRecordsDAO; |
| | | import com.panzhihua.service_community.dao.ComEldersAuthStatisticsMapper; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthElderliesDO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | import com.panzhihua.service_community.model.dos.ComEldersAuthStatisticsDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import com.panzhihua.service_community.service.ComElderAuthRecordsService; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * title: ComElderAuthRecordsServiceImpl 社区政务》高龄老人认证》认证记录表服务实现类 |
| | |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | |
| | | @Override |
| | | public R detailElderAuthRecords(Long authRecordId) { |
| | | ComElderAuthRecordVO comElderAuthRecordVO = comElderAuthRecordsDAO.detailElderAuthRecords(authRecordId); |
| | | comElderAuthRecordVO.setNextIds(comElderAuthRecordsDAO.getNextIds(comElderAuthRecordVO.getCommunityId(),authRecordId)); |
| | | return R.ok(comElderAuthRecordVO); |
| | | } |
| | | |
| | |
| | | if (comElderAuthRecordsDO == null) { |
| | | return R.fail("未查询到高龄老人认证记录"); |
| | | } |
| | | if(!comElderAuthRecordsDO.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.dsh)){ |
| | | return R.fail("该记录已审核,不可重复审核"); |
| | | } |
| | | ComElderAuthElderliesDO authElderliesDO = comElderAuthElderliesDAO.selectById(comElderAuthRecordsDO.getElderliesId()); |
| | | if(authElderliesDO == null){ |
| | | return R.fail("未查询到老人信息"); |
| | | } |
| | | |
| | | Date nowDate = new Date(); |
| | | BeanUtils.copyProperties(comElderAuthRecordVO, comElderAuthRecordsDO); |
| | | if (comElderAuthRecordVO.getApprovalStatus().equals(3)) { |
| | | comElderAuthRecordsDO.setAuthStatus(1); |
| | | comElderAuthRecordsDO.setApprovalDate(nowDate); |
| | | if (comElderAuthRecordVO.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.tg)) { |
| | | comElderAuthRecordsDO.setAuthStatus(ComElderAuthRecordsDO.authStatus.yrz); |
| | | sendAuthSubscribe(comElderAuthRecordsDO.getSubmitUserId(), "高龄认证", "认证成功!"); |
| | | } else { |
| | | sendAuthSubscribe(comElderAuthRecordsDO.getSubmitUserId(), "高龄认证", comElderAuthRecordVO.getRejectReason()); |
| | | } |
| | | comElderAuthRecordsDO.setApprovalDate(new Date()); |
| | | int nub = comElderAuthRecordsDAO.updateById(comElderAuthRecordsDO); |
| | |
| | | return R.fail("审核失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void sendAuthSubscribe(Long userId, String name, String result) { |
| | | //发送订阅通知 |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(userId); |
| | | if (map != null) { |
| | | String openid = map.get("openid"); |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | String accessToken = util.getAppAccessToken(); |
| | | WxUtil.sendSubscribeRZSH(openid, accessToken, name, |
| | | DateUtils.format(new Date(), DateUtils.ymdhms_format), |
| | | result); |
| | | } catch (Exception e) { |
| | | log.error("推送审核状态订阅消息失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | // 需要修改的认证记录集合 |
| | | List<ComElderAuthRecordsDO> updateList = new ArrayList<>(); |
| | | log.info("开始处理导入数据"); |
| | | |
| | | List<ComElderAuthRecordImportMistakeExcelVO> mistakes = new ArrayList<>(); |
| | | try { |
| | | // 查询所有人口数据放入HashMap中 |
| | |
| | | String key = population.getCardNo(); |
| | | populationMap.put(key, population); |
| | | }); |
| | | |
| | | Date nowDate = new Date(); |
| | | for (ComElderAuthRecordImportExcelVO vo : list) { |
| | | String cardNoAES = AESUtil.encrypt128(vo.getIdCard(), aesKey); |
| | | // 判断实有人口是否已存在 |
| | | log.info("开始查询实有人口是否已存在"); |
| | | ComMngPopulationDO populationDO = null; |
| | |
| | | if (null == comElderAuthElderliesDO) { |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在,但本社区不存在高龄信息,请先导入高龄人口"); |
| | | mistake.setMistake("该实有人口已存在,但本社区不存在高龄老人信息,请先导入高龄老人"); |
| | | mistake.setAuthDate(DateUtils.format(vo.getAuthDate(),DateUtils.yyyyMMdd_format)); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | //存在高龄信息,判断是否满足认证条件 |
| | | if (StringUtils.isNotEmpty(vo.getBirthday())) { |
| | | int age = AgeUtils.getAgeFromBirthTimes(vo.getBirthday()); |
| | | int age = IdcardUtil.getAgeByIdCard(vo.getIdCard()); |
| | | if (age < 80 || !comElderAuthElderliesDO.getIsRegister().equals(1) || !comElderAuthElderliesDO.getIsAlive().equals(1)) { |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该人口未满80岁,或者不健在,或者未做高龄老人登记"); |
| | | mistake.setAuthDate(DateUtils.format(vo.getAuthDate(),DateUtils.yyyyMMdd_format)); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | |
| | | //满足认证条件,判断是否存在当期认证记录 |
| | | List<ComElderAuthRecordsDO> elderAuthRecordList = null; |
| | | ComElderAuthRecordsDO comElderAuthRecordsDO = null; |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | // 获取当前月 |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | String authPeriod = ""; |
| | | if (month < 10) { |
| | | authPeriod = String.valueOf(year) + "0" + String.valueOf(month); |
| | | }else { |
| | | authPeriod = String.valueOf(year) + String.valueOf(month); |
| | | } |
| | | comElderAuthRecordsDO = comElderAuthRecordsDAO.selectOne(new QueryWrapper<ComElderAuthRecordsDO>().lambda(). |
| | | eq(ComElderAuthRecordsDO::getElderliesId, comElderAuthElderliesDO.getId()).eq(ComElderAuthRecordsDO::getAuthPeriod, authPeriod)); |
| | | if (null != comElderAuthRecordsDO) { |
| | | String authPeriod = vo.getAuthPeriod(); |
| | | elderAuthRecordList = comElderAuthRecordsDAO.selectList(new QueryWrapper<ComElderAuthRecordsDO>().lambda() |
| | | .eq(ComElderAuthRecordsDO::getElderliesId, comElderAuthElderliesDO.getId()) |
| | | .eq(ComElderAuthRecordsDO::getAuthPeriod, authPeriod).orderByDesc(ComElderAuthRecordsDO::getCreateAt)); |
| | | if (null != elderAuthRecordList && elderAuthRecordList.size() > 0) { |
| | | comElderAuthRecordsDO = elderAuthRecordList.get(0); |
| | | //存在记录且状态为已认证,不能修改 |
| | | if (comElderAuthRecordsDO.getAuthStatus().equals(1)) { |
| | | if (comElderAuthRecordsDO.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.tg)) { |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该人口本期已认证,不能修改"); |
| | | mistake.setMistake("该人口本期已认证通过,不能重复认证"); |
| | | mistake.setAuthDate(DateUtils.format(vo.getAuthDate(),DateUtils.yyyyMMdd_format)); |
| | | mistakes.add(mistake); |
| | | }else if (comElderAuthRecordsDO.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.dsh)) { |
| | | comElderAuthRecordsDO = updateElderAuthRecordsDO(vo, comElderAuthRecordsDO,userId,communityId,nowDate); |
| | | updateList.add(comElderAuthRecordsDO); |
| | | }else { |
| | | //存在记录,执行修改 |
| | | ComElderAuthRecordsDO comElderAuthRecordsDO1 = |
| | | updateElderAuthRecordsDO(vo, comElderAuthRecordsDO, userId); |
| | | updateList.add(comElderAuthRecordsDO1); |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该认证已存在,执行更新"); |
| | | mistakes.add(mistake); |
| | | // 驳回状态,则新增 |
| | | comElderAuthRecordsDO = saveElderAuthRecordsDO(vo, comElderAuthElderliesDO, authPeriod, userId,communityId,nowDate); |
| | | saveList.add(comElderAuthRecordsDO); |
| | | } |
| | | }else { |
| | | // 不存在记录,则新增 |
| | | comElderAuthRecordsDO = saveElderAuthRecordsDO(vo, comElderAuthElderliesDO, authPeriod, userId); |
| | | comElderAuthRecordsDO = saveElderAuthRecordsDO(vo, comElderAuthElderliesDO, authPeriod, userId,communityId,nowDate); |
| | | saveList.add(comElderAuthRecordsDO); |
| | | } |
| | | } |
| | |
| | | // 不存在实有人口,则新增 |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("不存在该实有人口,请先导入实有人口信息"); |
| | | mistake.setAuthDate(DateUtils.format(vo.getAuthDate(),DateUtils.yyyyMMdd_format)); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R exportElderAuthRecordsStatistic(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | public R exportElderAuthRecordsStatistic(PageElderAuthStatisticDTO pageElderAuthRecordsDTO) { |
| | | List<ComElderAuthRecordStatisticExcleVO> comElderAuthRecordStatisticExcleVOS = comElderAuthRecordsDAO.exportElderAuthRecordsStatistic(pageElderAuthRecordsDTO); |
| | | if (null != comElderAuthRecordStatisticExcleVOS && comElderAuthRecordStatisticExcleVOS.size() > 0) { |
| | | comElderAuthRecordStatisticExcleVOS.forEach(comElderAuthRecordStatisticExcleVO -> { |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private ComElderAuthRecordsDO updateElderAuthRecordsDO(ComElderAuthRecordImportExcelVO vo, ComElderAuthRecordsDO comElderAuthRecordsDO, Long userId) { |
| | | private ComElderAuthRecordsDO updateElderAuthRecordsDO(ComElderAuthRecordImportExcelVO vo |
| | | , ComElderAuthRecordsDO comElderAuthRecordsDO, Long userId, Long communityId,Date date) { |
| | | BeanUtils.copyProperties(vo, comElderAuthRecordsDO); |
| | | comElderAuthRecordsDO.setSubmitUserId(userId); |
| | | comElderAuthRecordsDO.setApproverId(userId); |
| | | comElderAuthRecordsDO.setApprovalStatus(3); |
| | | comElderAuthRecordsDO.setApprovalDate(new Date()); |
| | | comElderAuthRecordsDO.setAuthStatus(1); |
| | | comElderAuthRecordsDO.setCommunityId(communityId); |
| | | comElderAuthRecordsDO.setApprovalStatus(ComElderAuthRecordsDO.approvalStatus.tg); |
| | | comElderAuthRecordsDO.setApprovalDate(date); |
| | | comElderAuthRecordsDO.setAuthStatus(ComElderAuthRecordsDO.authStatus.yrz); |
| | | comElderAuthRecordsDO.setAuthMethod(ComElderAuthRecordsDO.authMethod.xxrz); |
| | | comElderAuthRecordsDO.setMark(vo.getMark()); |
| | | return comElderAuthRecordsDO; |
| | | } |
| | | |
| | | private ComElderAuthRecordsDO saveElderAuthRecordsDO(ComElderAuthRecordImportExcelVO vo, ComElderAuthElderliesDO comElderAuthElderliesDO, String authPeriod, Long userId) { |
| | | private ComElderAuthRecordsDO saveElderAuthRecordsDO(ComElderAuthRecordImportExcelVO vo |
| | | , ComElderAuthElderliesDO comElderAuthElderliesDO, String authPeriod, Long userId, Long communityId,Date date) { |
| | | ComElderAuthRecordsDO comElderAuthRecordsDO = new ComElderAuthRecordsDO(); |
| | | BeanUtils.copyProperties(vo, comElderAuthRecordsDO); |
| | | comElderAuthRecordsDO.setId(Snowflake.getId()); |
| | |
| | | comElderAuthRecordsDO.setAuthPeriod(authPeriod); |
| | | comElderAuthRecordsDO.setSubmitUserId(userId); |
| | | comElderAuthRecordsDO.setApproverId(userId); |
| | | comElderAuthRecordsDO.setApprovalStatus(3); |
| | | comElderAuthRecordsDO.setApprovalDate(new Date()); |
| | | comElderAuthRecordsDO.setAuthStatus(1); |
| | | comElderAuthRecordsDO.setApprovalStatus(ComElderAuthRecordsDO.approvalStatus.tg); |
| | | comElderAuthRecordsDO.setApprovalDate(date); |
| | | comElderAuthRecordsDO.setAuthStatus(ComElderAuthRecordsDO.authStatus.yrz); |
| | | comElderAuthRecordsDO.setCommunityId(communityId); |
| | | comElderAuthRecordsDO.setAuthMethod(ComElderAuthRecordsDO.authMethod.xxrz); |
| | | comElderAuthRecordsDO.setMark(vo.getMark()); |
| | | comElderAuthRecordsDO.setCreateAt(date); |
| | | return comElderAuthRecordsDO; |
| | | } |
| | | |
| | | private void setMistake(ComElderAuthRecordImportMistakeExcelVO mvo, |
| | | ComElderAuthRecordImportExcelVO vo) { |
| | | mvo.setIsAlive(PopulHouseUseEnum.getCnDescByName(vo.getIsAlive())); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判重方法 |
| | |
| | | return ObjectUtils.isEmpty(hashMap.get(key)); |
| | | } |
| | | |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param addIdentityAuthDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | public R addElderAuth(AddIdentityAuthDTO addIdentityAuthDTO) { |
| | | String idCard; |
| | | try { |
| | | idCard = AESUtil.encrypt128(addIdentityAuthDTO.getIdCard(), aesKey); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("加密失败【{}】", e.getMessage()); |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | ComElderAuthElderliesDO comElderAuthElderliesDO = comElderAuthElderliesDAO.selectOne(new QueryWrapper<ComElderAuthElderliesDO>() |
| | | .lambda().eq(ComElderAuthElderliesDO::getIdCard, idCard).eq(ComElderAuthElderliesDO::getCommunityId, addIdentityAuthDTO.getCommunityId())); |
| | | if (Objects.isNull(comElderAuthElderliesDO)) { |
| | | return R.fail("该人员未在社区报道无法认证"); |
| | | } |
| | | boolean isInfoCorrect = !comElderAuthElderliesDO.getName().equals(addIdentityAuthDTO.getName()) || |
| | | !(comElderAuthElderliesDO.getIsRegister().equals(1) && comElderAuthElderliesDO.getIsAlive().equals(1)); |
| | | if (isInfoCorrect) { |
| | | return R.fail("信息有误,请检查!"); |
| | | } |
| | | Date dateNow = new Date(); |
| | | String currentAuthPeriod = new SimpleDateFormat("yyyyMM").format(dateNow); |
| | | List<ComElderAuthRecordsDO> currentAuthPeriodRecords = comElderAuthRecordsDAO |
| | | .selectList(new QueryWrapper<ComElderAuthRecordsDO>().lambda() |
| | | .eq(ComElderAuthRecordsDO::getAuthPeriod, currentAuthPeriod) |
| | | .eq(ComElderAuthRecordsDO::getElderliesId, comElderAuthElderliesDO.getId())); |
| | | if (!currentAuthPeriodRecords.isEmpty()) { |
| | | boolean alreadyAuth = currentAuthPeriodRecords.stream() |
| | | .filter(record -> record.getAuthStatus().equals(CERTIFIED.getStatus())).findFirst().isPresent(); |
| | | if (alreadyAuth) { |
| | | return R.fail(String.format("该人员%s期已认证无需重复认证", currentAuthPeriod)); |
| | | } |
| | | boolean isPendingReview = currentAuthPeriodRecords.stream() |
| | | .filter(record -> record.getApprovalStatus().intValue() == PENDING_REVIEW.getStatus()).findFirst().isPresent(); |
| | | if (isPendingReview) { |
| | | return R.fail("该人员本期有尚未审核的认证,请稍后再试!"); |
| | | } |
| | | } |
| | | ComElderAuthRecordsDO comElderAuthRecordsDO = new ComElderAuthRecordsDO(); |
| | | BeanUtils.copyProperties(addIdentityAuthDTO, comElderAuthRecordsDO); |
| | | comElderAuthRecordsDO.setElderliesId(comElderAuthElderliesDO.getId()); |
| | | comElderAuthRecordsDO.setAuthDate(dateNow); |
| | | comElderAuthRecordsDO.setAuthPeriod(currentAuthPeriod); |
| | | if (addIdentityAuthDTO.getAuthMethod().intValue() == FACE_AUTH.getMethod()) { |
| | | comElderAuthRecordsDO.setApprovalStatus(PASS_THROUGH.getStatus()); |
| | | comElderAuthRecordsDO.setApprovalDate(dateNow); |
| | | comElderAuthRecordsDO.setAuthStatus(CERTIFIED.getStatus()); |
| | | } |
| | | if (this.baseMapper.insert(comElderAuthRecordsDO) < 0) { |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | if (addIdentityAuthDTO.getAuthMethod().intValue() == FACE_AUTH.getMethod()) { |
| | | sendAuthSubscribe(addIdentityAuthDTO.getSubmitUserId(), "高龄认证", "认证成功!"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询高龄认证记录 |
| | | * @param pageIdentityAuthRecordDTO 高龄认证记录vo |
| | | * @return 高龄认证记录列表 |
| | | */ |
| | | @Override |
| | | public R queryRecordWithPage(PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO) { |
| | | return R.ok(comElderAuthRecordsDAO.queryRecordWithPage(new Page(pageIdentityAuthRecordDTO.getPageNum(), |
| | | pageIdentityAuthRecordDTO.getPageSize()), pageIdentityAuthRecordDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 获取高龄认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | @Override |
| | | public R retrieveElderAuthDetail(Long identityAuthId) { |
| | | return R.ok(comElderAuthRecordsDAO.findById(identityAuthId)); |
| | | } |
| | | } |
| | |
| | | return R.ok(cascadeHouseVOList); |
| | | } |
| | | |
| | | @Override |
| | | public R getSecondHouseAddress(CascadeHouseDTO cascadeHouseDTO) { |
| | | return R.ok(this.comMngPopulationDAO.getSecondHouseAddress(cascadeHouseDTO.getCommunityId())); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询房屋列表 |
| | | * |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = savePopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveDrugPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveCorrectPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveMajorPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveCultPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveRehabilitationPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveKeyPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveSentencePopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveVeteransPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveDisabilityPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveLowSecurityPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | List<ComMngPopulationDO> saveList = new ArrayList<>(); |
| | | // 需要修改的人口集合 |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | // 需要新增的吸毒人员集合 |
| | | List<ComDrugPopulationDO> saveDrugList = new ArrayList<>(); |
| | | // 需要修改的吸毒人员集合 |
| | | List<ComDrugPopulationDO> updateDrugList = new ArrayList<>(); |
| | | // 需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | // 需要新增的人口与社区关系集合 |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveElderPopulationDO(vo, populationActVO, comMngVillageDO, userId,communityId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel()) |
| | | && comMngPopulationCommunityTagsDO.getLabel().contains(s)){ |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | if(userTag != null && userTag.size() > 0){ |
| | | comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel() + "," + Joiner.on(",").join(userTag)); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | |
| | | List<ComMngPopulationDO> saveList = new ArrayList<>(); |
| | | // 需要修改的人口集合 |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | // 需要新增的吸毒人员集合 |
| | | List<ComDrugPopulationDO> saveDrugList = new ArrayList<>(); |
| | | // 需要修改的吸毒人员集合 |
| | | List<ComDrugPopulationDO> updateDrugList = new ArrayList<>(); |
| | | // 需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | // 需要新增的人口与社区关系集合 |
| | |
| | | // 不存在实有人口,则新增 |
| | | populationDO = savePensionPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | populationMap.put(populationDO.getCardNo(),populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel()) |
| | | && comMngPopulationCommunityTagsDO.getLabel().contains(s)){ |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | if(userTag != null && userTag.size() > 0){ |
| | | comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel() + "," + Joiner.on(",").join(userTag)); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100); |
| | | } |
| | | } |
| | | if (!comElderAuthElderliesDO.getIsAlive().equals(1) || !comElderAuthElderliesDO.getIsRegister().equals(1)) { |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | // 获取当前月 |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | } |
| | | } |
| | | // if (!comElderAuthElderliesDO.getIsAlive().equals(1) || !comElderAuthElderliesDO.getIsRegister().equals(1)) { |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Date nowDate = new Date(); |
| | | // // 获取当前年 |
| | | // int year = DateUtils.getYear(nowDate); |
| | | // // 获取当前月 |
| | | // int month = DateUtils.getMonth(nowDate) + 1; |
| | | // ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | // .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | // comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | // comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | // } |
| | | // } |
| | | comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO); |
| | | } else { |
| | | comElderAuthElderliesDO = new ComElderAuthElderliesDO(); |
| | |
| | | comElderAuthElderliesDO.setPopulationId(populationDO.getId()); |
| | | comElderAuthElderliesDO.setCommunityId(communityId); |
| | | comElderAuthElderliesDO.setStreetId(populationDO.getStreetId()); |
| | | comElderAuthElderliesDO.setIdCard(cardNoAES); |
| | | comElderAuthElderliesDO.setIdCard(vo.getCardNo()); |
| | | comElderAuthElderliesDO.setAddress(vo.getNowAddress()); |
| | | if (StringUtils.isNotEmpty(vo.getBirthday())) { |
| | | int age = AgeUtils.getAgeFromBirthTimes(vo.getBirthday()); |
| | |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100); |
| | | } |
| | | } |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | // 获取当前月 |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | } |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Date nowDate = new Date(); |
| | | // // 获取当前年 |
| | | // int year = DateUtils.getYear(nowDate); |
| | | // // 获取当前月 |
| | | // int month = DateUtils.getMonth(nowDate) + 1; |
| | | // ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | // .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | // comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | // comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | // } |
| | | comElderAuthElderliesDAO.insert(comElderAuthElderliesDO); |
| | | } |
| | | return populationDO; |
| | |
| | | BeanUtils.copyProperties(vo, comPensionAuthPensionerDO); |
| | | comPensionAuthPensionerDO.setIdCard(cardNoAES); |
| | | comPensionAuthPensionerDO.setAddress(vo.getNowAddress()); |
| | | if (!comPensionAuthPensionerDO.getIsAlive().equals(1) || !comPensionAuthPensionerDO.getIsRegister().equals(1)) { |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = (DateUtils.getYear(nowDate)); |
| | | ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | if(null == comPensionAuthStatisticsDO){ |
| | | comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | .eq(ComPensionAuthStatisticsDO::getYear, year - 1)); |
| | | } |
| | | comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | } |
| | | } |
| | | // if (!comPensionAuthPensionerDO.getIsAlive().equals(1) || !comPensionAuthPensionerDO.getIsRegister().equals(1)) { |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Date nowDate = new Date(); |
| | | // // 获取当前年 |
| | | // int year = (DateUtils.getYear(nowDate)); |
| | | // ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | // .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | // .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | // if(null == comPensionAuthStatisticsDO){ |
| | | // comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | // .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | // .eq(ComPensionAuthStatisticsDO::getYear, year - 1)); |
| | | // } |
| | | // comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | // comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | // } |
| | | // } |
| | | comPensionAuthPensionerDAO.updateById(comPensionAuthPensionerDO); |
| | | } else { |
| | | comPensionAuthPensionerDO = new ComPensionAuthPensionerDO(); |
| | |
| | | comPensionAuthPensionerDO.setPopulationId(populationDO.getId()); |
| | | comPensionAuthPensionerDO.setCommunityId(populationDO.getActId()); |
| | | comPensionAuthPensionerDO.setStreetId(populationDO.getStreetId()); |
| | | comPensionAuthPensionerDO.setIdCard(cardNoAES); |
| | | comPensionAuthPensionerDO.setIdCard(vo.getCardNo()); |
| | | comPensionAuthPensionerDO.setAddress(vo.getNowAddress()); |
| | | comPensionAuthPensionerDAO.insert(comPensionAuthPensionerDO); |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = (DateUtils.getYear(nowDate)); |
| | | ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | } |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Date nowDate = new Date(); |
| | | // // 获取当前年 |
| | | // int year = (DateUtils.getYear(nowDate)); |
| | | // ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | // .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | // .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | // comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | // comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | // } |
| | | } |
| | | return populationDO; |
| | | } |
| | |
| | | comElderAuthElderliesDO.setId(Snowflake.getId()); |
| | | comElderAuthElderliesDO.setCommunityId(comActDO.getCommunityId()); |
| | | comElderAuthElderliesDO.setStreetId(comActDO.getStreetId()); |
| | | comElderAuthElderliesDO.setIdCard(cardNoAES); |
| | | comElderAuthElderliesDO.setIdCard(vo.getCardNo()); |
| | | comElderAuthElderliesDO.setAddress(vo.getNowAddress()); |
| | | if (StringUtils.isNotEmpty(vo.getBirthday())) { |
| | | int age = AgeUtils.getAgeFromBirthTimes(vo.getBirthday()); |
| | |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100); |
| | | } |
| | | } |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | // 获取当前年 |
| | | int year = calendar.get(Calendar.YEAR); |
| | | // 获取当前月 |
| | | int month = calendar.get(Calendar.MONTH) + 1; |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | } |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Calendar calendar = Calendar.getInstance(); |
| | | // // 获取当前年 |
| | | // int year = calendar.get(Calendar.YEAR); |
| | | // // 获取当前月 |
| | | // int month = calendar.get(Calendar.MONTH) + 1; |
| | | // ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | // .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | // comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | // comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | // } |
| | | comElderAuthElderliesDAO.insert(comElderAuthElderliesDO); |
| | | return populationDO; |
| | | } |
| | |
| | | comPensionAuthPensionerDO.setId(Snowflake.getId()); |
| | | comPensionAuthPensionerDO.setCommunityId(comActDO.getCommunityId()); |
| | | comPensionAuthPensionerDO.setStreetId(comActDO.getStreetId()); |
| | | comPensionAuthPensionerDO.setIdCard(cardNoAES); |
| | | comPensionAuthPensionerDO.setIdCard(vo.getCardNo()); |
| | | comPensionAuthPensionerDO.setAddress(vo.getNowAddress()); |
| | | comPensionAuthPensionerDAO.insert(comPensionAuthPensionerDO); |
| | | return populationDO; |
| | |
| | | // comMngPopulationHouseUserDO.setCreateAt(new Date()); |
| | | // comMngPopulationHouseUserDAO.insert(comMngPopulationHouseUserDO); |
| | | // } |
| | | //修改吸毒人员信息 |
| | | if (null != vo.getComDrugPopulationVO()) { |
| | | ComDrugPopulationVO comDrugPopulationVO = vo.getComDrugPopulationVO(); |
| | | ComDrugPopulationDO comDrugPopulationDO = comDrugPopulationDAO.selectById(comDrugPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comDrugPopulationVO, comDrugPopulationDO); |
| | | comDrugPopulationDAO.updateById(comDrugPopulationDO); |
| | | } |
| | | //修改社区矫正人员信息 |
| | | if (null != vo.getComCorrectPopulationVO()) { |
| | | ComCorrectPopulationVO comCorrectPopulationVO = vo.getComCorrectPopulationVO(); |
| | | ComCorrectPopulationDO comCorrectPopulationDO = comCorrectPopulationDAO.selectById(comCorrectPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comCorrectPopulationVO, comCorrectPopulationDO); |
| | | comCorrectPopulationDAO.updateById(comCorrectPopulationDO); |
| | | } |
| | | //修改精神障碍信息 |
| | | if (null != vo.getComMajorPopulationVO()) { |
| | | ComMajorPopulationVO comMajorPopulationVO = vo.getComMajorPopulationVO(); |
| | | ComMajorPopulationDO comCorrectPopulationDO = comMajorPopulationDAO.selectById(comMajorPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comMajorPopulationVO, comCorrectPopulationDO); |
| | | comMajorPopulationDAO.updateById(comCorrectPopulationDO); |
| | | } |
| | | //修改邪教信息 |
| | | if (null != vo.getComCultPopulationVO()) { |
| | | ComCultPopulationVO comCultPopulationVO = vo.getComCultPopulationVO(); |
| | | ComCultPopulationDO comCultPopulationDO = comCultPopulationDAO.selectById(comCultPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comCultPopulationVO, comCultPopulationDO); |
| | | comCultPopulationDAO.updateById(comCultPopulationDO); |
| | | } |
| | | //修改刑释信息 |
| | | if (null != vo.getComRehabilitationPopulationVO()) { |
| | | ComRehabilitationPopulationVO comRehabilitationPopulationVO = vo.getComRehabilitationPopulationVO(); |
| | | ComRehabilitationPopulationDO comRehabilitationPopulationDO = comRehabilitationPopulationDAO.selectById(comRehabilitationPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comRehabilitationPopulationVO, comRehabilitationPopulationDO); |
| | | comRehabilitationPopulationDAO.updateById(comRehabilitationPopulationDO); |
| | | } |
| | | //修改上访信息 |
| | | if (null != vo.getComKeyPopulationVO()) { |
| | | ComKeyPopulationVO comKeyPopulationVO = vo.getComKeyPopulationVO(); |
| | | ComKeyPopulationDO comKeyPopulationDO = comKeyPopulationDAO.selectById(comKeyPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comKeyPopulationVO, comKeyPopulationDO); |
| | | comKeyPopulationDAO.updateById(comKeyPopulationDO); |
| | | } |
| | | //修改退役军人信息 |
| | | if (null != vo.getComVeteransPopulationVO()) { |
| | | ComVeteransPopulationVO comVeteransPopulationVO = vo.getComVeteransPopulationVO(); |
| | | ComVeteransPopulationDO comVeteransPopulationDO = comVeteransPopulationDAO.selectById(comVeteransPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comVeteransPopulationVO, comVeteransPopulationDO); |
| | | comVeteransPopulationDAO.updateById(comVeteransPopulationDO); |
| | | } |
| | | //修改残疾人信息 |
| | | if (null != vo.getComDisabilityPopulationVO()) { |
| | | ComDisabilityPopulationVO comDisabilityPopulationVO = vo.getComDisabilityPopulationVO(); |
| | | ComDisabilityPopulationDO comDisabilityPopulationDO = comDisabilityPopulationDAO.selectById(comDisabilityPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comDisabilityPopulationVO, comDisabilityPopulationDO); |
| | | comDisabilityPopulationDAO.updateById(comDisabilityPopulationDO); |
| | | } |
| | | //修改低保户信息 |
| | | if (null != vo.getComLowSecurityPopulationVO()) { |
| | | ComLowSecurityPopulationVO comLowSecurityPopulationVO = vo.getComLowSecurityPopulationVO(); |
| | | ComLowSecurityPopulationDO comLowSecurityPopulationDO = comLowSecurityPopulationDAO.selectById(comLowSecurityPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comLowSecurityPopulationVO, comLowSecurityPopulationDO); |
| | | comLowSecurityPopulationDAO.updateById(comLowSecurityPopulationDO); |
| | | } |
| | | //修改高龄老人信息 |
| | | if (null != vo.getComElderAuthElderliesVO()) { |
| | | ComElderAuthElderliesVO comElderAuthElderliesVO = vo.getComElderAuthElderliesVO(); |
| | | ComElderAuthElderliesDO comElderAuthElderliesDO = comElderAuthElderliesDAO.selectById(comElderAuthElderliesVO.getId()); |
| | | BeanUtils.copyProperties(comElderAuthElderliesVO, comElderAuthElderliesDO); |
| | | comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO); |
| | | } |
| | | //修改养老人员信息 |
| | | if (null != vo.getComPensionAuthPensionerVO()) { |
| | | ComPensionAuthPensionerVO comPensionAuthPensionerVO = vo.getComPensionAuthPensionerVO(); |
| | | ComPensionAuthPensionerDO comPensionAuthPensionerDO = comPensionAuthPensionerDAO.selectById(comPensionAuthPensionerVO.getId()); |
| | | BeanUtils.copyProperties(comPensionAuthPensionerVO, comPensionAuthPensionerDO); |
| | | comPensionAuthPensionerDAO.updateById(comPensionAuthPensionerDO); |
| | | } |
| | | if (populationDAO.updateById(populationDO) > 0) { |
| | | return R.ok(); |
| | | } else { |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthHistoryRecordMapper; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthHistoryRecordDO; |
| | | import com.panzhihua.service_community.service.ComPensionAuthHistoryRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021-09-18 15:07:12 |
| | | * @deprecated 养老认证历史记录表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComPensionAuthHistoryRecordServiceImpl extends ServiceImpl<ComPensionAuthHistoryRecordMapper, ComPensionAuthHistoryRecordDO> implements ComPensionAuthHistoryRecordService { |
| | | |
| | | /** |
| | | * 养老认证统计-分页查询 |
| | | * @param pensionAuthStatisticDTO 请求参数 |
| | | * @return 养老认证统列表 |
| | | */ |
| | | @Override |
| | | public R pagePensionAuthStatisticAdmin(PagePensionAuthStatisticDTO pensionAuthStatisticDTO){ |
| | | return R.ok(this.baseMapper.pageAuthStatisticAdmin(new Page(pensionAuthStatisticDTO.getPageNum(),pensionAuthStatisticDTO.getPageSize()),pensionAuthStatisticDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证记标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @Override |
| | | public R signPensionAuthStatisticAdmin(SignElderAuthStatisticDTO signElderAuthStatisticDTO){ |
| | | |
| | | ComPensionAuthHistoryRecordDO authHistoryRecordDO = this.baseMapper.selectById(signElderAuthStatisticDTO.getId()); |
| | | if(authHistoryRecordDO == null){ |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | authHistoryRecordDO.setMark(signElderAuthStatisticDTO.getMark()); |
| | | if(this.baseMapper.updateById(authHistoryRecordDO) > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证表头统计 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计结果 |
| | | */ |
| | | @Override |
| | | public R getPensionAuthHeaderStatisticAdmin(ElderAuthStatisticHeaderDTO statisticHeaderDTO){ |
| | | return R.ok(this.baseMapper.getAuthHeaderStatisticAdmin(statisticHeaderDTO)); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static com.panzhihua.common.enums.IdentityApprovalStatusEnum.PASS_THROUGH; |
| | | import static com.panzhihua.common.enums.IdentityApprovalStatusEnum.PENDING_REVIEW; |
| | | import static com.panzhihua.common.enums.IdentityAuthMethodEnum.FACE_AUTH; |
| | | import static com.panzhihua.common.enums.IdentityAuthStatusEnum.CERTIFIED; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.enums.PopulHouseUseEnum; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordImportMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordStatisticExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.SysConfVO; |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComPensionAuthPensionerService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationDAO; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthPensionerDAO; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthRecordDAO; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthStatisticsDAO; |
| | | import com.panzhihua.service_community.dao.SysConfMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthPensionerDO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthRecordDO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthStatisticsDO; |
| | | import com.panzhihua.service_community.model.dos.SysConfDO; |
| | | import com.panzhihua.service_community.service.ComPensionAuthRecordService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordServiceImpl |
| | |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComPensionAuthStatisticsDAO comPensionAuthStatisticsDAO; |
| | | @Resource |
| | | private SysConfMapper sysConfDao; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | |
| | | return R.fail("未查询到养老认证记录"); |
| | | } |
| | | BeanUtils.copyProperties(comPensionAuthRecordVO, comPensionAuthRecordDO); |
| | | if (comPensionAuthRecordVO.getApprovalStatus().equals(3)) { |
| | | comPensionAuthRecordDO.setAuthStatus(1); |
| | | if (comPensionAuthRecordVO.getApprovalStatus().equals(PASS_THROUGH.getStatus())) { |
| | | comPensionAuthRecordDO.setAuthStatus(CERTIFIED.getStatus()); |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", "认证成功!"); |
| | | } else { |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", comPensionAuthRecordVO.getRejectReason()); |
| | | } |
| | | comPensionAuthRecordDO.setApprovalDate(new Date()); |
| | | int nub = comPensionAuthRecordDAO.updateById(comPensionAuthRecordDO); |
| | |
| | | return R.fail("审核失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void sendAuthSubscribe(Long userId, String name, String result) { |
| | | //发送订阅通知 |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(userId); |
| | | if (map != null) { |
| | | String openid = map.get("openid"); |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | String accessToken = util.getAppAccessToken(); |
| | | WxUtil.sendSubscribeRZSH(openid, accessToken, name, |
| | | DateUtils.format(new Date(), DateUtils.ymdhms_format), |
| | | result); |
| | | } catch (Exception e) { |
| | | log.error("推送审核状态订阅消息失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | // 需要修改的认证记录集合 |
| | | List<ComPensionAuthRecordDO> updateList = new ArrayList<>(); |
| | | log.info("开始处理导入数据"); |
| | | Date nowDate = new Date(); |
| | | List<ComPensionAuthRecordImportMistakeExcelVO> mistakes = new ArrayList<>(); |
| | | try { |
| | | // 查询所有人口数据放入HashMap中 |
| | |
| | | }); |
| | | |
| | | for (ComPensionAuthRecordImportExcelVO vo : list) { |
| | | String cardNoAES = AESUtil.encrypt128(vo.getIdCard(), aesKey); |
| | | // 判断实有人口是否已存在 |
| | | log.info("开始查询实有人口是否已存在"); |
| | | ComMngPopulationDO populationDO = null; |
| | |
| | | if (null == comPensionAuthPensionerDO) { |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在,但本社区不存在养老信息,请先导入养老人口"); |
| | | mistake.setAuthDate(DateUtils.format(vo.getAuthDate(),DateUtils.yyyyMMdd_format)); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | //存在养老信息,判断是否满足认证条件 |
| | | if (!comPensionAuthPensionerDO.getIsRegister().equals(1) || !comPensionAuthPensionerDO.getIsAlive().equals(1)) { |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该人口不健在,或者未做养老登记"); |
| | | mistake.setAuthDate(DateUtils.format(vo.getAuthDate(),DateUtils.yyyyMMdd_format)); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | //满足认证条件,判断是否存在当期认证记录 |
| | | List<ComPensionAuthRecordDO> pensionAuthList = null; |
| | | ComPensionAuthRecordDO comPensionAuthRecordDO = null; |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | String authPeriod = ""; |
| | | if (nowDate.before(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(String.valueOf(year) + "-03-01 00:00:00"))) { |
| | | authPeriod = String.valueOf(year - 1); |
| | | }else { |
| | | authPeriod = String.valueOf(year); |
| | | } |
| | | String authPeriod = vo.getAuthPeriod(); |
| | | pensionAuthList = comPensionAuthRecordDAO.selectList(new QueryWrapper<ComPensionAuthRecordDO>().lambda(). |
| | | eq(ComPensionAuthRecordDO::getPensionerId, comPensionAuthPensionerDO.getId()) |
| | | .eq(ComPensionAuthRecordDO::getAuthPeriod, authPeriod).orderByDesc(ComPensionAuthRecordDO::getCreateAt)); |
| | | |
| | | comPensionAuthRecordDO = comPensionAuthRecordDAO.selectOne(new QueryWrapper<ComPensionAuthRecordDO>().lambda(). |
| | | eq(ComPensionAuthRecordDO::getPensionerId, comPensionAuthPensionerDO.getId()).eq(ComPensionAuthRecordDO::getAuthPeriod, authPeriod)); |
| | | if (null != comPensionAuthRecordDO) { |
| | | if (null != pensionAuthList && pensionAuthList.size() > 0) { |
| | | comPensionAuthRecordDO = pensionAuthList.get(0); |
| | | //存在记录且状态为已认证,不能修改 |
| | | if (comPensionAuthRecordDO.getAuthStatus().equals(1)) { |
| | | if (comPensionAuthRecordDO.getApprovalStatus().equals(ComPensionAuthRecordDO.approvalStatus.tg)) { |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该人口本期已认证,不能修改"); |
| | | mistake.setMistake("该人口本期已认证,不可重复认证"); |
| | | mistake.setAuthDate(DateUtils.format(vo.getAuthDate(),DateUtils.yyyyMMdd_format)); |
| | | mistakes.add(mistake); |
| | | }else if (comPensionAuthRecordDO.getApprovalStatus().equals(ComPensionAuthRecordDO.approvalStatus.dsh)) { |
| | | //存在待审核记录,进行更新认证信息 |
| | | comPensionAuthRecordDO = updatePensionAuthRecordsDO(vo, comPensionAuthRecordDO, userId,communityId,nowDate); |
| | | updateList.add(comPensionAuthRecordDO); |
| | | }else { |
| | | //存在记录,执行修改 |
| | | ComPensionAuthRecordDO comPensionAuthRecordDO1 = |
| | | updatePensionAuthRecordsDO(vo, comPensionAuthRecordDO, userId); |
| | | updateList.add(comPensionAuthRecordDO1); |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该认证已存在,执行更新"); |
| | | mistakes.add(mistake); |
| | | // 不存在记录,则新增 |
| | | comPensionAuthRecordDO = savePensionAuthRecordsDO(vo, comPensionAuthPensionerDO, authPeriod, userId,communityId,nowDate); |
| | | saveList.add(comPensionAuthRecordDO); |
| | | } |
| | | }else { |
| | | // 不存在记录,则新增 |
| | | comPensionAuthRecordDO = savePensionAuthRecordsDO(vo, comPensionAuthPensionerDO, authPeriod, userId); |
| | | comPensionAuthRecordDO = savePensionAuthRecordsDO(vo, comPensionAuthPensionerDO, authPeriod, userId,communityId,nowDate); |
| | | saveList.add(comPensionAuthRecordDO); |
| | | } |
| | | } |
| | |
| | | // 不存在实有人口,则新增 |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("不存在该实有人口,请先导入实有人口信息"); |
| | | mistake.setAuthDate(DateUtils.format(vo.getAuthDate(),DateUtils.yyyyMMdd_format)); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R setPensionAuthType(Long communityId, Integer type) { |
| | | List<SysConfDO> authConf = |
| | | sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>().eq(SysConfDO::getCommunityId, communityId) |
| | | .eq(SysConfDO::getCode, "PENSION_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | if (authConf != null && authConf.size() > 0) { |
| | | SysConfDO first = authConf.get(0); |
| | | first.setValue(type + ""); |
| | | int updated = sysConfDao.updateById(first); |
| | | if (updated == 1) { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R communityPensionAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | Long communityId = eldersAuthTypeQueryDTO.getCommunityId(); |
| | | List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"PENSION_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | if (confDOList == null || confDOList.size() == 0) { |
| | | SysConfDO sysConfDO = new SysConfDO(); |
| | | sysConfDO.setCode("PENSION_AUTH_TYPE_" + communityId); |
| | | sysConfDO.setName("养老认证类型"); |
| | | sysConfDO.setValue(2 + "");// 核验类型(1.视频认证 2.人脸核验) |
| | | sysConfDO.setDescription("养老认证默认添加的核验类型"); |
| | | sysConfDO.setCommunityId(communityId); |
| | | sysConfDO.setCreateBy(eldersAuthTypeQueryDTO.getUserId()); |
| | | int inserted = sysConfDao.insert(sysConfDO); |
| | | if (inserted != 1) { |
| | | throw new ServiceException("添加养老认证默认添加的核验类型失败"); |
| | | } |
| | | confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId) |
| | | .orderByDesc(SysConfDO::getCreateAt)); |
| | | } |
| | | if (confDOList != null && confDOList.size() > 0) { |
| | | SysConfDO latest = confDOList.get(0); |
| | | SysConfVO sysConfVO = new SysConfVO(); |
| | | BeanUtils.copyProperties(latest, sysConfVO); |
| | | return R.ok(sysConfVO.getValue()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R timedTaskPensionAuthStatisticsJobHandler() { |
| | | Date nowDate = new Date(); |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private ComPensionAuthRecordDO updatePensionAuthRecordsDO(ComPensionAuthRecordImportExcelVO vo, ComPensionAuthRecordDO comPensionAuthRecordsDO, Long userId) { |
| | | private ComPensionAuthRecordDO updatePensionAuthRecordsDO(ComPensionAuthRecordImportExcelVO vo |
| | | , ComPensionAuthRecordDO comPensionAuthRecordsDO, Long userId , Long communityId,Date date) { |
| | | BeanUtils.copyProperties(vo, comPensionAuthRecordsDO); |
| | | comPensionAuthRecordsDO.setSubmitUserId(userId); |
| | | comPensionAuthRecordsDO.setApproverId(userId); |
| | | comPensionAuthRecordsDO.setApprovalStatus(3); |
| | | comPensionAuthRecordsDO.setApprovalDate(new Date()); |
| | | comPensionAuthRecordsDO.setAuthStatus(1); |
| | | comPensionAuthRecordsDO.setApprovalStatus(ComPensionAuthRecordDO.approvalStatus.tg); |
| | | comPensionAuthRecordsDO.setAuthMethod(ComPensionAuthRecordDO.authMethod.xxrz); |
| | | comPensionAuthRecordsDO.setApprovalDate(date); |
| | | comPensionAuthRecordsDO.setAuthStatus(ComPensionAuthRecordDO.authStatus.rez); |
| | | comPensionAuthRecordsDO.setCommunityId(communityId); |
| | | comPensionAuthRecordsDO.setMark(vo.getMark()); |
| | | return comPensionAuthRecordsDO; |
| | | } |
| | | |
| | | private ComPensionAuthRecordDO savePensionAuthRecordsDO(ComPensionAuthRecordImportExcelVO vo, ComPensionAuthPensionerDO comPensionAuthPensionerDO, String authPeriod, Long userId) { |
| | | private ComPensionAuthRecordDO savePensionAuthRecordsDO(ComPensionAuthRecordImportExcelVO vo |
| | | , ComPensionAuthPensionerDO comPensionAuthPensionerDO, String authPeriod, Long userId, Long communityId,Date date) { |
| | | ComPensionAuthRecordDO comPensionAuthRecordDO = new ComPensionAuthRecordDO(); |
| | | BeanUtils.copyProperties(vo, comPensionAuthRecordDO); |
| | | comPensionAuthRecordDO.setId(Snowflake.getId()); |
| | |
| | | comPensionAuthRecordDO.setAuthPeriod(authPeriod); |
| | | comPensionAuthRecordDO.setSubmitUserId(userId); |
| | | comPensionAuthRecordDO.setApproverId(userId); |
| | | comPensionAuthRecordDO.setApprovalStatus(3); |
| | | comPensionAuthRecordDO.setApprovalStatus(PASS_THROUGH.getStatus()); |
| | | comPensionAuthRecordDO.setApprovalDate(new Date()); |
| | | comPensionAuthRecordDO.setAuthStatus(1); |
| | | comPensionAuthRecordDO.setAuthStatus(CERTIFIED.getStatus()); |
| | | comPensionAuthRecordDO.setAuthMethod(ComPensionAuthRecordDO.authMethod.xxrz); |
| | | comPensionAuthRecordDO.setCommunityId(communityId); |
| | | comPensionAuthRecordDO.setCreateAt(date); |
| | | comPensionAuthRecordDO.setMark(vo.getMark()); |
| | | return comPensionAuthRecordDO; |
| | | } |
| | | |
| | | private void setMistake(ComPensionAuthRecordImportMistakeExcelVO mvo, |
| | | ComPensionAuthRecordImportExcelVO vo) { |
| | | mvo.setIsAlive(PopulHouseUseEnum.getCnDescByName(vo.getIsAlive())); |
| | | } |
| | | |
| | | /** |
| | |
| | | private boolean isOnly(String key, HashMap<String, Object> hashMap) { |
| | | return ObjectUtils.isEmpty(hashMap.get(key)); |
| | | } |
| | | |
| | | /** |
| | | * 新增养老认证 |
| | | * @param addIdentityAuthDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | public R addPensionAuth(AddIdentityAuthDTO addIdentityAuthDTO) { |
| | | String idCard; |
| | | try { |
| | | idCard = AESUtil.encrypt128(addIdentityAuthDTO.getIdCard(), aesKey); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("加密失败【{}】", e.getMessage()); |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | ComPensionAuthPensionerDO comPensionAuthPensionerDO = comPensionAuthPensionerDAO.selectOne(new QueryWrapper<ComPensionAuthPensionerDO>() |
| | | .lambda().eq(ComPensionAuthPensionerDO::getIdCard, idCard).eq(ComPensionAuthPensionerDO::getCommunityId, addIdentityAuthDTO.getCommunityId())); |
| | | if (Objects.isNull(comPensionAuthPensionerDO)) { |
| | | return R.fail("该人员未在社区报道无法认证"); |
| | | } |
| | | boolean isInfoCorrect = !comPensionAuthPensionerDO.getName().equals(addIdentityAuthDTO.getName()) || |
| | | !(comPensionAuthPensionerDO.getIsRegister().equals(ComPensionAuthPensionerDO.isOk.yes) |
| | | && comPensionAuthPensionerDO.getIsAlive().equals(ComPensionAuthPensionerDO.isOk.yes)); |
| | | if (isInfoCorrect) { |
| | | return R.fail("信息有误,请检查!"); |
| | | } |
| | | Date dateNow = new Date(); |
| | | String currentAuthPeriod = new SimpleDateFormat("yyyy").format(dateNow); |
| | | List<ComPensionAuthRecordDO> currentAuthPeriodRecords = comPensionAuthRecordDAO |
| | | .selectList(new QueryWrapper<ComPensionAuthRecordDO>().lambda() |
| | | .eq(ComPensionAuthRecordDO::getAuthPeriod, currentAuthPeriod) |
| | | .eq(ComPensionAuthRecordDO::getPensionerId, comPensionAuthPensionerDO.getId())); |
| | | if (!currentAuthPeriodRecords.isEmpty()) { |
| | | boolean alreadyAuth = currentAuthPeriodRecords.stream() |
| | | .filter(record -> record.getAuthStatus().equals(CERTIFIED.getStatus())).findFirst().isPresent(); |
| | | if (alreadyAuth) { |
| | | return R.fail(String.format("该人员%s期已认证无需重复认证", currentAuthPeriod)); |
| | | } |
| | | boolean isPendingReview = currentAuthPeriodRecords.stream() |
| | | .filter(record -> record.getApprovalStatus().intValue() == PENDING_REVIEW.getStatus()).findFirst().isPresent(); |
| | | if (isPendingReview) { |
| | | return R.fail("该人员本期有尚未审核的认证,请稍后再试!"); |
| | | } |
| | | } |
| | | ComPensionAuthRecordDO comPensionAuthRecordDO = new ComPensionAuthRecordDO(); |
| | | BeanUtils.copyProperties(addIdentityAuthDTO, comPensionAuthRecordDO); |
| | | comPensionAuthRecordDO.setPensionerId(comPensionAuthPensionerDO.getId()); |
| | | comPensionAuthRecordDO.setAuthDate(dateNow); |
| | | comPensionAuthRecordDO.setAuthPeriod(currentAuthPeriod); |
| | | if (addIdentityAuthDTO.getAuthMethod().intValue() == FACE_AUTH.getMethod()) { |
| | | comPensionAuthRecordDO.setApprovalStatus(PASS_THROUGH.getStatus()); |
| | | comPensionAuthRecordDO.setApprovalDate(dateNow); |
| | | comPensionAuthRecordDO.setAuthStatus(CERTIFIED.getStatus()); |
| | | } |
| | | if (this.baseMapper.insert(comPensionAuthRecordDO) < 0) { |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | if (addIdentityAuthDTO.getAuthMethod().intValue() == FACE_AUTH.getMethod()) { |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", "认证成功!"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询养老认证记录 |
| | | * @param pageIdentityAuthRecordDTO 查询参数 |
| | | * @return 养老认证记录列表 |
| | | */ |
| | | @Override |
| | | public R queryRecordWithPage(PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO) { |
| | | return R.ok(comPensionAuthRecordDAO.queryRecordWithPage(new Page(pageIdentityAuthRecordDTO.getPageNum(), |
| | | pageIdentityAuthRecordDTO.getPageSize()), pageIdentityAuthRecordDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 获取养老认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | @Override |
| | | public R retrievePensionAuthDetail(Long identityAuthId) { |
| | | return R.ok(comPensionAuthRecordDAO.findById(identityAuthId)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.entity.ComActSocialOrg; |
| | | import com.panzhihua.service_community.entity.ComProperty; |
| | | import com.panzhihua.service_community.dao.ComPropertyDao; |
| | | import com.panzhihua.service_community.service.ComPropertyService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * (ComProperty)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 10:46:51 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComPropertyServiceImpl extends ServiceImpl<ComPropertyDao, ComProperty> implements ComPropertyService { |
| | | @Resource |
| | | private ComPropertyDao comPropertyDao; |
| | | @Resource |
| | | private UserService userService; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return R.ok(comPropertyDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | |
| | | @Override |
| | | public R selectById(Long id) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R insert(ComPropertyVO comPropertyVO) { |
| | | if(comPropertyVO!=null){ |
| | | ComProperty comProperty=new ComProperty(); |
| | | BeanUtils.copyProperties(comPropertyVO,comProperty); |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setType(3); |
| | | administratorsUserVO.setAccount(comPropertyVO.getAccount()); |
| | | administratorsUserVO.setPassword(comPropertyVO.getPassword()); |
| | | administratorsUserVO.setRoleId(comPropertyVO.getRoleId()); |
| | | administratorsUserVO.setCommunityId(comPropertyVO.getCommunityId()); |
| | | administratorsUserVO.setAreaId(comPropertyVO.getAreaId()); |
| | | administratorsUserVO.setName(comPropertyVO.getContactName()); |
| | | administratorsUserVO.setPhone(comPropertyVO.getPhone()); |
| | | R r=userService.addUserBackstageProperty(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | comProperty.setUserId(Long.parseLong(r.getData().toString())); |
| | | comProperty.setCreateTime(DateUtil.date()); |
| | | this.comPropertyDao.insert(comProperty); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R update(ComPropertyVO comPropertyVO) { |
| | | if(comPropertyVO!=null){ |
| | | ComProperty comProperty=new ComProperty(); |
| | | BeanUtils.copyProperties(comPropertyVO,comProperty); |
| | | this.comPropertyDao.updateById(comProperty); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R delete(Long id) { |
| | | ComProperty comProperty=comPropertyDao.selectById(id); |
| | | if(comProperty!=null){ |
| | | if(comProperty.getUserId()!=null){ |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comProperty.getUserId()); |
| | | administratorsUserVO.setCommunityId(comProperty.getCommunityId()); |
| | | userService.deleteUserBackstage(administratorsUserVO); |
| | | this.comPropertyDao.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail("用户账号错误"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isNotBlank; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ResetPasswordConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberPassResetDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientConsultationStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductSpecificationVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientConsultationStatisticsDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientMerchantDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientProductDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientServiceCategoryDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientViewStatisticsDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientConsultationStatisticsDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientMerchantDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientServiceCategoryDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientViewStatisticsDO; |
| | | import com.panzhihua.service_community.service.ConvenientMerchantService; |
| | | |
| | | /** |
| | | * @title: ConvenientMerchantServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/09/16 16:14 |
| | | */ |
| | | @Service |
| | | public class ConvenientMerchantServiceImpl extends ServiceImpl<ConvenientMerchantDAO, ConvenientMerchantDO> implements ConvenientMerchantService { |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private ConvenientServiceCategoryDAO convenientServiceCategoryDAO; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ConvenientProductDAO convenientProductDAO; |
| | | @Resource |
| | | private ConvenientConsultationStatisticsDAO convenientConsultationStatisticsDAO; |
| | | @Resource |
| | | private ConvenientViewStatisticsDAO convenientViewStatisticsDAO; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addMerchant(ConvenientMerchantDTO convenientMerchantDTO) { |
| | | ComActDO comActDO = comActDAO.selectById(convenientMerchantDTO.getCommunityId()); |
| | | ConvenientMerchantDO convenientMerchantDO = new ConvenientMerchantDO(); |
| | | BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO); |
| | | convenientMerchantDO.setUserId(0L); |
| | | convenientMerchantDO.setCommunityName(comActDO.getName()); |
| | | convenientMerchantDO.setCreatedAt(new Date()); |
| | | int insertResult = this.baseMapper.insert(convenientMerchantDO); |
| | | if (insertResult > 0) { |
| | | Long merchantId = convenientMerchantDO.getId(); |
| | | if (nonNull(merchantId)) { |
| | | //添加服务 |
| | | List<Long> serviceIds = convenientMerchantDTO.getServiceIds(); |
| | | serviceIds.forEach(serviceId -> { |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId); |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(merchantId, serviceId, |
| | | convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy()); |
| | | }); |
| | | } |
| | | } |
| | | //添加user |
| | | R addUserResult = userService.addConvenientMerchantUser(convenientMerchantDTO); |
| | | if (R.isOk(addUserResult)) { |
| | | Long merchantUserId = ((Integer) addUserResult.getData()).longValue(); |
| | | convenientMerchantDO.setUserId(merchantUserId); |
| | | this.baseMapper.updateById(convenientMerchantDO); |
| | | } else { |
| | | throw new ServiceException("406", addUserResult.getMsg()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R putMerchant(ConvenientMerchantDTO convenientMerchantDTO) { |
| | | Long merchantId = convenientMerchantDTO.getId(); |
| | | ConvenientMerchantDO convenientMerchantDO = this.baseMapper.selectById(merchantId); |
| | | if (isNull(convenientMerchantDO)) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | Long communityId = convenientMerchantDTO.getCommunityId(); |
| | | if (nonNull(communityId)) { |
| | | ComActDO comActDO = comActDAO.selectById(communityId); |
| | | convenientMerchantDO.setCommunityName(comActDO.getName()); |
| | | } |
| | | String account = convenientMerchantDTO.getAccount(); |
| | | if (isNotBlank(account)) { |
| | | //修改商家绑定账户号 |
| | | R putAccountResult = userService.putUserAccount(convenientMerchantDO.getUserId(), account); |
| | | if (!R.isOk(putAccountResult)) { |
| | | return putAccountResult; |
| | | } |
| | | } |
| | | List<Long> serviceIds = convenientMerchantDTO.getServiceIds(); |
| | | if (!serviceIds.isEmpty()) { |
| | | convenientServiceCategoryDAO.deleteMerchantServiceRelation(merchantId); |
| | | serviceIds.forEach(serviceId -> { |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId); |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(merchantId, serviceId, |
| | | convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy()); |
| | | }); |
| | | } |
| | | BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO); |
| | | this.baseMapper.updateById(convenientMerchantDO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteMerchant(Long merchantId, Long operator) { |
| | | int result = this.baseMapper.deleteMerchantById(merchantId, operator); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R pageMerchant(PageConvenientMerchantDTO pageConvenientMerchantDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageConvenientMerchantDTO.getPageSize()); |
| | | page.setCurrent(pageConvenientMerchantDTO.getPageNum()); |
| | | IPage<ConvenientMerchantVO> iPage = this.baseMapper.pageMerchant(page, pageConvenientMerchantDTO); |
| | | if (nonNull(pageConvenientMerchantDTO.getServiceId())) { |
| | | List<ConvenientMerchantVO> records = iPage.getRecords(); |
| | | if (!records.isEmpty()) { |
| | | records.forEach(record -> { |
| | | String serviceScope = convenientServiceCategoryDAO.selectServiceScopeByMerchantId(record.getId()); |
| | | record.setServiceScope(serviceScope); |
| | | }); |
| | | } |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R getMerchant(Long merchantId) { |
| | | ConvenientMerchantVO convenientMerchantVO = this.baseMapper.selectMerchantById(merchantId); |
| | | List<Long> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(merchantId); |
| | | convenientMerchantVO.setServiceIds(serviceIds); |
| | | return R.ok(convenientMerchantVO); |
| | | } |
| | | |
| | | @Override |
| | | public R disableOrEnableMerchant(DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO) { |
| | | R result = userService.disableOrEnableMerchantUsers(disableOrEnableConvenientMerchantDTO); |
| | | if (R.isOk(result)) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R resetPasswordMerchant(ResetPasswordConvenientMerchantDTO resetPasswordConvenientMerchantDTO) { |
| | | EventGridMemberPassResetDTO eventGridMemberPassResetDTO = new EventGridMemberPassResetDTO(); |
| | | eventGridMemberPassResetDTO.setPassword(resetPasswordConvenientMerchantDTO.getPassword()); |
| | | eventGridMemberPassResetDTO.setIds(resetPasswordConvenientMerchantDTO.getIds()); |
| | | return userService.gridMemberPassReset(eventGridMemberPassResetDTO); |
| | | } |
| | | |
| | | @Override |
| | | public R<ConvenientMerchantVO> getUserMerchantInfoByAccount(String account) { |
| | | try { |
| | | R<LoginUserInfoVO> loginUserInfoVOR = userService.getUserInfo(account + "_10"); |
| | | LoginUserInfoVO loginUserInfoVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(loginUserInfoVOR.getData()), LoginUserInfoVO.class); |
| | | |
| | | if (isNull(loginUserInfoVO)) { |
| | | return R.fail(500, "该账号不存在"); |
| | | } |
| | | ConvenientMerchantDO merchantDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ConvenientMerchantDO>() |
| | | .eq(ConvenientMerchantDO::getIsDel, false).eq(ConvenientMerchantDO::getUserId, loginUserInfoVO.getUserId())); |
| | | if (isNull(merchantDO)) { |
| | | return R.fail(500, "该账号不存在"); |
| | | } |
| | | ConvenientMerchantVO merchantVO = new ConvenientMerchantVO(); |
| | | BeanUtils.copyProperties(merchantDO, merchantVO); |
| | | merchantVO.setAccount(account); |
| | | merchantVO.setAccountStatus(loginUserInfoVO.getStatus()); |
| | | return R.ok(merchantVO); |
| | | } catch (Exception e) { |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public R<ConvenientMerchantVO> getUserConvenientMerchantInfo(Long userId) { |
| | | ConvenientMerchantDO merchantDO = this.baseMapper.selectOne(new QueryWrapper<ConvenientMerchantDO>() |
| | | .lambda().eq(ConvenientMerchantDO::getUserId, userId)); |
| | | if (isNull(merchantDO)) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | Long merchantId = merchantDO.getId(); |
| | | ConvenientMerchantVO convenientMerchantVO = new ConvenientMerchantVO(); |
| | | BeanUtils.copyProperties(merchantDO, convenientMerchantVO); |
| | | List<Long> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(merchantId); |
| | | convenientMerchantVO.setServiceIds(serviceIds); |
| | | Date nowDate = new Date(); |
| | | SimpleDateFormat mothFormat = new SimpleDateFormat("yyyy-MM"); |
| | | SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String moth = mothFormat.format(nowDate); |
| | | String day = dayFormat.format(nowDate); |
| | | int monthConsultationVolume = convenientConsultationStatisticsDAO.selectMonthConsultationVolume(merchantId, moth); |
| | | int dayConsultationVolume = convenientConsultationStatisticsDAO.selectDayConsultationVolume(merchantId, day); |
| | | int monthViewNum = convenientViewStatisticsDAO.selectMonthViewNum(merchantId, moth); |
| | | int dayViewNum = convenientViewStatisticsDAO.selectDayViewNum(merchantId, day); |
| | | convenientMerchantVO.setMonthConsultationVolume(monthConsultationVolume); |
| | | convenientMerchantVO.setDayConsultationVolume(dayConsultationVolume); |
| | | convenientMerchantVO.setMonthViewNum(monthViewNum); |
| | | convenientMerchantVO.setDayViewNum(dayViewNum); |
| | | return R.ok(convenientMerchantVO); |
| | | } |
| | | |
| | | @Override |
| | | public R getPopularMerchants(PagePopularMerchantDTO pagePopularMerchantDTO) { |
| | | Date nowDate = new Date(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); |
| | | String currentMon = simpleDateFormat.format(nowDate).concat("%"); |
| | | Page page = new Page<>(); |
| | | page.setSize(pagePopularMerchantDTO.getPageSize()); |
| | | page.setCurrent(pagePopularMerchantDTO.getPageNum()); |
| | | IPage<ConvenientMerchantVO> merchantVOList = this.baseMapper.getPopularMerchants(page, pagePopularMerchantDTO.getCommunityId(), currentMon); |
| | | return R.ok(merchantVOList); |
| | | } |
| | | |
| | | @Override |
| | | public R getClassifyMerchants(PageClassifyMerchantDTO pageClassifyMerchantDTO) { |
| | | Date nowDate = new Date(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); |
| | | String currentMon = simpleDateFormat.format(nowDate).concat("%"); |
| | | Page page = new Page<>(); |
| | | page.setSize(pageClassifyMerchantDTO.getPageSize()); |
| | | page.setCurrent(pageClassifyMerchantDTO.getPageNum()); |
| | | IPage<ConvenientMerchantVO> merchantVOList = this.baseMapper.getClassifyMerchants(page, pageClassifyMerchantDTO, currentMon); |
| | | List<ConvenientMerchantVO> records = merchantVOList.getRecords(); |
| | | if (!records.isEmpty()) { |
| | | records.forEach(record -> { |
| | | String serviceScope = convenientServiceCategoryDAO.selectServiceScopeByMerchantId(record.getId()); |
| | | record.setServiceScope(serviceScope); |
| | | }); |
| | | } |
| | | return R.ok(merchantVOList); |
| | | } |
| | | |
| | | /** |
| | | * 小程序获取商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMerchantDetail(Long merchantId) { |
| | | Date nowDate = new Date(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); |
| | | String currentMon = simpleDateFormat.format(nowDate).concat("%"); |
| | | return R.ok(this.baseMapper.getMerchantDetail(merchantId, currentMon)); |
| | | } |
| | | |
| | | @Override |
| | | public R pageSearchMerchant(PageSearchDTO pageSearchDTO) { |
| | | Date nowDate = new Date(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); |
| | | String currentMon = simpleDateFormat.format(nowDate).concat("%"); |
| | | Page page = new Page<>(); |
| | | page.setSize(pageSearchDTO.getPageSize()); |
| | | page.setCurrent(pageSearchDTO.getPageNum()); |
| | | IPage<ConvenientMerchantVO> merchantVOIPage = this.baseMapper.pageSearchMerchant(page, pageSearchDTO, currentMon); |
| | | List<ConvenientMerchantVO> records = merchantVOIPage.getRecords(); |
| | | if (!records.isEmpty()) { |
| | | records.forEach(record -> { |
| | | List<ConvenientProductVO> merchantProduct = convenientProductDAO.getMerchantProduct(record.getId()); |
| | | List<ConvenientProductSpecificationVO> productSpecifications = convenientProductDAO.getProductSpecifications(record.getId()); |
| | | if (!merchantProduct.isEmpty()) { |
| | | if (merchantProduct.size() > 2) { |
| | | merchantProduct = merchantProduct.subList(0, 2); |
| | | } |
| | | merchantProduct.forEach(product -> { |
| | | List<ConvenientProductSpecificationVO> list = new ArrayList<>(); |
| | | productSpecifications.forEach(specification -> { |
| | | if (product.getId().equals(specification.getProductId())) { |
| | | list.add(specification); |
| | | } |
| | | }); |
| | | product.setProductSpecificationVOList(list); |
| | | }); |
| | | } |
| | | record.setProductVOList(merchantProduct); |
| | | }); |
| | | } |
| | | return R.ok(merchantVOIPage); |
| | | } |
| | | |
| | | @Override |
| | | public R consultMerchant(Long merchantId) { |
| | | ConvenientMerchantDO merchantDO = this.baseMapper.selectById(merchantId); |
| | | if (isNull(merchantDO)) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String nowDate = simpleDateFormat.format(new Date()); |
| | | ConvenientConsultationStatisticsDO statisticsDO = convenientConsultationStatisticsDAO.selectOne(new LambdaQueryWrapper<ConvenientConsultationStatisticsDO>() |
| | | .eq(ConvenientConsultationStatisticsDO::getMerchantId, merchantId).eq(ConvenientConsultationStatisticsDO::getStatisticDate, nowDate)); |
| | | if (isNull(statisticsDO)) { |
| | | convenientConsultationStatisticsDAO.createTodayStatistic(merchantId); |
| | | } else { |
| | | convenientConsultationStatisticsDAO.incrConsultationNum(merchantId, nowDate); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R incrMerchantView(Long merchantId) { |
| | | ConvenientMerchantDO merchantDO = this.baseMapper.selectById(merchantId); |
| | | if (isNull(merchantDO)) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String nowDate = simpleDateFormat.format(new Date()); |
| | | ConvenientViewStatisticsDO statisticsDO = convenientViewStatisticsDAO.selectOne(new LambdaQueryWrapper<ConvenientViewStatisticsDO>() |
| | | .eq(ConvenientViewStatisticsDO::getMerchantId, merchantId).eq(ConvenientViewStatisticsDO::getStatisticDate, nowDate)); |
| | | if (isNull(statisticsDO)) { |
| | | convenientViewStatisticsDAO.createTodayStatistic(merchantId); |
| | | } else { |
| | | convenientViewStatisticsDAO.incrViewNum(merchantId, nowDate); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R exportMerchant(ExportMerchantDTO exportMerchantDTO) { |
| | | List<Long> needExportIds = exportMerchantDTO.getIds(); |
| | | if (nonNull(needExportIds) && !needExportIds.isEmpty()) { |
| | | //根据id导出 |
| | | return R.ok(this.baseMapper.exportMerchantByIds(needExportIds)); |
| | | } |
| | | List<ExportMerchantVO> exportMerchantVOList = this.baseMapper.exportMerchantBySearch(exportMerchantDTO); |
| | | if (nonNull(exportMerchantDTO.getServiceId()) && !exportMerchantVOList.isEmpty()) { |
| | | exportMerchantVOList.forEach(merchant -> { |
| | | String serviceScope = convenientServiceCategoryDAO.selectServiceScopeByMerchantId(merchant.getId()); |
| | | merchant.setServiceScope(serviceScope); |
| | | }); |
| | | } |
| | | return R.ok(exportMerchantVOList); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务每隔半小时将商家浏览量和咨询量总值计入指定商家数据中 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R timedTaskWriteDataToMerchantJobHandler() { |
| | | List<ConvenientConsultationStatisticsVO> consultationVOList = convenientConsultationStatisticsDAO.selectSumForConsultationNum(); |
| | | List<ConvenientViewStatisticsVO> viewVOList = convenientViewStatisticsDAO.selectSumForViewNum(); |
| | | this.baseMapper.batchUpdateMerchantConsultationNum(consultationVOList); |
| | | this.baseMapper.batchUpdateMerchantViewNum(viewVOList); |
| | | return R.ok(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | 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.convenient.ConvenientProductCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductCategoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductCategoryVO; |
| | | import com.panzhihua.service_community.dao.ConvenientProductCategoryDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientProductDAO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductCategoryDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductDO; |
| | | import com.panzhihua.service_community.service.ConvenientProductCategoryService; |
| | | |
| | | /** |
| | | * @title: ConvenientProductCategoryServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务产品分类服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/09/20 16:13 |
| | | */ |
| | | @Service |
| | | public class ConvenientProductCategoryServiceImpl extends ServiceImpl<ConvenientProductCategoryDAO, ConvenientProductCategoryDO> implements ConvenientProductCategoryService { |
| | | |
| | | @Resource |
| | | private ConvenientProductDAO convenientProductDAO; |
| | | |
| | | @Override |
| | | public R addProductCategory(ConvenientProductCategoryDTO convenientProductCategoryDTO) { |
| | | ConvenientProductCategoryDO convenientProductCategoryDO = new ConvenientProductCategoryDO(); |
| | | BeanUtils.copyProperties(convenientProductCategoryDTO, convenientProductCategoryDO); |
| | | convenientProductCategoryDO.setCreatedAt(new Date()); |
| | | int result = this.baseMapper.insert(convenientProductCategoryDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R putProductCategory(ConvenientProductCategoryDTO convenientProductCategoryDTO) { |
| | | ConvenientProductCategoryDO convenientProductCategoryDO = this.baseMapper.selectById(convenientProductCategoryDTO.getId()); |
| | | if (isNull(convenientProductCategoryDO)) { |
| | | return R.fail("分类id不存在"); |
| | | } |
| | | BeanUtils.copyProperties(convenientProductCategoryDTO, convenientProductCategoryDO); |
| | | int result = this.baseMapper.updateById(convenientProductCategoryDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("更新失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteProductCategory(Long categoryId, Long operator) { |
| | | if (isNull(categoryId)) { |
| | | return R.fail("分类id不能为空"); |
| | | } |
| | | ConvenientProductCategoryDO convenientProductCategoryDO = this.baseMapper.selectById(categoryId); |
| | | if (isNull(convenientProductCategoryDO)) { |
| | | return R.fail("分类id不存在"); |
| | | } |
| | | int quotedCount = convenientProductDAO.selectCount(new QueryWrapper<ConvenientProductDO>() |
| | | .lambda().eq(ConvenientProductDO::getCategoryId, categoryId).eq(ConvenientProductDO::getIsDel, false)); |
| | | if (quotedCount > 0) { |
| | | return R.fail("该分类名称已被引用,无法删除!"); |
| | | } |
| | | convenientProductCategoryDO.setIsDel(true); |
| | | convenientProductCategoryDO.setUpdatedBy(operator); |
| | | int result = this.baseMapper.updateById(convenientProductCategoryDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R getProductCategory(Long categoryId) { |
| | | if (isNull(categoryId)) { |
| | | return R.fail("分类id不能为空"); |
| | | } |
| | | ConvenientProductCategoryDO convenientProductCategoryDO = this.baseMapper.selectById(categoryId); |
| | | if (isNull(convenientProductCategoryDO)) { |
| | | return R.fail("分类id不存在"); |
| | | } |
| | | ConvenientProductCategoryVO convenientProductCategoryVO = new ConvenientProductCategoryVO(); |
| | | BeanUtils.copyProperties(convenientProductCategoryDO, convenientProductCategoryVO); |
| | | return R.ok(convenientProductCategoryVO); |
| | | } |
| | | |
| | | @Override |
| | | public R pageProductCategory(PageConvenientProductCategoryDTO pageConvenientProductCategoryDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageConvenientProductCategoryDTO.getPageSize()); |
| | | page.setCurrent(pageConvenientProductCategoryDTO.getPageNum()); |
| | | IPage<ConvenientProductCategoryVO> iPage = this.baseMapper.pageProductCategory(page, pageConvenientProductCategoryDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R getAllProductCategory() { |
| | | return R.ok(this.baseMapper.selectAllCategories()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.convenient.ConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductSpecificationDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DeleteConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.OnShelfOrOffShelfProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductLevelInfoVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductShelfVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductSpecificationVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO; |
| | | import com.panzhihua.service_community.dao.ConvenientProductCategoryDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientProductDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientProductSpecificationDAO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductCategoryDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductSpecificationDO; |
| | | import com.panzhihua.service_community.service.ConvenientProductService; |
| | | |
| | | /** |
| | | * @title: ConvenientProductServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商家后台产品服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/09/21 21:33 |
| | | */ |
| | | @Service |
| | | public class ConvenientProductServiceImpl extends ServiceImpl<ConvenientProductDAO, ConvenientProductDO> implements ConvenientProductService { |
| | | |
| | | @Resource |
| | | private ConvenientProductCategoryDAO convenientProductCategoryDAO; |
| | | @Resource |
| | | private ConvenientProductSpecificationDAO convenientProductSpecificationDAO; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addProduct(ConvenientProductDTO convenientProductDTO) { |
| | | ConvenientProductCategoryDO convenientProductCategoryDO = convenientProductCategoryDAO.selectById(convenientProductDTO.getCategoryId()); |
| | | if (isNull(convenientProductCategoryDO)) { |
| | | return R.fail("产品分类不存在"); |
| | | } |
| | | ConvenientProductDO convenientProductDO = new ConvenientProductDO(); |
| | | BeanUtils.copyProperties(convenientProductDTO, convenientProductDO); |
| | | Date nowDate = new Date(); |
| | | convenientProductDO.setCreatedAt(nowDate); |
| | | this.baseMapper.insert(convenientProductDO); |
| | | Long productId = convenientProductDO.getId(); |
| | | if (nonNull(productId)) { |
| | | //规格 |
| | | List<ConvenientProductSpecificationDTO> productSpecificationDTOList = convenientProductDTO.getProductSpecificationDTOList(); |
| | | List<ConvenientProductSpecificationDO> productSpecificationDOList = productSpecificationDTOList.stream().map(specificationDTO -> { |
| | | ConvenientProductSpecificationDO convenientProductSpecificationDO = new ConvenientProductSpecificationDO(); |
| | | BeanUtils.copyProperties(specificationDTO, convenientProductSpecificationDO); |
| | | convenientProductSpecificationDO.setProductId(productId); |
| | | convenientProductSpecificationDO.setCreatedAt(nowDate); |
| | | convenientProductSpecificationDO.setCreatedBy(convenientProductDTO.getCreatedBy()); |
| | | return convenientProductSpecificationDO; |
| | | }).collect(Collectors.toList()); |
| | | convenientProductSpecificationDAO.batchInsert(productSpecificationDOList); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R putProduct(ConvenientProductDTO convenientProductDTO) { |
| | | Long productId = convenientProductDTO.getId(); |
| | | Long updatedBy = convenientProductDTO.getUpdatedBy(); |
| | | ConvenientProductDO convenientProductDO = this.baseMapper.selectById(productId); |
| | | if (isNull(convenientProductDO)) { |
| | | return R.fail("产品不存在"); |
| | | } |
| | | BeanUtils.copyProperties(convenientProductDTO, convenientProductDO); |
| | | convenientProductDO.setUpdatedBy(updatedBy); |
| | | this.baseMapper.updateById(convenientProductDO); |
| | | List<ConvenientProductSpecificationDTO> productSpecificationDTOList = convenientProductDTO.getProductSpecificationDTOList(); |
| | | List<Long> notNeedDelIds = productSpecificationDTOList.stream().filter(specificationDTO -> nonNull(specificationDTO.getId())) |
| | | .map(ConvenientProductSpecificationDTO::getId).collect(Collectors.toList()); |
| | | //删除已失去关联的规格 |
| | | convenientProductSpecificationDAO.deleteLoseRelationSpecifications(notNeedDelIds); |
| | | Date nowDate = new Date(); |
| | | productSpecificationDTOList.forEach(specificationDTO -> { |
| | | Long specificationId = specificationDTO.getId(); |
| | | if (isNull(specificationId)) { |
| | | //新增 |
| | | ConvenientProductSpecificationDO convenientProductSpecificationDO = new ConvenientProductSpecificationDO(); |
| | | BeanUtils.copyProperties(specificationDTO, convenientProductSpecificationDO); |
| | | convenientProductSpecificationDO.setProductId(productId); |
| | | convenientProductSpecificationDO.setCreatedAt(nowDate); |
| | | convenientProductSpecificationDO.setCreatedBy(updatedBy); |
| | | convenientProductSpecificationDAO.insert(convenientProductSpecificationDO); |
| | | } else { |
| | | //更新 |
| | | ConvenientProductSpecificationDO convenientProductSpecificationDO = convenientProductSpecificationDAO.selectById(specificationId); |
| | | BeanUtils.copyProperties(specificationDTO, convenientProductSpecificationDO); |
| | | convenientProductSpecificationDO.setUpdatedBy(updatedBy); |
| | | convenientProductSpecificationDAO.updateById(convenientProductSpecificationDO); |
| | | } |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getProduct(Long productId) { |
| | | if (isNull(productId)) { |
| | | return R.fail("产品ID不能为空"); |
| | | } |
| | | ConvenientProductDO convenientProductDO = this.baseMapper.selectById(productId); |
| | | if (isNull(convenientProductDO)) { |
| | | return R.fail("产品不存在"); |
| | | } |
| | | ConvenientProductVO convenientProductVO = new ConvenientProductVO(); |
| | | BeanUtils.copyProperties(convenientProductDO, convenientProductVO); |
| | | //查找产品规格 |
| | | List<ConvenientProductSpecificationDO> convenientProductSpecificationDOList = convenientProductSpecificationDAO.selectList(new LambdaQueryWrapper<ConvenientProductSpecificationDO>() |
| | | .eq(ConvenientProductSpecificationDO::getProductId, productId).eq(ConvenientProductSpecificationDO::getIsDel, false)); |
| | | List<ConvenientProductSpecificationVO> convenientProductSpecificationVOList = new ArrayList<>(); |
| | | if (!convenientProductSpecificationDOList.isEmpty()) { |
| | | convenientProductSpecificationDOList.forEach(specificationDO -> { |
| | | ConvenientProductSpecificationVO convenientProductSpecificationVO = new ConvenientProductSpecificationVO(); |
| | | BeanUtils.copyProperties(specificationDO, convenientProductSpecificationVO); |
| | | convenientProductSpecificationVOList.add(convenientProductSpecificationVO); |
| | | }); |
| | | } |
| | | convenientProductVO.setProductSpecificationVOList(convenientProductSpecificationVOList); |
| | | return R.ok(convenientProductVO); |
| | | } |
| | | |
| | | @Override |
| | | public R pageProduct(PageConvenientProductDTO pageConvenientProductDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageConvenientProductDTO.getPageSize()); |
| | | page.setCurrent(pageConvenientProductDTO.getPageNum()); |
| | | IPage<ConvenientProductVO> productVOIPage = this.baseMapper.pageProduct(page, pageConvenientProductDTO); |
| | | List<ConvenientProductVO> convenientProductVOList = productVOIPage.getRecords(); |
| | | //图片填充 |
| | | if (!convenientProductVOList.isEmpty()) { |
| | | convenientProductVOList.forEach(product -> { |
| | | List<ConvenientProductSpecificationDO> specificationDOList = convenientProductSpecificationDAO.selectList(new LambdaQueryWrapper<ConvenientProductSpecificationDO>() |
| | | .eq(ConvenientProductSpecificationDO::getProductId, product.getId()).isNotNull(ConvenientProductSpecificationDO::getImage)); |
| | | product.setImage(specificationDOList.isEmpty() ? null : specificationDOList.get(0).getImage()); |
| | | }); |
| | | } |
| | | return R.ok(productVOIPage); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R deleteProduct(DeleteConvenientProductDTO deleteConvenientProductDTO) { |
| | | List<Long> needDelIds = deleteConvenientProductDTO.getIds(); |
| | | //删除产品 |
| | | int result = this.baseMapper.batchDeleteByIds(needDelIds); |
| | | if (result > 0) { |
| | | //删除规格 |
| | | convenientProductSpecificationDAO.batchDeleteByProductIds(needDelIds); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R onShelfOrOffShelfProduct(OnShelfOrOffShelfProductDTO onShelfOrOffShelfProductDTO) { |
| | | Integer type = onShelfOrOffShelfProductDTO.getType(); |
| | | Long updatedBy = onShelfOrOffShelfProductDTO.getUpdatedBy(); |
| | | List<Long> needDelIds = onShelfOrOffShelfProductDTO.getIds(); |
| | | if (type.intValue() == 1) { |
| | | //上架 |
| | | this.baseMapper.batchOnShelfOrOffShelfByIds(needDelIds, updatedBy, true); |
| | | } else if (type.intValue() == 2) { |
| | | //下架 |
| | | this.baseMapper.batchOnShelfOrOffShelfByIds(needDelIds, updatedBy, false); |
| | | } else { |
| | | return R.fail("处理类型错误"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 小程序获取商家产品 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMerchantProduct(Long merchantId) { |
| | | List<ConvenientProductVO> productVOList = this.baseMapper.getMerchantProduct(merchantId); |
| | | List<ConvenientProductSpecificationVO> specificationVOList = this.baseMapper.getProductSpecifications(merchantId); |
| | | List<ConvenientProductLevelInfoVO> levelInfoVOList = new ArrayList<>(); |
| | | if (!productVOList.isEmpty()) { |
| | | productVOList.forEach(productVO -> { |
| | | List<ConvenientProductSpecificationVO> currentProductSpecificationVOList = new ArrayList<>(); |
| | | specificationVOList.forEach(specificationVO -> { |
| | | if (productVO.getId().equals(specificationVO.getProductId())) { |
| | | currentProductSpecificationVOList.add(specificationVO); |
| | | } |
| | | }); |
| | | productVO.setProductSpecificationVOList(currentProductSpecificationVOList); |
| | | }); |
| | | //分类 |
| | | Map<String, List<ConvenientProductVO>> levelGroup = productVOList.stream() |
| | | .collect(Collectors.groupingBy(ConvenientProductVO::getCategoryName)); |
| | | Set<String> categoryNames = levelGroup.keySet(); |
| | | Iterator<String> iterator = categoryNames.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String categoryName = iterator.next(); |
| | | ConvenientProductLevelInfoVO levelInfoVOLevelInfoVO = new ConvenientProductLevelInfoVO(); |
| | | levelInfoVOLevelInfoVO.setCategoryName(categoryName); |
| | | List<ConvenientProductVO> productVOS = levelGroup.get(categoryName); |
| | | List<ConvenientProductVO> sortedProductVOS = productVOS.stream() |
| | | .sorted(Comparator.comparing(ConvenientProductVO::getOnShelfAt).reversed()).collect(Collectors.toList()); |
| | | levelInfoVOLevelInfoVO.setProductVOList(sortedProductVOS); |
| | | levelInfoVOList.add(levelInfoVOLevelInfoVO); |
| | | } |
| | | } |
| | | return R.ok(levelInfoVOList); |
| | | } |
| | | |
| | | @Override |
| | | public R pageSearchProduct(PageSearchDTO pageSearchDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageSearchDTO.getPageSize()); |
| | | page.setCurrent(pageSearchDTO.getPageNum()); |
| | | IPage<ConvenientProductVO> productVOIPage = this.baseMapper.pageSearchProduct(page, pageSearchDTO); |
| | | List<ConvenientProductVO> records = productVOIPage.getRecords(); |
| | | if (!records.isEmpty()) { |
| | | List<Long> productIds = records.stream().map(ConvenientProductVO::getId).collect(Collectors.toList()); |
| | | List<ConvenientProductSpecificationDO> specificationDOS = convenientProductSpecificationDAO |
| | | .selectList(new LambdaQueryWrapper<ConvenientProductSpecificationDO>().in(ConvenientProductSpecificationDO::getProductId, productIds)); |
| | | List<ConvenientProductSpecificationVO> specificationVOList = new ArrayList<>(); |
| | | if (!specificationDOS.isEmpty()) { |
| | | specificationDOS.forEach(specificationDO -> { |
| | | ConvenientProductSpecificationVO specificationVO = new ConvenientProductSpecificationVO(); |
| | | BeanUtils.copyProperties(specificationDO, specificationVO); |
| | | specificationVOList.add(specificationVO); |
| | | }); |
| | | Map<Long, List<ConvenientProductSpecificationVO>> collect = specificationVOList |
| | | .stream().collect(Collectors.groupingBy(ConvenientProductSpecificationVO::getProductId)); |
| | | Set<Long> keySet = collect.keySet(); |
| | | Iterator<Long> iterator = keySet.iterator(); |
| | | while (iterator.hasNext()) { |
| | | Long productId = iterator.next(); |
| | | records.forEach(record -> { |
| | | if (record.getId().equals(productId)) { |
| | | record.setProductSpecificationVOList(collect.get(productId)); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(productVOIPage); |
| | | } |
| | | |
| | | @Override |
| | | public R incrProductView(Long productId) { |
| | | this.baseMapper.incrProductView(productId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getProductShelfNum(Long merchantId) { |
| | | int onShelfTotalNum = this.baseMapper.selectCount(new LambdaQueryWrapper<ConvenientProductDO>().eq(ConvenientProductDO::getMerchantId, merchantId) |
| | | .eq(ConvenientProductDO::getIsDel, false).eq(ConvenientProductDO::getOnShelf, true)); |
| | | int offShelfTotalNum = this.baseMapper.selectCount(new LambdaQueryWrapper<ConvenientProductDO>().eq(ConvenientProductDO::getMerchantId, merchantId) |
| | | .eq(ConvenientProductDO::getIsDel, false).eq(ConvenientProductDO::getOnShelf, false)); |
| | | ConvenientProductShelfVO convenientProductShelfVO = new ConvenientProductShelfVO(); |
| | | convenientProductShelfVO.setOnShelfTotalNum(onShelfTotalNum); |
| | | convenientProductShelfVO.setOffShelfTotalNum(offShelfTotalNum); |
| | | return R.ok(convenientProductShelfVO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | 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.dtos.community.convenient.ConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO; |
| | | import com.panzhihua.service_community.dao.ConvenientServiceCategoryDAO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientServiceCategoryDO; |
| | | import com.panzhihua.service_community.service.ConvenientServiceCategoryService; |
| | | |
| | | /** |
| | | * @title: ConvenientServiceCategoryServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务分类服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/09/16 10:56 |
| | | */ |
| | | @Service |
| | | public class ConvenientServiceCategoryServiceImpl extends ServiceImpl<ConvenientServiceCategoryDAO, ConvenientServiceCategoryDO> |
| | | implements ConvenientServiceCategoryService { |
| | | |
| | | @Override |
| | | public R addServiceCategory(ConvenientServiceCategoryDTO convenientServiceCategoryDTO) { |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = new ConvenientServiceCategoryDO(); |
| | | BeanUtils.copyProperties(convenientServiceCategoryDTO, convenientServiceCategoryDO); |
| | | convenientServiceCategoryDO.setCreatedAt(new Date()); |
| | | int result = this.baseMapper.insert(convenientServiceCategoryDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R putServiceCategory(ConvenientServiceCategoryDTO convenientServiceCategoryDTO) { |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = this.baseMapper.selectById(convenientServiceCategoryDTO.getId()); |
| | | if (isNull(convenientServiceCategoryDO)) { |
| | | return R.fail("分类id不存在"); |
| | | } |
| | | BeanUtils.copyProperties(convenientServiceCategoryDTO, convenientServiceCategoryDO); |
| | | int result = this.baseMapper.updateById(convenientServiceCategoryDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("更新失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteServiceCategoryById(Long categoryId, Long operator) { |
| | | if (isNull(categoryId)) { |
| | | return R.fail("分类id不能为空"); |
| | | } |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = this.baseMapper.selectById(categoryId); |
| | | if (isNull(convenientServiceCategoryDO)) { |
| | | return R.fail("分类id不存在"); |
| | | } |
| | | int count = this.baseMapper.checkCategoryIsUsing(categoryId); |
| | | if (count > 0) { |
| | | return R.fail("该分类名称已被引用,无法删除!"); |
| | | } |
| | | convenientServiceCategoryDO.setIsDel(true); |
| | | convenientServiceCategoryDO.setUpdatedBy(operator); |
| | | int result = this.baseMapper.updateById(convenientServiceCategoryDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R getServiceCategoryById(Long categoryId) { |
| | | if (isNull(categoryId)) { |
| | | return R.fail("分类id不能为空"); |
| | | } |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = this.baseMapper.selectById(categoryId); |
| | | if (isNull(convenientServiceCategoryDO)) { |
| | | return R.fail("分类id不存在"); |
| | | } |
| | | ConvenientServiceCategoryVO convenientServiceCategoryVO = new ConvenientServiceCategoryVO(); |
| | | BeanUtils.copyProperties(convenientServiceCategoryDO, convenientServiceCategoryVO); |
| | | return R.ok(convenientServiceCategoryVO); |
| | | } |
| | | |
| | | @Override |
| | | public R pageServiceCategory(PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageConvenientServiceCategoryDTO.getPageSize()); |
| | | page.setCurrent(pageConvenientServiceCategoryDTO.getPageNum()); |
| | | IPage<ConvenientServiceCategoryVO> iPage = this.baseMapper.pageServiceCategory(page, pageConvenientServiceCategoryDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R getAllServiceCategories() { |
| | | List<ConvenientServiceCategoryVO> categoryVOList = new ArrayList<>(); |
| | | List<ConvenientServiceCategoryDO> categoryDOS = this.baseMapper.selectList(new QueryWrapper<ConvenientServiceCategoryDO>() |
| | | .lambda().orderByDesc(ConvenientServiceCategoryDO::getWeight)); |
| | | if (!ObjectUtils.isEmpty(categoryDOS)) { |
| | | categoryDOS.forEach(categoryDO -> { |
| | | ConvenientServiceCategoryVO categoryVO = new ConvenientServiceCategoryVO(); |
| | | BeanUtils.copyProperties(categoryDO, categoryVO); |
| | | categoryVOList.add(categoryVO); |
| | | }); |
| | | } |
| | | return R.ok(categoryVOList); |
| | | } |
| | | |
| | | @Override |
| | | public R getSuitableServiceCategories(Long communityId) { |
| | | return R.ok(this.baseMapper.selectSuitableServiceCategories(communityId)); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthHistoryVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComElderAuthRecordsDAO comElderAuthRecordsDAO; |
| | | @Resource |
| | | private ComElderAuthElderliesDAO comElderAuthElderliesDAO; |
| | | |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | |
| | | public R communityAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | Long communityId = eldersAuthTypeQueryDTO.getCommunityId(); |
| | | List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"ELDER_AUTH_TYPE").orderByDesc(SysConfDO::getCreateAt)); |
| | | .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"ELDER_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | if (confDOList == null || confDOList.size() == 0) { |
| | | SysConfDO sysConfDO = new SysConfDO(); |
| | | sysConfDO.setCode("ELDER_AUTH_TYPE"); |
| | | sysConfDO.setCode("ELDER_AUTH_TYPE_" + communityId); |
| | | sysConfDO.setName("高龄认证类型"); |
| | | sysConfDO.setValue(2 + "");// 核验类型(1.视频认证 2.人脸核验) |
| | | sysConfDO.setDescription("高龄认证默认添加的核验类型"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 检测上月所有视频认证记录,取最后一条记录为认证成功记录 |
| | | * 检测本月所有认证记录,认证成功记录更新到历史记录中 |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R timedTaskEldersRecordAuthJobHandler(){ |
| | | Date nowDate = new Date(); |
| | | //查询所有启用中社区 |
| | | List<ComActDO> actList = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState,0)); |
| | | |
| | | actList.forEach(act -> { |
| | | //查询社区上月所有视频认证 |
| | | List<ComEldersAuthHistoryVO> authList = eldersAuthDAO.getEldersAuthRecords(act.getCommunityId()); |
| | | authList.forEach(auth -> { |
| | | if(auth.getUserId() != null){ |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = new ComEldersAuthHistoryRecordDO(); |
| | | authHistoryRecordDO.setCommunityId(auth.getCommunityId()); |
| | | authHistoryRecordDO.setCreateAt(auth.getCreateAt()); |
| | | authHistoryRecordDO.setAuthId(auth.getId()); |
| | | authHistoryRecordDO.setUserId(auth.getUserId()); |
| | | authHistoryRecordDO.setBrithday(auth.getBirthday()); |
| | | authHistoryRecordDO.setDomicile(auth.getDomicile()); |
| | | authHistoryRecordDO.setIdCard(auth.getIdCard()); |
| | | authHistoryRecordDO.setName(auth.getName()); |
| | | authHistoryRecordDO.setIsAuth(1); |
| | | try { |
| | | Integer age = IdcardUtil.getAgeByIdCard(auth.getIdCard()); |
| | | authHistoryRecordDO.setAge(age); |
| | | }catch (Exception e){ |
| | | log.error("年龄转换失败"); |
| | | String authPeriod = DateUtils.getCurrentDateString_YYYY_MM(); |
| | | //查询所有老人信息并加入到老人认证历史记录表中,如果不存在则新增,存在则不做操作 |
| | | List<ComElderAuthElderliesDO> authElderliesList = comElderAuthElderliesDAO.selectList(new QueryWrapper<>()); |
| | | authElderliesList.forEach(authElderlies -> { |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComEldersAuthHistoryRecordDO>().lambda() |
| | | .eq(ComEldersAuthHistoryRecordDO::getElderliesId,authElderlies.getId()) |
| | | .eq(ComEldersAuthHistoryRecordDO::getAuthPeriod,authPeriod)); |
| | | if(authHistoryRecordDO == null){ |
| | | authHistoryRecordDO = new ComEldersAuthHistoryRecordDO(); |
| | | BeanUtils.copyProperties(authElderlies,authHistoryRecordDO); |
| | | authHistoryRecordDO.setIsAuth(ComEldersAuthHistoryRecordDO.isAuth.no); |
| | | authHistoryRecordDO.setElderliesId(authElderlies.getId()); |
| | | authHistoryRecordDO.setAuthPeriod(authPeriod); |
| | | authHistoryRecordDO.setCreateAt(nowDate); |
| | | comEldersAuthHistoryRecordMapper.insert(authHistoryRecordDO); |
| | | } |
| | | }); |
| | | |
| | | List<ComElderAuthRecordsDO> authRecordsList = comElderAuthRecordsDAO.selectList(new QueryWrapper<ComElderAuthRecordsDO>().lambda() |
| | | .ge(ComElderAuthRecordsDO::getCreateAt,DateUtils.getFirstDayOfMonth())); |
| | | //遍历认证记录列表 |
| | | authRecordsList.forEach(authRecords -> { |
| | | if(authRecords.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.tg)){ |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComEldersAuthHistoryRecordDO>().lambda() |
| | | .eq(ComEldersAuthHistoryRecordDO::getElderliesId,authRecords.getElderliesId()) |
| | | .eq(ComEldersAuthHistoryRecordDO::getAuthPeriod,authRecords.getAuthPeriod())); |
| | | if(authHistoryRecordDO != null){//存在记录 |
| | | if(authHistoryRecordDO.getIsAuth().equals(ComEldersAuthHistoryRecordDO.isAuth.no)){ |
| | | authHistoryRecordDO.setIsAuth(ComEldersAuthHistoryRecordDO.isAuth.yes); |
| | | authHistoryRecordDO.setAuthDate(authRecords.getApprovalDate()); |
| | | authHistoryRecordDO.setApprovalDate(authRecords.getApprovalDate()); |
| | | authHistoryRecordDO.setApproverId(authRecords.getApproverId()); |
| | | authHistoryRecordDO.setSubmitUserId(authRecords.getSubmitUserId()); |
| | | authHistoryRecordDO.setAuthMethod(authRecords.getAuthMethod()); |
| | | authHistoryRecordDO.setVerificationResult(authRecords.getVerificationResult()); |
| | | authHistoryRecordDO.setAuthId(authRecords.getId()); |
| | | comEldersAuthHistoryRecordMapper.updateById(authHistoryRecordDO); |
| | | } |
| | | }else{ |
| | | authHistoryRecordDO = new ComEldersAuthHistoryRecordDO(); |
| | | BeanUtils.copyProperties(authRecords,authHistoryRecordDO); |
| | | authHistoryRecordDO.setIsAuth(ComEldersAuthHistoryRecordDO.isAuth.yes); |
| | | authHistoryRecordDO.setAuthId(authRecords.getId()); |
| | | comEldersAuthHistoryRecordMapper.insert(authHistoryRecordDO); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R setAuthType(Long communityId, Integer type){ |
| | | List<SysConfDO> authConf = |
| | | sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>().eq(SysConfDO::getCommunityId, communityId) |
| | | .eq(SysConfDO::getCode, "ELDER_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | if (authConf != null && authConf.size() > 0) { |
| | | SysConfDO first = authConf.get(0); |
| | | first.setValue(type + ""); |
| | | int updated = sysConfDao.updateById(first); |
| | | if (updated == 1) { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R getAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO){ |
| | | Long communityId = eldersAuthTypeQueryDTO.getCommunityId(); |
| | | List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"ELDER_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | if (confDOList == null || confDOList.size() == 0) { |
| | | SysConfDO sysConfDO = new SysConfDO(); |
| | | sysConfDO.setCode("ELDER_AUTH_TYPE_" + communityId); |
| | | sysConfDO.setName("高龄认证类型"); |
| | | sysConfDO.setValue(2 + "");// 核验类型(1.视频认证 2.人脸核验) |
| | | sysConfDO.setDescription("高龄认证默认添加的核验类型"); |
| | | sysConfDO.setCommunityId(communityId); |
| | | sysConfDO.setCreateBy(eldersAuthTypeQueryDTO.getUserId()); |
| | | int inserted = sysConfDao.insert(sysConfDO); |
| | | if (inserted != 1) { |
| | | throw new ServiceException("添加高龄认证默认添加的核验类型失败"); |
| | | } |
| | | confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId) |
| | | .orderByDesc(SysConfDO::getCreateAt)); |
| | | } |
| | | if (confDOList != null && confDOList.size() > 0) { |
| | | SysConfDO latest = confDOList.get(0); |
| | | SysConfVO sysConfVO = new SysConfVO(); |
| | | BeanUtils.copyProperties(latest, sysConfVO); |
| | | return R.ok(sysConfVO.getValue()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | @Override |
| | | public R pageAuthStatisticAdmin(PageElderAuthStatisticDTO pageElderAuthStatisticDTO){ |
| | | return R.ok(comEldersAuthHistoryRecordMapper.pageAuthStatisticAdmin(new Page(pageElderAuthStatisticDTO.getPageNum(),pageElderAuthStatisticDTO.getPageSize()),pageElderAuthStatisticDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @Override |
| | | public R signAuthStatisticAdmin(SignElderAuthStatisticDTO signElderAuthStatisticDTO){ |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectById(signElderAuthStatisticDTO.getId()); |
| | | if(authHistoryRecordDO == null){ |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | authHistoryRecordDO.setMark(signElderAuthStatisticDTO.getMark()); |
| | | if(comEldersAuthHistoryRecordMapper.updateById(authHistoryRecordDO) > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-统计表头数据 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计表头数据 |
| | | */ |
| | | @Override |
| | | public R getAuthHeaderStatisticAdmin(ElderAuthStatisticHeaderDTO statisticHeaderDTO){ |
| | | return R.ok(comEldersAuthHistoryRecordMapper.getAuthHeaderStatisticAdmin(statisticHeaderDTO)); |
| | | } |
| | | } |
| | |
| | | </select> |
| | | <select id="getIndexTopActivityList" resultMap="BaseResultMap"> |
| | | SELECT * FROM `com_act_activity` |
| | | WHERE community_id = #{communityId} and is_top = 1 and end_at >= now() and begin_at <= now() |
| | | WHERE community_id = #{communityId} and is_top = 1 and sign_up_end >= now() and sign_up_begin <= now() |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActCommitteeDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComActCommittee" id="ComActCommitteeBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="contactName" column="contact_name"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="areaId" column="area_id"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="communityId" column="communityId"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComActCommiteeVO"> |
| | | select t.*,t1.account,t1.password,t2.name as areaName,t3.role_id as roleId from com_act_committee t |
| | | left join sys_user t1 on t.user_id = t1.user_id |
| | | left join com_mng_village t2 on t.area_id = t2.village_id |
| | | left join sys_user_role t3 on t.user_id = t3.user_id |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.areaId!=null and commonPage.areaId !=''"> |
| | | and t.area_id =#{commonPage.areaId} |
| | | </if> |
| | | <if test="commonPage.name!=null and commonPage.name!=''"> |
| | | and t.name like concat(#{commonPage.name},'%') |
| | | </if> |
| | | <if test="commonPage.phone!=null and commonPage.phone!=''"> |
| | | and t.phone like concat(#{commonPage.phone},'%') |
| | | </if> |
| | | <if test="commonPage.username!=null and commonPage.username!=''"> |
| | | and t.contact_name like concat(#{commonPage.username},'%') |
| | | </if> |
| | | <if test="commonPage.paramId!=null"> |
| | | and t.community_id =#{commonPage.paramId} |
| | | </if> |
| | | </where> |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActDiscussCommentDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActDiscussCommentDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="discuss_id" property="discussId"/> |
| | | <result column="comment" property="comment"/> |
| | | <result column="is_topping" property="isTopping"/> |
| | | <result column="create_at" property="createAt"/> |
| | | <result column="is_author" property="isAuthor"/> |
| | | <result column="parent_id" property="parentId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="reply_num" property="replyNum"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, discuss_id, comment, is_topping, create_at, is_author, parent_id, user_id, reply_num |
| | | </sql> |
| | | |
| | | <select id="getDiscussCommentList" parameterType="com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActDiscussCommentVO"> |
| | | SELECT |
| | | cadc.id, |
| | | cadc.`comment`, |
| | | cadc.`is_author`, |
| | | su.`image_url`, |
| | | IFNULL( su.`name`, su.nick_name ) AS userNameBack, |
| | | cadc.create_at |
| | | FROM |
| | | com_act_discuss_comment AS cadc |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadc.user_id |
| | | where cadc.parent_id = #{id} and cadc.is_del = 2 |
| | | order by cadc.create_at desc |
| | | </select> |
| | | <select id="selectChilds" resultType="com.panzhihua.common.model.vos.community.ComActDiscussCommentVO"> |
| | | SELECT |
| | | u.`name` userName, |
| | | IFNULL(u.`nick_name`,'社区管理员') AS userNickName, |
| | | u.`image_url`, |
| | | u.phone, |
| | | c.`comment`, |
| | | c.`parent_id`, |
| | | c.`is_author`, |
| | | c.`is_topping`, |
| | | COUNT( cu.id ) num, |
| | | c.create_at, |
| | | c.id |
| | | FROM |
| | | com_act_discuss_comment c |
| | | JOIN sys_user u ON c.user_id = u.user_id |
| | | LEFT JOIN com_act_discuss_comment_user cu ON c.id=cu.disscuss_comment_id |
| | | WHERE |
| | | FIND_IN_SET( |
| | | c.id, |
| | | getChildren ( #{parentId} )) AND c.parent_id != 0 AND c.is_del = 2 |
| | | GROUP BY c.id |
| | | ORDER BY create_at desc |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActDiscussCommentUserDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActDiscussCommentUserDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="disscuss_comment_id" property="disscussCommentId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="create_at" property="createAt"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, disscuss_comment_id, user_id, create_at |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActDiscussDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActDiscussDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="discuss_subject" property="discussSubject"/> |
| | | <result column="type" property="type"/> |
| | | <result column="photo_pah" property="photoPah"/> |
| | | <result column="address" property="address"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="community_id" property="communityId"/> |
| | | <result column="create_at" property="createAt"/> |
| | | <result column="discuss_option" property="discussOption"/> |
| | | <result column="vote_title" property="voteTitle"/> |
| | | <result column="is_repeat" property="isRepeat"/> |
| | | <result column="count" property="count"/> |
| | | <result column="img_width" property="imgWidth"/> |
| | | <result column="img_height" property="imgHeight"/> |
| | | <result column="start_time" property="startTime"/> |
| | | <result column="end_time" property="endTime"/> |
| | | <result column="comment_num" property="commentNum"/> |
| | | <result column="fabulous_num" property="fabulousNum"/> |
| | | <result column="views_num" property="viewsNum"/> |
| | | <result column="join_num" property="joinNum"/> |
| | | <result column="status" property="status"/> |
| | | <result column="is_del" property="isDel"/> |
| | | <result column="publish_result" property="publishResult"/> |
| | | <result column="publish_at" property="publishAt"/> |
| | | <result column="release_at" property="releaseAt"/> |
| | | <result column="update_at" property="updateAt"/> |
| | | <result column="publish_by" property="publishBy"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, discuss_subject, type, photo_pah, address, user_id, community_id, create_at, discuss_option, vote_title, is_repeat, count, img_width, img_height, start_time, end_time, comment_num, fabulous_num, views_num, join_num, status, is_del, publish_result, publish_at, release_at, update_at, publish_by |
| | | </sql> |
| | | <update id="updateStatusById"> |
| | | UPDATE `com_act_discuss` SET status = #{status}, update_at = NOW() WHERE id = #{discussId} |
| | | </update> |
| | | <update id="incrCommentAndJoinNumById"> |
| | | UPDATE `com_act_discuss` |
| | | SET comment_num = comment_num + 1, |
| | | <if test="isFirstComment"> |
| | | join_num = join_num + 1, |
| | | </if> |
| | | update_at = NOW() WHERE id = #{discussId} |
| | | </update> |
| | | <update id="incrOrDecrFabulousNumByType"> |
| | | UPDATE `com_act_discuss` |
| | | SET fabulous_num = IF(IF(#{isIncr},fabulous_num + 1,fabulous_num - 1) >= 0,IF(#{isIncr},fabulous_num + 1,fabulous_num - 1),0), update_at = NOW() |
| | | WHERE id = #{discussId} |
| | | </update> |
| | | <update id="batchUpdateViewNum" parameterType="java.util.Map"> |
| | | UPDATE `com_act_discuss` SET views_num = CASE id |
| | | <foreach collection="needDealMap.entrySet()" item="value" index="key"> |
| | | WHEN #{key} THEN #{value} |
| | | </foreach> |
| | | END,update_at = NOW() |
| | | WHERE id = CASE id |
| | | <foreach collection="needDealMap.entrySet()" index="key"> |
| | | WHEN #{key} THEN #{key} |
| | | </foreach> |
| | | END |
| | | </update> |
| | | |
| | | <select id="pageDiscuss" parameterType="com.panzhihua.common.model.dtos.community.PageComActDiscussDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActDiscussVO"> |
| | | SELECT |
| | | t.* |
| | | FROM |
| | | ( |
| | | SELECT |
| | | d.id, |
| | | d.`discuss_subject`, |
| | | d.type, |
| | | COUNT( DISTINCT c.id ) commentNum, |
| | | u.NAME userName, |
| | | u.nick_name userNickName, |
| | | d.create_at |
| | | FROM |
| | | com_act_discuss d |
| | | JOIN sys_user u ON d.user_id = u.user_id |
| | | LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id |
| | | WHERE |
| | | d.community_id = #{pageComActDiscussDTO.communityId} and d.is_del = 2 |
| | | <if test = 'pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""' > |
| | | AND d.`discuss_subject` LIKE concat(#{pageComActDiscussDTO.subject}, '%' ) |
| | | </if> |
| | | <if test = 'pageComActDiscussDTO.begin != null ' > |
| | | AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} |
| | | |
| | | AND #{pageComActDiscussDTO.end} |
| | | </if> |
| | | <if test="pageComActDiscussDTO.status != null"> |
| | | and d.status = #{pageComActDiscussDTO.status} |
| | | </if> |
| | | GROUP BY d.id )t |
| | | order by t.create_at desc |
| | | </select> |
| | | |
| | | <select id="pageDiscussAdmin" parameterType="com.panzhihua.common.model.dtos.community.PageComActDiscussDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActDiscussVO"> |
| | | SELECT |
| | | d.id, |
| | | d.`discuss_subject`, |
| | | d.type, |
| | | d.comment_num, |
| | | d.fabulous_num as signNum, |
| | | d.views_num, |
| | | d.status, |
| | | u.NAME userName, |
| | | u.nick_name userNickName, |
| | | d.create_at |
| | | FROM |
| | | com_act_discuss d |
| | | JOIN sys_user u ON d.user_id = u.user_id |
| | | WHERE |
| | | d.community_id = #{pageComActDiscussDTO.communityId} and d.is_del = 2 |
| | | <if test = 'pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""' > |
| | | AND d.`discuss_subject` LIKE concat(#{pageComActDiscussDTO.subject}, '%' ) |
| | | </if> |
| | | <if test = 'pageComActDiscussDTO.begin != null ' > |
| | | AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} |
| | | AND #{pageComActDiscussDTO.end} |
| | | </if> |
| | | <if test="pageComActDiscussDTO.status != null"> |
| | | and d.status = #{pageComActDiscussDTO.status} |
| | | </if> |
| | | <if test="pageComActDiscussDTO.keyWord != null and pageComActDiscussDTO.keyWord != """> |
| | | and (d.`discuss_subject` LIKE concat(#{pageComActDiscussDTO.keyWord}, '%' ) or |
| | | u.`name` LIKE concat(#{pageComActDiscussDTO.keyWord}, '%' )) |
| | | </if> |
| | | order by d.create_at desc |
| | | </select> |
| | | <select id="pageDiscussCommentApplets" resultType="com.panzhihua.common.model.vos.community.ComActDiscussCommentVO"> |
| | | SELECT * FROM ( |
| | | SELECT u.`name` userName, IFNULL(u.`nick_name`, '社区管理员') AS userNickName, u.`image_url`, u.phone, |
| | | u.type AS userType, c.`comment`, c.`parent_id`, c.`is_author`, c.`is_topping`, COUNT( cu.id ) num, c.create_at, c.id |
| | | FROM com_act_discuss_comment c |
| | | JOIN sys_user u ON c.user_id = u.user_id |
| | | JOIN com_act_discuss d ON c.discuss_id = d.id |
| | | <if test='pageComActDiscussCommentDTO.name != null and pageComActDiscussCommentDTO.name.trim() != ""'> |
| | | AND u.`name` LIKE concat( #{pageComActDiscussCommentDTO.name}, '%' ) |
| | | </if> |
| | | <if test='pageComActDiscussCommentDTO.account != null and pageComActDiscussCommentDTO.account.trim() != ""'> |
| | | AND u.phone LIKE concat( #{pageComActDiscussCommentDTO.account}, '%' ) |
| | | </if> |
| | | LEFT JOIN com_act_discuss_comment_user cu ON c.id = cu.disscuss_comment_id |
| | | WHERE c.discuss_id=#{pageComActDiscussCommentDTO.id} AND parent_id=0 AND c.is_del = 2 |
| | | <if test='pageComActDiscussCommentDTO.comment != null and pageComActDiscussCommentDTO.comment.trim() != ""'> |
| | | AND c.`comment` LIKE concat( '%', #{pageComActDiscussCommentDTO.comment}, '%' ) |
| | | </if> |
| | | GROUP BY c.id |
| | | ) t ORDER BY t.is_topping DESC , t.create_at DESC |
| | | </select> |
| | | <select id="pageDiscussApplets" resultType="com.panzhihua.common.model.vos.community.ComActDiscussVO"> |
| | | SELECT t.* FROM ( |
| | | SELECT d.id, d.vote_title, if(d.address IS NULL OR d.address='null',a.name,d.address )address, d.photo_pah, |
| | | d.`discuss_subject`, d.type, d.end_time, d.status, d.views_num, d.join_num, d.fabulous_num AS signNum, |
| | | d.comment_num AS commentNum, d.release_at, d.img_width, d.img_height, d.is_repeat, d.count, u.type AS userType, if(u.type=1,u.name,a.name) userName, |
| | | if(u.type=1,u.nick_name,a.name) userNickName, |
| | | <if test='pageComActDiscussDTO.loginUserId != null '> |
| | | if(du.id IS NOT NULL,1,0) haveSign, if(ou.id IS NOT NULL,1,0) haveVote, |
| | | </if> |
| | | u.image_url, d.create_at |
| | | FROM com_act_discuss d |
| | | JOIN sys_user u ON d.user_id = u.user_id |
| | | JOIN com_act a ON d.community_id = a.community_id |
| | | LEFT JOIN com_act_discuss_option do ON d.id = do.discuss_id |
| | | LEFT JOIN com_act_discuss_user du ON d.id = du.discuss_id |
| | | <if test='pageComActDiscussDTO.loginUserId != null '> |
| | | LEFT JOIN com_act_discuss_option_user ou ON do.id=ou.discuss_option_id AND ou.user_id=#{pageComActDiscussDTO.loginUserId} |
| | | </if> |
| | | WHERE d.community_id=#{pageComActDiscussDTO.communityId} AND d.is_del = 2 AND d.status != 1 |
| | | <if test='pageComActDiscussDTO.type != null '> |
| | | AND d.`type` = #{pageComActDiscussDTO.type} |
| | | </if> |
| | | <if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'> |
| | | AND d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) |
| | | </if> |
| | | <if test='pageComActDiscussDTO.userId != null and pageComActDiscussDTO.userId !=0 '> |
| | | AND d.`user_id` = #{pageComActDiscussDTO.userId} |
| | | </if> |
| | | <if test='pageComActDiscussDTO.begin != null '> |
| | | AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} AND #{pageComActDiscussDTO.end} |
| | | </if> |
| | | <if test='pageComActDiscussDTO.displayStatus != null and pageComActDiscussDTO.displayStatus == 1'> |
| | | AND d.`end_time` > now() |
| | | </if> |
| | | <if test='pageComActDiscussDTO.displayStatus != null and pageComActDiscussDTO.displayStatus == 2'> |
| | | AND d.`end_time` < now() |
| | | </if> |
| | | GROUP BY d.id |
| | | ) t ORDER BY t.create_at DESC |
| | | </select> |
| | | |
| | | <update id="addCommentCount"> |
| | | update com_act_discuss set comment_num = comment_num + #{num} where id = #{discussId} |
| | | </update> |
| | | |
| | | <select id="pageDiscussCommentAdmin" parameterType="com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActDiscussCommentVO"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | ( |
| | | SELECT |
| | | u.`name` userName, |
| | | u.nick_name userNickName, |
| | | u.image_url, |
| | | u.phone, |
| | | c.`comment`, |
| | | c.`parent_id`, |
| | | COUNT( DISTINCT cu.id ) num, |
| | | COUNT( c1.id ) replyNum, |
| | | c.create_at, |
| | | c.is_topping, |
| | | c.id |
| | | FROM |
| | | com_act_discuss_comment c |
| | | JOIN sys_user u ON c.user_id = u.user_id |
| | | LEFT JOIN com_act_discuss_comment_user cu ON c.id = cu.disscuss_comment_id |
| | | LEFT JOIN com_act_discuss_comment c1 ON c1.parent_id = c.id and c1.is_del = 2 |
| | | WHERE |
| | | c.discuss_id = #{pageComActDiscussCommentDTO.id} and c.parent_id = 0 and c.is_del = 2 |
| | | <if test = 'pageComActDiscussCommentDTO.keyWord != null and pageComActDiscussCommentDTO.keyWord.trim() != ""' > |
| | | AND (c.`comment` LIKE concat( '%', #{pageComActDiscussCommentDTO.keyWord }, '%' ) or |
| | | u.`name` LIKE concat(#{pageComActDiscussCommentDTO.keyWord}, '%' ) or |
| | | u.phone LIKE concat(#{pageComActDiscussCommentDTO.keyWord}, '%' )) |
| | | </if> |
| | | GROUP BY |
| | | c.id |
| | | ) t |
| | | ORDER BY |
| | | t.is_topping DESC,t.create_at DESC |
| | | </select> |
| | | |
| | | <select id="getDiscussCommentReplyList" resultType="com.panzhihua.common.model.vos.community.ComActDiscussCommentVO"> |
| | | SELECT |
| | | cadc.id, |
| | | cadc.discuss_id, |
| | | cadc.`comment`, |
| | | cadc.create_at, |
| | | cadc.is_author, |
| | | cadc.user_id, |
| | | IFNULL( su.`name`, su.nick_name ) AS userName |
| | | FROM |
| | | com_act_discuss_comment AS cadc |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadc.user_id |
| | | WHERE |
| | | cadc.is_del = 2 |
| | | AND cadc.parent_id = #{commentId} |
| | | order by cadc.create_at desc |
| | | limit 10 |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActDiscussOptionDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActDiscussOptionDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="discuss_id" property="discussId"/> |
| | | <result column="option_content" property="optionContent"/> |
| | | <result column="create_at" property="createAt"/> |
| | | <result column="option_url" property="optionUrl"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, discuss_id, option_content, create_at, option_url |
| | | </sql> |
| | | |
| | | <select id="getDiscussOptionList" resultType="com.panzhihua.common.model.vos.community.ComActDiscussOptionVO"> |
| | | SELECT |
| | | cado.id, |
| | | cado.option_content, |
| | | cado.option_url, |
| | | ( SELECT count( id ) FROM com_act_discuss_option_user WHERE discuss_option_id = cado.id ) AS num, |
| | | ( SELECT count( id ) FROM com_act_discuss_option_user WHERE discuss_id = cado.discuss_id ) AS allNum |
| | | FROM |
| | | com_act_discuss_option AS cado |
| | | WHERE |
| | | discuss_id = #{discussId} |
| | | ORDER BY |
| | | num DESC |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActDiscussOptionUserDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActDiscussOptionUserDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="discuss_option_id" property="discussOptionId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="create_at" property="createAt"/> |
| | | <result column="discuss_id" property="discussId"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, discuss_option_id, user_id, create_at, discuss_id |
| | | </sql> |
| | | <insert id="batchInsert" parameterType="java.util.List"> |
| | | INSERT INTO `com_act_discuss_option_user`(discuss_option_id,user_id,create_at,discuss_id) |
| | | VALUES |
| | | <foreach collection="comActDiscussOptionUserDOList" item="item" index="index" separator="," > |
| | | (#{item.discussOptionId}, #{item.userId}, now(), #{item.discussId}) |
| | | </foreach> |
| | | </insert> |
| | | <select id="selectVotedVotesInToday" resultType="java.lang.Integer"> |
| | | SELECT COUNT(1) FROM `com_act_discuss_option_user` |
| | | WHERE discuss_id = #{discussId} AND user_id = #{userId} AND DATE(create_at) >= DATE(now()) |
| | | AND DATE(create_at) < DATE_ADD(DATE(now()),INTERVAL 1 DAY) |
| | | </select> |
| | | <select id="selectVotedRecords" resultType="com.panzhihua.common.model.vos.community.ComActDiscussOptionUserVO"> |
| | | SELECT |
| | | cadou.*, |
| | | su.nick_name, |
| | | su.image_url |
| | | FROM `com_act_discuss_option_user` cadou |
| | | LEFT JOIN `sys_user` su ON cadou.user_id = su.user_id |
| | | WHERE cadou.discuss_id = #{discussId} GROUP BY cadou.user_id limit 6 |
| | | </select> |
| | | <select id="selectVotedPersonNum" resultType="java.lang.Integer"> |
| | | SELECT COUNT(DISTINCT `user_id`) |
| | | FROM `com_act_discuss_option_user` |
| | | WHERE discuss_id = #{discussId} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActDiscussUserDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActDiscussUserDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="discuss_id" property="discussId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="create_at" property="createAt"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, discuss_id, user_id, create_at |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActFourMemberDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComActFourMember" id="ComActFourMemberBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="position" column="position"/> |
| | | <result property="jurisdiction" column="jurisdiction"/> |
| | | <result property="communityId" column="community_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="jurisdictionContent" column="jurisdiction_content"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="baseResultMap" type="com.panzhihua.common.model.vos.community.ComActFourMemberVO"> |
| | | <collection property="buildings" |
| | | ofType="String" |
| | | column="{id = jurisdiction}" |
| | | select="selectBuilding" |
| | | javaType="java.util.ArrayList" /> |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultMap="baseResultMap"> |
| | | select t.*,t1.* from com_act_four_member t left join sys_user t1 on t.user_id = t1.user_id |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.paramId !=null"> |
| | | and t.community_id =#{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.position !=null and commonPage.position !=''"> |
| | | and t.position like concat(#{commonPage.position},'%') |
| | | </if> |
| | | <if test="commonPage.keyword !=null and commonPage.keyword !=''"> |
| | | and (t1.name like concat(#{commonPage.keyword},'%') or t1.phone like concat(#{commonPage.keyword},'%') or t.jurisdiction_content like concat(#{commonPage.keyword},'%')) |
| | | </if> |
| | | <if test="commonPage.status !=null"> |
| | | and t1.status =#{commonPage.status} |
| | | </if> |
| | | </where> |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | <select id="selectBuilding" resultType="String"> |
| | | select concat(t1.group_at,t.name,'栋') from com_mng_building t left join com_mng_village t1 on t.village_id = t1.village_id where t.id in (#{id}) |
| | | </select> |
| | | |
| | | <select id="getById" resultMap="baseResultMap"> |
| | | select t.*,t1.* from com_act_four_member t left join sys_user t1 on t.user_id = t1.user_id where t.id =#{id} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | ORDER BY w.create_at desc |
| | | </select> |
| | | |
| | | <select id="getWishHandleListAdmin" resultType="com.panzhihua.common.model.vos.user.SysUserVO"> |
| | | <if test="type != null and type == 1"> |
| | | select user_id,`name` as `name` from sys_user where `type` = 3 and community_id = #{communityId} and status = 1 |
| | | </if> |
| | | <if test="type != null and type == 2"> |
| | | select user_id,IFNULL(`name`,nick_name) as `name` from sys_user where `type` = 1 and community_id = #{communityId} and status = 1 and is_partymember = 1 |
| | | </if> |
| | | <if test="type != null and type == 3"> |
| | | select user_id,IFNULL(`name`,nick_name) as `name` from sys_user where `type` = 1 and community_id = #{communityId} and status = 1 and is_volunteer = 1 |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getUserByUserId" resultType="com.panzhihua.common.model.vos.user.SysUserVO"> |
| | | select user_id,IFNULL(`name`,nick_name) as `name`,`type`,is_volunteer,is_partymember from sys_user where user_id = #{userId} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActSocialOrgDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComActSocialOrg" id="ComActSocialOrgBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="businessNumber" column="business_number"/> |
| | | <result property="buildDate" column="build_date"/> |
| | | <result property="agencyCode" column="agency_code"/> |
| | | <result property="weixinOfficialAccounts" column="weixin_official_accounts"/> |
| | | <result property="companyType" column="company_type"/> |
| | | <result property="registFee" column="regist_fee"/> |
| | | <result property="assetsTotal" column="assets_total"/> |
| | | <result property="assetsNet" column="assets_net"/> |
| | | <result property="salesFee" column="sales_fee"/> |
| | | <result property="taxesLastYear" column="taxes_last_year"/> |
| | | <result property="staffCount" column="staff_count"/> |
| | | <result property="maillingAddr" column="mailling_addr"/> |
| | | <result property="postCode" column="post_code"/> |
| | | <result property="officialUrl" column="official_url"/> |
| | | <result property="corporationName" column="corporation_name"/> |
| | | <result property="corporationGen" column="corporation_gen"/> |
| | | <result property="corporationOfficePhone" column="corporation_office_phone"/> |
| | | <result property="corporationPosition" column="corporation_position"/> |
| | | <result property="corporationPhone" column="corporation_phone"/> |
| | | <result property="corporationEmail" column="corporation_email"/> |
| | | <result property="contactName" column="contact_name"/> |
| | | <result property="contactGen" column="contact_gen"/> |
| | | <result property="contactOfficePhone" column="contact_office_phone"/> |
| | | <result property="contactPosition" column="contact_position"/> |
| | | <result property="contactPhone" column="contact_phone"/> |
| | | <result property="contactEmail" column="contact_email"/> |
| | | <result property="businessScope" column="business_scope"/> |
| | | <result property="businessImpact" column="business_impact"/> |
| | | <result property="attachUrl" column="attach_url"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createAt" column="create_at"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateAt" column="update_at"/> |
| | | <result property="communityId" column="community_id"/> |
| | | <result property="userId" column="user_id"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComActSocialOrgVO"> |
| | | select t.*,t1.account,t1.password,t2.role_id as roleId from com_act_social_org t |
| | | left join sys_user t1 on t.user_id = t1.user_id |
| | | left join sys_user_role t2 on t.user_id = t2.user_id |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.type!=null"> |
| | | and t.company_type =#{commonPage.type} |
| | | </if> |
| | | <if test="commonPage.name!=null and commonPage.name!=''"> |
| | | and t.name like concat(#{commonPage.name},'%') |
| | | </if> |
| | | <if test="commonPage.serialNo!=null and commonPage.serialNo!=''"> |
| | | and t.agency_code like concat(#{commonPage.serialNo},'%') |
| | | </if> |
| | | <if test="commonPage.username!=null and commonPage.username!=''"> |
| | | and t.corporation_name like concat(#{commonPage.username},'%') |
| | | </if> |
| | | <if test="commonPage.systemName!=null and commonPage.systemName!=''"> |
| | | and t.contact_name like concat(#{commonPage.systemName},'%') |
| | | </if> |
| | | <if test="commonPage.paramId!=null"> |
| | | and t.community_id =#{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.phone!=null and commonPage.phone!=''"> |
| | | and t.contact_phone like concat(#{commonPage.phone},'%') |
| | | </if> |
| | | </where> |
| | | order by t.create_at desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <id column="id" property="id" /> |
| | | <result column="elderlies_id" property="elderliesId" /> |
| | | <result column="auth_period" property="authPeriod" /> |
| | | <result column="auth_method" property="authMethod" /> |
| | | <result column="verification_result" property="verificationResult" /> |
| | | <result column="submit_user_id" property="submitUserId" /> |
| | | <result column="auth_video" property="authVideo" /> |
| | | <result column="address" property="address" /> |
| | | <result column="approver_id" property="approverId" /> |
| | | <result column="approval_status" property="approvalStatus" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | |
| | | <result column="auth_date" property="authDate" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="community_id" property="communityId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, elderlies_id, auth_period, submit_user_id, auth_video, approver, approval_status, approval_date, mark, reject_reason, auth_status, auth_date, create_at, update_at |
| | | id, elderlies_id, auth_period, auth_method, verification_result, submit_user_id, auth_video, address, approver_id, approval_status, approval_date, mark, reject_reason, auth_status, auth_date, create_at, update_at, community_id |
| | | </sql> |
| | | |
| | | <select id="pageElderAuthRecords" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO"> |
| | | SELECT |
| | | cear.id, |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | |
| | | ceae.personnel_category, |
| | | ceae.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | | cear.auth_video, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | cear.approval_status, |
| | | cear.approver_id, |
| | | su1.`name` as approverName, |
| | | cear.approval_date, |
| | | cear.auth_status |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id |
| | | WHERE |
| | | ceae.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authMethod != null and pageElderAuthRecordsDTO.authMethod != 0"> |
| | | and cear.auth_method = #{pageElderAuthRecordsDTO.authMethod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateBegin != null and pageElderAuthRecordsDTO.authDateBegin != ''"> |
| | | and cear.auth_date after #{pageElderAuthRecordsDTO.authDateBegin} |
| | |
| | | SELECT |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | cear.id, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | ceae.sex, |
| | |
| | | ceae.personnel_category, |
| | | ceae.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | cear.auth_video, |
| | | cear.approval_status, |
| | | cear.community_id, |
| | | su1.`name` as approverName, |
| | | cear.approval_date |
| | | FROM |
| | |
| | | END personnelCategory, |
| | | ceae.address, |
| | | CASE |
| | | ceae.isAlive |
| | | ceae.is_alive |
| | | WHEN 1 THEN |
| | | '是' |
| | | WHEN 0 THEN |
| | | '否' |
| | | END is_alive, |
| | | END isAlive, |
| | | CASE |
| | | cear.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | END authMethod, |
| | | cear.auth_period, |
| | | cear.auth_date, |
| | | cear.mark, |
| | |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | WHERE |
| | | cear.id in |
| | | <foreach collection="ids" item="id" open="(" separator="," close=")" > |
| | | #{id} |
| | | </foreach> |
| | | <where> |
| | | <if test="ids != null and ids.size > 0"> |
| | | and cear.id in |
| | | <foreach collection="ids" item="id" open="(" separator="," close=")" > |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | |
| | | order by cear.create_at desc |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | <if test="item.elderliesId != null"> |
| | | `elderlies_id` = #{item.elderliesId}, |
| | | </if> |
| | | <if test="item.authMethod != null and item.authMethod != 0"> |
| | | `auth_method` = #{item.authMethod}, |
| | | </if> |
| | | <if test="item.authPeriod != null and item.authPeriod != ''"> |
| | | `auth_period` = #{item.authPeriod}, |
| | |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | CASE |
| | | ceae.sex |
| | | WHEN 1 THEN |
| | | '男' |
| | | WHEN 2 THEN |
| | | '女' |
| | | WHEN 3 THEN |
| | | '其他' |
| | | ceae.sex |
| | | WHEN 1 THEN |
| | | '男' |
| | | WHEN 2 THEN |
| | | '女' |
| | | WHEN 3 THEN |
| | | '其他' |
| | | END sex, |
| | | ceae.birthday, |
| | | CASE |
| | | ceae.personnel_category |
| | | WHEN 1 THEN |
| | | '80-89周岁' |
| | | WHEN 2 THEN |
| | | '90-99周岁' |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | ceae.personnel_category |
| | | WHEN 1 THEN |
| | | '80-89周岁' |
| | | WHEN 2 THEN |
| | | '90-99周岁' |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | ceae.address, |
| | | CASE |
| | | ceae.isAlive |
| | | WHEN 1 THEN |
| | | '是' |
| | | WHEN 0 THEN |
| | | '否' |
| | | ceae.is_alive |
| | | WHEN 1 THEN |
| | | '是' |
| | | WHEN 0 THEN |
| | | '否' |
| | | END is_alive, |
| | | cear.auth_period, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | ceahr.auth_period, |
| | | ceahr.auth_date, |
| | | CASE |
| | | cear.auth_status |
| | | WHEN 1 THEN |
| | | '已认证' |
| | | WHEN 0 THEN |
| | | '未认证' |
| | | ceahr.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | WHEN 3 THEN |
| | | '线下认证' |
| | | END authMethod, |
| | | ceahr.mark, |
| | | CASE |
| | | ceahr.is_auth |
| | | WHEN 1 THEN |
| | | '已认证' |
| | | WHEN 2 THEN |
| | | '未认证' |
| | | END authStatus |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | com_elders_auth_history_record ceahr |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON ceahr.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON ceahr.submit_user_id = su.user_id |
| | | WHERE |
| | | ceae.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | ceahr.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | and ceahr.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cear.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | and ceahr.is_auth = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (ceae.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cear.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')) |
| | | <if test="pageElderAuthRecordsDTO.keyWord != null and pageElderAuthRecordsDTO.keyWord != ''"> |
| | | and (ceae.`name` like concat ('%', #{pageElderAuthRecordsDTO.keyWord}, '%') |
| | | or ceahr.mark like concat ('%', #{pageElderAuthRecordsDTO.keyWord}, '%')) |
| | | </if> |
| | | order by cear.create_at desc |
| | | order by ceahr.create_at desc |
| | | </select> |
| | | |
| | | <select id="getNextIds" resultType="long"> |
| | | select id from com_elder_auth_records where approval_status = 1 and community_id = #{communityId} and id != #{authRecordId} |
| | | </select> |
| | | |
| | | <select id="queryRecordWithPage" resultType="com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO"> |
| | | SELECT |
| | | cear.id, |
| | | cear.auth_date, |
| | | cear.auth_status, |
| | | cear.reject_reason, |
| | | cear.approval_status, |
| | | ceae.name, |
| | | ceae.id_card |
| | | FROM `com_elder_auth_records` cear |
| | | LEFT JOIN `com_elder_auth_elderlies` ceae ON cear.elderlies_id = ceae.id |
| | | WHERE cear.submit_user_id = #{pageIdentityAuthRecordDTO.submitUserId} |
| | | ORDER BY cear.id DESC |
| | | </select> |
| | | <select id="findById" resultType="com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO"> |
| | | SELECT |
| | | ceae.name, |
| | | ceae.id_card, |
| | | ca.name AS communityName, |
| | | cear.address, |
| | | cear.auth_period, |
| | | cear.auth_date, |
| | | cear.auth_video, |
| | | cear.reject_reason, |
| | | cear.approval_status |
| | | FROM `com_elder_auth_records` cear |
| | | LEFT JOIN `com_elder_auth_elderlies` ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN `com_act` ca ON ceae.community_id = ca.community_id |
| | | WHERE cear.id = #{identityAuthId} |
| | | </select> |
| | | </mapper> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="pageAuthStatisticAdmin" parameterType="com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO" |
| | | resultType="com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticVO"> |
| | | SELECT |
| | | ceahr.id, |
| | | ceahr.phone, |
| | | ceahr.`name`, |
| | | ceahr.id_card, |
| | | ceahr.sex, |
| | | ceahr.age, |
| | | ceahr.personnel_category, |
| | | ceahr.is_alive, |
| | | ceahr.auth_period, |
| | | ceahr.auth_date, |
| | | ceahr.auth_method, |
| | | ceahr.mark, |
| | | ceahr.is_auth, |
| | | ceahr.submit_user_id, |
| | | IFNULL(su.nick_name,su.`name`) as submitUserName, |
| | | IFNULL(su1.nick_name,su1.`name`) as approvalName, |
| | | ceae.address, |
| | | cear.auth_video, |
| | | cear.approval_status, |
| | | ceahr.approver_id, |
| | | ceahr.approval_date, |
| | | ceahr.brithday |
| | | FROM |
| | | com_elders_auth_history_record AS ceahr |
| | | LEFT JOIN com_elder_auth_elderlies AS ceae ON ceae.id = ceahr.elderlies_id |
| | | left join sys_user as su on su.user_id = ceahr.submit_user_id |
| | | left join sys_user as su1 on su1.user_id = ceahr.approver_id |
| | | left join com_elder_auth_records as cear on cear.id = ceahr.auth_id |
| | | <where> |
| | | <if test="pageElderAuthStatisticDTO.keyWord != null and pageElderAuthStatisticDTO.keyWord !="""> |
| | | and (ceahr.`name` like concat (#{pageElderAuthStatisticDTO.keyWord},'%') or |
| | | ceahr.id_card = #{pageElderAuthStatisticDTO.keyWord} or |
| | | ceahr.mark like concat (#{pageElderAuthStatisticDTO.keyWord},'%')) |
| | | </if> |
| | | <if test="pageElderAuthStatisticDTO.authPeriod != null and pageElderAuthStatisticDTO.authPeriod != """> |
| | | and ceahr.auth_period = #{pageElderAuthStatisticDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthStatisticDTO.authStatus != null"> |
| | | and ceahr.is_auth = #{pageElderAuthStatisticDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthStatisticDTO.personnelCategory != null"> |
| | | and ceahr.personnel_category = #{pageElderAuthStatisticDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthStatisticDTO.isAlive != null"> |
| | | and ceahr.is_alive = #{pageElderAuthStatisticDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthStatisticDTO.communityId != null"> |
| | | and ceahr.community_id = #{pageElderAuthStatisticDTO.communityId} |
| | | </if> |
| | | </where> |
| | | order by ceahr.create_at desc |
| | | </select> |
| | | |
| | | <select id="getAuthHeaderStatisticAdmin" parameterType="com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO" |
| | | resultType="com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticHeaderVO"> |
| | | SELECT |
| | | count( id ) AS allCount, |
| | | ( SELECT count( id ) FROM com_elders_auth_history_record WHERE is_auth = 1 |
| | | <if test="statisticHeaderDTO.authPeriod != null and statisticHeaderDTO.authPeriod != """> |
| | | and auth_period = #{statisticHeaderDTO.authPeriod} |
| | | </if> |
| | | <if test="statisticHeaderDTO.communityId != null"> |
| | | and community_id = #{statisticHeaderDTO.communityId} |
| | | </if> |
| | | ) AS yesCount, |
| | | ( SELECT count( id ) FROM com_elders_auth_history_record WHERE is_auth = 2 |
| | | <if test="statisticHeaderDTO.authPeriod != null and statisticHeaderDTO.authPeriod != """> |
| | | and auth_period = #{statisticHeaderDTO.authPeriod} |
| | | </if> |
| | | <if test="statisticHeaderDTO.communityId != null"> |
| | | and community_id = #{statisticHeaderDTO.communityId} |
| | | </if> |
| | | ) AS noCount |
| | | FROM |
| | | com_elders_auth_history_record |
| | | <where> |
| | | <if test="statisticHeaderDTO.authPeriod != null and statisticHeaderDTO.authPeriod != """> |
| | | and auth_period = #{statisticHeaderDTO.authPeriod} |
| | | </if> |
| | | <if test="statisticHeaderDTO.communityId != null"> |
| | | and community_id = #{statisticHeaderDTO.communityId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComMngBuildingDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.model.dos.ComMngBuildingDO" id="ComMngBuildingBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="streetId" column="street_id"/> |
| | | <result property="actId" column="act_id"/> |
| | | <result property="villageId" column="village_id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="buildFloorSum" column="build_floor_sum"/> |
| | | <result property="everyFloorSum" column="every_floor_sum"/> |
| | | <result property="buildUserSum" column="build_user_sum"/> |
| | | <result property="buildType" column="build_type"/> |
| | | <result property="buildStructure" column="build_structure"/> |
| | | <result property="useType" column="use_type"/> |
| | | <result property="buildDate" column="build_date"/> |
| | | <result property="unitTotal" column="unit_total"/> |
| | | <result property="elevatorTotal" column="elevator_total"/> |
| | | <result property="buildStatus" column="build_status"/> |
| | | <result property="path" column="path"/> |
| | | <result property="lng" column="lng"/> |
| | | <result property="lat" column="lat"/> |
| | | <result property="buildingResponsible" column="building_responsible"/> |
| | | <result property="buildingResponsibleCardNo" column="building_responsible_card_no"/> |
| | | <result property="buildingResponsiblePhone" column="building_responsible_phone"/> |
| | | <result property="buildingResponsibleType" column="building_responsible_type"/> |
| | | <result property="createAt" column="create_at"/> |
| | | <result property="updateAt" column="update_at"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="gridId" column="grid_id"/> |
| | | </resultMap> |
| | | |
| | | <select id="find" resultType="String"> |
| | | select concat(t1.group_at,t.name,'栋') from com_mng_building t left join com_mng_village t1 on t.village_id = t1.village_id where t.id in (#{id}) |
| | | </select> |
| | | |
| | | <resultMap id="selectMap" type="com.panzhihua.common.model.vos.community.VillageVO"> |
| | | <result property="value" column="villageId"/> |
| | | <result property="label" column="villageName"/> |
| | | <collection property="children" ofType="com.panzhihua.common.model.vos.community.BuildingVO" |
| | | column="{village_id = village_id}" |
| | | javaType="java.util.ArrayList"> |
| | | <result property="value" column="id"/> |
| | | <result property="label" column="name"/> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <select id="select" resultMap="selectMap"> |
| | | select t.village_id as villageId,t.name as villageName,t1.id,t1.name from com_mng_village t left join com_mng_building t1 on t.village_id = t1.village_id where t.community_id=#{id} and t1.id is not null |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <resultMap id="selectMap" type="com.panzhihua.common.model.vos.community.VillageVO"> |
| | | <result property="value" column="villageId"/> |
| | | <result property="label" column="villageName"/> |
| | | <collection property="children" ofType="com.panzhihua.common.model.vos.community.BuildingVO" |
| | | column="{village_id = village_id}" |
| | | javaType="java.util.ArrayList"> |
| | | <result property="value" column="id"/> |
| | | <result property="label" column="name"/> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <select id="getSecondHouseAddress" resultMap="selectMap"> |
| | | select t.village_id as villageId,concat(t.alley,t.house_num,'号') as villageName,t1.id,concat(t1.unit_no,'栋',t1.floor,'单元',t1.code,'号') as name from com_mng_village t left join com_mng_population_house t1 on t.village_id = t1.village_id where t.community_id=#{communityId} and t1.id is not null |
| | | </select> |
| | | |
| | | <delete id="deletePopulaitonRelation"> |
| | | delete from com_mng_population_community_tags where population_id in |
| | | <foreach item="item" collection="ids" separator="," open="(" close=")" index=""> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComPensionAuthHistoryRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComPensionAuthHistoryRecordDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="name" property="name" /> |
| | | <result column="id_card" property="idCard" /> |
| | | <result column="brithday" property="brithday" /> |
| | | <result column="age" property="age" /> |
| | | <result column="domicile" property="domicile" /> |
| | | <result column="is_auth" property="isAuth" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="elderlies_id" property="elderliesId" /> |
| | | <result column="auth_period" property="authPeriod" /> |
| | | <result column="submit_user_id" property="submitUserId" /> |
| | | <result column="auth_method" property="authMethod" /> |
| | | <result column="verification_result" property="verificationResult" /> |
| | | <result column="mark" property="mark" /> |
| | | <result column="is_alive" property="isAlive" /> |
| | | <result column="sex" property="sex" /> |
| | | <result column="auth_id" property="authId" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="auth_date" property="authDate" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | | <result column="approver_id" property="approverId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, name, id_card, brithday, age, domicile, is_auth, create_at, community_id, elderlies_id, auth_period, submit_user_id, auth_method, verification_result, mark, is_alive, sex, auth_id, phone, auth_date, approval_date, approver_id |
| | | </sql> |
| | | |
| | | <select id="pageAuthStatisticAdmin" resultType="com.panzhihua.common.model.vos.elders.ComPensionAuthStatisticVO"> |
| | | SELECT |
| | | cpahr.id, |
| | | cpahr.phone, |
| | | cpahr.`name`, |
| | | cpahr.id_card, |
| | | cpahr.sex, |
| | | cpahr.age, |
| | | cpahr.is_alive, |
| | | cpahr.auth_period, |
| | | cpahr.auth_date, |
| | | cpahr.auth_method, |
| | | cpahr.mark, |
| | | cpahr.is_auth, |
| | | cpahr.submit_user_id, |
| | | IFNULL(su.nick_name,su.`name`) as submitUserName, |
| | | IFNULL(su1.nick_name,su1.`name`) as approvalName, |
| | | cpap.address, |
| | | cpar.auth_video, |
| | | cpar.approval_status, |
| | | cpahr.approver_id, |
| | | cpahr.approval_date, |
| | | cpahr.brithday |
| | | FROM |
| | | com_pension_auth_history_record AS cpahr |
| | | LEFT JOIN com_pension_auth_pensioners AS cpap ON cpap.id = cpahr.elderlies_id |
| | | left join sys_user as su on su.user_id = cpahr.submit_user_id |
| | | left join sys_user as su1 on su1.user_id = cpahr.approver_id |
| | | left join com_pension_auth_records as cpar on cpar.id = cpahr.auth_id |
| | | <where> |
| | | <if test="pensionAuthStatisticDTO.keyWord != null and pensionAuthStatisticDTO.keyWord !="""> |
| | | and (cpahr.`name` like concat (#{pensionAuthStatisticDTO.keyWord},'%') or |
| | | cpahr.id_card = #{pensionAuthStatisticDTO.keyWord} or |
| | | cpahr.mark like concat (#{pensionAuthStatisticDTO.keyWord},'%')) |
| | | </if> |
| | | <if test="pensionAuthStatisticDTO.authPeriod != null and pensionAuthStatisticDTO.authPeriod != """> |
| | | and cpahr.auth_period = #{pensionAuthStatisticDTO.authPeriod} |
| | | </if> |
| | | <if test="pensionAuthStatisticDTO.authStatus != null"> |
| | | and cpahr.is_auth = #{pensionAuthStatisticDTO.authStatus} |
| | | </if> |
| | | <if test="pensionAuthStatisticDTO.isAlive != null"> |
| | | and cpahr.is_alive = #{pensionAuthStatisticDTO.isAlive} |
| | | </if> |
| | | <if test="pensionAuthStatisticDTO.communityId != null"> |
| | | and cpahr.community_id = #{pensionAuthStatisticDTO.communityId} |
| | | </if> |
| | | </where> |
| | | order by cpahr.create_at desc |
| | | </select> |
| | | |
| | | <select id="getAuthHeaderStatisticAdmin" parameterType="com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO" |
| | | resultType="com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticHeaderVO"> |
| | | SELECT |
| | | count( id ) AS allCount, |
| | | ( SELECT count( id ) FROM com_pension_auth_history_record WHERE is_auth = 1 |
| | | <if test="statisticHeaderDTO.authPeriod != null and statisticHeaderDTO.authPeriod != """> |
| | | and auth_period = #{statisticHeaderDTO.authPeriod} |
| | | </if> |
| | | <if test="statisticHeaderDTO.communityId != null"> |
| | | and community_id = #{statisticHeaderDTO.communityId} |
| | | </if> |
| | | ) AS yesCount, |
| | | ( SELECT count( id ) FROM com_pension_auth_history_record WHERE is_auth = 2 |
| | | <if test="statisticHeaderDTO.authPeriod != null and statisticHeaderDTO.authPeriod != """> |
| | | and auth_period = #{statisticHeaderDTO.authPeriod} |
| | | </if> |
| | | <if test="statisticHeaderDTO.communityId != null"> |
| | | and community_id = #{statisticHeaderDTO.communityId} |
| | | </if> |
| | | ) AS noCount |
| | | FROM |
| | | com_pension_auth_history_record |
| | | <where> |
| | | <if test="statisticHeaderDTO.authPeriod != null and statisticHeaderDTO.authPeriod != """> |
| | | and auth_period = #{statisticHeaderDTO.authPeriod} |
| | | </if> |
| | | <if test="statisticHeaderDTO.communityId != null"> |
| | | and community_id = #{statisticHeaderDTO.communityId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <id column="id" property="id" /> |
| | | <result column="pensioner_id" property="pensionerId" /> |
| | | <result column="auth_period" property="authPeriod" /> |
| | | <result column="auth_method" property="authMethod" /> |
| | | <result column="verification_result" property="verificationResult" /> |
| | | <result column="submit_user_id" property="submitUserId" /> |
| | | <result column="auth_video" property="authVideo" /> |
| | | <result column="address" property="address" /> |
| | | <result column="approver_id" property="approverId" /> |
| | | <result column="approval_status" property="approvalStatus" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, pensioner_id, auth_period, submit_user_id, auth_video, approver, approval_status, approval_date, mark, reject_reason, auth_status, auth_date, create_at, update_at |
| | | id, pensioner_id, auth_period, authMethod, verification_result, submit_user_id, auth_video, address, approver_id, approval_status, approval_date, mark, reject_reason, auth_status, auth_date, create_at, update_at |
| | | </sql> |
| | | |
| | | <select id="pagePensionAuthRecords" resultType="com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO"> |
| | |
| | | cpap.is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | cpar.auth_method, |
| | | cpar.mark, |
| | | cpar.approval_status, |
| | | cpar.id, |
| | | cpar.auth_status |
| | | FROM |
| | | com_pension_auth_records cpar |
| | |
| | | cpap.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cpar.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authMethod != null and pageElderAuthRecordsDTO.authMethod != 0"> |
| | | and cpar.auth_method = #{pageElderAuthRecordsDTO.authMethod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateBegin != null and pageElderAuthRecordsDTO.authDateBegin != ''"> |
| | | and cpar.auth_date after #{pageElderAuthRecordsDTO.authDateBegin} |
| | |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | cpar.mark, |
| | | cpar.auth_method, |
| | | cpar.auth_video, |
| | | cpar.approval_status, |
| | | su1.`name` as approverName, |
| | |
| | | com_pension_auth_records cpar |
| | | LEFT JOIN com_pension_auth_pensioners cpap ON cpar.pensioner_id = cpap.id |
| | | LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id |
| | | LEFT JOIN sys_user su1 ON ccparear.approver_id = su1.user_id |
| | | LEFT JOIN sys_user su1 ON cpar.approver_id = su1.user_id |
| | | WHERE |
| | | cpar.id = #{authRecordId} |
| | | </select> |
| | |
| | | END is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | CASE |
| | | cpar.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | END authMethod, |
| | | cpar.mark, |
| | | CASE |
| | | cpar.approval_status |
| | |
| | | <if test="item.pensionerId != null"> |
| | | `pensioner_id` = #{item.pensionerId}, |
| | | </if> |
| | | <if test="item.authPeriod != null and item.authPeriod != ''"> |
| | | <if test="item.authMethod != null and item.authMethod != 0"> |
| | | `auth_method` = #{item.authMethod}, |
| | | </if> |
| | | <if test="item.authPeriod != null and item.authPeriod != '""'"> |
| | | `auth_period` = #{item.authPeriod}, |
| | | </if> |
| | | <if test="item.submitUserId != null"> |
| | | `submit_user_id` = #{item.submitUserId}, |
| | | </if> |
| | | <if test="item.authVideo != null and item.authVideo != ''"> |
| | | <if test="item.authVideo != null and item.authVideo != '""'"> |
| | | `auth_video` = #{item.authVideo}, |
| | | </if> |
| | | <if test="item.address != null and item.address != ''"> |
| | | <if test="item.address != null and item.address != '""'"> |
| | | `address` = #{item.address}, |
| | | </if> |
| | | <if test="item.approverId != null"> |
| | |
| | | <if test="item.approvalDate != null"> |
| | | `approval_date` = #{item.approvalDate}, |
| | | </if> |
| | | <if test="item.mark != null and item.mark != ''"> |
| | | <if test="item.mark != null and item.mark != '""'"> |
| | | `mark` = #{item.mark}, |
| | | </if> |
| | | <if test="item.rejectReason != null and item.rejectReason != ''"> |
| | | <if test="item.rejectReason != null and item.rejectReason != '""'"> |
| | | `reject_reason` = #{item.rejectReason}, |
| | | </if> |
| | | <if test="item.authStatus != null"> |
| | |
| | | END is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | CASE |
| | | cpar.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | END authMethod, |
| | | cpar.mark, |
| | | CASE |
| | | cpar.auth_status |
| | |
| | | order by cpar.create_at desc |
| | | </select> |
| | | |
| | | <select id="queryRecordWithPage" resultType="com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO"> |
| | | SELECT |
| | | cpar.id, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | cpar.reject_reason, |
| | | cpar.approval_status, |
| | | cpap.name, |
| | | cpap.id_card |
| | | FROM `com_pension_auth_records` cpar |
| | | LEFT JOIN `com_pension_auth_pensioners` cpap ON cpar.pensioner_id = cpap.id |
| | | WHERE cpar.submit_user_id = #{pageIdentityAuthRecordDTO.submitUserId} |
| | | ORDER BY cpar.id DESC |
| | | </select> |
| | | <select id="findById" resultType="com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO"> |
| | | SELECT |
| | | cpap.name, |
| | | cpap.id_card, |
| | | ca.name AS communityName, |
| | | cpar.address, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | cpar.auth_video, |
| | | cpar.reject_reason, |
| | | cpar.approval_status |
| | | FROM `com_pension_auth_records` cpar |
| | | LEFT JOIN `com_pension_auth_pensioners` cpap ON cpar.pensioner_id = cpap.id |
| | | LEFT JOIN `com_act` ca ON cpap.community_id = ca.community_id |
| | | WHERE cpar.id = #{identityAuthId} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComPropertyDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComProperty" id="ComPropertyBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="introduction" column="introduction"/> |
| | | <result property="contactName" column="contact_name"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="address" column="address"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="communityId" column="community_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="areaId" column="area_id"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComPropertyVO"> |
| | | select t.*,t1.account,t1.password,t2.name as areaName,t3.role_id as roleId from com_property t |
| | | left join sys_user t1 on t.user_id = t1.user_id |
| | | left join com_mng_village t2 on t.area_id = t2.village_id |
| | | left join sys_user_role t3 on t.user_id = t3.user_id |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.name !=null and commonPage.name !=''"> |
| | | and t.name like concat(#{commonPage.name},'%') |
| | | </if> |
| | | <if test="commonPage.username !=null and commonPage.username !=''"> |
| | | and t.contact_name like concat(#{commonPage.username},'%') |
| | | </if> |
| | | <if test="commonPage.phone !=null and commonPage.phone !=''"> |
| | | and t.phone like concat(#{commonPage.phone},'%') |
| | | </if> |
| | | <if test="commonPage.paramId !=null"> |
| | | and t.community_id =#{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.areaId !=null"> |
| | | and t.area_id =#{commonPage.areaId} |
| | | </if> |
| | | </where> |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ConvenientConsultationStatisticsDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ConvenientConsultationStatisticsDO"> |
| | | <id column="id" property="id" /> |
| | | <id column="merchant_id" property="merchantId" /> |
| | | <id column="statistic_date" property="statisticDate" /> |
| | | <id column="consultation_volume" property="consultationVolume" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,merchant_id,statistic_date,consultation_volume |
| | | </sql> |
| | | <insert id="createTodayStatistic"> |
| | | INSERT INTO com_convenient_consultation_statistics (merchant_id, statistic_date) VALUES (#{merchantId}, NOW()) |
| | | </insert> |
| | | <update id="incrConsultationNum"> |
| | | UPDATE com_convenient_consultation_statistics SET consultation_volume = consultation_volume + 1 |
| | | WHERE merchant_id = #{merchantId} AND statistic_date = #{nowDate} |
| | | </update> |
| | | <select id="selectMonthConsultationVolume" resultType="java.lang.Integer"> |
| | | SELECT IF(SUM(consultation_volume) IS NULL,0,SUM(consultation_volume)) |
| | | FROM com_convenient_consultation_statistics |
| | | WHERE merchant_id = #{merchantId} AND (statistic_date LIKE CONCAT(#{moth}, '%') OR statistic_date IS NULL) |
| | | </select> |
| | | <select id="selectDayConsultationVolume" resultType="java.lang.Integer"> |
| | | SELECT IF(SUM(consultation_volume) IS NULL,0,SUM(consultation_volume)) |
| | | FROM com_convenient_consultation_statistics |
| | | WHERE merchant_id = #{merchantId} AND (statistic_date = #{day} OR statistic_date IS NULL) |
| | | </select> |
| | | <select id="selectSumForConsultationNum" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientConsultationStatisticsVO"> |
| | | SELECT merchant_id, SUM(consultation_volume) AS totalConsultationNum |
| | | FROM com_convenient_consultation_statistics GROUP BY merchant_id |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ConvenientMerchantDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ConvenientMerchantDO"> |
| | | <id column="id" property="id" /> |
| | | <id column="name" property="name" /> |
| | | <id column="community_id" property="communityId" /> |
| | | <id column="community_name" property="communityName" /> |
| | | <id column="logo" property="logo" /> |
| | | <id column="contacts" property="contacts" /> |
| | | <id column="id_card" property="idCard" /> |
| | | <id column="phone" property="phone" /> |
| | | <id column="address" property="address" /> |
| | | <id column="lat" property="lat" /> |
| | | <id column="lon" property="lon" /> |
| | | <id column="begin_at" property="beginAt" /> |
| | | <id column="end_at" property="endAt" /> |
| | | <id column="period" property="period" /> |
| | | <id column="introduction" property="introduction" /> |
| | | <id column="business_status" property="businessStatus" /> |
| | | <id column="user_id" property="userId" /> |
| | | <id column="consultation_volume" property="consultationVolume" /> |
| | | <id column="view_num" property="viewNum" /> |
| | | <id column="is_del" property="isDel" /> |
| | | <id column="created_at" property="createdAt" /> |
| | | <id column="created_by" property="createdBy" /> |
| | | <id column="updated_at" property="updatedAt" /> |
| | | <id column="updated_by" property="updatedBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,`name`,community_id,community_name,logo,contacts,id_card,phone,address,lat,lon,begin_at,end_at,period,introduction, |
| | | business_status,user_id,consultation_volume,is_del,created_at,created_by,updated_at,updated_by |
| | | </sql> |
| | | <select id="pageMerchant" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT ccm.*, su.account, su.status AS accountStatus, GROUP_CONCAT(ccss.service_name) AS serviceScope |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN sys_user su ON ccm.user_id = su.user_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.is_del = 0 |
| | | <if test="pageConvenientMerchantDTO.serviceId != null and pageConvenientMerchantDTO.serviceId != 0"> |
| | | AND ccss.service_category_id = #{pageConvenientMerchantDTO.serviceId} |
| | | </if> |
| | | <if test="pageConvenientMerchantDTO.accountStatus != null"> |
| | | AND su.status = #{pageConvenientMerchantDTO.accountStatus} |
| | | </if> |
| | | <if test="pageConvenientMerchantDTO.communityId != null and pageConvenientMerchantDTO.communityId != 0"> |
| | | AND ccm.community_id = #{pageConvenientMerchantDTO.communityId} |
| | | </if> |
| | | <if test="pageConvenientMerchantDTO.businessStatus != null"> |
| | | AND ccm.business_status = #{pageConvenientMerchantDTO.businessStatus} |
| | | </if> |
| | | <if test="pageConvenientMerchantDTO.keyword != null and pageConvenientMerchantDTO.keyword != """> |
| | | AND ccm.name LIKE CONCAT('%', #{pageConvenientMerchantDTO.keyword}, '%') |
| | | AND ccm.address LIKE CONCAT('%', #{pageConvenientMerchantDTO.keyword}, '%') |
| | | AND ccm.phone LIKE CONCAT('%', #{pageConvenientMerchantDTO.keyword}, '%') |
| | | </if> |
| | | GROUP BY ccm.id |
| | | </select> |
| | | <select id="selectMerchantById" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT ccm.*, su.account, su.status AS accountStatus |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN sys_user su ON ccm.user_id = su.user_id |
| | | WHERE ccm.id = #{merchantId} |
| | | </select> |
| | | <select id="getPopularMerchants" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT |
| | | temp.id, temp.name, temp.introduction, temp.logo, |
| | | temp.serviceScope, IF(SUM(temp.consultation_volume) is null, 0, SUM(temp.consultation_volume)) as monthConsultationVolume |
| | | FROM ( |
| | | SELECT |
| | | ccm.id, ccm.name, ccm.introduction, ccm.logo, |
| | | cccs.consultation_volume,GROUP_CONCAT(ccss.service_name) AS serviceScope |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN com_convenient_consultation_statistics cccs ON ccm.id = cccs.merchant_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.community_id = #{communityId} AND (cccs.statistic_date LIKE #{currentMon} OR cccs.statistic_date IS NULL) GROUP BY cccs.id |
| | | ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC |
| | | </select> |
| | | <select id="getClassifyMerchants" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT |
| | | temp.id, temp.name, temp.introduction, temp.logo, |
| | | IF(SUM(temp.consultation_volume) is null,0,SUM(temp.consultation_volume)) as monthConsultationVolume |
| | | FROM ( |
| | | SELECT |
| | | ccm.id, ccm.name, ccm.introduction, ccm.logo, cccs.consultation_volume |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN com_convenient_consultation_statistics cccs ON ccm.id = cccs.merchant_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.community_id = #{pageClassifyMerchantDTO.communityId} AND ccss.service_category_id = #{pageClassifyMerchantDTO.serviceId} |
| | | AND (cccs.statistic_date LIKE #{currentMon} OR cccs.statistic_date IS NULL) GROUP BY cccs.id |
| | | ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC |
| | | </select> |
| | | <select id="getMerchantDetail" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT |
| | | temp.id, temp.name, temp.introduction, temp.logo, temp.phone, temp.begin_at, temp.end_at, temp.period, |
| | | temp.address, temp.lat, temp.lon, temp.serviceScope, IF(SUM(temp.consultation_volume) is null,0,SUM(temp.consultation_volume)) as monthConsultationVolume |
| | | FROM ( |
| | | SELECT |
| | | ccm.id, ccm.name, ccm.introduction, ccm.logo, ccm.phone, ccm.begin_at, ccm.end_at, ccm.period, |
| | | ccm.address, ccm.lat, ccm.lon, cccs.consultation_volume,GROUP_CONCAT(ccss.service_name) AS serviceScope |
| | | FROM com_convenient_merchants ccm |
| | | INNER JOIN com_convenient_consultation_statistics cccs ON ccm.id = cccs.merchant_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.id = #{merchantId} AND (cccs.statistic_date LIKE #{currentMon} OR cccs.statistic_date IS NULL) GROUP BY cccs.id |
| | | ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC |
| | | </select> |
| | | <select id="pageSearchMerchant" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT |
| | | temp.id, temp.name, temp.introduction, temp.logo, |
| | | temp.serviceScope, IF(SUM(temp.consultation_volume) is null,0,SUM(temp.consultation_volume)) as monthConsultationVolume |
| | | FROM ( |
| | | SELECT |
| | | ccm.id, ccm.name, ccm.introduction, ccm.logo, |
| | | cccs.consultation_volume,GROUP_CONCAT(ccss.service_name) AS serviceScope |
| | | FROM com_convenient_merchants ccm |
| | | INNER JOIN com_convenient_consultation_statistics cccs ON ccm.id = cccs.merchant_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.community_id = #{pageSearchDTO.communityId} AND ccm.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%') |
| | | AND ccm.is_del = 0 AND (cccs.statistic_date LIKE #{currentMon} OR cccs.statistic_date IS NULL) GROUP BY cccs.id |
| | | ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC |
| | | </select> |
| | | <select id="exportMerchantBySearch" resultType="com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO"> |
| | | SELECT ccm.*, su.account, su.status AS accountStatus, GROUP_CONCAT(ccss.service_name) AS serviceScope, |
| | | CONCAT(ccm.period,DATE_FORMAT(ccm.begin_at,'%T'),'~',DATE_FORMAT(ccm.end_at,'%T')) AS businessTime |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN sys_user su ON ccm.user_id = su.user_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.community_id = #{exportMerchantDTO.communityId} AND ccm.is_del = 0 |
| | | <if test="exportMerchantDTO.serviceId != null and exportMerchantDTO.serviceId != 0"> |
| | | AND ccss.service_category_id = #{exportMerchantDTO.serviceId} |
| | | </if> |
| | | <if test="exportMerchantDTO.accountStatus != null"> |
| | | AND su.status = #{exportMerchantDTO.accountStatus} |
| | | </if> |
| | | <if test="exportMerchantDTO.businessStatus != null"> |
| | | AND ccm.business_status = #{exportMerchantDTO.businessStatus} |
| | | </if> |
| | | <if test="exportMerchantDTO.keyword != null and exportMerchantDTO.keyword != """> |
| | | AND ccm.name LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%') |
| | | AND ccm.address LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%') |
| | | AND ccm.phone LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%') |
| | | </if> |
| | | GROUP BY ccm.id |
| | | </select> |
| | | <select id="exportMerchantByIds" resultType="com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO"> |
| | | SELECT ccm.*, su.account, su.status AS accountStatus, GROUP_CONCAT(ccss.service_name) AS serviceScope, |
| | | CONCAT(ccm.period,DATE_FORMAT(ccm.begin_at,'%T'),'~',DATE_FORMAT(ccm.end_at,'%T')) AS businessTime |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN sys_user su ON ccm.user_id = su.user_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.id IN |
| | | <foreach collection="needExportIds" open="(" separator="," close=")" index="index" item="item"> |
| | | #{item} |
| | | </foreach> |
| | | GROUP BY ccm.id |
| | | </select> |
| | | <update id="deleteMerchantById"> |
| | | UPDATE com_convenient_merchants SET is_del = 1, updated_by = #{operator} WHERE id = #{merchantId} |
| | | </update> |
| | | <update id="batchUpdateMerchantConsultationNum"> |
| | | UPDATE `com_convenient_merchants` SET consultation_volume = CASE id |
| | | <foreach collection="consultationVOList" item="item" index="index"> |
| | | WHEN #{item.merchantId} THEN #{item.totalConsultationNum} |
| | | </foreach> |
| | | END |
| | | WHERE id = CASE id |
| | | <foreach collection="consultationVOList" item="item" index="index"> |
| | | WHEN #{item.merchantId} THEN #{item.merchantId} |
| | | </foreach> |
| | | END |
| | | </update> |
| | | <update id="batchUpdateMerchantViewNum"> |
| | | UPDATE `com_convenient_merchants` SET view_num = CASE id |
| | | <foreach collection="viewVOList" item="item" index="index"> |
| | | WHEN #{item.merchantId} THEN #{item.totalViewNum} |
| | | </foreach> |
| | | END |
| | | WHERE id = CASE id |
| | | <foreach collection="viewVOList" item="item" index="index"> |
| | | WHEN #{item.merchantId} THEN #{item.merchantId} |
| | | </foreach> |
| | | END |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ConvenientProductCategoryDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ConvenientProductCategoryDO"> |
| | | <id column="id" property="id" /> |
| | | <id column="name" property="name" /> |
| | | <id column="remark" property="remark" /> |
| | | <id column="weight" property="weight" /> |
| | | <id column="is_del" property="isDel" /> |
| | | <id column="created_at" property="createdAt" /> |
| | | <id column="created_by" property="createdBy" /> |
| | | <id column="updated_at" property="updatedAt" /> |
| | | <id column="updated_by" property="updatedBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,`name`,remark,weight,is_del,created_at,created_by,updated_at,updated_by |
| | | </sql> |
| | | <select id="pageProductCategory" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientProductCategoryVO"> |
| | | SELECT <include refid="Base_Column_List"/> |
| | | FROM com_convenient_product_categories |
| | | WHERE is_del = 0 |
| | | <if test="pageConvenientProductCategoryDTO.name != null and pageConvenientProductCategoryDTO.name.trim() != """> |
| | | AND `name` LIKE concat('%', #{pageConvenientProductCategoryDTO.name}, '%' ) |
| | | </if> |
| | | ORDER BY weight DESC |
| | | </select> |
| | | <select id="selectAllCategories" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientProductCategoryVO"> |
| | | SELECT <include refid="Base_Column_List"/> |
| | | FROM com_convenient_product_categories |
| | | WHERE is_del = 0 ORDER BY weight DESC |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ConvenientProductDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ConvenientProductDO"> |
| | | <id column="id" property="id" /> |
| | | <id column="name" property="name" /> |
| | | <id column="category_id" property="categoryId" /> |
| | | <id column="merchant_id" property="merchantId" /> |
| | | <id column="on_shelf" property="onShelf" /> |
| | | <id column="introduction" property="introduction" /> |
| | | <id column="is_del" property="isDel" /> |
| | | <id column="view_num" property="viewNum" /> |
| | | <id column="created_at" property="createdAt" /> |
| | | <id column="created_by" property="createdBy" /> |
| | | <id column="updated_at" property="updatedAt" /> |
| | | <id column="updated_by" property="updatedBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,`name`,category_id,merchant_id,on_shelf,introduction,is_del,view_num,created_at,created_by,updated_at,updated_by |
| | | </sql> |
| | | <update id="batchDeleteByIds"> |
| | | UPDATE com_convenient_products SET is_del = 1 WHERE id IN |
| | | <foreach collection="needDelIds" open="(" separator="," close=")" index="index" item="item"> |
| | | #{item} |
| | | </foreach> |
| | | </update> |
| | | <update id="batchOnShelfOrOffShelfByIds"> |
| | | UPDATE com_convenient_products SET on_shelf = #{saleStatus}, updated_by = #{updatedBy} WHERE id IN |
| | | <foreach collection="needDealIds" open="(" separator="," close=")" index="index" item="item"> |
| | | #{item} |
| | | </foreach> |
| | | </update> |
| | | <update id="incrProductView"> |
| | | UPDATE com_convenient_products SET view_num = view_num + 1 WHERE id = #{productId} |
| | | </update> |
| | | <select id="pageProduct" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO"> |
| | | SELECT ccp.id, ccp.name,ccpc.name AS categoryName,ccp.view_num,ccp.on_shelf |
| | | FROM com_convenient_products ccp |
| | | LEFT JOIN com_convenient_product_categories ccpc ON ccp.category_id = ccpc.id |
| | | WHERE ccp.merchant_id = #{pageConvenientProductDTO.merchantId} AND ccp.is_del = 0 |
| | | <if test="pageConvenientProductDTO.name != null and pageConvenientProductDTO.name != """> |
| | | AND ccp.name LIKE CONCAT('%', #{pageConvenientProductDTO.name}, '%') |
| | | </if> |
| | | <if test="pageConvenientProductDTO.categoryId != null and pageConvenientProductDTO.categoryId != 0"> |
| | | AND ccp.category_id = #{pageConvenientProductDTO.categoryId} |
| | | </if> |
| | | <if test="pageConvenientProductDTO.onShelf != null"> |
| | | AND ccp.on_shelf = #{pageConvenientProductDTO.onShelf} |
| | | </if> |
| | | </select> |
| | | <select id="getMerchantProduct" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO"> |
| | | SELECT ccp.id, ccp.name, ccp.category_id, ccp.on_shelf_at, ccp.introduction, ccpc.name AS categoryName |
| | | FROM com_convenient_products ccp |
| | | LEFT JOIN com_convenient_product_categories ccpc ON ccp.category_id = ccpc.id |
| | | INNER JOIN com_convenient_product_specifications ccps ON ccp.id = ccps.product_id |
| | | WHERE ccp.merchant_id = #{merchantId} AND ccp.is_del = 0 |
| | | AND ccp.on_shelf = 1 AND ccps.is_del = 0 GROUP BY ccp.id ORDER BY ccpc.weight DESC |
| | | </select> |
| | | <select id="getProductSpecifications" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientProductSpecificationVO"> |
| | | SELECT ccps.id, ccps.name, ccps.price, ccps.image, ccps.product_id |
| | | FROM com_convenient_products ccp |
| | | LEFT JOIN com_convenient_product_categories ccpc ON ccp.category_id = ccpc.id |
| | | INNER JOIN com_convenient_product_specifications ccps ON ccp.id = ccps.product_id |
| | | WHERE ccp.merchant_id = #{merchantId} AND ccp.is_del = 0 AND ccp.on_shelf = 1 AND ccps.is_del = 0 |
| | | </select> |
| | | <select id="pageSearchProduct" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO"> |
| | | SELECT ccp.id,ccp.`name`,ccp.category_id,ccp.merchant_id,ccp.introduction |
| | | FROM com_convenient_products ccp |
| | | LEFT JOIN com_convenient_merchants ccm ON ccp.merchant_id = ccm.id |
| | | WHERE ccm.community_id = #{pageSearchDTO.communityId} AND ccp.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%') |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ConvenientProductSpecificationDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ConvenientProductSpecificationDO"> |
| | | <id column="id" property="id" /> |
| | | <id column="name" property="name" /> |
| | | <id column="price" property="price" /> |
| | | <id column="image" property="image" /> |
| | | <id column="product_id" property="productId" /> |
| | | <id column="is_del" property="isDel" /> |
| | | <id column="created_at" property="createdAt" /> |
| | | <id column="created_by" property="createdBy" /> |
| | | <id column="updated_at" property="updatedAt" /> |
| | | <id column="updated_by" property="updatedBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,`name`,price,image,product_id,is_del,created_at,created_by,updated_at,updated_by |
| | | </sql> |
| | | <insert id="batchInsert"> |
| | | INSERT INTO `com_convenient_product_specifications`(name,price,image,product_id,created_at,created_by) |
| | | VALUES |
| | | <foreach collection="productSpecificationDOList" item="item" index="index" separator="," > |
| | | (#{item.name}, #{item.price}, #{item.image}, #{item.productId}, #{item.createdAt}, #{item.createdBy}) |
| | | </foreach> |
| | | </insert> |
| | | <update id="deleteLoseRelationSpecifications" parameterType="java.util.List"> |
| | | UPDATE com_convenient_product_specifications SET is_del = 1 |
| | | WHERE id NOT IN |
| | | <foreach collection="notNeedDelIds" open="(" separator="," close=")" index="index" item="item"> |
| | | #{item} |
| | | </foreach> |
| | | </update> |
| | | <update id="batchDeleteByProductIds"> |
| | | UPDATE com_convenient_product_specifications SET is_del = 1 |
| | | WHERE id IN |
| | | <foreach collection="needDelProductIds" open="(" separator="," close=")" index="index" item="item"> |
| | | #{item} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ConvenientServiceCategoryDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ConvenientServiceCategoryDO"> |
| | | <id column="id" property="id" /> |
| | | <id column="name" property="name" /> |
| | | <id column="icon" property="icon" /> |
| | | <id column="remark" property="remark" /> |
| | | <id column="weight" property="weight" /> |
| | | <id column="is_del" property="isDel" /> |
| | | <id column="created_at" property="createdAt" /> |
| | | <id column="created_by" property="createdBy" /> |
| | | <id column="updated_at" property="updatedAt" /> |
| | | <id column="updated_by" property="updatedBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,`name`,icon,remark,weight,is_del,created_at,created_by,updated_at,updated_by |
| | | </sql> |
| | | <insert id="createMerchantServiceRelation"> |
| | | INSERT INTO com_convenient_service_scope (merchant_id, service_category_id, service_name, created_by, created_at) |
| | | VALUES (#{merchantId}, #{serviceId}, #{name}, #{createdBy}, NOW()) |
| | | </insert> |
| | | <delete id="deleteMerchantServiceRelation"> |
| | | DELETE FROM com_convenient_service_scope WHERE merchant_id = #{merchantId} |
| | | </delete> |
| | | <select id="pageServiceCategory" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO"> |
| | | SELECT <include refid="Base_Column_List"/> |
| | | FROM com_convenient_service_categories |
| | | WHERE is_del = 0 |
| | | <if test="pageConvenientServiceCategoryDTO.name != null and pageConvenientServiceCategoryDTO.name.trim() != """> |
| | | AND `name` LIKE concat('%', #{pageConvenientServiceCategoryDTO.name}, '%' ) |
| | | </if> |
| | | ORDER BY weight DESC |
| | | </select> |
| | | <select id="selectServiceScopeByMerchantId" resultType="java.lang.String"> |
| | | SELECT GROUP_CONCAT(`service_name`) serviceScope FROM com_convenient_service_scope WHERE merchant_id = #{merchantId} |
| | | </select> |
| | | <select id="selectServiceIdsForMerchant" resultType="java.lang.Long"> |
| | | SELECT service_category_id FROM com_convenient_service_scope WHERE merchant_id = #{merchantId} |
| | | </select> |
| | | <select id="checkCategoryIsUsing" resultType="java.lang.Integer"> |
| | | SELECT COUNT(1) FROM com_convenient_service_scope WHERE service_category_id = #{categoryId} |
| | | </select> |
| | | <select id="selectSuitableServiceCategories" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO"> |
| | | SELECT ccsc.id, ccsc.name, ccsc.icon, ccsc.remark, ccsc.weight |
| | | FROM com_convenient_service_categories ccsc |
| | | INNER JOIN com_convenient_service_scope ccss ON ccsc.id = ccss.service_category_id |
| | | LEFT JOIN com_convenient_merchants ccm ON ccss.merchant_id = ccm.id |
| | | WHERE ccsc.is_del = 0 AND ccm.is_del = 0 AND ccm.community_id = #{communityId} GROUP BY ccsc.id |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ConvenientViewStatisticsDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ConvenientViewStatisticsDO"> |
| | | <id column="id" property="id" /> |
| | | <id column="merchant_id" property="merchantId" /> |
| | | <id column="statistic_date" property="statisticDate" /> |
| | | <id column="view_num" property="viewNum" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,merchant_id,statistic_date,view_num |
| | | </sql> |
| | | <insert id="createTodayStatistic"> |
| | | INSERT INTO com_convenient_view_statistics (merchant_id, statistic_date) VALUES (#{merchantId}, NOW()) |
| | | </insert> |
| | | <update id="incrViewNum"> |
| | | UPDATE com_convenient_view_statistics SET view_num = view_num + 1 |
| | | WHERE merchant_id = #{merchantId} AND statistic_date = #{nowDate} |
| | | </update> |
| | | <select id="selectMonthViewNum" resultType="java.lang.Integer"> |
| | | SELECT IF(SUM(view_num) IS NULL,0,SUM(view_num)) |
| | | FROM com_convenient_view_statistics |
| | | WHERE merchant_id = #{merchantId} AND (statistic_date LIKE CONCAT(#{moth}, '%') OR statistic_date IS NULL) |
| | | </select> |
| | | <select id="selectDayViewNum" resultType="java.lang.Integer"> |
| | | SELECT IF(SUM(view_num) IS NULL,0,SUM(view_num)) |
| | | FROM com_convenient_view_statistics |
| | | WHERE merchant_id = #{merchantId} AND (statistic_date = #{day} OR statistic_date IS NULL) |
| | | </select> |
| | | <select id="selectSumForViewNum" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO"> |
| | | SELECT merchant_id, SUM(view_num) AS totalViewNum |
| | | FROM com_convenient_view_statistics GROUP BY merchant_id |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.jpush.api</groupId> |
| | | <artifactId>jpush-client</artifactId> |
| | | <version>3.4.6</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.jpush.api</groupId> |
| | | <artifactId>jiguang-common</artifactId> |
| | | <version>1.1.8</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-openfeign</artifactId> |
| | | </dependency> |
| | |
| | | ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm(); |
| | | BeanUtils.copyProperties(comPropertyAlarmVO,comPropertyAlarm); |
| | | comPropertyAlarm.setCreateTime(DateUtil.date()); |
| | | return R.ok(this.comPropertyAlarmService.save(comPropertyAlarm)); |
| | | return this.comPropertyAlarmService.insert(comPropertyAlarm); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.service_property.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyHelpVO; |
| | | import com.panzhihua.service_property.entity.ComPropertyHelp; |
| | | import com.panzhihua.service_property.service.ComPropertyHelpService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComPropertyHelp)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 16:43:12 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comPropertyHelp") |
| | | public class ComPropertyHelpApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComPropertyHelpService comPropertyHelpService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comPropertyHelpService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Serializable id) { |
| | | return R.ok(this.comPropertyHelpService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyHelp 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyHelpVO comPropertyHelp) { |
| | | if(comPropertyHelp!=null){ |
| | | ComPropertyHelp comPropertyHelp1=new ComPropertyHelp(); |
| | | BeanUtils.copyProperties(comPropertyHelp,comPropertyHelp1); |
| | | return R.ok(this.comPropertyHelpService.save(comPropertyHelp1)); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyHelp 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyHelpVO comPropertyHelp) { |
| | | if(comPropertyHelp!=null){ |
| | | ComPropertyHelp comPropertyHelp1=new ComPropertyHelp(); |
| | | BeanUtils.copyProperties(comPropertyHelp,comPropertyHelp1); |
| | | return R.ok(this.comPropertyHelpService.updateById(comPropertyHelp1)); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comPropertyHelpService.removeById(id)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.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.property.CommonPage; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_property.entity.ComPropertyHelp; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * (ComPropertyHelp)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 16:43:11 |
| | | */ |
| | | @Mapper |
| | | public interface ComPropertyHelpDao extends BaseMapper<ComPropertyHelp> { |
| | | /** |
| | | * 分页查询 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComPropertyHelp> pageList(Page page, @Param("commonPage")CommonPage commonPage); |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty("设备类型 设备类型 1红外报警 2一键报警") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 手机号码 |
| | | */ |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 街路巷id |
| | | */ |
| | | @ApiModelProperty("街路巷id") |
| | | private Long villageId; |
| | | |
| | | /** |
| | | * 回显路径 |
| | | */ |
| | | private String path; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (ComPropertyHelp)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 16:43:11 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class ComPropertyHelp implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 804376246485599231L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | /** |
| | | * 照片 |
| | | */ |
| | | @ApiModelProperty(value = "照片") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 状态 0 禁用 1启用 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0 禁用 1启用") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | public class AlarmMessage { |
| | |
| | | if (msg.toString().startsWith("4A1803")) { |
| | | String serial = msg.toString().substring(14, 24); |
| | | myTools.writeToClient("404A03" + msg.toString().substring(msg.toString().length() - 2) + "23", ctx, "事件包"); |
| | | // ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm(); |
| | | // comPropertyAlarm.setCreateTime(DateUtil.date()); |
| | | // comPropertyAlarm.setSerialNo(serial); |
| | | // comPropertyAlarm.setType(ComPropertyAlarm.type.one); |
| | | // nettyServerHandler.comPropertyAlarmDao.insert(comPropertyAlarm); |
| | | if (msg.toString().startsWith("4A18031")) { |
| | | //正式处理 |
| | | // delayAlarm(serial); |
| | | delayAlarm(serial); |
| | | //展会处理 |
| | | ComPropertyAlarm comPropertyAlarm = new ComPropertyAlarm(); |
| | | comPropertyAlarm.setCreateTime(DateUtil.date()); |
| | | comPropertyAlarm.setSerialNo(serial); |
| | | comPropertyAlarm.setType(ComPropertyAlarm.type.one); |
| | | nettyServerHandler.comPropertyAlarmDao.insert(comPropertyAlarm); |
| | | // ComPropertyAlarm comPropertyAlarm = new ComPropertyAlarm(); |
| | | // comPropertyAlarm.setCreateTime(DateUtil.date()); |
| | | // comPropertyAlarm.setSerialNo(serial); |
| | | // comPropertyAlarm.setType(ComPropertyAlarm.type.one); |
| | | // nettyServerHandler.comPropertyAlarmDao.insert(comPropertyAlarm); |
| | | } |
| | | |
| | | } |
| | |
| | | * 查询报警详情 |
| | | */ |
| | | R selectDetail(Integer id); |
| | | |
| | | /** |
| | | * 新增报警记录 |
| | | */ |
| | | R insert(ComPropertyAlarm comPropertyAlarm); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_property.entity.ComPropertyHelp; |
| | | |
| | | /** |
| | | * (ComPropertyHelp)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 16:43:12 |
| | | */ |
| | | public interface ComPropertyHelpService extends IService<ComPropertyHelp> { |
| | | /** |
| | | * 分页查询 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | } |
| | |
| | | package com.panzhihua.service_property.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | 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.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; |
| | | import com.panzhihua.service_property.dao.ComPropertyEquipmentDao; |
| | | import com.panzhihua.service_property.entity.ComPropertyAlarm; |
| | | import com.panzhihua.service_property.dao.ComPropertyAlarmDao; |
| | | import com.panzhihua.service_property.entity.ComPropertyEquipment; |
| | | import com.panzhihua.service_property.service.ComPropertyAlarmService; |
| | | import com.panzhihua.service_property.util.JPushUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * (ComPropertyAlarm)表服务实现类 |
| | |
| | | public class ComPropertyAlarmServiceImpl extends ServiceImpl<ComPropertyAlarmDao, ComPropertyAlarm> implements ComPropertyAlarmService { |
| | | @Resource |
| | | private ComPropertyAlarmDao comPropertyAlarmDao; |
| | | @Resource |
| | | private ComPropertyEquipmentDao comPropertyEquipmentDao; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | IPage<ComPropertyAlarmVO> page=comPropertyAlarmDao.selectList(new Page(commonPage.getPage(), commonPage.getSize()),commonPage); |
| | |
| | | public R selectDetail(Integer id) { |
| | | return R.ok(comPropertyAlarmDao.selectById(id)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(ComPropertyAlarm comPropertyAlarm) { |
| | | if(comPropertyAlarm!=null){ |
| | | ComPropertyEquipment comPropertyEquipment=comPropertyEquipmentDao.selectOne(new QueryWrapper<ComPropertyEquipment>().lambda().eq(ComPropertyEquipment::getSerialNo,comPropertyAlarm.getSerialNo())); |
| | | ComPropertyAlarmVO propertyAlarmVO=new ComPropertyAlarmVO(); |
| | | if(comPropertyEquipment!=null) { |
| | | if (comPropertyAlarm.getType().equals(ComPropertyAlarm.type.one)) { |
| | | comPropertyAlarm.setStatus(ComPropertyAlarm.status.dcl); |
| | | comPropertyAlarm.setCommunityId(comPropertyEquipment.getCommunityId()); |
| | | comPropertyAlarm.setPhone(comPropertyEquipment.getPhone()); |
| | | comPropertyAlarm.setName(comPropertyEquipment.getUsername()); |
| | | if (comPropertyAlarmDao.insert(comPropertyAlarm) > 0) { |
| | | BeanUtils.copyProperties(comPropertyAlarm,propertyAlarmVO); |
| | | propertyAlarmVO.setLatitude(comPropertyEquipment.getLatitude()); |
| | | propertyAlarmVO.setLongitude(comPropertyEquipment.getLongitude()); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("title", "一键报警通知"); |
| | | map.put("msg", comPropertyEquipment.getPosition() + "," + comPropertyEquipment.getUsername() + "发起报警"); |
| | | map.put("communityId", comPropertyEquipment.getCommunityId().toString()); |
| | | map.put("alarm",JSONObject.toJSONString(propertyAlarmVO)); |
| | | JPushUtil.jpushAndroid(map); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } else { |
| | | if (comPropertyAlarmDao.insert(comPropertyAlarm) > 0) { |
| | | BeanUtils.copyProperties(comPropertyAlarm,propertyAlarmVO); |
| | | propertyAlarmVO.setLatitude(comPropertyEquipment.getLatitude()); |
| | | propertyAlarmVO.setLongitude(comPropertyEquipment.getLongitude()); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("title", "长时间未移动报警通知"); |
| | | map.put("msg", comPropertyEquipment.getPosition() + "," + comPropertyEquipment.getUsername() + "长时间未移动报警"); |
| | | map.put("communityId", comPropertyEquipment.getCommunityId().toString()); |
| | | map.put("alarm",JSONObject.toJSONString(propertyAlarmVO)); |
| | | JPushUtil.jpushAndroid(map); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_property.entity.ComPropertyHelp; |
| | | import com.panzhihua.service_property.dao.ComPropertyHelpDao; |
| | | import com.panzhihua.service_property.service.ComPropertyHelpService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * (ComPropertyHelp)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-18 16:43:12 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComPropertyHelpServiceImpl extends ServiceImpl<ComPropertyHelpDao, ComPropertyHelp> implements ComPropertyHelpService { |
| | | @Resource |
| | | private ComPropertyHelpDao comPropertyHelpDao; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return R.ok(comPropertyHelpDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.util; |
| | | |
| | | import cn.jiguang.common.resp.APIConnectionException; |
| | | import cn.jiguang.common.resp.APIRequestException; |
| | | import cn.jpush.api.JPushClient; |
| | | import cn.jpush.api.push.PushResult; |
| | | import cn.jpush.api.push.model.Message; |
| | | import cn.jpush.api.push.model.Options; |
| | | import cn.jpush.api.push.model.Platform; |
| | | import cn.jpush.api.push.model.PushPayload; |
| | | import cn.jpush.api.push.model.audience.Audience; |
| | | import cn.jpush.api.push.model.notification.AndroidNotification; |
| | | import cn.jpush.api.push.model.notification.IosNotification; |
| | | import cn.jpush.api.push.model.notification.Notification; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @ClassName JPushUtil |
| | | * @Description: |
| | | * @Author gzm |
| | | * @Date 2020/6/12 10:14 |
| | | **/ |
| | | @Slf4j |
| | | public class JPushUtil { |
| | | |
| | | /** 设置好账号的app_key和masterSecret是必须的 |
| | | 用自己创建以用后的APP_KEY和MASTER_SECRET |
| | | 替换即可,后期可写到yml配置文件中*/ |
| | | @Value("{JPush.APP_KEY}") |
| | | private static String APP_KEY = "6db03724d207e0debcca68af"; |
| | | private static String MASTER_SECRET = "8ba46c3e30e1fd2cea0b246e"; |
| | | |
| | | // 极光推送>>Android |
| | | //Map<String, String> parm是我自己传过来的参数,可以自定义参数 |
| | | |
| | | public static void jpushAndroid(Map<String, String> parm) { |
| | | |
| | | // 创建JPushClient(极光推送的实例) |
| | | JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY); |
| | | // 推送的关键,构造一个payload |
| | | PushPayload payload = PushPayload.newBuilder() |
| | | // 指定android平台的用户 |
| | | .setPlatform(Platform.android()) |
| | | // 同社区账号推送 |
| | | .setAudience(Audience.tag(parm.get("communityId"))) |
| | | |
| | | // .setAudience(Audience.alias(parm.get("alias"))) // 设置别名发送,单发,点对点方式 |
| | | //.setAudience(Audience.tag("tag1")) // 设置按标签发送,相当于群发 |
| | | // .setAudience(Audience.registrationId(parm.get("id"))) // registrationId指定用户 |
| | | // 发送内容 |
| | | .setNotification(Notification.android(parm.get("msg"), |
| | | parm.get("title"), parm)) |
| | | // apnProduction指定开发环境 true为生产模式 false 为测试模式 (android不区分模式,ios区分模式) 不用设置也没关系 |
| | | // TimeToLive 两个小时的缓存时间 |
| | | .setOptions(Options.newBuilder().setApnsProduction(true).setTimeToLive(7200).build()) |
| | | // 自定义信息 |
| | | .setMessage(Message.content(parm.get("alarm"))) |
| | | .build(); |
| | | try { |
| | | PushResult pu = jpushClient.sendPush(payload); |
| | | |
| | | System.out.println(pu.toString()); |
| | | |
| | | } catch (APIConnectionException e) { |
| | | e.printStackTrace(); |
| | | } catch (APIRequestException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | // 极光推送>>ios |
| | | |
| | | // Map<String, String> parm是我自己传过来的参数,可以自定义参数 |
| | | |
| | | public static void jpushIOS(Map<String, String> parm) { |
| | | // 创建JPushClient |
| | | JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY); |
| | | PushPayload payload = PushPayload.newBuilder() |
| | | // ios平台的用户 |
| | | .setPlatform(Platform.ios()) |
| | | // 所有用户 |
| | | .setAudience(Audience.all()) |
| | | // registrationId指定用户 |
| | | //.setAudience(Audience.registrationId(parm.get("id"))) |
| | | .setNotification(Notification.newBuilder() |
| | | .addPlatformNotification(IosNotification.newBuilder() |
| | | .setAlert(parm.get("msg")) |
| | | .setBadge(+1) |
| | | // 这里是设置提示音 |
| | | .setSound("happy") |
| | | .addExtras(parm) |
| | | .build()) |
| | | .build()) |
| | | .setOptions(Options.newBuilder().setApnsProduction(false).build()) |
| | | // 自定义信息 |
| | | .setMessage(Message.newBuilder().setMsgContent(parm.get("msg")).addExtras(parm).build()) |
| | | .build(); |
| | | try { |
| | | PushResult pu = jpushClient.sendPush(payload); |
| | | log.info(String.valueOf(pu)); |
| | | } catch (APIConnectionException e) { |
| | | e.printStackTrace(); |
| | | } catch (APIRequestException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | // 极光推送>>All所有平台 |
| | | |
| | | public static void jpushAll(Map<String, String> param) { |
| | | |
| | | // 创建JPushClient |
| | | JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY); |
| | | // 创建option |
| | | PushPayload payload = PushPayload.newBuilder() |
| | | // 所有平台的用户 |
| | | .setPlatform(Platform.all()) |
| | | // registrationId指定用户 |
| | | .setAudience(Audience.registrationId(param.get("id"))) |
| | | |
| | | .setNotification(Notification.newBuilder() |
| | | // 发送ios |
| | | .addPlatformNotification(IosNotification.newBuilder() |
| | | // 消息体 |
| | | .setAlert(param.get("msg")) |
| | | .setBadge(+1) |
| | | // ios提示音 |
| | | .setSound("happy") |
| | | // 附加参数 |
| | | .addExtras(param) |
| | | .build()) |
| | | // 发送android |
| | | .addPlatformNotification(AndroidNotification.newBuilder() |
| | | // 附加参数 |
| | | .addExtras(param) |
| | | // 消息体 |
| | | .setAlert(param.get("msg")) |
| | | .build()) |
| | | .build()) |
| | | // 指定开发环境 true为生产模式 false 为测试模式 (android不区分模式,ios区分模式) |
| | | .setOptions(Options.newBuilder().setApnsProduction(true).build()) |
| | | // 自定义信息 |
| | | .setMessage(Message.newBuilder().setMsgContent(param.get("msg")).addExtras(param).build()) |
| | | .build(); |
| | | try { |
| | | PushResult pu = jpushClient.sendPush(payload); |
| | | log.info(String.valueOf(pu)); |
| | | } catch (APIConnectionException e) { |
| | | e.printStackTrace(); |
| | | } catch (APIRequestException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectList" resultType="com.panzhihua.common.model.vos.property.ComPropertyAlarmVO"> |
| | | select t.*,t1.position,t2.name as solveName from com_property_Alarm t |
| | | select t.*,t3.address as position,t1.longitude,t1.latitude,t2.name as solveName from com_property_alarm t |
| | | left join com_property_equipment t1 on t.serial_no = t1.serial_no |
| | | left join com_mng_population_house t3 on t1.village_id=t3.id |
| | | left join sys_user t2 on t.solve_id = user_id |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.paramId !=null"> |
| | | and t.community_id =#{commonPage.paramId} |
| | | and t1.community_id =#{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.type !=null"> |
| | | and t.type =#{commonPage.type} |
| | |
| | | and t.status =#{commonPage.status} |
| | | </if> |
| | | <if test="commonPage.address !=null and commonPage.address !=''"> |
| | | and t1.position like concat(#{commonPage.address},'%') |
| | | and t3.address like concat(#{commonPage.address},'%') |
| | | </if> |
| | | <if test="commonPage.username !=null and commonPage.username !=''"> |
| | | and t.name like concat(#{commonPage.username},'%') |
| | |
| | | |
| | | <select id="selectById" resultType="com.panzhihua.common.model.vos.property.ComPropertyAlarmVO"> |
| | | select t.*, t1.position, t2.name as solveName |
| | | from com_property_Alarm t |
| | | from com_property_alarm t |
| | | left join com_property_equipment t1 on t.serial_no = t1.serial_no |
| | | left join sys_user t2 on t.solve_id = user_id |
| | | where t.id=#{id} |
| | |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="type" column="type"/> |
| | | <result property="username" column="username"/> |
| | | <result property="villageId" column="villageId"/> |
| | | <result property="path" column="path"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultMap="ComPropertyEquipmentBaseResultMap"> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_property.dao.ComPropertyHelpDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_property.entity.ComPropertyHelp" id="ComPropertyHelpBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="imgUrl" column="img_url"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="status" column="status"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="communityId" column="community_id"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="pageList" resultMap="ComPropertyHelpBaseResultMap"> |
| | | select * from com_property_help |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.status !=null"> |
| | | and status =#{commonPage.status} |
| | | </if> |
| | | <if test="commonPage.paramId !=null"> |
| | | and community_id =#{commonPage.paramId} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.property.ComPropertyRepairVO" parameterType="com.panzhihua.common.model.dtos.property.CommonPage"> |
| | | select t.*,t1.name as feedback from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id |
| | | select t.*,t1.name as feedback from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id left join com_property t2 on t.property_id = t2.area_id |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.status !=null"> |
| | |
| | | <if test="commonPage.systemName !=null and commonPage.systemName.trim() !=''"> |
| | | and t1.name like concat(#{commonPage.systemName},'%') |
| | | </if> |
| | | <if test="commonPage.paramId !=null"> |
| | | and t.property_id =#{commonPage.paramId} |
| | | <if test="commonPage.paramId !=null and commonPage.paramId !=0"> |
| | | and t2.community_id =#{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.areaId !=null and commonPage.areaId !=0"> |
| | | and t2.area_id =#{commonPage.areaId} |
| | | </if> |
| | | <if test="commonPage.userId !=null"> |
| | | and t.create_by =#{commonPage.userId} |
| | | </if> |
| | | </where> |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | <select id="selectDetail" resultType="com.panzhihua.common.model.vos.property.ComPropertyRepairVO"> |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | |
| | | @PostMapping("changepassword") |
| | | public R changePassword(@RequestBody ChangePasswordVO changePasswordVO) { |
| | | return userService.changePassword(changePasswordVO); |
| | | } |
| | | |
| | | /** |
| | | * 重置密码 |
| | | * |
| | | * @param userId |
| | | * 新密码 |
| | | * @return 修改结果 |
| | | */ |
| | | @GetMapping("resetPassword") |
| | | public R resetPassword(@RequestParam("userId") Long userId) { |
| | | return userService.resetPassword(userId); |
| | | } |
| | | |
| | | /** |
| | | * 批量重置密码 |
| | | * |
| | | * @param userId |
| | | * 新密码 |
| | | * @return 修改结果 |
| | | */ |
| | | @GetMapping("resetPasswordPatch") |
| | | public R resetPasswordPatch(@RequestParam("userIds") Long[] userId) { |
| | | return userService.resetPasswordPatch(userId); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping("putuserbackstage") |
| | | R putUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) { |
| | | return userService.putUserBackstage(administratorsUserVO); |
| | | } |
| | | |
| | | /** |
| | | * 新增社区后台物业,社会组织,业主委员会账户 |
| | | * |
| | | * @param administratorsUserVO |
| | | * 账户信息 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("adduserbackstageproperty") |
| | | public R adduserbackstageproperty(@RequestBody AdministratorsUserVO administratorsUserVO) { |
| | | |
| | | return userService.addUserBackstageProperty(administratorsUserVO); |
| | | } |
| | | |
| | | /** |
| | |
| | | return userService.getUserListByCommunityId(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 检查当前用户是否是社区工作人员 |
| | | * @param phone |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("checkIsTeam") |
| | | public R checkCurrentUserIsTeam(String phone, Long communityId) { |
| | | return userService.checkCurrentUserIsTeam(phone, communityId); |
| | | } |
| | | |
| | | /** |
| | | * 便民服务新增商家账号 |
| | | * @param convenientMerchantDTO |
| | | * @return 商家用户id |
| | | */ |
| | | @PostMapping("insertMerchantAccount") |
| | | public R addConvenientMerchantUser(@RequestBody ConvenientMerchantDTO convenientMerchantDTO) { |
| | | return userService.addConvenientMerchantUser(convenientMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改便民服务商家绑定账号 |
| | | * @param userId 用户id |
| | | * @param account 修改账户 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping("putMerchantUserAccount") |
| | | public R putUserAccount(@RequestParam("userId") Long userId, @RequestParam("account") String account) { |
| | | return userService.putUserAccount(userId, account); |
| | | } |
| | | |
| | | /** |
| | | * 禁用/启用便民服务商家用户 |
| | | * @param disableOrEnableConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("disableOrEnableMerchantUsers") |
| | | public R disableOrEnableMerchantUsers(@RequestBody DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO) { |
| | | return userService.disableOrEnableMerchantUsers(disableOrEnableConvenientMerchantDTO); |
| | | } |
| | | } |
| | |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.*; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | |
| | | int putUserTag(@Param("sysUserDO") SysUserDO sysUserDO); |
| | | |
| | | /** |
| | | * 禁用/启用便民服务商家账号 |
| | | * @param status |
| | | * @param userIds |
| | | * @return |
| | | */ |
| | | int disableOrEnableMerchantUsers(@Param("status") Integer status, @Param("userIds") List<Long> userIds); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.NoticeReadDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.user.PageFeedBackDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageUserAppletsBackstageDTO; |
| | |
| | | * @return 新增结果 |
| | | */ |
| | | R addUserBackstage(AdministratorsUserVO administratorsUserVO); |
| | | |
| | | /** |
| | | * 新增社区后台物业,社会组织,业主委员会账户 |
| | | * |
| | | * @param administratorsUserVO |
| | | * 账户信息 |
| | | * @return 新增结果 |
| | | */ |
| | | R addUserBackstageProperty(AdministratorsUserVO administratorsUserVO); |
| | | |
| | | /** |
| | | * 编辑运营、社区后台账户 |
| | |
| | | */ |
| | | R getUserListByCommunityId(Long communityId); |
| | | |
| | | /** |
| | | * 检查当前用户是否是社区工作人员 |
| | | * @param phone |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R checkCurrentUserIsTeam(String phone, Long communityId); |
| | | /** |
| | | * 重置密码 |
| | | */ |
| | | R resetPassword(Long userId); |
| | | |
| | | /** |
| | | * 批量重置密码 |
| | | */ |
| | | R resetPasswordPatch(Long[] userId); |
| | | |
| | | /** |
| | | * 便民服务新增商家账号 |
| | | * @param convenientMerchantDTO |
| | | * @return 商家用户id |
| | | */ |
| | | R addConvenientMerchantUser(ConvenientMerchantDTO convenientMerchantDTO); |
| | | |
| | | /** |
| | | * 修改便民服务商家绑定账号 |
| | | * @param userId 用户id |
| | | * @param account 修改账户 |
| | | * @return 修改结果 |
| | | */ |
| | | R putUserAccount(Long userId, String account); |
| | | |
| | | /** |
| | | * 禁用/启用便民服务商家用户 |
| | | * @param disableOrEnableConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | | R disableOrEnableMerchantUsers(DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO); |
| | | } |
| | |
| | | import com.panzhihua.service_user.service.RoleService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("新增角色失败,失败原因【{}】", e.getMessage()); |
| | | if (e.getMessage().contains("unique_role_name_community_id")) { |
| | | return R.fail("角色已经存在"); |
| | | } |
| | | } |
| | | if (insert > 0) { |
| | | SysRoleDO roleDO = roleDAO.selectOne(new QueryWrapper<SysRoleDO>().lambda() |
| | |
| | | sysMenuDOS1.forEach(sysMenuDO1 -> { |
| | | SysMenuVO sysMenuVO1 = new SysMenuVO(); |
| | | BeanUtils.copyProperties(sysMenuDO1, sysMenuVO1); |
| | | List<SysMenuDO> sysMenuDOList = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda() |
| | | .eq(SysMenuDO::getParentId, sysMenuDO1.getMenuId()).orderByAsc(SysMenuDO::getOrderNum)); |
| | | List<SysMenuVO> sysMenuVOList=new ArrayList<>(); |
| | | sysMenuDOList.forEach(sysMenuDO2 -> { |
| | | SysMenuVO sysMenuVO2=new SysMenuVO(); |
| | | BeanUtils.copyProperties(sysMenuDO2,sysMenuVO2); |
| | | sysMenuVOList.add(sysMenuVO2); |
| | | }); |
| | | sysMenuVO1.setSysMenuVOList(sysMenuVOList); |
| | | sysMenuVOS1.add(sysMenuVO1); |
| | | }); |
| | | sysMenuVO.setSysMenuVOList(sysMenuVOS1); |
| | |
| | | public R putMenuRole(MenuRoleVO menuRoleVO) { |
| | | List<Long> menuIds = new ArrayList<>(); |
| | | Long roleId = menuRoleVO.getRoleId(); |
| | | if(!StringUtils.isEmpty(menuRoleVO.getRoleName())){ |
| | | SysRoleDO sysRoleDO=new SysRoleDO(); |
| | | sysRoleDO.setRoleId(roleId); |
| | | sysRoleDO.setRoleName(menuRoleVO.getRoleName()); |
| | | this.roleDAO.updateById(sysRoleDO); |
| | | } |
| | | // 删除旧的 |
| | | sysRoleMenuDAO.delete(new QueryWrapper<SysRoleMenuDO>().lambda().eq(SysRoleMenuDO::getRoleId, roleId)); |
| | | // 创建新的 |
| | |
| | | if (isAll.intValue() == 1) { |
| | | menuIds = sysMenuDAO |
| | | .selectList( |
| | | new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, menuRoleVO.getCommunityId())) |
| | | new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, 2)) |
| | | .stream().map(sysMenuDO -> sysMenuDO.getMenuId()).collect(Collectors.toList()); |
| | | } else { |
| | | menuIds = menuRoleVO.getMenuIds(); |
| | |
| | | List<Long> collect = |
| | | sysRoleMenuDOS.stream().map(sysRoleMenuDO -> sysRoleMenuDO.getMenuId()).collect(Collectors.toList()); |
| | | List<SysMenuDO> sysMenuDOS = |
| | | sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().in(SysMenuDO::getMenuId, collect)); |
| | | sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().in(SysMenuDO::getMenuId, collect).eq(SysMenuDO::getParentId,0)); |
| | | List<SysMenuVO> sysMenuVOS = new ArrayList<>(); |
| | | sysMenuDOS.forEach(sysMenuDO -> { |
| | | SysMenuVO sysMenuVO = new SysMenuVO(); |
| | | List<SysMenuVO> menuVOS=new ArrayList<>(); |
| | | BeanUtils.copyProperties(sysMenuDO, sysMenuVO); |
| | | List<SysMenuDO> sysMenuDOList=sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getParentId,sysMenuDO.getMenuId()).in(SysMenuDO::getMenuId, collect)); |
| | | sysMenuDOList.forEach(sysMenuDO1->{ |
| | | SysMenuVO sysMenuVO1 = new SysMenuVO(); |
| | | List<SysMenuVO> sysMenuVOList=new ArrayList<>(); |
| | | BeanUtils.copyProperties(sysMenuDO1, sysMenuVO1); |
| | | List<SysMenuDO> sysMenuDOList1=sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getParentId,sysMenuDO1.getMenuId()).in(SysMenuDO::getMenuId, collect)); |
| | | sysMenuDOList1.forEach(sysMenuDO2 -> { |
| | | SysMenuVO sysMenuVO2=new SysMenuVO(); |
| | | BeanUtils.copyProperties(sysMenuDO2,sysMenuVO2); |
| | | sysMenuVOList.add(sysMenuVO2); |
| | | }); |
| | | sysMenuVO1.setSysMenuVOList(sysMenuVOList); |
| | | menuVOS.add(sysMenuVO1); |
| | | }); |
| | | sysMenuVO.setSysMenuVOList(menuVOS); |
| | | sysMenuVOS.add(sysMenuVO); |
| | | }); |
| | | List<SysMenuVO> collect1 = |
| | | sysMenuVOS.stream().filter(sysMenuVO -> sysMenuVO.getParentId() == 0).collect(Collectors.toList()); |
| | | if (!ObjectUtils.isEmpty(collect1)) { |
| | | collect1.forEach(sysMenuVO -> { |
| | | Long menuId = sysMenuVO.getMenuId(); |
| | | List<SysMenuVO> sysMenuVOS1 = |
| | | sysMenuVOS.stream().filter(sysMenuVO1 -> sysMenuVO1.getParentId().intValue() == menuId.intValue()) |
| | | .collect(Collectors.toList()); |
| | | sysMenuVO.setSysMenuVOList(sysMenuVOS1); |
| | | }); |
| | | } |
| | | |
| | | return R.ok(collect1); |
| | | return R.ok(sysMenuVOS); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public R listMenuBackstageByRole(Long roleId) { |
| | | List<SysMenuVO> sysMenuVOS = new ArrayList<>(); |
| | | List<SysRoleMenuDO> sysRoleMenuDOS = |
| | | sysRoleMenuDAO.selectList(new QueryWrapper<SysRoleMenuDO>().lambda().eq(SysRoleMenuDO::getRoleId, roleId)); |
| | | if (!ObjectUtils.isEmpty(sysRoleMenuDOS)) { |
| | | List<Long> longs = |
| | | sysRoleMenuDOS.stream().map(sysRoleMenuDO -> sysRoleMenuDO.getMenuId()).collect(Collectors.toList()); |
| | | List<SysMenuDO> sysMenuDOS = |
| | | sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().in(SysMenuDO::getMenuId, longs)); |
| | | if (!ObjectUtils.isEmpty(sysMenuDOS)) { |
| | | sysMenuDOS.forEach(sysMenuDO -> { |
| | | SysMenuVO sysMenuVO1 = new SysMenuVO(); |
| | | BeanUtils.copyProperties(sysMenuDO, sysMenuVO1); |
| | | sysMenuVOS.add(sysMenuVO1); |
| | | }); |
| | | } |
| | | return R.ok(longs); |
| | | } |
| | | return R.ok(sysMenuVOS); |
| | | return R.fail(); |
| | | } |
| | | } |
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysUserDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/api/ConvenientApi.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/filter/StoreValidFilter.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/model/vos/LoginBody.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/DiscussJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java |