Merge branch 'volunteer_lyq' into 'dev'
Volunteer lyq
See merge request root/zhihuishequ!258
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.common.PageComMngVolunteerOrgTeamDto; |
| | | import com.panzhihua.common.model.dtos.common.PageComMngVolunteerServiceTypeDto; |
| | | import com.panzhihua.common.model.dtos.common.PageComMngVolunteerSkillDto; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerOrgTeamVo; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerServiceTypeVo; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerSkillVo; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | comMngVolunteerMngVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | }else{ |
| | | comMngVolunteerMngVO.setCommunityId(pageVolunteerDTO.getCommunityId()); |
| | | } |
| | | // Long communityId = this.getCommunityId(); |
| | | |
| | | // comMngVolunteerMngVO.setCommunityId(communityId); |
| | | comMngVolunteerMngVO.setPageNum(pageVolunteerDTO.getPageNum()); |
| | | comMngVolunteerMngVO.setPageSize(pageVolunteerDTO.getPageSize()); |
| | | return communityService.pageVolunteer(comMngVolunteerMngVO); |
| | |
| | | return communityService.detailVolunteer(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询志愿者组织列表", response = ComMngVolunteerOrgTeamVo.class) |
| | | @GetMapping("/volunteer/org/list") |
| | | public R listVolunteerOrgAdmin() { |
| | | PageComMngVolunteerOrgTeamDto orgTeamDto = new PageComMngVolunteerOrgTeamDto(); |
| | | orgTeamDto.setParentId(0L); |
| | | orgTeamDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.listVolunteerOrgAdmin(orgTeamDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询志愿者服务类型列表", response = ComMngVolunteerServiceTypeVo.class) |
| | | @GetMapping("/volunteer/service/type/list") |
| | | public R listVolunteerServiceTypeAdmin() { |
| | | PageComMngVolunteerServiceTypeDto serviceTypeDto = new PageComMngVolunteerServiceTypeDto(); |
| | | serviceTypeDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.listServiceTypeAdmin(serviceTypeDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询志愿者技能列表", response = ComMngVolunteerSkillVo.class) |
| | | @GetMapping("/volunteer/skill/list") |
| | | public R listVolunteerSkillAdmin() { |
| | | PageComMngVolunteerSkillDto volunteerSkillDto = new PageComMngVolunteerSkillDto(); |
| | | volunteerSkillDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.listVolunteerSkillAdmin(volunteerSkillDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "车辆登记") |
| | | @PostMapping("car/register") |
| | | public R addComMngCar(@Validated(AddGroup.class) @RequestBody ComMngCarAppletDTO comMngCarAppletDTO) { |
| | |
| | | if (Objects.isNull(communityId)) { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | return communityService.getSuitableServiceCategories(communityId); |
| | | return communityService.getSuitableServiceCategories(communityId,this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取热门商家", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/merchant/popular") |
| | | public R getPopularMerchants(@RequestBody @Valid PagePopularMerchantDTO pagePopularMerchantDTO) { |
| | | pagePopularMerchantDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.getPopularMerchants(pagePopularMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取服务类型下商家", response = ConvenientMerchantVO.class) |
| | | @PostMapping("/merchant/classify") |
| | | public R getClassifyMerchants(@RequestBody @Valid PageClassifyMerchantDTO pageClassifyMerchantDTO) { |
| | | pageClassifyMerchantDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.getClassifyMerchants(pageClassifyMerchantDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "根据距离搜索社区", response = CommunitySwitchAllAppletsVO.class) |
| | | @PostMapping("/distance/noToken") |
| | | public R searchDistance(@RequestBody SearchCommunityDTO communityDTO) { |
| | | communityDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.communitySwitchSearchDistanceList(communityDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "随手拍分类列表", response = ComActEasyPhotoClassifyVO.class) |
| | | @GetMapping("easyphoto/classify/list") |
| | | public R easyPhotoClassifyList() { |
| | | return communityService.listPhotoClassify(); |
| | | return communityService.listPhotoClassify(this.getAreaCode()); |
| | | } |
| | | } |
| | |
| | | public R putUserAuthentication(@RequestBody @Validated(AddGroup.class) LoginUserInfoVO loginUserInfoVO) { |
| | | Long userId = this.getUserId(); |
| | | loginUserInfoVO.setUserId(userId); |
| | | loginUserInfoVO.setCommunityId(this.getCommunityId()); |
| | | R r = userService.putUserAuthentication(loginUserInfoVO); |
| | | if (R.isOk(r)) { |
| | | // 通过发通知 |
| | |
| | | @PostMapping("/merchant/add") |
| | | public R addMerchant(@RequestBody @Validated(AddGroup.class) ConvenientMerchantDTO convenientMerchantDTO) { |
| | | convenientMerchantDTO.setCreatedBy(this.getUserId()); |
| | | convenientMerchantDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.addMerchant(convenientMerchantDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "所有服务分类", response = ConvenientServiceCategoryVO.class) |
| | | @GetMapping("/service-category/all") |
| | | public R getAllServiceCategories() { |
| | | return communityService.getAllServiceCategories(); |
| | | return communityService.getAllServiceCategories(this.getAreaCode()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets_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.microCommercialStreet.McsOrderVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 商业街订单表(McsOrder)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-04 16:10:07 |
| | | */ |
| | | @Api(tags = {"商业街订单API"}) |
| | | @RestController |
| | | @RequestMapping("mcsOrder") |
| | | public class McsOrderApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询订单",response = McsOrderVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return communityService.selectAllMscOrder(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "通过主键查询单条数据",response = McsOrderVO.class) |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return communityService.selectOneMscOrder(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param mcsOrderVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody McsOrderVO mcsOrderVO) { |
| | | return communityService.insertMscOrder(mcsOrderVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param mcsOrderVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改订单") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody McsOrderVO mcsOrderVO) { |
| | | return communityService.updateMscOrder(mcsOrderVO); |
| | | } |
| | | |
| | | /** |
| | | * 微信支付 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("微信支付") |
| | | @PostMapping("/wxPay") |
| | | public R wxPay(@RequestBody McsOrderVO mcsOrderVO){ |
| | | return communityService.wxPayMscOrder(mcsOrderVO); |
| | | } |
| | | |
| | | /** |
| | | * 发送提醒短信 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation("发送提醒短信") |
| | | @GetMapping("/sendContent") |
| | | public R sendContent(@RequestParam("id") Long id){ |
| | | return communityService.sendContentMcsOrder(id); |
| | | } |
| | | |
| | | /** |
| | | *微信支付回调 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("微信支付回调") |
| | | @PostMapping("/notify") |
| | | public R notify(@RequestBody McsOrderVO mcsOrderVO){ |
| | | return communityService.notifyMcsOrder(mcsOrderVO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsEvaluateDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsEvaluateVO; |
| | | 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 com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.DisableOrEnableMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsInformationDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetPopularForGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForInfoDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsConfigVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsInformationVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | /** |
| | | * @title: MicroCommercialStreetApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 微商业街相关接口 |
| | | * @author: hans |
| | | * @date: 2021/12/28 14:18 |
| | | */ |
| | | @Api(tags = {"微商业街"}) |
| | | @RestController |
| | | @RequestMapping("/microcommercialstreet") |
| | | public class MicroCommercialStreetApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "新增数字商业街商家") |
| | | @PostMapping("/merchant/add") |
| | | public R addMcsMerchant(@RequestBody @Validated(AddGroup.class) McsMerchantDTO mcsMerchantDTO) { |
| | | Long userId = this.getUserId(); |
| | | mcsMerchantDTO.setCreatedBy(userId); |
| | | mcsMerchantDTO.setUpdatedBy(userId); |
| | | return communityService.addMcsMerchant(mcsMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑数字商业街商家") |
| | | @PutMapping("/merchant/put") |
| | | public R putMcsMerchant(@RequestBody @Validated(PutGroup.class) McsMerchantDTO mcsMerchantDTO) { |
| | | mcsMerchantDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.putMcsMerchant(mcsMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询数字商业街商家详情", response = McsMerchantVO.class) |
| | | @GetMapping("/merchant/get") |
| | | public R getMcsMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.getMcsMerchant(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除数字商业街商家") |
| | | @DeleteMapping("/merchant/delete") |
| | | public R deleteMcsMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.deleteMcsMerchant(merchantId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询数字商业街商家", response = McsMerchantVO.class) |
| | | @PostMapping("/merchant/page") |
| | | public R pageMcsMerchant(@RequestBody @Valid PageMcsMerchantDTO pageMcsMerchantDTO) { |
| | | return communityService.pageMcsMerchant(pageMcsMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "禁用/启用数字商业街商家") |
| | | @PutMapping("/merchant/disable-or-enable") |
| | | public R disableOrEnableMcsMerchant(@RequestBody @Valid DisableOrEnableMcsMerchantDTO disableOrEnableMcsMerchantDTO) { |
| | | disableOrEnableMcsMerchantDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.disableOrEnableMcsMerchant(disableOrEnableMcsMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取所有数字商业街配置", response = McsConfigVO.class) |
| | | @GetMapping("/config/all") |
| | | public R getAllMcsConfig() { |
| | | return communityService.getAllMcsConfig(); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改数字商业街配置") |
| | | @PutMapping("/config/put") |
| | | public R putMcsConfig(@RequestBody List<McsConfigVO> configs) { |
| | | return communityService.putMcsConfig(configs); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询戳戳游戏", response = McsGameVO.class) |
| | | @PostMapping("/game/page") |
| | | public R pageMcsGame(@RequestBody @Valid PageMcsGameDTO pageMcsGameDTO) { |
| | | return communityService.pageMcsGame(pageMcsGameDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "设为/取消游戏热门") |
| | | @PutMapping("/game/setPopular") |
| | | public R setPopularForGame(@RequestBody @Valid SetPopularForGameDTO setPopularForGameDTO) { |
| | | setPopularForGameDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.setPopularForGame(setPopularForGameDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "上架/下架戳戳游戏") |
| | | @PutMapping("/game/setShelf") |
| | | public R setShelfForGame(@RequestBody @Valid SetShelfForGameDTO setShelfForGameDTO) { |
| | | setShelfForGameDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.setShelfForGame(setShelfForGameDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除戳戳游戏") |
| | | @DeleteMapping("/game/delete") |
| | | public R deleteMcsGame(@RequestParam("gameId") Long gameId) { |
| | | return communityService.deleteMcsGame(gameId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询戳戳资讯", response = McsInformationVO.class) |
| | | @PostMapping("/information/page") |
| | | public R pageMcsInfo(@RequestBody @Valid PageMcsInformationDTO pageMcsInformationDTO) { |
| | | return communityService.pageMcsInfo(pageMcsInformationDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "上架/下架戳戳资讯") |
| | | @PutMapping("/information/setShelf") |
| | | public R setShelfForMcsInfo(@RequestBody @Valid SetShelfForInfoDTO setShelfForInfoDTO) { |
| | | setShelfForInfoDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.setShelfForMcsInfo(setShelfForInfoDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除戳戳资讯") |
| | | @DeleteMapping("/information/delete") |
| | | public R deleteMcsInfo(@RequestParam("infoId") Long infoId) { |
| | | return communityService.deleteMcsInfo(infoId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询评价记录", response = McsEvaluateVO.class) |
| | | @PostMapping("/evaluate/page") |
| | | public R pageMcsEvaluate(@RequestBody @Valid PageMcsEvaluateDTO pageMcsEvaluateDTO) { |
| | | return communityService.pageMcsEvaluate(pageMcsEvaluateDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询评价记录详情", response = McsEvaluateVO.class) |
| | | @GetMapping("/evaluate/get") |
| | | public R getMcsEvaluate(@RequestParam("evaluateId") Long evaluateId) { |
| | | return communityService.getMcsEvaluate(evaluateId); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除评价记录") |
| | | @DeleteMapping("/evaluate/delete") |
| | | public R deleteMcsEvaluate(@RequestParam("evaluateId") Long evaluateId) { |
| | | return communityService.deleteMcsEvaluate(evaluateId); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @GetMapping("info") |
| | | public R getUserInfo() { |
| | | Long userId = this.getUserId(); |
| | | return userService.detailUser(userId); |
| | | R<LoginUserInfoVO> r=userService.detailUser(userId); |
| | | if(r.getData()!=null){ |
| | | LoginUserInfoVO loginUserInfoVO=r.getData(); |
| | | if(StringUtils.isNotEmpty(loginUserInfoVO.getAreaCode())){ |
| | | switch (loginUserInfoVO.getAreaCode()){ |
| | | case "510423": loginUserInfoVO.setCommunityName("西区运营后台"); |
| | | break; |
| | | case "510411": loginUserInfoVO.setCommunityName("仁和区运营后台"); |
| | | break; |
| | | case "510402": loginUserInfoVO.setCommunityName("东区运营后台"); |
| | | break; |
| | | default:loginUserInfoVO.setCommunityName("运营后台"); |
| | | } |
| | | } |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | return R.fail("无用户信息"); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改密码") |
| | |
| | | LoginReturnVO loginReturnVO = loginService.loginXQDP(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 微商业街用户登录 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginMcsUser") |
| | | public R loginMcsUser(@RequestParam("account") String account, @RequestParam("password") String password) { |
| | | LoginReturnVO loginReturnVO = loginService.loginMcsUser(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | } |
| | |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginXQDP(String account, String password); |
| | | |
| | | /** |
| | | * 微商业街用户登录 |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginMcsUser(String account, String password); |
| | | } |
| | |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | /** |
| | | * 微商业街用户登录 |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginMcsUser(String account, String password) { |
| | | Authentication authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_11", 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; |
| | | } |
| | | } |
| | |
| | | <artifactId>commons-net</artifactId> |
| | | <version>3.6</version> |
| | | </dependency> |
| | | <!-- thymeleaf --> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-thymeleaf</artifactId> |
| | | </dependency> |
| | | <!--FlyingSaucer--> |
| | | <dependency> |
| | | <groupId>org.xhtmlrenderer</groupId> |
| | | <artifactId>flying-saucer-pdf</artifactId> |
| | | <version>9.1.9</version> |
| | | </dependency> |
| | | <!-- batik --> |
| | | <dependency> |
| | | <groupId>org.apache.xmlgraphics</groupId> |
| | | <artifactId>batik-codec</artifactId> |
| | | <version>1.12</version> |
| | | </dependency> |
| | | <!-- 阿里easyexcel--> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | |
| | | |
| | | /** |
| | | * 通用常量信息 |
| | | * |
| | | * |
| | | * @author HUANGHONGFA |
| | | */ |
| | | public class Constants { |
| | |
| | | |
| | | public static final String CLUSTER_MEMBER_ERROR_LIST = "CLUSTER_MEMBER_ERROR_LIST_"; |
| | | |
| | | public static final String COM_MNG_VOLUNTEER_ERROR_LIST = "COM_MNG_VOLUNTEER_ERROR_LIST_"; |
| | | |
| | | public static final String CLUSTER_MEMBER_DEFAULT_IMAGE_URL = "https://www.psciio.com/files/4822602b68af48bcbbea7842aa463227/a6a7882b3fd24d60ac6809fef42d879d.png"; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Getter |
| | | public enum PopulPersonTypeEnum { |
| | | HJ(1, "户籍人员"), LS(2, "留守人员"), WD(3, "外地人员"), JW(4, "境外人员"); |
| | | HJ(1, "户籍人口"), LS(2, "留守人员"), WD(3, "外地人员"), JW(4, "境外人员"), |
| | | LD(5, "流动人口"), CZ(6, "常住人口"), ZZ(7, "暂住人口"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
New file |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.enums.PopulPersonTypeEnum; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: ComMngPopulationTempFilledExcelListen |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 实有人口临时填充人员类型 |
| | | * @author: hans |
| | | * @date: 2022/01/19 13:33 |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationTempFilledExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | private static int headSize = 0; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | private CommunityService communityService; |
| | | private Long communityId; |
| | | private Long userId; |
| | | private Map<Integer, String> headData; |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public ComMngPopulationTempFilledExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | log.info("开始填充历史数据人员类型"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = "POPULATION_FILLED_ERROR_LIST"; |
| | | |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationServeExcelVO> voList = Lists.newArrayList(); |
| | | ArrayList<ComMngPopulationMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationServeExcelVO vo = new ComMngPopulationServeExcelVO(); |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isNotEmpty(oneData.get(0)) || StringUtils.isNotEmpty(oneData.get(1))) { |
| | | if (StringUtils.isEmpty(oneData.get(0))) { |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(0)); |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证号"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(1).length() != 18) { |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(1).toUpperCase()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(2))) { |
| | | Integer isOk = PopulPersonTypeEnum.getCodeByName(oneData.get(2)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的人员类型有误"); |
| | | mistake.setPersonType(oneData.get(2)); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setPersonType(isOk); |
| | | } |
| | | // 将重复的数据进行MD5加密实现去重 |
| | | String distinct = vo.getName() + vo.getCardNo(); |
| | | try { |
| | | String distinctPass = PayUtil.MD5(distinct); |
| | | if (StringUtils.isNotEmpty(distinctPass)) { |
| | | vo.setDistinctPass(distinctPass); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("组装MD5加密字段失败,数据表格行数:" + index); |
| | | continue; |
| | | } |
| | | voList.add(vo); |
| | | index++; |
| | | } |
| | | // 根据list中的IdCard城市来去重 |
| | | List<ComMngPopulationServeExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationServeExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.filledPopulationPersonType(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationMistakeExcelVO.class); |
| | | mistakes.addAll(list); |
| | | log.info("将错误数据存入redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } else { |
| | | log.info("业务层处理逻辑失败"); |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } |
| | | } |
| | | } catch (NumberFormatException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | | log.error("数据格式有误,第" + index + "行"); |
| | | throw new ServiceException("500", "导入失败111"); |
| | | } |
| | | } |
| | | |
| | | private void setMistake(Map<Integer, String> map, ComMngPopulationMistakeExcelVO vo) { |
| | | vo.setName(map.get(0)); |
| | | vo.setCardNo(map.get(1)); |
| | | vo.setNation(map.get(2)); |
| | | vo.setPoliticalOutlook(map.get(3)); |
| | | vo.setIsRent(map.get(4)); |
| | | vo.setRelation(map.get(5)); |
| | | vo.setRoad(map.get(6)); |
| | | vo.setDoorNo(map.get(7)); |
| | | vo.setFloor(map.get(8)); |
| | | vo.setUnitNo(map.get(9)); |
| | | vo.setHouseNo(map.get(10)); |
| | | vo.setBuildPurpose(map.get(11)); |
| | | vo.setBuildArea(map.get(12)); |
| | | vo.setHouseStatus(map.get(13)); |
| | | vo.setHousePurpose(map.get(14)); |
| | | vo.setControlStatus(map.get(15)); |
| | | vo.setPhone(map.get(16)); |
| | | vo.setNativePlace(map.get(17)); |
| | | vo.setCultureLevel(map.get(18)); |
| | | vo.setMarriage(map.get(19)); |
| | | vo.setHealthy(map.get(20)); |
| | | vo.setBloodType(map.get(21)); |
| | | vo.setReligion(map.get(22)); |
| | | vo.setProfession(map.get(23)); |
| | | vo.setWorkCompany(map.get(24)); |
| | | vo.setOutOrLocal(map.get(25)); |
| | | vo.setCensusRegister(map.get(26)); |
| | | vo.setResidence(map.get(27)); |
| | | vo.setPersonType(map.get(28)); |
| | | vo.setCountry(map.get(29)); |
| | | vo.setStringOfDeparture(map.get(30)); |
| | | vo.setPersonStatus(map.get(31)); |
| | | vo.setMonthlyIncome(map.get(32)); |
| | | vo.setFamilyStatus(map.get(33)); |
| | | vo.setGoalInChina(map.get(34)); |
| | | vo.setStringOfArrival(map.get(35)); |
| | | vo.setRemark(map.get(36)); |
| | | vo.setIdCardPositive(map.get(37)); |
| | | vo.setIdCardBack(map.get(38)); |
| | | vo.setHouseHold(map.get(39)); |
| | | vo.setDeath(map.get(40)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerErrorExcelVO; |
| | | import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * title: 志愿者导入监听 |
| | | * @author : lyq |
| | | */ |
| | | @Slf4j |
| | | public class ComMngVolunteerExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 3000; |
| | | private static int headSize = 0; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | private CommunityService communityService; |
| | | private Long communityId; |
| | | private Long userId; |
| | | private Map<Integer, String> headData; |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public ComMngVolunteerExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.COM_MNG_VOLUNTEER_ERROR_LIST + communityId; |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngVolunteerExcelVO> voList = Lists.newArrayList(); |
| | | ArrayList<ComMngVolunteerErrorExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngVolunteerExcelVO vo = new ComMngVolunteerExcelVO(); |
| | | |
| | | if (StringUtils.isEmpty(oneData.get(0))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者名称不可为空,请填写志愿者名称")); |
| | | continue; |
| | | }else{ |
| | | //判断导入的名字的长度是否超过10 |
| | | if(oneData.get(0).length() > 10){ |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者名称长度不可超过10,请重新填写志愿者名称")); |
| | | continue; |
| | | } |
| | | } |
| | | vo.setName(oneData.get(0)); |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者手机号不可为空,请填写志愿者手机号")); |
| | | continue; |
| | | } |
| | | vo.setPhone(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(2))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者身份证不可为空,请填写志愿者身份证")); |
| | | continue; |
| | | } |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(2).length() != 18) { |
| | | if (oneData.get(2).length() != 15) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者身份证位数有误,请检查身份证号码是否正确")); |
| | | continue; |
| | | } |
| | | } |
| | | if (oneData.get(2).length() != 15) { |
| | | if (oneData.get(2).length() != 18) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者身份证位数有误,请检查身份证号码是否正确")); |
| | | continue; |
| | | } |
| | | } |
| | | vo.setIdCard(oneData.get(2).toUpperCase()); |
| | | if (StringUtils.isEmpty(oneData.get(3))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者组织不可为空,请填写志愿者组织")); |
| | | continue; |
| | | } |
| | | vo.setOrgName(oneData.get(3)); |
| | | |
| | | if (StringUtils.isEmpty(oneData.get(4))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者队伍不可为空,请填写志愿者队伍")); |
| | | continue; |
| | | } |
| | | vo.setTeamName(oneData.get(4)); |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者技能不可为空,请填写志愿者技能")); |
| | | continue; |
| | | } |
| | | vo.setSkillName(oneData.get(5)); |
| | | if (StringUtils.isEmpty(oneData.get(6))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"是否是大学生不可为空,请填写是否是大学生")); |
| | | continue; |
| | | } |
| | | if(!oneData.get(6).equals("1") && !oneData.get(6).equals("2")){ |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"是否是大学生选择错误,请选择是否")); |
| | | continue; |
| | | } |
| | | vo.setIsUniversity(Integer.parseInt(oneData.get(6))); |
| | | voList.add(vo); |
| | | index++; |
| | | } |
| | | List<ComMngVolunteerExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngVolunteerExcelVO::getIdCard)) |
| | | .collect(Collectors.toList()); |
| | | R r = communityService.importVolunteerAdmin(newVoList, communityId, userId); |
| | | if (!R.isOk(r)) { |
| | | List<ComMngVolunteerErrorExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngVolunteerErrorExcelVO.class); |
| | | mistakes.addAll(list); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | throw new ServiceException("500", key); |
| | | } else { |
| | | if (!mistakes.isEmpty()) { |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | throw new ServiceException("500", key); |
| | | } |
| | | } |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | throw new ServiceException("500", "导入失败"); |
| | | } |
| | | } |
| | | |
| | | private void setError(Map<Integer, String> map, ComMngVolunteerErrorExcelVO vo) { |
| | | vo.setName(map.get(0)); |
| | | vo.setPhone(map.get(1)); |
| | | vo.setIdCard(map.get(2)); |
| | | vo.setOrgName(map.get(3)); |
| | | vo.setTeamName(map.get(4)); |
| | | vo.setSkillName(map.get(5)); |
| | | } |
| | | |
| | | /** |
| | | * 组装错误信息 |
| | | * @param oneData 数据表格对象 |
| | | * @param error 错误信息 |
| | | * @return 错误对象 |
| | | */ |
| | | private ComMngVolunteerErrorExcelVO setErrorObject(Map<Integer, String> oneData, String error){ |
| | | ComMngVolunteerErrorExcelVO mistake = new ComMngVolunteerErrorExcelVO(); |
| | | setError(oneData, mistake); |
| | | mistake.setError(error); |
| | | return mistake; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 新增志愿者组织队伍表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:04:49 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增志愿者组织队伍表请求参数") |
| | | public class AddComMngVolunteerOrgTeamDto { |
| | | |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 父级id,为0时则为组织,不为0则为队伍 |
| | | */ |
| | | @ApiModelProperty(value = "父级id,为0时则为组织,不为0则为队伍") |
| | | private Long parentId; |
| | | |
| | | /** |
| | | * 服务类型 |
| | | */ |
| | | @ApiModelProperty(value = "服务类型") |
| | | private Long serviceTypeId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateAt; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 新增志愿者服务类型表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:10 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增志愿者服务类型表请求参数") |
| | | public class AddComMngVolunteerServiceTypeDto { |
| | | |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 新增志愿者技能表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:37 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增志愿者技能表请求参数") |
| | | public class AddComMngVolunteerSkillDto { |
| | | |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 编辑志愿者组织队伍表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:04:50 |
| | | */ |
| | | @Data |
| | | @ApiModel("编辑志愿者组织队伍表请求参数") |
| | | public class EditComMngVolunteerOrgTeamDto { |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 父级id,为0时则为组织,不为0则为队伍 |
| | | */ |
| | | @ApiModelProperty(value = "父级id,为0时则为组织,不为0则为队伍") |
| | | private Long parentId; |
| | | /** |
| | | * 服务类型 |
| | | */ |
| | | @ApiModelProperty(value = "服务类型") |
| | | private Long serviceTypeId; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateAt; |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 编辑志愿者服务类型表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:10 |
| | | */ |
| | | @Data |
| | | @ApiModel("编辑志愿者服务类型表请求参数") |
| | | public class EditComMngVolunteerServiceTypeDto { |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | /** |
| | | * 创建人id |
| | | */ |
| | | @ApiModelProperty(value = "创建人id") |
| | | private Long createBy; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateAt; |
| | | /** |
| | | * 修改人id |
| | | */ |
| | | @ApiModelProperty(value = "修改人id") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 编辑志愿者技能表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:37 |
| | | */ |
| | | @Data |
| | | @ApiModel("编辑志愿者技能表请求参数") |
| | | public class EditComMngVolunteerSkillDto { |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 分页查询志愿者组织队伍表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:04:48 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询志愿者组织队伍表请求参数") |
| | | public class PageComMngVolunteerOrgTeamDto { |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 父级id,为0时则为组织,不为0则为队伍 |
| | | */ |
| | | @ApiModelProperty(value = "父级id,为0时则为组织,不为0则为队伍") |
| | | private Long parentId; |
| | | /** |
| | | * 服务类型 |
| | | */ |
| | | @ApiModelProperty(value = "服务类型") |
| | | private Long serviceTypeId; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "分页每页数量", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "分页当前记录数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 分页查询志愿者服务类型表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:10 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询志愿者服务类型表请求参数") |
| | | public class PageComMngVolunteerServiceTypeDto { |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | /** |
| | | * 创建人id |
| | | */ |
| | | @ApiModelProperty(value = "创建人id") |
| | | private Long createBy; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateAt; |
| | | /** |
| | | * 修改人id |
| | | */ |
| | | @ApiModelProperty(value = "修改人id") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "分页每页数量", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "分页当前记录数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 分页查询志愿者技能表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:37 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询志愿者技能表请求参数") |
| | | public class PageComMngVolunteerSkillDto { |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | /** |
| | | * 创建人id |
| | | */ |
| | | @ApiModelProperty(value = "创建人id") |
| | | private Long createBy; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateAt; |
| | | /** |
| | | * 修改人id |
| | | */ |
| | | @ApiModelProperty(value = "修改人id") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "分页每页数量", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "分页当前记录数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | } |
| | | |
| | |
| | | @ApiModelProperty("等级是否查询全部(1.是 2.否)") |
| | | private Integer levelIsAll; |
| | | |
| | | @ApiModelProperty("是否死亡人员 (1.是 2.否)") |
| | | @ApiModelProperty("是否死亡人员 (1.是 0.否)") |
| | | private Integer isDeath; |
| | | |
| | | @ApiModelProperty("人员类型(1、户籍人口2、留守人员3、外地人员4、境外人员5、流动人口6、常住人口7、暂住人口)") |
| | | private String personType; |
| | | |
| | | private Integer type; |
| | | |
| | | private String searchKey; |
| | | public interface levelIsAll{ |
| | | int yes = 1; |
| | | int no = 2; |
| | |
| | | @ApiModelProperty("健康状况") |
| | | private String healthy; |
| | | |
| | | @ApiModelProperty("人员类型(1、户籍人口2、留守人员3、外地人员4、境外人员5、流动人口6、常住人口7、暂住人口)") |
| | | private String personType; |
| | | |
| | | @ApiModelProperty("房屋信息请求参数") |
| | | private List<ComMngPopulationHouseEditDTO> houseEditDTOList; |
| | | |
| | |
| | | @Min(value = 1, groups = {PageGroup.class}, message = "每页记录数不能为空") |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | } |
| | |
| | | @Min(value = 1) |
| | | private Long pageSize; |
| | | |
| | | private String areaCode; |
| | | |
| | | } |
| | |
| | | @Min(value = 1) |
| | | private Long pageSize; |
| | | |
| | | private String areaCode; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Pattern; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: BindUserPhoneDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 商业街用户绑定手机号 |
| | | * @author: hans |
| | | * @date: 2022/01/13 10:58 |
| | | */ |
| | | @Data |
| | | @ApiModel("商业街用户绑定手机号") |
| | | public class BindUserPhoneDTO { |
| | | |
| | | @ApiModelProperty("手机号") |
| | | @NotBlank(message = "手机号不能为空") |
| | | @Pattern(message = "手机号格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("验证码") |
| | | @NotBlank(message = "验证码不能为空") |
| | | private String code; |
| | | |
| | | @ApiModelProperty("openId") |
| | | @NotBlank(message = "openId不能为空") |
| | | private String openId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: DeleteProductDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 删除产品信息请求参数 |
| | | * @author: hans |
| | | * @date: 2022/01/11 16:24 |
| | | */ |
| | | @Data |
| | | @ApiModel("删除产品信息请求参数") |
| | | public class DeleteProductDTO { |
| | | |
| | | @ApiModelProperty(value = "产品id列表", required = true) |
| | | @NotEmpty(message = "产品id列表不能为空") |
| | | private List<Long> productIds; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: DisableOrEnableMcsMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 禁用/启用数字商业街商家请求参数 |
| | | * @author: hans |
| | | * @date: 2021/12/29 14:35 |
| | | */ |
| | | @Data |
| | | @ApiModel("禁用/启用数字商业街商家请求参数") |
| | | public class DisableOrEnableMcsMerchantDTO { |
| | | |
| | | @ApiModelProperty(value = "处理类型(1.启用 2.禁用)", required = true, allowableValues = "1,2") |
| | | @NotNull(message = "处理类型不能为空") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "商家id", required = true) |
| | | @NotNull(message = "商家id不能为空") |
| | | private Long merchantId; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Pattern; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: LoginWithPhoneDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 手机号登录请求参数 |
| | | * @author: hans |
| | | * @date: 2022/01/06 16:40 |
| | | */ |
| | | @Data |
| | | @ApiModel("手机号登录请求参数") |
| | | public class LoginWithPhoneDTO { |
| | | |
| | | @ApiModelProperty("手机号") |
| | | @NotBlank(message = "手机号不能为空") |
| | | @Pattern(message = "手机号格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("验证码") |
| | | @NotBlank(message = "验证码不能为空") |
| | | private String code; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: McsEvaluateDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 评价记录请求 |
| | | * @author: hans |
| | | * @date: 2022/01/08 13:13 |
| | | */ |
| | | @Data |
| | | @ApiModel("评价记录请求") |
| | | public class McsEvaluateDTO { |
| | | |
| | | @ApiModelProperty("戳戳券码id") |
| | | @NotNull(groups = {AddGroup.class}, message = "戳戳券码id不能为空") |
| | | private Long couponId; |
| | | |
| | | @ApiModelProperty("评分(1.差 2.一般 3.还不错 4.很满意 5.强烈推荐)") |
| | | @NotNull(groups = {AddGroup.class}, message = "评分不能为空") |
| | | private Integer star; |
| | | |
| | | @ApiModelProperty("评价内容") |
| | | @NotBlank(groups = {AddGroup.class}, message = "评价内容不能为空") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("评价图片(多张逗号隔开)") |
| | | @NotBlank(groups = {AddGroup.class}, message = "评价图片不能为空") |
| | | private String photos; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | 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: McsGameDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑戳戳游戏 |
| | | * @author: hans |
| | | * @date: 2021/12/31 15:42 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑戳戳游戏") |
| | | public class McsGameDTO { |
| | | |
| | | @ApiModelProperty("游戏ID") |
| | | @NotNull(groups = {PutGroup.class}, message = "游戏ID不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("游戏名称") |
| | | @NotBlank(groups = {AddGroup.class}, message = "游戏名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("戳戳卷数量") |
| | | @NotNull(groups = {AddGroup.class}, message = "戳戳卷数量不能为空") |
| | | private Integer coupons; |
| | | |
| | | @ApiModelProperty("游戏类别(1.戳戳币游戏 2.体验游戏)") |
| | | @NotNull(groups = {AddGroup.class}, message = "游戏类别不能为空") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券)") |
| | | private Integer awardType; |
| | | |
| | | @ApiModelProperty("戳戳币分配方式(1.随机分配 2.平均分配)") |
| | | private Integer allocation; |
| | | |
| | | @ApiModelProperty("戳戳币数量") |
| | | private Integer coins; |
| | | |
| | | @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("失效时间") |
| | | @NotNull(groups = {AddGroup.class}, message = "失效时间不能为空") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date expireAt; |
| | | |
| | | @ApiModelProperty("封面") |
| | | @NotBlank(groups = {AddGroup.class}, message = "封面不能为空") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("其他图片(多张图片以逗号隔开)") |
| | | private String otherImages; |
| | | |
| | | @ApiModelProperty("游戏介绍") |
| | | @NotBlank(groups = {AddGroup.class}, message = "游戏介绍不能为空") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | 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: McsInfoDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑戳戳资讯 |
| | | * @author: hans |
| | | * @date: 2022/01/05 10:06 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑戳戳资讯") |
| | | public class McsInfoDTO { |
| | | |
| | | @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 address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | @NotBlank(groups = {AddGroup.class}, message = "纬度不能为空") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | @NotBlank(groups = {AddGroup.class}, message = "经度不能为空") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("封面") |
| | | @NotBlank(groups = {AddGroup.class}, message = "封面不能为空") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("资讯内容") |
| | | @NotBlank(groups = {AddGroup.class}, message = "资讯内容不能为空") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Pattern; |
| | | |
| | | 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: McsMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: |
| | | * @author: hans |
| | | * @date: 2021/12/28 14:32 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑微商业街商家") |
| | | public class McsMerchantDTO { |
| | | |
| | | @ApiModelProperty("微商业街商家ID") |
| | | @NotNull(groups = {PutGroup.class}, message = "微商业街商家ID不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("商家名称") |
| | | @NotBlank(groups = {AddGroup.class}, message = "商家名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | @Pattern(groups = {AddGroup.class}, message = "手机号格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("商家级别(1.临时商家 2.合作商家)") |
| | | @NotNull(groups = {AddGroup.class}, message = "商家级别不能为空") |
| | | private Integer level; |
| | | |
| | | @ApiModelProperty("点亮天数") |
| | | @NotNull(groups = {AddGroup.class}, message = "点亮天数不能为空") |
| | | private Integer litDays; |
| | | |
| | | @ApiModelProperty("商家账号") |
| | | @NotBlank(groups = {AddGroup.class}, message = "商家账号不能为空") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("密码") |
| | | // @Pattern(groups = {AddGroup.class}, message = "请输入8-12位密码,由英文,数字和特殊符号组成", |
| | | // regexp = "^(?=.*[A-Za-z])(?=(.*[\\d]){1,})(?=(.*[\\W]){1,})(?!.*\\s).{8,12}$") |
| | | @NotBlank(groups = {AddGroup.class}, message = "密码不能为空") |
| | | private String password; |
| | | |
| | | @ApiModelProperty("账号状态(1.启用 2.禁用)") |
| | | @NotNull(groups = {AddGroup.class}, message = "账号状态不能为空") |
| | | private Integer accountStatus; |
| | | |
| | | @ApiModelProperty("商家logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("戳戳点亮上限(发布次数上限)") |
| | | private Integer publishLimit; |
| | | |
| | | @ApiModelProperty("商家地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("商家介绍") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | |
| | | @ApiModelProperty(value = "所属商家", hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "用户头像", hidden = true) |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty(value = "openId", hidden = true) |
| | | private String openId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | 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; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: McsProductDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑产品信息 |
| | | * @author: hans |
| | | * @date: 2022/01/05 11:25 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑产品信息") |
| | | public class McsProductDTO { |
| | | |
| | | @ApiModelProperty("产品ID") |
| | | @NotNull(groups = {PutGroup.class}, message = "产品ID不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("产品名称") |
| | | @NotBlank(groups = {AddGroup.class}, message = "产品名称不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("产品图片") |
| | | private String image; |
| | | |
| | | @ApiModelProperty("产品介绍") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty("产品标签id列表") |
| | | private List<Long> labelIds; |
| | | |
| | | @ApiModelProperty(value = "创建人", hidden = true) |
| | | private Long createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageMyCouponDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询我的评价-参与游戏列表 |
| | | * @author: hans |
| | | * @date: 2022/01/08 12:34 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询我的评价-参与游戏列表") |
| | | public class PageJoinGameListDTO { |
| | | |
| | | @ApiModelProperty("关键字") |
| | | 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", hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageMcsEvaluateDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询戳戳评价记录请求参数 |
| | | * @author: hans |
| | | * @date: 2021/12/31 13:22 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询戳戳评价记录请求参数") |
| | | public class PageMcsEvaluateDTO { |
| | | |
| | | @ApiModelProperty("关键词") |
| | | 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("1.我的评价") |
| | | private Integer isMy; |
| | | |
| | | @ApiModelProperty("戳戳游戏id") |
| | | private Long gameId; |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageMcsGameDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询戳戳游戏请求参数 |
| | | * @author: hans |
| | | * @date: 2021/12/30 15:20 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询戳戳游戏请求参数") |
| | | public class PageMcsGameDTO { |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty("游戏类别(1.戳戳币游戏 2.体验游戏)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("状态(1.未发布 2.进行中 3.已下架 4.已结束)") |
| | | private Integer status; |
| | | |
| | | @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("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("距离(千米)") |
| | | private Integer distance; |
| | | |
| | | @ApiModelProperty("商家id") |
| | | private Long merchantId; |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageMcsInformationDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询戳戳资讯请求参数 |
| | | * @author: hans |
| | | * @date: 2021/12/30 17:44 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询戳戳资讯请求参数") |
| | | public class PageMcsInformationDTO { |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty("状态(1.未发布 2.已发布 3.已下架)") |
| | | private Integer status; |
| | | |
| | | @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("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("距离(千米)") |
| | | private Integer distance; |
| | | |
| | | @ApiModelProperty("商家id") |
| | | private Long merchantId; |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageMcsMerchantDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询微商业街商家请求参数 |
| | | * @author: hans |
| | | * @date: 2021/12/29 14:31 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询微商业街商家请求参数") |
| | | public class PageMcsMerchantDTO { |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty("账号状态(1.启用 2.禁用)") |
| | | private Integer accountStatus; |
| | | |
| | | @ApiModelProperty("商家级别(1.临时商家 2.合作商家)") |
| | | private Integer level; |
| | | |
| | | @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("查询类型(1.戳戳游戏 2.戳戳资讯)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("距离,单位km") |
| | | private Integer distance; |
| | | |
| | | @ApiModelProperty("x km以上时,此值为1") |
| | | private Integer isMore; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageMcsProductDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询产品信息请求参数 |
| | | * @author: hans |
| | | * @date: 2022/01/05 11:30 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询产品信息请求参数") |
| | | public class PageMcsProductDTO { |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty("状态(1.上架中 2.已下架)") |
| | | private Integer status; |
| | | |
| | | @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") |
| | | private Long merchantId; |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: PageVerifyRecordDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询核销记录 |
| | | * @author: hans |
| | | * @date: 2022/01/08 14:53 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询核销记录") |
| | | public class PageVerifyRecordDTO { |
| | | |
| | | @ApiModelProperty("关键字") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty("游戏类别(1.戳戳币游戏 2.体验游戏)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("核销时间-起") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date verifiedBegin; |
| | | |
| | | @ApiModelProperty("核销时间-止") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date verifiedEnd; |
| | | |
| | | @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", hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PutUserInfoDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 修改用戶信息请求参数 |
| | | * @author: hans |
| | | * @date: 2022/01/08 16:24 |
| | | */ |
| | | @Data |
| | | @ApiModel("修改用戶信息请求参数") |
| | | public class PutUserInfoDTO { |
| | | |
| | | @ApiModelProperty("头像") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty("昵称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: SetPopularForGameDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 设为/取消游戏热门请求参数 |
| | | * @author: hans |
| | | * @date: 2021/12/30 16:29 |
| | | */ |
| | | @Data |
| | | @ApiModel("设为/取消游戏热门请求参数") |
| | | public class SetPopularForGameDTO { |
| | | |
| | | @ApiModelProperty(value = "处理类型(1.设为热门 2.取消热门)", required = true, allowableValues = "1,2") |
| | | @NotNull(message = "处理类型不能为空") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "游戏id", required = true) |
| | | @NotNull(message = "游戏id不能为空") |
| | | private Long gameId; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: SetPopularForGameDTO1 |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 上架/下架戳戳游戏请求参数 |
| | | * @author: hans |
| | | * @date: 2021/12/30 16:43 |
| | | */ |
| | | @Data |
| | | @ApiModel("上架/下架戳戳游戏请求参数") |
| | | public class SetShelfForGameDTO { |
| | | |
| | | @ApiModelProperty(value = "处理类型(1.上架 2.下架)", required = true, allowableValues = "1,2") |
| | | @NotNull(message = "处理类型不能为空") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "游戏id", required = true) |
| | | @NotNull(message = "游戏id不能为空") |
| | | private Long gameId; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: SetShelfForInfoDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 上架/下架戳戳资讯请求参数 |
| | | * @author: hans |
| | | * @date: 2021/12/30 17:45 |
| | | */ |
| | | @Data |
| | | @ApiModel("上架/下架戳戳资讯请求参数") |
| | | public class SetShelfForInfoDTO { |
| | | |
| | | @ApiModelProperty(value = "处理类型(1.上架 2.下架)", required = true, allowableValues = "1,2") |
| | | @NotNull(message = "处理类型不能为空") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "资讯id", required = true) |
| | | @NotNull(message = "资讯id不能为空") |
| | | private Long infoId; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.microCommercialStreet; |
| | | |
| | | 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: SetShelfForProductDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 上架/下架产品信息请求参数 |
| | | * @author: hans |
| | | * @date: 2022/01/05 11:27 |
| | | */ |
| | | @Data |
| | | @ApiModel("上架/下架产品信息请求参数") |
| | | public class SetShelfForProductDTO { |
| | | |
| | | @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> productIds; |
| | | |
| | | @ApiModelProperty(value = "处理人", hidden = true) |
| | | private Long updatedBy; |
| | | } |
| | |
| | | private Long communityId; |
| | | |
| | | private String areaCode; |
| | | |
| | | private Integer isWjw; |
| | | } |
| | |
| | | @ApiModelProperty(value = "来攀/离攀结束时间") |
| | | private String stopTime; |
| | | |
| | | @ApiModelProperty(value = "类型 1燃气 2防火") |
| | | private Integer pdfType; |
| | | |
| | | } |
| | |
| | | private Integer paramId2; |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | @ApiModelProperty("商家id") |
| | | private Long merchantId; |
| | | } |
| | |
| | | private String refreshToken; |
| | | @ApiModelProperty("communityId") |
| | | private Long communityId; |
| | | @ApiModelProperty("openId") |
| | | private String openId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 志愿者组织队伍表返回参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:06:57 |
| | | */ |
| | | @Data |
| | | @ApiModel("志愿者组织队伍表返回参数") |
| | | public class ComMngVolunteerOrgTeamVo { |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 父级id,为0时则为组织,不为0则为队伍 |
| | | */ |
| | | @ApiModelProperty(value = "父级id,为0时则为组织,不为0则为队伍") |
| | | private Long parentId; |
| | | /** |
| | | * 服务类型 |
| | | */ |
| | | @ApiModelProperty(value = "服务类型") |
| | | private Long serviceTypeId; |
| | | /** |
| | | * 服务类型名称 |
| | | */ |
| | | @ApiModelProperty(value = "服务类型名称") |
| | | private String serviceTypeName; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "组织下队伍列表") |
| | | private List<ComMngVolunteerOrgTeamVo> childList; |
| | | |
| | | @ApiModelProperty(value = "创建人名字") |
| | | private String createByName; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 志愿者服务类型表返回参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:10 |
| | | */ |
| | | @Data |
| | | @ApiModel("志愿者服务类型表返回参数") |
| | | public class ComMngVolunteerServiceTypeVo { |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | /** |
| | | * 创建人id |
| | | */ |
| | | @ApiModelProperty(value = "创建人id") |
| | | private Long createBy; |
| | | /** |
| | | * 创建人名称 |
| | | */ |
| | | @ApiModelProperty(value = "创建人名称") |
| | | private String createByName; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateAt; |
| | | /** |
| | | * 修改人id |
| | | */ |
| | | @ApiModelProperty(value = "修改人id") |
| | | private Long updateBy; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.common; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 志愿者技能表返回参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:37 |
| | | */ |
| | | @Data |
| | | @ApiModel("志愿者技能表返回参数") |
| | | public class ComMngVolunteerSkillVo { |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | /** |
| | | * 创建人id |
| | | */ |
| | | @ApiModelProperty(value = "创建人id") |
| | | private Long createBy; |
| | | /** |
| | | * 创建人名称 |
| | | */ |
| | | @ApiModelProperty(value = "创建人名称") |
| | | private String createByName; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateAt; |
| | | /** |
| | | * 修改人id |
| | | */ |
| | | @ApiModelProperty(value = "修改人id") |
| | | private Long updateBy; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.common; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | |
| | | /** |
| | | * 志愿者组织统计返回参数 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:06:57 |
| | | */ |
| | | @Data |
| | | @ApiModel("志愿者组织统计返回参数") |
| | | public class ComMngVolunteerStatisticsVo { |
| | | |
| | | @ApiModelProperty(value = "组织数量") |
| | | private Integer orgTotal; |
| | | |
| | | @ApiModelProperty(value = "队伍数量") |
| | | private Integer teamTotal; |
| | | |
| | | @ApiModelProperty(value = "志愿者数量") |
| | | private Integer volunteerTotal; |
| | | |
| | | } |
| | |
| | | private String contactName; |
| | | |
| | | @ApiModelProperty("联系人电话") |
| | | @NotBlank(groups = AddGroup.class, message = "联系人电话不可为空") |
| | | private String contactPhone; |
| | | |
| | | @ApiModelProperty("是否签到 1 是 0否") |
| | |
| | | private String name; |
| | | @ApiModelProperty("预约内容") |
| | | private String content; |
| | | @ApiModelProperty("填报记录id") |
| | | private Long recordId; |
| | | } |
| | |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | |
| | | @ExcelProperty(value = "身份证号码", index = 1) |
| | | private String cardNo; |
| | | |
| | | @ExcelProperty(value = "人员标签", index = 2) |
| | | @ExcelProperty(value = "人员类型", index = 2) |
| | | private String personType; |
| | | |
| | | @ExcelProperty(value = "人员标签", index = 3) |
| | | private String label; |
| | | |
| | | @ExcelProperty(value = "居住地址", index = 3) |
| | | @ExcelProperty(value = "居住地址", index = 4) |
| | | private String address; |
| | | |
| | | @ExcelProperty(value = "性别", index = 4) |
| | | @ExcelProperty(value = "性别", index = 5) |
| | | private String sex; |
| | | |
| | | @ExcelProperty(value = "民族", index = 5) |
| | | @ExcelProperty(value = "民族", index = 6) |
| | | private String nation; |
| | | |
| | | @ExcelProperty(value = "政治面貌", index = 6) |
| | | @ExcelProperty(value = "政治面貌", index = 7) |
| | | private String politicalOutlook; |
| | | |
| | | @ExcelProperty(value = "出生年月日", index = 7) |
| | | @ExcelProperty(value = "出生年月日", index = 8) |
| | | private String birthday; |
| | | |
| | | @ExcelProperty(value = "年龄", index = 8) |
| | | @ExcelProperty(value = "年龄", index = 9) |
| | | private Integer age; |
| | | |
| | | @ExcelProperty(value = "联系方式", index = 9) |
| | | @ExcelProperty(value = "联系方式", index = 10) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "籍贯", index = 10) |
| | | @ExcelProperty(value = "籍贯", index = 11) |
| | | private String nativePlace; |
| | | |
| | | @ExcelProperty(value = "本地外地", index = 11) |
| | | @ExcelProperty(value = "本地外地", index = 12) |
| | | private String outOrLacal; |
| | | |
| | | @ExcelProperty(value = "文化程度", index = 12) |
| | | @ExcelProperty(value = "文化程度", index = 13) |
| | | private String cultureLevel; |
| | | |
| | | @ExcelProperty(value = "婚姻状况", index = 13) |
| | | @ExcelProperty(value = "婚姻状况", index = 14) |
| | | private String marriage; |
| | | |
| | | @ExcelProperty(value = "健康状况", index = 14) |
| | | @ExcelProperty(value = "健康状况", index = 15) |
| | | private String healthy; |
| | | |
| | | @ExcelProperty(value = "工作单位", index = 15) |
| | | @ExcelProperty(value = "工作单位", index = 16) |
| | | private String workCompany; |
| | | } |
| | |
| | | // @ExcelProperty(value = "居住地址", index = 28) |
| | | // private String address; |
| | | |
| | | @ExcelProperty(value = "人员类型(户籍人员/留守人员/外地人员/境外人员)", index = 28) |
| | | @ExcelProperty(value = "人员类型(户籍人口/留守人员/外地人员/境外人员/流动人口/常住人口/暂住人口)", index = 28) |
| | | private String personType; |
| | | |
| | | @ExcelProperty(value = "国家", index = 29) |
| | |
| | | @ExcelProperty(value = "居住地址", index = 28) |
| | | private String address; |
| | | |
| | | @ExcelProperty(value = "人员类型(1、户籍人员2、留守人员3、外地人员4、境外人员)", index = 29) |
| | | @ExcelProperty(value = "人员类型(1、户籍人口2、留守人员3、外地人员4、境外人员5、流动人口6、常住人口7、暂住人口)", index = 29) |
| | | private Integer personType; |
| | | |
| | | @ExcelProperty(value = "国家", index = 30) |
| | |
| | | @ApiModelProperty("楼栋数") |
| | | private Integer buildNum; |
| | | |
| | | @ApiModelProperty("户籍人口") |
| | | private Integer houseRegTotal; |
| | | |
| | | @ApiModelProperty("流动人口") |
| | | private Integer floatingTotal; |
| | | |
| | | @ApiModelProperty("常住人口") |
| | | private Integer permanentTotal; |
| | | |
| | | @ApiModelProperty("暂住人口") |
| | | private Integer temporaryTotal; |
| | | |
| | | @ApiModelProperty("外地人员") |
| | | private Integer outOfTownTotal; |
| | | |
| | | @ApiModelProperty("留守人员") |
| | | private Integer leftTotal; |
| | | |
| | | @ApiModelProperty("境外人员") |
| | | private Integer overseasTotal; |
| | | } |
| | |
| | | @ApiModelProperty("身份证无加密字段") |
| | | private String cardNoStr; |
| | | |
| | | @ApiModelProperty("是否健在 0是 、1否") |
| | | private Integer death; |
| | | |
| | | @ApiModelProperty("人员类型 1 80-89 2 90-99 3 100以上") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("人员类型(1、户籍人口2、留守人员3、外地人员4、境外人员5、流动人口6、常住人口7、暂住人口)") |
| | | private String personType; |
| | | |
| | | @ApiModelProperty("房屋列表") |
| | | private List<ComMngHouseVo> houseList; |
| | | |
| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | |
| | | @ApiModelProperty(value = "申请提交人ID", hidden = true) |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "身份证号") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "组织id") |
| | | private Long orgId; |
| | | |
| | | @ApiModelProperty(value = "队伍id") |
| | | private Long teamId; |
| | | |
| | | @ApiModelProperty(value = "技能id") |
| | | private Long skillId; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "组织名称") |
| | | private String orgName; |
| | | |
| | | @ApiModelProperty(value = "队伍名称") |
| | | private String teamName; |
| | | |
| | | @ApiModelProperty(value = "技能名称") |
| | | private String skillName; |
| | | |
| | | @ApiModelProperty(value = "服务类型id") |
| | | private Long serviceTypeId; |
| | | |
| | | @ApiModelProperty(value = "服务类型名称") |
| | | private String serviceTypeName; |
| | | |
| | | @ApiModelProperty(value = "是否是在校大学生(1.是 2.否)") |
| | | private Integer isUniversity; |
| | | |
| | | @Length(max = 30) |
| | | @ApiModelProperty(value = "大学名称") |
| | | private String universityName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: GameStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 游戏统计信息 |
| | | * @author: hans |
| | | * @date: 2022/01/08 15:12 |
| | | */ |
| | | @Data |
| | | @ApiModel("游戏统计信息") |
| | | public class GameStatisticsVO { |
| | | |
| | | @ApiModelProperty("游戏总数") |
| | | private Integer gameTotal; |
| | | |
| | | @ApiModelProperty("发放核销码") |
| | | private Integer sendCouponTotal; |
| | | |
| | | @ApiModelProperty("领取数占比") |
| | | private BigDecimal appliedPercent; |
| | | |
| | | @ApiModelProperty("未领取数占比") |
| | | private BigDecimal unAppliedPercent; |
| | | |
| | | @ApiModelProperty("核销人数占比") |
| | | private BigDecimal verifiedPercent; |
| | | |
| | | @ApiModelProperty("未核销数占比") |
| | | private BigDecimal unVerifiedPercent; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: IndexTopStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 首页顶部数据 |
| | | * @author: hans |
| | | * @date: 2022/01/07 14:04 |
| | | */ |
| | | @Data |
| | | @ApiModel("首页顶部数据") |
| | | public class IndexTopStatisticsVO { |
| | | |
| | | @ApiModelProperty("戳戳币总额") |
| | | private Integer coinTotal; |
| | | |
| | | @ApiModelProperty("今日已领戳戳币") |
| | | private Integer appliedTotal; |
| | | |
| | | @ApiModelProperty("游戏总数") |
| | | private Integer gameTotal; |
| | | |
| | | @ApiModelProperty("全部资讯") |
| | | private Integer infoTotal; |
| | | |
| | | @ApiModelProperty("热门戳戳") |
| | | private McsGameVO popularGame; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: McsConfigVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 数字商业街配置信息 |
| | | * @author: hans |
| | | * @date: 2021/12/30 11:15 |
| | | */ |
| | | @Data |
| | | @ApiModel("数字商业街配置信息") |
| | | public class McsConfigVO { |
| | | |
| | | @ApiModelProperty("配置id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("配置名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("key") |
| | | private String key; |
| | | |
| | | @ApiModelProperty("配置内容") |
| | | private String value; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: CouponApplyReturnVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 戳戳卷信息 |
| | | * @author: hans |
| | | * @date: 2022/01/07 17:27 |
| | | */ |
| | | @Data |
| | | @ApiModel("戳戳卷信息") |
| | | public class McsCouponVO { |
| | | |
| | | @ApiModelProperty("戳戳卷id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("优惠券包含奖励") |
| | | private String award; |
| | | |
| | | @ApiModelProperty("戳戳卷二维码") |
| | | private String qrCode; |
| | | |
| | | @ApiModelProperty("是否核验") |
| | | private Boolean isVerified; |
| | | |
| | | @ApiModelProperty("游戏名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("游戏类别(1.戳戳币游戏 2.体验游戏)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("是否评论(1.是 2.否)") |
| | | private Integer isEvaluate; |
| | | |
| | | @ApiModelProperty("评论id") |
| | | private Long evaluateId; |
| | | |
| | | @ApiModelProperty("游戏id") |
| | | private Long gameId; |
| | | |
| | | @ApiModelProperty("失效时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date expireAt; |
| | | |
| | | @ApiModelProperty("游戏封面") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券)") |
| | | private Integer awardType; |
| | | |
| | | @ApiModelProperty("戳戳币分配方式(1.随机分配 2.平均分配)") |
| | | private Integer allocation; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: McsEvaluateVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 戳戳评价记录信息 |
| | | * @author: hans |
| | | * @date: 2021/12/31 13:19 |
| | | */ |
| | | @Data |
| | | @ApiModel("戳戳评价记录信息") |
| | | public class McsEvaluateVO { |
| | | |
| | | @ApiModelProperty("评价记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("评分(1.差 2.一般 3.还不错 4.很满意 5.强烈推荐)") |
| | | private Integer star; |
| | | |
| | | @ApiModelProperty("评价内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("评价图片(多张逗号隔开)") |
| | | private String photos; |
| | | |
| | | @ApiModelProperty("评价时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createdAt; |
| | | |
| | | @ApiModelProperty("用户") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("用户头像") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty("手机号码") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("评价游戏") |
| | | private String gameName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: McsGameVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 戳戳游戏信息 |
| | | * @author: hans |
| | | * @date: 2021/12/30 13:50 |
| | | */ |
| | | @Data |
| | | @ApiModel("戳戳游戏信息") |
| | | public class McsGameVO { |
| | | |
| | | @ApiModelProperty("游戏id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("游戏名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("戳戳卷数量") |
| | | private Integer coupons; |
| | | |
| | | @ApiModelProperty("剩余戳戳卷数量") |
| | | private Integer surplusCoupons; |
| | | |
| | | @ApiModelProperty("游戏类别(1.戳戳币游戏 2.体验游戏)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券)") |
| | | private Integer awardType; |
| | | |
| | | @ApiModelProperty("戳戳币分配方式(1.随机分配 2.平均分配)") |
| | | private Integer allocation; |
| | | |
| | | @ApiModelProperty("戳戳币总额") |
| | | private Integer coins; |
| | | |
| | | @ApiModelProperty("戳戳币剩余数量") |
| | | private Integer surplusCoins; |
| | | |
| | | @ApiModelProperty("地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("失效时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date expireAt; |
| | | |
| | | @ApiModelProperty("封面") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("其他图片(多张图片以逗号隔开)") |
| | | private String otherImages; |
| | | |
| | | @ApiModelProperty("游戏介绍") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty("状态(1.未发布 2.进行中 3.已下架 4.已结束)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("是否热门") |
| | | private Boolean isPopular; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date publishAt; |
| | | |
| | | @ApiModelProperty("所属商家") |
| | | private Long merchantId; |
| | | |
| | | @ApiModelProperty("所属商家名称") |
| | | private String merchantName; |
| | | |
| | | @ApiModelProperty("商家logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("所属商家下游戏总数") |
| | | private Integer gameCount; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: McsInformationVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 戳戳资讯信息 |
| | | * @author: hans |
| | | * @date: 2021/12/30 17:43 |
| | | */ |
| | | @Data |
| | | @ApiModel("戳戳资讯信息") |
| | | public class McsInformationVO { |
| | | |
| | | @ApiModelProperty("资讯id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("资讯标题") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("封面") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("资讯内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("状态(1.未发布 2.已发布 3.已下架)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date publishAt; |
| | | |
| | | @ApiModelProperty("所属商家") |
| | | private Long merchantId; |
| | | |
| | | @ApiModelProperty("资讯内容") |
| | | private String merchantName; |
| | | |
| | | @ApiModelProperty("商家信息") |
| | | private McsMerchantVO merchantInfo; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: McsLabelVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 产品标签信息 |
| | | * @author: hans |
| | | * @date: 2022/01/05 14:54 |
| | | */ |
| | | @Data |
| | | @ApiModel("产品标签信息") |
| | | public class McsLabelVO { |
| | | |
| | | @ApiModelProperty("标签id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("标签名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("说明") |
| | | private String introduction; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | 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: McsLoginUserInfoVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 微商业街用户登录信息 |
| | | * @author: hans |
| | | * @date: 2022/01/06 13:12 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "微商业街用户登录信息") |
| | | public class McsLoginUserInfoVO extends LoginUserInfoVO { |
| | | @ApiModelProperty("商家信息") |
| | | private McsMerchantVO mcsMerchantVO; |
| | | |
| | | private String plaintextPassword; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: McsMerchantVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 数字商业街商家信息 |
| | | * @author: hans |
| | | * @date: 2021/12/29 10:37 |
| | | */ |
| | | @Data |
| | | @ApiModel("数字商业街商家信息") |
| | | public class McsMerchantVO { |
| | | |
| | | @ApiModelProperty("商家id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("商家名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("商家账号") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("商家logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("商家级别(1.临时商家 2.合作商家)") |
| | | private Integer level; |
| | | |
| | | @ApiModelProperty("戳戳点亮上限(发布次数上限)") |
| | | private Integer publishLimit; |
| | | |
| | | @ApiModelProperty("到期时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date expireAt; |
| | | |
| | | @ApiModelProperty("商家地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("商家简介") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty("首次点亮时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date firstLitAt; |
| | | |
| | | @ApiModelProperty("剩余点亮天数") |
| | | private Integer surplusLitDays; |
| | | |
| | | @ApiModelProperty("账号状态(1.启用 2.禁用)") |
| | | private Integer accountStatus; |
| | | |
| | | @ApiModelProperty("空闲戳戳点") |
| | | private Integer idleTotal; |
| | | |
| | | @ApiModelProperty("距离") |
| | | private Double distance; |
| | | |
| | | @ApiModelProperty("客服电话") |
| | | private String customPhone; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | @Data |
| | | @ApiModel("商业街订单表") |
| | | public class McsOrderVO { |
| | | private Long id; |
| | | |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 支付配置id |
| | | */ |
| | | @ApiModelProperty(value = "支付配置id") |
| | | private Long configId; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer num; |
| | | |
| | | /** |
| | | * 支付状态 0 待支付 1已支付 2 已取消 3 已退款 |
| | | */ |
| | | @ApiModelProperty(value = "支付状态 0 待支付 1已支付 2 已取消 3 已退款") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 支付金额 |
| | | */ |
| | | @ApiModelProperty(value = "支付金额") |
| | | private BigDecimal money; |
| | | |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | @ApiModelProperty(value = "支付时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date payTime; |
| | | |
| | | /** |
| | | * 商家id |
| | | */ |
| | | @ApiModelProperty(value = "商家id") |
| | | private Long merchantId; |
| | | |
| | | /** |
| | | * 支付流水号 |
| | | */ |
| | | @ApiModelProperty(value = "支付流水号") |
| | | private String payNo; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | /** |
| | | * 商家名称 |
| | | */ |
| | | @ApiModelProperty("商家名称") |
| | | private String merchantName; |
| | | /** |
| | | * 付费名称 |
| | | */ |
| | | @ApiModelProperty("付费名称") |
| | | private String payName; |
| | | /** |
| | | * 商家账号 |
| | | */ |
| | | @ApiModelProperty("商家账号") |
| | | private String merchantAccount; |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | @ApiModelProperty("交易类型 MWEB-->h5支付 NATIVE-->pc端支付 JSAPI-->小程序支付") |
| | | private String tradeType; |
| | | |
| | | @ApiModelProperty("openid") |
| | | private String openId; |
| | | |
| | | @ApiModelProperty("订单取消剩余倒计时") |
| | | private Long cancelCountdown; |
| | | |
| | | @ApiModelProperty("支付方式") |
| | | private String paymentMethod; |
| | | |
| | | @ApiModelProperty("商家地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty(value = "用户真实ip", hidden = true) |
| | | private String clientIp; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: McsProductVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: |
| | | * @author: hans |
| | | * @date: 2022/01/05 11:29 |
| | | */ |
| | | @Data |
| | | @ApiModel("产品信息") |
| | | public class McsProductVO { |
| | | |
| | | @ApiModelProperty("产品id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("产品名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("产品图片") |
| | | private String image; |
| | | |
| | | @ApiModelProperty("产品介绍") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty("浏览量") |
| | | private Integer viewNum; |
| | | |
| | | @ApiModelProperty("状态(1.上架中 2.已下架)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("产品标签") |
| | | private String productLabel; |
| | | |
| | | @ApiModelProperty("所属商家") |
| | | private Long merchantId; |
| | | |
| | | @ApiModelProperty("所属商家名称") |
| | | private Long merchantName; |
| | | |
| | | @ApiModelProperty("产品标签ids") |
| | | private List<Long> labelIds; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: McsVerifyRecordVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 戳戳卷核验记录信息 |
| | | * @author: hans |
| | | * @date: 2022/01/08 14:56 |
| | | */ |
| | | @Data |
| | | @ApiModel("戳戳卷核验记录信息") |
| | | public class McsVerifyRecordVO { |
| | | |
| | | @ApiModelProperty("核验记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("核验码") |
| | | private Long couponId; |
| | | |
| | | @ApiModelProperty("游戏名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("获得奖励") |
| | | private String award; |
| | | |
| | | @ApiModelProperty("核验时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date verifiedAt; |
| | | |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("游戏类别(1.戳戳币游戏 2.体验游戏)") |
| | | private Integer type; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: MyCouponVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 我的戳戳卷信息 |
| | | * @author: hans |
| | | * @date: 2022/01/08 12:26 |
| | | */ |
| | | @Data |
| | | @ApiModel("我的戳戳卷信息") |
| | | public class MyCouponVO { |
| | | |
| | | @ApiModelProperty("已获得的戳戳币") |
| | | private Integer obtainedTotal; |
| | | |
| | | @ApiModelProperty("免费体验次") |
| | | private Integer trialTotal; |
| | | |
| | | @ApiModelProperty("参与游戏数") |
| | | private Integer joinGameTotal; |
| | | |
| | | @ApiModelProperty("待核销券码") |
| | | private Integer unVerifiedTotal; |
| | | |
| | | @ApiModelProperty("戳戳卷列表") |
| | | private List<McsCouponVO> couponList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: TopStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 统计信息 |
| | | * @author: hans |
| | | * @date: 2022/01/04 17:58 |
| | | */ |
| | | @Data |
| | | @ApiModel("统计信息") |
| | | public class TopStatisticsVO { |
| | | |
| | | @ApiModelProperty("到期时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date expireAt; |
| | | |
| | | @ApiModelProperty("剩余点亮天数") |
| | | private Integer surplusLitDays; |
| | | |
| | | @ApiModelProperty("领取人数") |
| | | private Integer appliedTotal; |
| | | |
| | | @ApiModelProperty("核销人数") |
| | | private Integer verifiedTotal; |
| | | |
| | | @ApiModelProperty("空闲戳戳点") |
| | | private Integer idleTotal; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.microCommercialStreet; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: VerifiedReturnVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 戳戳卷核验返回参数 |
| | | * @author: hans |
| | | * @date: 2022/01/08 14:37 |
| | | */ |
| | | @Data |
| | | @ApiModel("戳戳卷核验返回参数") |
| | | public class VerifiedReturnVO { |
| | | |
| | | @ApiModelProperty("用户") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("奖励") |
| | | private String award; |
| | | |
| | | @ApiModelProperty("券码") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long couponId; |
| | | |
| | | @ApiModelProperty("核销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date verifiedAt; |
| | | |
| | | @ApiModelProperty("游戏名称") |
| | | private String gameName; |
| | | |
| | | @ApiModelProperty("游戏封面") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券)") |
| | | private Integer awardType; |
| | | } |
| | |
| | | int input = 8; |
| | | int name = 9; |
| | | int imgselect = 10; |
| | | int address=14; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ReservePdfExportVO { |
| | | private String name; |
| | | private String time; |
| | | private String phone; |
| | | private String sign; |
| | | private String communityPhone; |
| | | private String address; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.volunteer; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @description: 批量导入志愿者请求参数 |
| | | * @author : lyq |
| | | */ |
| | | @Data |
| | | public class ComMngVolunteerErrorExcelVO implements Serializable { |
| | | |
| | | @ExcelProperty(value = "志愿者名称", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "志愿者手机号", index = 1) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "志愿者身份证", index = 2) |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "志愿者组织", index = 3) |
| | | private String orgName; |
| | | |
| | | @ExcelProperty(value = "志愿者队伍", index = 4) |
| | | private String teamName; |
| | | |
| | | @ExcelProperty(value = "技能", index = 5) |
| | | private String skillName; |
| | | |
| | | @ExcelProperty(value = "是否是大学生", index = 6) |
| | | private Integer isUniversity; |
| | | |
| | | @ExcelProperty(value = "错误信息", index = 7) |
| | | private String error; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.volunteer; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @description: 批量导入志愿者请求参数 |
| | | * @author : lyq |
| | | */ |
| | | @Data |
| | | public class ComMngVolunteerExcelVO implements Serializable { |
| | | |
| | | @ExcelProperty(value = "志愿者名称", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "志愿者手机号", index = 1) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "志愿者身份证", index = 2) |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "志愿者组织", index = 3) |
| | | private String orgName; |
| | | |
| | | @ExcelProperty(value = "志愿者队伍", index = 4) |
| | | private String teamName; |
| | | |
| | | @ExcelProperty(value = "技能", index = 5) |
| | | private String skillName; |
| | | |
| | | @ExcelProperty(value = "是否是大学生", index = 6) |
| | | private Integer isUniversity; |
| | | |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/loginXQDP") |
| | | R loginXQDP(@RequestParam("account") String account, @RequestParam("password") String password); |
| | | |
| | | /** |
| | | * 微商业街用户登录 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginMcsUser") |
| | | R loginMcsUser(@RequestParam("account") String account, @RequestParam("password") String password); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.DeleteProductDTO; |
| | | import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerExcelVO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import com.panzhihua.common.model.dtos.AppletesBackstageConfigDTO; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | 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.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.microCommercialStreet.DisableOrEnableMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsEvaluateDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageJoinGameListDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsEvaluateDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsInformationDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageVerifyRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PutUserInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetPopularForGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.questnaire.StatisticsSummaryDTO; |
| | | import com.panzhihua.common.model.dtos.community.rentingHouses.*; |
| | | import com.panzhihua.common.model.dtos.community.rentingHouses.NearbyDTO; |
| | | import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO; |
| | | import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHousesConfigDTO; |
| | | import com.panzhihua.common.model.dtos.community.rentingHouses.ReleaseOrCancelHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHouseRegisterDTO; |
| | | import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHousesConfigDTO; |
| | | 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.vos.community.bigscreen.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsConfigVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsOrderVO; |
| | | 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.shop.ShopStoreVO; |
| | | import com.panzhihua.common.model.vos.user.UserElectronicFileVO; |
| | | import com.panzhihua.common.model.vos.user.UserPhoneVO; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/page") |
| | | R pagePopulation(ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | /** |
| | | * 导出老人 |
| | | * |
| | | * @param comMngPopulationVO |
| | | * 查询参数 |
| | | * @return 分页集合 |
| | | */ |
| | | @PostMapping("/common/data/population/exportOld") |
| | | R exportOld(ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | |
| | | /** |
| | | * 根据身份证查询实有人口信息 |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/eventgrid/community/westList") |
| | | R getWestCommunityLists(String areaCode); |
| | | R getWestCommunityLists(@RequestParam("areaCode")String areaCode); |
| | | |
| | | /** |
| | | * 综治app-小区列表 |
| | |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @GetMapping("/classify/admin/list") |
| | | R listPhotoClassify(); |
| | | R listPhotoClassify(@RequestParam("areaCode") String areaCode); |
| | | |
| | | /** |
| | | * 社区后台-切换随手拍公示状态 |
| | |
| | | */ |
| | | @PostMapping("/reserve/admin/register/detailed/list") |
| | | R registerDetailedListAdmin(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 导出登记明细列表 |
| | | * @param detailedAdminDTO 请求参数 |
| | | * @return 登记明细列表 |
| | | */ |
| | | @PostMapping("/reserve/admin/register/detailed/list/export") |
| | | R registerDetailedListAdminExport(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 查询登记详情记录 |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/service-category/all") |
| | | R getAllServiceCategories(); |
| | | R getAllServiceCategories(@RequestParam("areaCode") String areaCode); |
| | | |
| | | /** |
| | | * 获取用户便民服务商家详情 |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/service-category/suitable") |
| | | R getSuitableServiceCategories(@RequestParam("communityId") Long communityId); |
| | | R getSuitableServiceCategories(@RequestParam("communityId") Long communityId,@RequestParam("areaCode")String areaCode); |
| | | |
| | | /** |
| | | * 获取该社区下的热门商家 |
| | |
| | | */ |
| | | @PostMapping("/screen/event/page") |
| | | R pageEventList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 新增数字商业街商家 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/merchant/add") |
| | | R addMcsMerchant(@RequestBody McsMerchantDTO mcsMerchantDTO); |
| | | |
| | | /** |
| | | * 编辑数字商业街商家 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/merchant/put") |
| | | R putMcsMerchant(@RequestBody McsMerchantDTO mcsMerchantDTO); |
| | | |
| | | /** |
| | | * 查询数字商业街商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/merchant/get") |
| | | R getMcsMerchant(@RequestParam("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 删除数字商业街商家 |
| | | * @param merchantId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/microcommercialstreet/merchant/delete") |
| | | R deleteMcsMerchant(@RequestParam("merchantId") Long merchantId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 分页查询数字商业街商家 |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/merchant/page") |
| | | R pageMcsMerchant(@RequestBody PageMcsMerchantDTO pageMcsMerchantDTO); |
| | | |
| | | /** |
| | | * 禁用/启用数字商业街商家 |
| | | * @param disableOrEnableMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/merchant/disable-or-enable") |
| | | R disableOrEnableMcsMerchant(@RequestBody DisableOrEnableMcsMerchantDTO disableOrEnableMcsMerchantDTO); |
| | | |
| | | /** |
| | | * 获取所有数字商业街配置 |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/config/all") |
| | | R getAllMcsConfig(); |
| | | |
| | | /** |
| | | * 修改数字商业街配置 |
| | | * @param configs |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/config/put") |
| | | R putMcsConfig(@RequestBody List<McsConfigVO> configs); |
| | | |
| | | /** |
| | | * 分页查询戳戳游戏 |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/game/page") |
| | | R pageMcsGame(@RequestBody PageMcsGameDTO pageMcsGameDTO); |
| | | |
| | | /** |
| | | * 设为/取消游戏热门 |
| | | * @param setPopularForGameDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/game/setPopular") |
| | | R setPopularForGame(@RequestBody SetPopularForGameDTO setPopularForGameDTO); |
| | | |
| | | /** |
| | | * 上架/下架戳戳游戏 |
| | | * @param setShelfForGameDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/game/setShelf") |
| | | R setShelfForGame(@RequestBody SetShelfForGameDTO setShelfForGameDTO); |
| | | |
| | | /** |
| | | * 删除戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/microcommercialstreet/game/delete") |
| | | R deleteMcsGame(@RequestParam("gameId") Long gameId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 分页查询戳戳资讯 |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/information/page") |
| | | R pageMcsInfo(@RequestBody PageMcsInformationDTO pageMcsInformationDTO); |
| | | |
| | | /** |
| | | * 上架/下架戳戳资讯 |
| | | * @param setShelfForInfoDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/information/setShelf") |
| | | R setShelfForMcsInfo(@RequestBody SetShelfForInfoDTO setShelfForInfoDTO); |
| | | |
| | | /** |
| | | * 删除戳戳资讯 |
| | | * @param infoId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/microcommercialstreet/information/delete") |
| | | R deleteMcsInfo(@RequestParam("infoId") Long infoId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 分页查询评价记录 |
| | | * @param pageMcsEvaluateDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/evaluate/page") |
| | | R pageMcsEvaluate(@RequestBody PageMcsEvaluateDTO pageMcsEvaluateDTO); |
| | | |
| | | /** |
| | | * 查询评价记录详情 |
| | | * @param evaluateId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/evaluate/get") |
| | | R getMcsEvaluate(@RequestParam("evaluateId") Long evaluateId); |
| | | |
| | | /** |
| | | * 删除评价记录 |
| | | * @param evaluateId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/microcommercialstreet/evaluate/delete") |
| | | R deleteMcsEvaluate(@RequestParam("evaluateId") Long evaluateId); |
| | | |
| | | /** |
| | | * 新增戳戳游戏 |
| | | * @param mcsGameDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/game/add") |
| | | R addMcsGame(@RequestBody McsGameDTO mcsGameDTO); |
| | | |
| | | /** |
| | | * 编辑戳戳游戏 |
| | | * @param mcsGameDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/game/put") |
| | | R putMcsGame(@RequestBody McsGameDTO mcsGameDTO); |
| | | |
| | | /** |
| | | * 发布戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/game/publish") |
| | | R publishMcsGame(@RequestParam("gameId") Long gameId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 结束戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/game/finish") |
| | | R finishMcsGame(@RequestParam("gameId") Long gameId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 戳戳游戏/资讯顶部统计数据 |
| | | * @param type |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/statistics/top") |
| | | R getTopStatistics(@RequestParam("type") Integer type, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 新增戳戳资讯 |
| | | * @param mcsInfoDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/information/add") |
| | | R addMcsInfo(@RequestBody McsInfoDTO mcsInfoDTO); |
| | | |
| | | /** |
| | | * 编辑戳戳资讯 |
| | | * @param mcsInfoDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/information/put") |
| | | R putMcsInfo(@RequestBody McsInfoDTO mcsInfoDTO); |
| | | |
| | | /** |
| | | * 发布戳戳资讯 |
| | | * @param infoId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/information/publish") |
| | | R publishMcsInfo(@RequestParam("infoId") Long infoId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 新增产品信息 |
| | | * @param mcsProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/product/add") |
| | | R addMcsProduct(@RequestBody McsProductDTO mcsProductDTO); |
| | | |
| | | /** |
| | | * 编辑产品信息 |
| | | * @param mcsProductDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/product/put") |
| | | R putMcsProduct(@RequestBody McsProductDTO mcsProductDTO); |
| | | |
| | | /** |
| | | * 删除产品信息 |
| | | * @param deleteProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/product/delete") |
| | | R deleteMcsProduct(@RequestBody DeleteProductDTO deleteProductDTO); |
| | | |
| | | /** |
| | | * 上架/下架产品信息 |
| | | * @param setShelfForProductDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/product/setShelf") |
| | | R setShelfForMcsProduct(@RequestBody SetShelfForProductDTO setShelfForProductDTO); |
| | | |
| | | /** |
| | | * 分页查询产品信息 |
| | | * @param pageMcsProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/product/page") |
| | | R pageMcsProduct(@RequestBody PageMcsProductDTO pageMcsProductDTO); |
| | | |
| | | /** |
| | | * 获取产品标签列表 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/label/list") |
| | | R getMcsLabelList(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * check商家/店铺是否有效 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shop/checkStoreIsValid") |
| | | R checkStoreIsValid(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 根据account查询微商业街商家信息 |
| | | * @param account |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/getMcsMerchantByAccount") |
| | | R getMcsMerchantByAccount(@RequestParam("account") String account); |
| | | |
| | | /** |
| | | * 完成订单更新/新增商家信息 |
| | | * @param merchantName |
| | | * @param configId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/updateAfterOrder") |
| | | R updateMcsMerchantAfterOrder(@RequestParam(value = "merchantName", required = false) String merchantName, |
| | | @RequestParam("configId") Long configId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/mcsOrder/queryAll") |
| | | R selectAllMscOrder(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/mcsOrder/{id}") |
| | | R selectOneMscOrder(@PathVariable("id") Long id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param mcsOrderVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/mcsOrder") |
| | | R insertMscOrder(@RequestBody McsOrderVO mcsOrderVO); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param mcsOrderVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/mcsOrder/update") |
| | | R updateMscOrder(@RequestBody McsOrderVO mcsOrderVO); |
| | | |
| | | /** |
| | | * 微信支付 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/mcsOrder/wxPay") |
| | | R wxPayMscOrder(McsOrderVO mcsOrderVO); |
| | | |
| | | /** |
| | | * 发送提醒短信 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/mcsOrder/sendContent") |
| | | R sendContentMcsOrder(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | *微信支付回调 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/mcsOrder/notify") |
| | | R notifyMcsOrder(@RequestBody McsOrderVO mcsOrderVO); |
| | | |
| | | /** |
| | | * 验证码登录 |
| | | * @param loginDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/loginWithPhone") |
| | | R loginWithPhone(@RequestBody LoginWithPhoneDTO loginDTO); |
| | | |
| | | /** |
| | | * 首页顶部数据 |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/index/topData") |
| | | R getMcsIndexTopData(); |
| | | |
| | | /** |
| | | * 戳戳卷领取 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/coupon/apply") |
| | | R applyMcsCoupon(@RequestParam("gameId") Long gameId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * h5分页查询戳戳资讯 |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/information/pageH5") |
| | | R pageH5McsInfo(@RequestBody PageMcsInformationDTO pageMcsInformationDTO); |
| | | |
| | | /** |
| | | * h5分页查询戳戳游戏 |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/game/pageH5") |
| | | R pageH5McsGame(@RequestBody PageMcsGameDTO pageMcsGameDTO); |
| | | |
| | | /** |
| | | * 游戏详情 |
| | | * @param gameId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/game/get") |
| | | R getMcsGame(@RequestParam("gameId") Long gameId); |
| | | |
| | | /** |
| | | * 资讯详情 |
| | | * @param infoId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/info/get") |
| | | R getMcsInfo(@RequestParam("infoId") Long infoId); |
| | | |
| | | /** |
| | | * H5分页查询数字商业街商家 |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/merchant/pageH5") |
| | | R pageH5McsMerchant(@RequestBody PageMcsMerchantDTO pageMcsMerchantDTO); |
| | | |
| | | /** |
| | | * 我的戳戳卷 |
| | | * @param type |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/myCoupon") |
| | | R getMyCoupon(@RequestParam(value = "type", required = false) Integer type, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 新增评价记录 |
| | | * @param mcsEvaluateDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/evaluate/add") |
| | | R addMcsEvaluate(@RequestBody McsEvaluateDTO mcsEvaluateDTO); |
| | | |
| | | /** |
| | | * 我的评价-参与游戏列表 |
| | | * @param pageJoinGameListDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/joinGame/page") |
| | | R getJoinGameList(@RequestBody PageJoinGameListDTO pageJoinGameListDTO); |
| | | |
| | | /** |
| | | * 戳戳卷核销 |
| | | * @param couponId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/coupon/verify") |
| | | R verifyMcsCoupon(@RequestParam("couponId") Long couponId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 分页查询核销记录 |
| | | * @param pageVerifyRecordDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/microcommercialstreet/verifyRecord/page") |
| | | R pageMcsVerifyRecord(@RequestBody PageVerifyRecordDTO pageVerifyRecordDTO); |
| | | |
| | | /** |
| | | * 游戏统计 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/game/statistics") |
| | | R getMcsGameStatistics(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 修改用戶信息 |
| | | * @param putUserInfoDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/microcommercialstreet/putUserInfo") |
| | | R putUserInfo(@RequestBody PutUserInfoDTO putUserInfoDTO); |
| | | |
| | | /** |
| | | * 根据userId获取商家信息 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/retrieveMcsMerchantInfoByUserId") |
| | | R retrieveMcsMerchantInfoByUserId(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街商家旗下所有的游戏/资讯全部下架 |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/offResourceForMcsMerchant") |
| | | R offResourceForMcsMerchant(); |
| | | |
| | | /** |
| | | * 获取产品信息详情 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/product/get") |
| | | R getMcsProduct(@RequestParam("productId") Long productId); |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街游戏结束 |
| | | * @return |
| | | */ |
| | | @GetMapping("/microcommercialstreet/endStatusForMcsGame") |
| | | R endStatusForMcsGame(); |
| | | |
| | | @GetMapping("/reserve/record/delete") |
| | | R deleteRecord(@RequestParam("recordId")Long recordId); |
| | | |
| | | /** |
| | | * 历史数据人员类型填充 |
| | | * @param newVoList |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @PostMapping("/common/data/history/filled") |
| | | R filledPopulationPersonType(@RequestBody List<ComMngPopulationServeExcelVO> newVoList, |
| | | @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 社区后台-分页查询志愿者组织队伍 |
| | | * |
| | | * @param orgTeamDto 请求参数 |
| | | * @return 志愿者组织队伍 |
| | | */ |
| | | @PostMapping("/comMngVolunteerOrgTeam/page") |
| | | R pageVolunteerOrgAdmin(@RequestBody PageComMngVolunteerOrgTeamDto orgTeamDto); |
| | | |
| | | /** |
| | | * 社区后台-新增志愿者组织队伍 |
| | | * |
| | | * @param orgTeamDto 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comMngVolunteerOrgTeam/add") |
| | | R addVolunteerOrgAdmin(@RequestBody AddComMngVolunteerOrgTeamDto orgTeamDto); |
| | | |
| | | /** |
| | | * 社区后台-编辑志愿者组织队伍 |
| | | * |
| | | * @param orgTeamDto 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PutMapping("/comMngVolunteerOrgTeam/edit") |
| | | R editVolunteerOrgAdmin(@RequestBody EditComMngVolunteerOrgTeamDto orgTeamDto); |
| | | |
| | | /** |
| | | * 社区后台-删除志愿者组织队伍 |
| | | * |
| | | * @param id 主键id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comMngVolunteerOrgTeam/delete") |
| | | R deleteVolunteerOrgAdmin(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者组织列表 |
| | | * |
| | | * @param orgTeamDto 请求参数 |
| | | * @return 志愿者组织列表 |
| | | */ |
| | | @PostMapping("/comMngVolunteerOrgTeam/list") |
| | | R listVolunteerOrgAdmin(@RequestBody PageComMngVolunteerOrgTeamDto orgTeamDto); |
| | | |
| | | /** |
| | | * 社区后台-分页查询服务类型 |
| | | * |
| | | * @param serviceTypeDto 请求参数 |
| | | * @return 服务类型列表 |
| | | */ |
| | | @PostMapping("/comMngVolunteerServiceType/page") |
| | | R pageServiceTypeAdmin(@RequestBody PageComMngVolunteerServiceTypeDto serviceTypeDto); |
| | | |
| | | /** |
| | | * 社区后台-新增服务类型 |
| | | * |
| | | * @param serviceTypeDto 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comMngVolunteerServiceType/add") |
| | | R addServiceTypeAdmin(@RequestBody AddComMngVolunteerServiceTypeDto serviceTypeDto); |
| | | |
| | | /** |
| | | * 社区后台-编辑服务类型 |
| | | * |
| | | * @param serviceTypeDto 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PutMapping("/comMngVolunteerServiceType/edit") |
| | | R editServiceTypeAdmin(@RequestBody EditComMngVolunteerServiceTypeDto serviceTypeDto); |
| | | |
| | | /** |
| | | * 社区后台-删除服务类型 |
| | | * |
| | | * @param id 主键id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comMngVolunteerServiceType/delete") |
| | | R deleteServiceTypeAdmin(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 社区后台-分页查询志愿者技能列表 |
| | | * |
| | | * @param volunteerSkillDto 请求参数 |
| | | * @return 志愿者技能列表 |
| | | */ |
| | | @PostMapping("/comMngVolunteerSkill/page") |
| | | R pageVolunteerSkillAdmin(@RequestBody PageComMngVolunteerSkillDto volunteerSkillDto); |
| | | |
| | | /** |
| | | * 社区后台-新增志愿者技能 |
| | | * |
| | | * @param volunteerSkillDto 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comMngVolunteerSkill/add") |
| | | R addVolunteerSkillAdmin(@RequestBody AddComMngVolunteerSkillDto volunteerSkillDto); |
| | | |
| | | /** |
| | | * 社区后台-编辑志愿者技能 |
| | | * |
| | | * @param volunteerSkillDto 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PutMapping("/comMngVolunteerSkill/edit") |
| | | R editVolunteerSkillAdmin(@RequestBody EditComMngVolunteerSkillDto volunteerSkillDto); |
| | | |
| | | /** |
| | | * 社区后台-删除志愿者技能 |
| | | * |
| | | * @param id 主键id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comMngVolunteerSkill/delete") |
| | | R deleteVolunteerSkillAdmin(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者服务类型列表 |
| | | * |
| | | * @param serviceTypeDto 请求参数 |
| | | * @return 志愿者服务列表 |
| | | */ |
| | | @PostMapping("/comMngVolunteerServiceType/list") |
| | | R listServiceTypeAdmin(@RequestBody PageComMngVolunteerServiceTypeDto serviceTypeDto); |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者技能列表 |
| | | * |
| | | * @param volunteerSkillDto 请求参数 |
| | | * @return 志愿者技能列表 |
| | | */ |
| | | @PostMapping("/comMngVolunteerSkill/list") |
| | | R listVolunteerSkillAdmin(@RequestBody PageComMngVolunteerSkillDto volunteerSkillDto); |
| | | |
| | | /** |
| | | * 社区后台-志愿者组织统计 |
| | | * |
| | | * @param communityId 社区id |
| | | * @return 志愿者组织统计 |
| | | */ |
| | | @GetMapping("/comMngVolunteerOrgTeam/statistics") |
| | | R statisticsVolunteerOrgAdmin(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 志愿者导入 |
| | | * |
| | | * @param list 志愿者数据列表 |
| | | * @param communityId 社区id |
| | | * @param userId 用户id |
| | | * @return 导入结果 |
| | | */ |
| | | @PostMapping("/volunteer/import/admin") |
| | | R importVolunteerAdmin(@RequestBody List<ComMngVolunteerExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.DataKanBansDto; |
| | | 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.microCommercialStreet.BindUserPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import com.panzhihua.common.model.vos.*; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | * @return 人员详情 |
| | | */ |
| | | @PostMapping("detailuser") |
| | | R detailUser(@RequestParam("userId") Long userId); |
| | | R<LoginUserInfoVO> detailUser(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 设置用户标签 |
| | |
| | | */ |
| | | @GetMapping("/sysTemplateConfig/selectTemplate") |
| | | R<SysTemplateConfigVO> selectTemplate(@RequestParam("areaCode")String areaCode,@RequestParam("type")Integer type); |
| | | |
| | | /** |
| | | * 微商业街新增商家账号 |
| | | * @param mcsMerchantDTO |
| | | * @return 商家用户id |
| | | */ |
| | | @PostMapping("insertMcsMerchantAccount") |
| | | R addMcsMerchantUser(@RequestBody McsMerchantDTO mcsMerchantDTO); |
| | | |
| | | /** |
| | | * 微商业街修改商家账号 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("putMcsMerchantUser") |
| | | R putMcsMerchantUser(@RequestBody McsMerchantDTO mcsMerchantDTO); |
| | | |
| | | /** |
| | | * 检查用户是否有效 |
| | | * @param userId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @PutMapping("checkUserIsValid") |
| | | Boolean checkUserIsValid(@RequestParam("userId") Long userId, @RequestParam("type") Integer type); |
| | | |
| | | /** |
| | | * 根据手机号、用户类型查询用户 |
| | | * @param phone |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @GetMapping("/getSysUserByPhone") |
| | | R getSysUserByPhone(@RequestParam("phone") String phone, @RequestParam("type") Integer type); |
| | | |
| | | /** |
| | | * 发送验证码 |
| | | * @param phone 手机号 |
| | | * @param clientIP 用户ip |
| | | * @param prefixKey redis Key 前缀 |
| | | * @param limit 获取次数限制 |
| | | * @param timeout 超次数获取时间等待 |
| | | * @return |
| | | */ |
| | | @GetMapping("/sendMessageCode") |
| | | R sendMessageCode(@RequestParam("phone") String phone, |
| | | @RequestParam(value = "clientIP", required = false) String clientIP, |
| | | @RequestParam("prefixKey") String prefixKey, |
| | | @RequestParam("limit") Integer limit, |
| | | @RequestParam("timeout") Integer timeout); |
| | | |
| | | /** |
| | | * 根据openId获取微商业街用户 |
| | | * @param openid |
| | | * @return |
| | | */ |
| | | @GetMapping("/getMcsUserByOpenId") |
| | | R getMcsUserByOpenId(@RequestParam("openid") String openid); |
| | | |
| | | /** |
| | | * 商业街用户微信授权-绑定手机号 |
| | | * @param bindUserPhoneDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/mcs/bindPhone") |
| | | R bindOrAddMcsUser(@RequestBody @Valid BindUserPhoneDTO bindUserPhoneDTO); |
| | | } |
| | |
| | | Boolean isOldDuo = false; |
| | | StringBuffer sb = new StringBuffer(); |
| | | if (answerContentVOList != null && answerContentVOList.size() > 0) { |
| | | int a=0; |
| | | for (ComActQuestnaireAnswerContentVO userAnswers : answerContentVOList) { |
| | | a++; |
| | | if(answerContentVOList.size()==26&&a==9){ |
| | | userData.add(" "); |
| | | } |
| | | //判断是文字描述直接跳过 |
| | | if (userAnswers.getOptionType().equals(5) |
| | | || (StringUtils.isNotEmpty(userAnswers.getAnswerContent()) && userAnswers.getAnswerContent().contains(noExport))) { |
| | |
| | | public static SimpleDateFormat yyyyMM_format = new SimpleDateFormat("yyyy-MM"); |
| | | public static SimpleDateFormat format_yyymmdd = new SimpleDateFormat("yyyyMMdd"); |
| | | public static SimpleDateFormat format_yyyy = new SimpleDateFormat("yyyy"); |
| | | public static SimpleDateFormat format_yyyyMMddHHmmss = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | | 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"); |
| | |
| | | |
| | | /** |
| | | * 字符串转date |
| | | * |
| | | * |
| | | * @param date |
| | | * 时间戳 |
| | | * @param format |
| | |
| | | |
| | | /** |
| | | * 字符串转date |
| | | * |
| | | * |
| | | * @param date |
| | | * 时间戳 |
| | | * @return 时间 |
| | |
| | | |
| | | /** |
| | | * 字符串转date |
| | | * |
| | | * |
| | | * @param date |
| | | * 时间戳 |
| | | * @return 时间 |
| | |
| | | |
| | | /** |
| | | * 获取当前时间 |
| | | * |
| | | * |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 返回当前事件的时间戳 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static Long getCurrentDateTimeStamp() { |
| | |
| | | |
| | | /** |
| | | * 获取当前时间字符串,格式为yyyy-MM-dd HH:mm:ss |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getCurrentDateStr() { |
| | |
| | | |
| | | /** |
| | | * 获取当前时间字符串,格式为yyyyMMdd |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getCurrentDateString() { |
| | |
| | | |
| | | /** |
| | | * 获取当前时间字符串,格式为yyyy-MM-dd |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getCurrentDateStrymd() { |
| | |
| | | |
| | | /** |
| | | * 获取当前时间long值 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static long getCurrentDataLong() { |
| | |
| | | |
| | | /** |
| | | * 获取当前时间 |
| | | * |
| | | * |
| | | * @param format |
| | | * @return |
| | | * @throws Exception |
| | |
| | | |
| | | /** |
| | | * 对日期进行加法操作 |
| | | * |
| | | * |
| | | * @param date |
| | | * @param hours |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 对日期的分钟进行加法操作 |
| | | * |
| | | * |
| | | * @param date |
| | | * @param minutes |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 计算两个日期先差多少秒 |
| | | * |
| | | * |
| | | * @param pre |
| | | * 前一个日期 |
| | | * @param after |
| | |
| | | |
| | | /** |
| | | * 计算两个时间相差的天数 |
| | | * |
| | | * |
| | | * @param stardate |
| | | * @param enddate |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 结束时间与当前时间计算相差的月数 |
| | | * |
| | | * |
| | | * @param enddate |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取某个时间段之前的时间点 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getSomeTimeStapStr(String sign) { |
| | |
| | | |
| | | /** |
| | | * 获取失效时间点(在什么时间失效) |
| | | * |
| | | * |
| | | * @param minutes |
| | | * 有效分钟数 |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 获取当前年份 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getCurrentYear() { |
| | |
| | | |
| | | /** |
| | | * 获取当前月份 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getCurrentMonth() { |
| | |
| | | |
| | | /** |
| | | * 获取无符号的当前时间 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getCurrentDateStrNoSignal() { |
| | |
| | | |
| | | /** |
| | | * 获取前几个小时的时间 |
| | | * |
| | | * |
| | | * @param hours |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 小时取整 |
| | | * |
| | | * |
| | | * @param date |
| | | * @param hour |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 分钟取整 以十分钟为单位 ,去除尾端,加上 参数 46->40+minutes*10 |
| | | * |
| | | * |
| | | * @param date |
| | | * @param minutes |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 天数取整 |
| | | * |
| | | * |
| | | * @param date |
| | | * @param day |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 日期相加减 |
| | | * |
| | | * |
| | | * @param time |
| | | * 时间字符串 yyyy-MM-dd HH:mm:ss |
| | | * @param num |
| | |
| | | |
| | | /** |
| | | * 获取当前月第一天 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static Date getFirstDayOfMonth() { |
| | |
| | | |
| | | /** |
| | | * 获取当前年月的第一天时间 |
| | | * |
| | | * |
| | | * @param year |
| | | * 年份 |
| | | * @param month |
| | |
| | | |
| | | /** |
| | | * 获取当前年月的最后一天时间 |
| | | * |
| | | * |
| | | * @param year |
| | | * 年份 |
| | | * @param month |
| | |
| | | |
| | | /** |
| | | * date2比date1多的天数 |
| | | * |
| | | * |
| | | * @param date1 |
| | | * @param date2 |
| | | * @return |
| | |
| | | } |
| | | |
| | | /** |
| | | * 计算剩余天数,不足一天按一天算 |
| | | * @param expireDate |
| | | * @return |
| | | */ |
| | | public static int retrieveRemainingDays(Date expireDate) { |
| | | Date nowDate = new Date(); |
| | | Calendar startDate = Calendar.getInstance(); |
| | | startDate.setTime(nowDate); |
| | | Calendar endDate = Calendar.getInstance(); |
| | | endDate.setTime(expireDate); |
| | | Calendar date = (Calendar) startDate.clone(); |
| | | int daysBetween = 0; |
| | | while (date.before(endDate)) { |
| | | date.add(Calendar.DAY_OF_MONTH, 1); |
| | | daysBetween++; |
| | | } |
| | | return daysBetween; |
| | | } |
| | | |
| | | /** |
| | | * 获取当前月第一天 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getFirstDayOfMonthString() { |
| | |
| | | |
| | | /** |
| | | * 获取当前月最后一天 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getLastDayOfMonthString() { |
| | |
| | | |
| | | /** |
| | | * 获取当前时间(年月日) |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getDayOfMonthString() { |
| | |
| | | } |
| | | return dates; |
| | | } |
| | | |
| | | /** |
| | | * 获取上月最后一天时间 |
| | | * @return 上月最后一天时间 |
| | | */ |
| | | public static String getOldMonthLastDay(){ |
| | | Calendar calendar=Calendar.getInstance(); |
| | | int month=calendar.get(Calendar.MONTH); |
| | | calendar.set(Calendar.MONTH, month-1); |
| | | calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); |
| | | return format_yyymmdd.format(calendar.getTime()); |
| | | } |
| | | |
| | | /** |
| | | * 获取上月第一天时间 |
| | | * @return 上月第一天时间 |
| | | */ |
| | | public static String getOldMonthFirstDay(){ |
| | | Calendar calendar=Calendar.getInstance(); |
| | | calendar.add(Calendar.MONTH, -1); |
| | | calendar.set(Calendar.DAY_OF_MONTH, 1); |
| | | return format_yyymmdd.format(calendar.getTime()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import org.json.JSONObject; |
| | | import org.json.XML; |
| | | public class SmsUtil { |
| | | |
| | | private final static String URL = "https://106.ihuyi.com/webservice/sms.php?method=Submit"; |
| | | private final static String ACCOUNT="C87595580"; |
| | | private final static String PASSWORD="b66d918a598ad126b85b13e82a38e165"; |
| | | private final static String CONTENT="您有一笔订单还未付款,超时未付款订单将自动取消。"; |
| | | public static int sendCode(String mobile, String code){ |
| | | try { |
| | | String requestUrl=URL+"&account="+ACCOUNT+"&password="+PayUtil.MD5(PASSWORD)+"&mobile="+mobile+"&content="+"您的验证码是:"+code+"。请不要把验证码泄露给其他人。"; |
| | | String res=HttpClientUtil.httpGet(requestUrl, null,null); |
| | | JSONObject jsonObject=XML.toJSONObject(res); |
| | | if(jsonObject.get("SubmitResult")!=null){ |
| | | JSONObject result= (JSONObject) jsonObject.get("SubmitResult"); |
| | | if(result.get("code").equals(2)){ |
| | | return 1; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | public int sendContent(String mobile){ |
| | | try { |
| | | String requestUrl=URL+"&account="+ACCOUNT+"&password="+PayUtil.MD5(PASSWORD)+"&mobile="+mobile+"&content="+CONTENT; |
| | | String res=HttpClientUtil.httpGet(requestUrl, null,null); |
| | | JSONObject jsonObject=XML.toJSONObject(res); |
| | | if(jsonObject.get("SubmitResult")!=null){ |
| | | JSONObject result= (JSONObject) jsonObject.get("SubmitResult"); |
| | | if(result.get("code").equals(2)){ |
| | | return 1; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | } |
| | |
| | | parameters.put("paySign", sign); |
| | | return parameters; |
| | | } |
| | | public static String h5pay(String appid, String mchId, String payKey, String notifyUrl, String body, |
| | | String openid, String outTradeNo, BigDecimal money, String tradeType, String clientIp) { |
| | | String nonceStr = PayUtil.makeUUID(32); |
| | | SortedMap<Object, Object> params = new TreeMap<>(); |
| | | params.put("appid", appid); |
| | | params.put("body", body); |
| | | params.put("mch_id", mchId); |
| | | params.put("nonce_str", nonceStr); |
| | | params.put("notify_url", notifyUrl); |
| | | params.put("openid", openid); |
| | | params.put("out_trade_no", outTradeNo);// 商品订单号 |
| | | params.put("spbill_create_ip", clientIp);// 用户真实ip |
| | | params.put("total_fee", PayUtil.moneyToIntegerStr(money));// 费用的参数转型 |
| | | params.put("trade_type", tradeType);// 对接类型 |
| | | params.put("sign", PayUtil.createSign(PayCpmstant.DEFAULT_ENCODING, params, payKey));// MD5签名 |
| | | // 转换成xml |
| | | String xmlData = PayUtil.getRequestXml(params); |
| | | // 请求微信后台,获取支付id |
| | | String resXml = HttpClientUtil.httpsRequest(PayCpmstant.UNIFIEDORDER_URL, xmlData); |
| | | log.info("请求微信支付返回参数:" + resXml); |
| | | |
| | | org.json.JSONObject resultData = XML.toJSONObject(resXml); |
| | | JSONObject data = JSON.parseObject(resultData.get("xml").toString()); |
| | | JSONObject result = new JSONObject(); |
| | | |
| | | if (data.get("return_msg").equals(PayCpmstant.RETURN_MSG) |
| | | && data.get("return_code").equals(PayCpmstant.RETURN_CODE)) { |
| | | // 将微信统一下单成功的参数拼接再签名 |
| | | // 统一下单返回prepay_id |
| | | if(tradeType.equals("JSAPI")) { |
| | | String prepayId = "prepay_id=" + data.getString("prepay_id"); |
| | | // 时间戳 |
| | | Long timeStamp = System.currentTimeMillis() / 1000; |
| | | // 封装需要签名的字段 |
| | | SortedMap<Object, Object> payParams = new TreeMap<>(); |
| | | payParams.put("appId", appid); |
| | | payParams.put("nonceStr", nonceStr); |
| | | payParams.put("package", prepayId); |
| | | payParams.put("signType", PayCpmstant.SIGN_TYPE); |
| | | payParams.put("timeStamp", timeStamp); |
| | | // 将参数以及签名计算完成封装返回给前端 |
| | | result.put("timeStamp", timeStamp); |
| | | result.put("nonceStr", nonceStr); |
| | | result.put("package", prepayId); |
| | | result.put("signType", PayCpmstant.SIGN_TYPE); |
| | | result.put("paySign", PayUtil.createSign(PayCpmstant.DEFAULT_ENCODING, payParams, payKey)); |
| | | } |
| | | else if(tradeType.equals("NATIVE")) { |
| | | result.put("codeUrl",data.getString("code_url")); |
| | | } else if(tradeType.equals("MWEB")) { |
| | | result.put("mWebUrl",data.getString("mweb_url")); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | return result.toJSONString(); |
| | | } |
| | | } |
| | |
| | | try { |
| | | // 此处APP_ID APP_SECRET 在微信小程序后端可见 |
| | | // String accessTokenUrl = String.format(TEMP_URL, APP_ID, APP_SECRET); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + getAppId() + "&secret=" + getAppSecret(); |
| | | String appId = getAppId(); |
| | | String appSecret = getAppSecret(); |
| | | if(StringUtils.isEmpty(appId)){ |
| | | appId = APP_ID; |
| | | } |
| | | if(StringUtils.isEmpty(appSecret)){ |
| | | appSecret = APP_SECRET; |
| | | } |
| | | log.info("获取微信token参数:appid=" + appId + ",appSecret=" + appSecret); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + appId + "&secret=" + appSecret; |
| | | String result = HttpClientUtil.httpGet(accessTokenUrl, null, null); |
| | | Map<String, Object> resultMap = JSON.parseObject(result, Map.class); |
| | | if (resultMap.containsKey("access_token")) { |
| | | accessToken = resultMap.get("access_token").toString(); |
| | | } |
| | | } catch (IOException ioe) { |
| | | log.error("小程序http请求异常"); |
| | | ioe.printStackTrace(); |
| | | } |
| | | return accessToken; |
| | | } |
| | | |
| | | /** |
| | | * 获取西区社区通微信token |
| | | * @return 西区社区通微信token |
| | | * @throws Exception 异常 |
| | | */ |
| | | public String getXQAppAccessToken() throws Exception { |
| | | String accessToken = "0"; |
| | | try { |
| | | // 此处APP_ID APP_SECRET 在微信小程序后端可见 |
| | | // String accessTokenUrl = String.format(TEMP_URL, APP_ID, APP_SECRET); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + APP_ID + "&secret=" + APP_SECRET; |
| | | String result = HttpClientUtil.httpGet(accessTokenUrl, null, null); |
| | | Map<String, Object> resultMap = JSON.parseObject(result, Map.class); |
| | | if (resultMap.containsKey("access_token")) { |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.io.*; |
| | | import java.util.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.lowagie.text.DocumentException; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterExportVO; |
| | | import com.panzhihua.community_backstage.util.MyAESUtil; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.community_backstage.util.HtmlToPdfUtil; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | import org.apache.poi.ss.usermodel.VerticalAlignment; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.thymeleaf.TemplateEngine; |
| | | import org.thymeleaf.context.Context; |
| | | |
| | | /** |
| | | * @description: 预约登记接口 |
| | |
| | | private UserService userService; |
| | | @Resource |
| | | private SFTPConfig sftpConfig; |
| | | @Resource |
| | | private TemplateEngine templateEngine; |
| | | |
| | | @ApiOperation(value = "分页查询预约登记列表", response = ComActReserveListAdminVO.class) |
| | | @PostMapping("/page") |
| | |
| | | return communityService.registerDetailedListAdmin(detailedAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出登记明细列表", response = ComActReserveRegisterDetailedVO.class) |
| | | @PostMapping("/register/detailed/list/export") |
| | | public R registerDetailedListExport(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | R r=communityService.registerDetailedListAdminExport(detailedAdminDTO); |
| | | if(r.getData()!=null){ |
| | | List<ReservePdfExportVO> reservePdfExportVOS = (List<ReservePdfExportVO>) r.getData(); |
| | | if(!reservePdfExportVOS.isEmpty()&&reservePdfExportVOS.size()<=100){ |
| | | String name="承诺书.pdf"; |
| | | String uuid = UUID.randomUUID().toString().replace("-", ""); |
| | | String ftpUrl = "/mnt/data/web/excel/"+uuid+"/"; |
| | | SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort()); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl +name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | Map<String, Object> model = new HashMap<>(); |
| | | model.put("reservePdfExportVOS", reservePdfExportVOS); |
| | | Context ctx = new Context(); |
| | | ctx.setVariables(model); |
| | | String htmlcontext =null; |
| | | if(detailedAdminDTO.getPdfType()==1){ |
| | | htmlcontext=templateEngine.process("/gasSafety", ctx); |
| | | } |
| | | if(detailedAdminDTO.getPdfType()==2){ |
| | | htmlcontext=templateEngine.process("/forestFire", ctx); |
| | | } |
| | | InputStream inputStream = null; |
| | | try { |
| | | HtmlToPdfUtil.topdf(htmlcontext, fileName); |
| | | 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("删除pdf【{}】结果【{}】", absolutePath, delete); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | try { |
| | | inputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return R.ok(sftpConfig.getExcelUrl() +uuid+ "/" + name); |
| | | } |
| | | } |
| | | return R.ok(null,"当前数据量太大,请根据筛选条件优化到100条以内"); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询登记明细详情", response = ComActReserveRegisterDetailedVO.class) |
| | | @PostMapping("/register/detailed/detail") |
| | | public R registerDetailedDetail(@RequestParam("reserveRecordId") Long reserveRecordId) { |
| | |
| | | public R getWestCommunityLists() { |
| | | return communityService.getWestCommunityLists(null); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除预约登记记录") |
| | | @GetMapping("/record/delete") |
| | | public R deleteRecord(@RequestParam("recordId")Long recordId){ |
| | | return communityService.deleteRecord(recordId); |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "分页查询所有数据",response = ComPropertyVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return this.propertyService.comPropertyHelpSelectAll(commonPage); |
| | | } |
| | | |
| | |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | } |
| | | comSwPatrolRecordPageDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pagePatrolRecord(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "随手拍分类列表", response = ComActEasyPhotoClassifyVO.class) |
| | | @GetMapping("easyphoto/classify/list") |
| | | public R easyPhotoClassifyList() { |
| | | return communityService.listPhotoClassify(); |
| | | return communityService.listPhotoClassify(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍切换公示状态", response = ComActEasyPhotoClassifyVO.class) |
| | |
| | | @ApiOperation(value = "所有服务分类", response = ConvenientServiceCategoryVO.class) |
| | | @GetMapping("/service-category/all") |
| | | public R getAllServiceCategories() { |
| | | return communityService.getAllServiceCategories(); |
| | | return communityService.getAllServiceCategories(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "便民服务商家导出") |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "excel填充旧数据的人员类型") |
| | | @PostMapping(value = "/history/filled", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R filledPopulationPersonType(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | | log.info("传入文件名字【{}】", fileName); |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationTempFilledExcelListen excelListen = new ComMngPopulationTempFilledExcelListen( |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, excelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("填充旧数据的人员类型【{}】", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } catch (ServiceException e) { |
| | | log.error("错误数据【{}】", e.getMessage()); |
| | | return downloadErrorPopulation("POPULATION_FILLED_ERROR_LIST"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | head27.add("是否居住地(是/否)"); |
| | | |
| | | List<String> head28 = new ArrayList<String>(); |
| | | head28.add("人员类型(户籍人员/留守人员/外地人员/境外人员)"); |
| | | head28.add("人员类型(户籍人口/留守人员/外地人员/境外人员/流动人口/常住人口/暂住人口)"); |
| | | List<String> head29 = new ArrayList<String>(); |
| | | head29.add("国家"); |
| | | List<String> head30 = new ArrayList<String>(); |
| | |
| | | if (StringUtils.isNotEmpty(popul.getBirthday())) { |
| | | populationExcelVo.setAge(AgeUtils.getAgeFromBirthTimes(popul.getBirthday())); |
| | | } |
| | | if (StringUtils.isNumeric(popul.getPersonType())) { |
| | | populationExcelVo.setPersonType(PopulPersonTypeEnum.getCnDescByName(Integer.parseInt(popul.getPersonType()))); |
| | | } |
| | | populationExcelVoList.add(populationExcelVo); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "老人-数据导出") |
| | | @PostMapping("/data/exportOld") |
| | | public R dataExportPopulationOld(@RequestBody ComMngPopulationDTO comMngPopulationVO) { |
| | | // 获取登陆用户 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | // 获取登陆用户绑定社区id |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | comMngPopulationVO.setActId(communityId); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "实有人口数据.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 { |
| | | List<ComMngPopulationVO> populList = null; |
| | | populList = JSON.parseArray( |
| | | JSON.toJSONString(communityService.exportOld(comMngPopulationVO).getData()), |
| | | ComMngPopulationVO.class); |
| | | List<ComMngPopulationExcelVo> populationExcelVoList = new ArrayList<>(); |
| | | if (populList != null && populList.size() > 0) { |
| | | for (ComMngPopulationVO popul : populList) { |
| | | ComMngPopulationExcelVo populationExcelVo = new ComMngPopulationExcelVo(); |
| | | BeanUtils.copyProperties(popul, populationExcelVo); |
| | | // 设置性别 |
| | | populationExcelVo.setSex(PopulSexEnum.getCnDescByName(popul.getSex())); |
| | | // 设置政治面貌 |
| | | populationExcelVo.setPoliticalOutlook( |
| | | PopulPoliticalOutlookEnum.getCnDescByName(popul.getPoliticalOutlook())); |
| | | // 设置是否租住 |
| | | // populationExcelVo.setIsRent(PopulIsOkEnum.getCnDescByName(popul.getIsRent())); |
| | | // 设置本地或外地 |
| | | populationExcelVo.setOutOrLacal(PopulOutOrLocalEnum.getCnDescByName(popul.getOutOrLocal())); |
| | | // 设置婚姻状况 |
| | | populationExcelVo.setMarriage(PopulMarriageEnum.getCnDescByName(popul.getMarriage())); |
| | | // 设置文化程度 |
| | | populationExcelVo |
| | | .setCultureLevel(PopulCultureLevelEnum.getCnDescByName(popul.getCultureLevel())); |
| | | // 设置年龄 |
| | | if (StringUtils.isNotEmpty(popul.getBirthday())) { |
| | | populationExcelVo.setAge(AgeUtils.getAgeFromBirthTimes(popul.getBirthday())); |
| | | } |
| | | populationExcelVoList.add(populationExcelVo); |
| | | } |
| | | } |
| | | |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationExcelVo.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("老人导出数据").build(); |
| | | excelWriter.write(populationExcelVoList, 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("/edit/electronicArchives") |
| | | public R editPopulation(@RequestBody UserElectronicFileVO userElectronicFileVO) { |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.listen.ComMngVolunteerExcelListen; |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerOrgTeamVo; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerServiceTypeVo; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerSkillVo; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerStatisticsVo; |
| | | import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerErrorExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.community_backstage.config.SFTPConfig; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * 志愿者模块 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"志愿者模块"}) |
| | | @RestController |
| | | @RequestMapping("/volunteer/") |
| | | public class VolunteerApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private SFTPConfig sftpConfig; |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | @ApiOperation(value = "分页查询志愿者组织", response = ComMngVolunteerOrgTeamVo.class) |
| | | @PostMapping("/org/page") |
| | | public R pageVolunteerOrgAdmin(@RequestBody PageComMngVolunteerOrgTeamDto orgTeamDto) { |
| | | orgTeamDto.setParentId(0L); |
| | | orgTeamDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.pageVolunteerOrgAdmin(orgTeamDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询志愿者组织列表", response = ComMngVolunteerOrgTeamVo.class) |
| | | @GetMapping("/org/list") |
| | | public R listVolunteerOrgAdmin() { |
| | | PageComMngVolunteerOrgTeamDto orgTeamDto = new PageComMngVolunteerOrgTeamDto(); |
| | | orgTeamDto.setParentId(0L); |
| | | orgTeamDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.listVolunteerOrgAdmin(orgTeamDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询志愿者组织下队伍列表", response = ComMngVolunteerOrgTeamVo.class) |
| | | @PostMapping("/org/team/page") |
| | | public R pageVolunteerOrgTeamAdmin(@RequestBody PageComMngVolunteerOrgTeamDto orgTeamDto) { |
| | | orgTeamDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.pageVolunteerOrgAdmin(orgTeamDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增志愿者组织") |
| | | @PostMapping("/org/add") |
| | | public R addVolunteerOrgAdmin(@RequestBody AddComMngVolunteerOrgTeamDto orgTeamDto) { |
| | | if(StringUtils.isEmpty(orgTeamDto.getName())){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | orgTeamDto.setParentId(0L); |
| | | orgTeamDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.addVolunteerOrgAdmin(orgTeamDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增志愿者队伍") |
| | | @PostMapping("/org/team/add") |
| | | public R addVolunteerOrgTeamAdmin(@RequestBody AddComMngVolunteerOrgTeamDto orgTeamDto) { |
| | | if(orgTeamDto.getParentId() == null || orgTeamDto.getServiceTypeId() == null || StringUtils.isEmpty(orgTeamDto.getName())){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | orgTeamDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.addVolunteerOrgAdmin(orgTeamDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑志愿者组织") |
| | | @PostMapping("/org/edit") |
| | | public R editVolunteerOrgAdmin(@RequestBody EditComMngVolunteerOrgTeamDto orgTeamDto) { |
| | | if(StringUtils.isEmpty(orgTeamDto.getName()) || orgTeamDto.getId() == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.editVolunteerOrgAdmin(orgTeamDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑志愿者队伍") |
| | | @PostMapping("/org/team/edit") |
| | | public R editVolunteerOrgTeamAdmin(@RequestBody EditComMngVolunteerOrgTeamDto orgTeamDto) { |
| | | if(orgTeamDto.getId() == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.editVolunteerOrgAdmin(orgTeamDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除志愿者组织/队伍") |
| | | @GetMapping("/org/delete") |
| | | public R deleteVolunteerOrgAdmin(@RequestParam("id") Long id) { |
| | | if(id == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.deleteVolunteerOrgAdmin(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询服务类型", response = ComMngVolunteerOrgTeamVo.class) |
| | | @PostMapping("/service/type/page") |
| | | public R pageServiceTypeAdmin(@RequestBody PageComMngVolunteerServiceTypeDto serviceTypeDto) { |
| | | serviceTypeDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.pageServiceTypeAdmin(serviceTypeDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增服务类型") |
| | | @PostMapping("/service/type/add") |
| | | public R addServiceTypeAdmin(@RequestBody AddComMngVolunteerServiceTypeDto serviceTypeDto) { |
| | | if(StringUtils.isEmpty(serviceTypeDto.getName())){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | serviceTypeDto.setCommunityId(this.getCommunityId()); |
| | | serviceTypeDto.setUserId(this.getUserId()); |
| | | return communityService.addServiceTypeAdmin(serviceTypeDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑服务类型") |
| | | @PostMapping("/service/type/edit") |
| | | public R editServiceTypeAdmin(@RequestBody EditComMngVolunteerServiceTypeDto serviceTypeDto) { |
| | | if(StringUtils.isEmpty(serviceTypeDto.getName()) || serviceTypeDto.getId() == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | serviceTypeDto.setUserId(this.getUserId()); |
| | | return communityService.editServiceTypeAdmin(serviceTypeDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除志愿者组织/队伍") |
| | | @GetMapping("/service/type/delete") |
| | | public R deleteServiceTypeAdmin(@RequestParam("id") Long id) { |
| | | if(id == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.deleteServiceTypeAdmin(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询志愿者技能列表", response = ComMngVolunteerSkillVo.class) |
| | | @PostMapping("/skill/page") |
| | | public R pageVolunteerSkillAdmin(@RequestBody PageComMngVolunteerSkillDto volunteerSkillDto) { |
| | | volunteerSkillDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.pageVolunteerSkillAdmin(volunteerSkillDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增志愿者技能列表") |
| | | @PostMapping("/skill/add") |
| | | public R addVolunteerSkillAdmin(@RequestBody AddComMngVolunteerSkillDto volunteerSkillDto) { |
| | | if(StringUtils.isEmpty(volunteerSkillDto.getName())){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | volunteerSkillDto.setCommunityId(this.getCommunityId()); |
| | | volunteerSkillDto.setUserId(this.getUserId()); |
| | | return communityService.addVolunteerSkillAdmin(volunteerSkillDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑志愿者技能列表") |
| | | @PostMapping("/skill/edit") |
| | | public R editVolunteerSkillAdmin(@RequestBody EditComMngVolunteerSkillDto volunteerSkillDto) { |
| | | if(StringUtils.isEmpty(volunteerSkillDto.getName()) || volunteerSkillDto.getId() == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | volunteerSkillDto.setUserId(this.getUserId()); |
| | | return communityService.editVolunteerSkillAdmin(volunteerSkillDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除志愿者技能列表") |
| | | @GetMapping("/skill/delete") |
| | | public R deleteVolunteerSkillAdmin(@RequestParam("id") Long id) { |
| | | if(id == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.deleteVolunteerSkillAdmin(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询志愿者服务类型列表", response = ComMngVolunteerServiceTypeVo.class) |
| | | @GetMapping("/service/type/list") |
| | | public R listVolunteerServiceTypeAdmin() { |
| | | PageComMngVolunteerServiceTypeDto serviceTypeDto = new PageComMngVolunteerServiceTypeDto(); |
| | | serviceTypeDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.listServiceTypeAdmin(serviceTypeDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询志愿者技能列表", response = ComMngVolunteerSkillVo.class) |
| | | @GetMapping("/skill/list") |
| | | public R listVolunteerSkillAdmin() { |
| | | PageComMngVolunteerSkillDto volunteerSkillDto = new PageComMngVolunteerSkillDto(); |
| | | volunteerSkillDto.setCommunityId(this.getCommunityId()); |
| | | return communityService.listVolunteerSkillAdmin(volunteerSkillDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "志愿者组织统计接口", response = ComMngVolunteerStatisticsVo.class) |
| | | @GetMapping("/org/statistics") |
| | | public R statisticsVolunteerOrgAdmin() { |
| | | return communityService.statisticsVolunteerOrgAdmin(this.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "志愿者导入模板下载") |
| | | @GetMapping("/import/template/download") |
| | | public R importTemplateDownload() { |
| | | return R.ok(sftpConfig.getExcelUrl() + "志愿者导入模板.xlsx"); |
| | | } |
| | | |
| | | @ApiOperation(value = "志愿者导入") |
| | | @PostMapping("/import") |
| | | public R importAdmin(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | | log.info("传入文件名字【{}】", fileName); |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngVolunteerExcelListen clusterMemberExcelListen = new ComMngVolunteerExcelListen( |
| | | communityService, this.getCommunityId(), this.getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, clusterMemberExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "下载导入失败志愿者错误数据") |
| | | @PostMapping("/download/error") |
| | | public R downloadErrorDrugPopulation(@RequestParam(value = "key") String key) { |
| | | List<ComMngVolunteerErrorExcelVO> 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, ComMngVolunteerErrorExcelVO.class); |
| | | } |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "导入志愿者错误数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort()); |
| | | 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, ComMngVolunteerErrorExcelVO.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(sftpConfig.getExcelUrl() + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.util; |
| | | |
| | | import com.lowagie.text.DocumentException; |
| | | import com.lowagie.text.pdf.BaseFont; |
| | | import org.springframework.util.ResourceUtils; |
| | | import org.xhtmlrenderer.pdf.ITextFontResolver; |
| | | import org.xhtmlrenderer.pdf.ITextRenderer; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | import java.net.URLDecoder; |
| | | |
| | | public class HtmlToPdfUtil { |
| | | public static void topdf(String content,String path) throws DocumentException, FileNotFoundException { |
| | | ITextRenderer renderer = new ITextRenderer(); |
| | | ITextFontResolver fontResolver = renderer.getFontResolver(); |
| | | try { |
| | | //设置字体,否则不支持中文,在html中使用字体,html{ font-family: SimSun;} |
| | | fontResolver.addFont("templates/simsun.ttc", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | renderer.getSharedContext().setReplacedElementFactory(new PdfBase64ImgReplacedElementFactory()); |
| | | renderer.getSharedContext().getTextRenderer().setSmoothingThreshold(0); |
| | | renderer.setDocumentFromString(content); |
| | | renderer.layout(); |
| | | renderer.createPDF(new FileOutputStream(new File(path))); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.util; |
| | | |
| | | import com.lowagie.text.BadElementException; |
| | | import com.lowagie.text.Image; |
| | | import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; |
| | | import org.apache.batik.transcoder.TranscoderException; |
| | | import org.apache.batik.transcoder.TranscoderInput; |
| | | import org.apache.batik.transcoder.TranscoderOutput; |
| | | import org.apache.batik.transcoder.image.PNGTranscoder; |
| | | import org.w3c.dom.Element; |
| | | import org.xhtmlrenderer.extend.FSImage; |
| | | import org.xhtmlrenderer.extend.ReplacedElement; |
| | | import org.xhtmlrenderer.extend.ReplacedElementFactory; |
| | | import org.xhtmlrenderer.extend.UserAgentCallback; |
| | | import org.xhtmlrenderer.layout.LayoutContext; |
| | | import org.xhtmlrenderer.pdf.ITextFSImage; |
| | | import org.xhtmlrenderer.pdf.ITextImageElement; |
| | | import org.xhtmlrenderer.render.BlockBox; |
| | | import org.xhtmlrenderer.simple.extend.FormSubmissionListener; |
| | | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * @author zzj |
| | | * 图片转换工具 |
| | | */ |
| | | public class PdfBase64ImgReplacedElementFactory implements ReplacedElementFactory { |
| | | |
| | | /** |
| | | * * 实现createReplacedElement 替换html中的Img标签 |
| | | * * |
| | | * * @param c 上下文 |
| | | * * @param box 盒子 |
| | | * * @param uac 回调 |
| | | * * @param cssWidth css宽 |
| | | * * @param cssHeight css高 |
| | | * * @return ReplacedElement |
| | | */ |
| | | @Override |
| | | public ReplacedElement createReplacedElement(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight) { |
| | | // 遍历所有标签 |
| | | Element e = box.getElement(); |
| | | if (e == null) { |
| | | return null; |
| | | } |
| | | String nodeName = e.getNodeName(); |
| | | // 找到所有img标签 |
| | | if (nodeName.equals("img")) { |
| | | String attribute = e.getAttribute("src"); |
| | | FSImage fsImage; |
| | | try { |
| | | // 生成itext图像 |
| | | fsImage = buildImage(attribute, uac); |
| | | } catch (BadElementException e1) { |
| | | fsImage = null; |
| | | } catch (IOException e1) { |
| | | fsImage = null; |
| | | } |
| | | if (fsImage != null) { |
| | | // 对图像进行缩放 |
| | | if (cssWidth != -1 || cssHeight != -1) { |
| | | fsImage.scale(cssWidth, cssHeight); |
| | | } |
| | | return new ITextImageElement(fsImage); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 编解码base64并生成itext图像 |
| | | */ |
| | | protected FSImage buildImage(String srcAttr, UserAgentCallback uac) throws IOException, |
| | | BadElementException { |
| | | FSImage fiImg = null; |
| | | //图片的src要为src="data:image/jpg;base64,{图片的base64code}"这种base64格式 |
| | | if (srcAttr.toLowerCase().startsWith("data:image/")) { |
| | | String base64Code = srcAttr.substring(srcAttr.indexOf("base64,") + "base64,".length(), srcAttr.length()); |
| | | PNGTranscoder t = new PNGTranscoder(); |
| | | TranscoderInput input = new TranscoderInput(BaseUtils.base64StrToInputStream(base64Code)); |
| | | ByteArrayOutputStream out = new ByteArrayOutputStream(); |
| | | TranscoderOutput output = new TranscoderOutput(out); |
| | | try { |
| | | t.transcode(input, output); |
| | | } catch (TranscoderException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | out.flush(); |
| | | fiImg = new ITextFSImage(Image.getInstance(out.toByteArray())); |
| | | } else { |
| | | fiImg = uac.getImageResource(srcAttr).getImage(); |
| | | } |
| | | return fiImg; |
| | | } |
| | | |
| | | @Override |
| | | public void reset() { |
| | | } |
| | | |
| | | @Override |
| | | public void remove(Element arg0) { |
| | | } |
| | | |
| | | @Override |
| | | public void setFormSubmissionListener(FormSubmissionListener arg0) { |
| | | } |
| | | } |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> |
| | | |
| | | <head> |
| | | <meta charset="UTF-8" /> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| | | <title>森林防火承诺书</title> |
| | | <style> |
| | | @page { |
| | | size: 210mm 297mm; |
| | | /*设置纸张大小:A4(210mm 297mm)、A3(297mm 420mm) 横向则反过来*/ |
| | | margin: 0.25in; |
| | | padding: 1em; |
| | | |
| | | @top-center { |
| | | content: element(header) |
| | | } |
| | | ; |
| | | } |
| | | </style> |
| | | <style type="text/css"> |
| | | /* reset */ |
| | | * { |
| | | padding: 0; |
| | | margin: 0; |
| | | font-family: 'SimSun'; |
| | | overflow: hidden; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div style="height: 1044px;" th:each="reservePdfExportVO : ${reservePdfExportVOS}"> |
| | | <div style="text-align: center;font-size: 30px;">森林防火承诺书</div> |
| | | <div style="display: flex;align-items: center;align-items: center;"> |
| | | <div style="font-size: 22px;padding: 30px;"> |
| | | <div style="text-indent:2em;line-height: 1.4;">保护森林资源、维护生态安全,是每个公民应尽的义务。为保证在我市林区范围内不发生森林火灾,我自愿做出如下承诺: |
| | | </div> |
| | | <div style="text-indent:2em;line-height: 1.4;">一、严格遵守森林防火法律法规及《禁火令》规定,文明祭祀,在祭祀过程不使用明火、不野外用火。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">二、对家人和朋友进行防火知识宣传,提高大家防火意识。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;"> |
| | | 三、保证做到“五负责”:即个人失火个人负责,学生失火家长负责,小孩失火大人负责,多人失火为首者负责,特殊人群(精神病人、痴呆等人群)失火监护人负责。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">四、不携带任何火种进入林区,不在林区吸烟、烧烤、野炊。擅自在林区内野外用火的,接受200—3000元的罚款。 |
| | | </div> |
| | | <div style="text-indent:2em;line-height: 1.4;"> |
| | | 五、在森林防火区内个人拒绝森林防火检查或者接到森林火灾隐患整改通知书逾期不消除火灾隐患的,接受200元—2000元以下罚款。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">六、造成森林火灾构成犯罪的,除接受赔偿损失、补种树木、罚款等行政处罚外,还要接受司法机关依法追究刑事责任。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">七、一旦发现森林山火,及时报告防火办、社区或街办。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">森林防火电话:12119 5760171</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">社区电话:<span th:text="${reservePdfExportVO.communityPhone}"></span></div> |
| | | <div style="padding-left: 300px;"> |
| | | <div style="width: 300px;"> |
| | | 家庭住址:<span th:text="${reservePdfExportVO.address}"></span></div> |
| | | <div style="width: 300px;">承 诺 人: |
| | | <img style="width: 250px;height: 100px;" th:src="@{${reservePdfExportVO.sign}}" /> |
| | | </div> |
| | | <div style="width: 300px;" >联系电话:<span th:text="${reservePdfExportVO.phone}"></span></div> |
| | | <div style="text-align: right;"> |
| | | <span style="margin-right: 100px;" th:text="${reservePdfExportVO.time}"></span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> |
| | | |
| | | <head> |
| | | <meta charset="UTF-8" /> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| | | <title>关于燃气安全使用的温馨提示</title> |
| | | <style> |
| | | @page { |
| | | size: 210mm 297mm; |
| | | /*设置纸张大小:A4(210mm 297mm)、A3(297mm 420mm) 横向则反过来*/ |
| | | margin: 0.25in; |
| | | padding: 1em; |
| | | |
| | | @top-center { |
| | | content: element(header) |
| | | } |
| | | ; |
| | | } |
| | | </style> |
| | | <style type="text/css"> |
| | | /* reset */ |
| | | * { |
| | | padding: 0; |
| | | margin: 0; |
| | | font-family: 'SimSun'; |
| | | overflow: hidden; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | | |
| | | <body> |
| | | <div style="padding-top: 0px; height:1045px; " th:each="reservePdfExportVO : ${reservePdfExportVOS}"> |
| | | <div style="text-align: center;font-size: 30px;">关于燃气安全使用的温馨提示</div> |
| | | <div style="display: flex;align-items: center;align-items: center;"> |
| | | <div style="font-size: 20px;padding: 30px;"> |
| | | <div>各位燃气用户:</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">为了您和社会公众的生命财产安全,在此温馨提示您要关注燃气安全:</div> |
| | | <div style="text-indent:2em;line-height: 1.4;"> |
| | | 1.应选购符合国家标准、带有安全熄火保护装置的燃气灶具,使用时人不能远离,使用后应关好灶具开关、灶前阀,防止泄漏。燃气具过期应及时更换。切勿使用节能罩。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;"> |
| | | 2.燃气胶管应每18个月更换一次,要经常检查是否存在老化、开裂、鼠咬及连接处是否用卡子固定,建议选用使用寿命长的金属波纹管。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">3.应根据气源类型选用并正确安装燃气报警器,报警器宜选择靠近燃气表或燃气管道接点的位置安放。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">4.燃气用户不得擅自安装、改装、拆除燃气管道、阀门等户内燃气设施和燃气计量装置。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">5.不可将设有燃气管道、燃气具的房间改成卧室、客厅和卫生间,长时间用气要注意通风换气。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;">6.发现异味要立即开窗,远离现场拨打服务电话报修。切勿触碰各类电器开关或携带火种进入室内。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;"> |
| | | 7.燃气热水器应安装在厨房或阳台,严禁安装在卫生间、浴室、餐厅、客厅、卧室等其他空间,并规范安装烟道。严禁选用直排式热水器。</div> |
| | | <div style="text-indent:2em;line-height: 1.4;"> |
| | | 燃气安全关乎千家万户,居家安全,从燃气安全开始!为了您和家人的幸福,请您正确使用燃气,及时排查隐患,共同营造幸福家园。 |
| | | </div> |
| | | <div style="margin-top: 110px;text-align: right;"> |
| | | 地址:<span style="margin-right: 100px;" th:text="${reservePdfExportVO.address}"></span> |
| | | </div> |
| | | <div style="margin-top: 30px;margin-left: 450px;"><div>被提醒人:</div><img style="width: 250px;" |
| | | th:src="@{${reservePdfExportVO.sign}}" /></div> |
| | | <div style="margin-top: 30px;text-align: right;"> |
| | | <span style="margin-right: 100px;" th:text="${reservePdfExportVO.time}"></span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | import com.panzhihua.service_community.model.dos.ComActReserveRecordDO; |
| | | import com.panzhihua.service_community.service.*; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return comActReserveAnswerContentService.registerDetailedListAdmin(detailedAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 导出登记明细列表 |
| | | * @param detailedAdminDTO 请求参数 |
| | | * @return 登记明细列表 |
| | | */ |
| | | @PostMapping("/admin/register/detailed/list/export") |
| | | public R registerDetailedListAdminExport(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO){ |
| | | return comActReserveAnswerContentService.registerDetailedListAdminExport(detailedAdminDTO); |
| | | } |
| | | |
| | | @GetMapping("/admin/register/detailed/detail") |
| | | public R registerDetailedDetailAdmin(@RequestParam("reserveRecordId") Long reserveRecordId){ |
| | | return comActReserveRecordService.registerDetailedDetailAdmin(reserveRecordId); |
| | |
| | | public R bigScreenStaticsReserve(@RequestParam("communityId") Long communityId){ |
| | | return comActReserveAnswerContentService.bigScreenStaticsReserve(communityId); |
| | | } |
| | | |
| | | @GetMapping("/record/delete") |
| | | public R deleteRecord(@RequestParam("recordId")Long recordId){ |
| | | return R.ok(comActReserveRecordService.removeById(recordId)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerOrgTeamService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 志愿者组织队伍表(ComMngVolunteerOrgTeam)表控制层 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 15:51:21 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comMngVolunteerOrgTeam") |
| | | public class ComMngVolunteerOrgTeamApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComMngVolunteerOrgTeamService comMngVolunteerOrgTeamService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param comMngVolunteerOrgTeam 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | @PostMapping("/page") |
| | | public R queryByPage(@RequestBody PageComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam) { |
| | | return this.comMngVolunteerOrgTeamService.queryByPage(comMngVolunteerOrgTeam); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R queryById(@PathVariable("id") Long id) { |
| | | return this.comMngVolunteerOrgTeamService.queryById(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comMngVolunteerOrgTeam 实体 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody AddComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam) { |
| | | return this.comMngVolunteerOrgTeamService.insert(comMngVolunteerOrgTeam); |
| | | } |
| | | |
| | | /** |
| | | * 编辑数据 |
| | | * |
| | | * @param comMngVolunteerOrgTeam 实体 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PutMapping("/edit") |
| | | public R edit(@RequestBody EditComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam) { |
| | | return this.comMngVolunteerOrgTeamService.update(comMngVolunteerOrgTeam); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 删除是否成功 |
| | | */ |
| | | @GetMapping("/delete") |
| | | public R deleteById(Long id) { |
| | | return this.comMngVolunteerOrgTeamService.deleteById(id); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者组织列表 |
| | | * @param comMngVolunteerOrgTeam 请求参数 |
| | | * @return 志愿者组织列表 |
| | | */ |
| | | @PostMapping("/list") |
| | | public R queryByList(@RequestBody PageComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam) { |
| | | return this.comMngVolunteerOrgTeamService.queryByList(comMngVolunteerOrgTeam); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-志愿者组织统计 |
| | | * @param communityId 社区id |
| | | * @return 志愿者组织统计 |
| | | */ |
| | | @GetMapping("/statistics") |
| | | public R statisticsVolunteerOrgAdmin(@RequestParam("communityId") Long communityId) { |
| | | return this.comMngVolunteerOrgTeamService.statisticsVolunteerOrgAdmin(communityId); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerServiceTypeService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 志愿者服务类型表(ComMngVolunteerServiceType)表控制层 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:09 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comMngVolunteerServiceType") |
| | | public class ComMngVolunteerServiceTypeApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComMngVolunteerServiceTypeService comMngVolunteerServiceTypeService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param comMngVolunteerServiceType 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | @PostMapping("/page") |
| | | public R queryByPage(@RequestBody PageComMngVolunteerServiceTypeDto comMngVolunteerServiceType) { |
| | | return this.comMngVolunteerServiceTypeService.queryByPage(comMngVolunteerServiceType); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R queryById(@PathVariable("id") Long id) { |
| | | return this.comMngVolunteerServiceTypeService.queryById(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comMngVolunteerServiceType 实体 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody AddComMngVolunteerServiceTypeDto comMngVolunteerServiceType) { |
| | | return this.comMngVolunteerServiceTypeService.insert(comMngVolunteerServiceType); |
| | | } |
| | | |
| | | /** |
| | | * 编辑数据 |
| | | * |
| | | * @param comMngVolunteerServiceType 实体 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PutMapping("/edit") |
| | | public R edit(@RequestBody EditComMngVolunteerServiceTypeDto comMngVolunteerServiceType) { |
| | | return this.comMngVolunteerServiceTypeService.update(comMngVolunteerServiceType); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 删除是否成功 |
| | | */ |
| | | @GetMapping("/delete") |
| | | public R deleteById(Long id) { |
| | | return this.comMngVolunteerServiceTypeService.deleteById(id); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者服务类型列表 |
| | | * @param comMngVolunteerServiceType 请求参数 |
| | | * @return 志愿者服务列表 |
| | | */ |
| | | @PostMapping("/list") |
| | | public R queryByList(@RequestBody PageComMngVolunteerServiceTypeDto comMngVolunteerServiceType) { |
| | | return this.comMngVolunteerServiceTypeService.queryByList(comMngVolunteerServiceType); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerSkillService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 志愿者技能表(ComMngVolunteerSkill)表控制层 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:36 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comMngVolunteerSkill") |
| | | public class ComMngVolunteerSkillApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComMngVolunteerSkillService comMngVolunteerSkillService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param comMngVolunteerSkill 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | @PostMapping("/page") |
| | | public R queryByPage(@RequestBody PageComMngVolunteerSkillDto comMngVolunteerSkill) { |
| | | return this.comMngVolunteerSkillService.queryByPage(comMngVolunteerSkill); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R queryById(@PathVariable("id") Long id) { |
| | | return this.comMngVolunteerSkillService.queryById(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comMngVolunteerSkill 实体 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody AddComMngVolunteerSkillDto comMngVolunteerSkill) { |
| | | return this.comMngVolunteerSkillService.insert(comMngVolunteerSkill); |
| | | } |
| | | |
| | | /** |
| | | * 编辑数据 |
| | | * |
| | | * @param comMngVolunteerSkill 实体 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PutMapping("/edit") |
| | | public R edit(@RequestBody EditComMngVolunteerSkillDto comMngVolunteerSkill) { |
| | | return this.comMngVolunteerSkillService.update(comMngVolunteerSkill); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 删除是否成功 |
| | | */ |
| | | @GetMapping("/delete") |
| | | public R deleteById(Long id) { |
| | | return this.comMngVolunteerSkillService.deleteById(id); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者技能列表 |
| | | * @param comMngVolunteerSkill 请求参数 |
| | | * @return 志愿者技能列表 |
| | | */ |
| | | @PostMapping("/list") |
| | | public R queryByList(@RequestBody PageComMngVolunteerSkillDto comMngVolunteerSkill) { |
| | | return this.comMngVolunteerSkillService.queryByList(comMngVolunteerSkill); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | public R pagePopulation(@RequestBody ComMngPopulationDTO comMngPopulationVO) { |
| | | return comMngPopulationService.pagePopulation(comMngPopulationVO); |
| | | } |
| | | /** |
| | | * 社区后台老人导出管理列表 |
| | | * |
| | | * @param comMngPopulationVO |
| | | * 查询参数 |
| | | * @return 实有人口分页查询结果 |
| | | */ |
| | | @PostMapping("/population/exportOld") |
| | | public R exportOld(@RequestBody ComMngPopulationDTO comMngPopulationVO) { |
| | | return comMngPopulationService.exportOld(comMngPopulationVO); |
| | | } |
| | | |
| | | /** |
| | | * 根据身份证查询实有人口信息 |
| | |
| | | public R detailHousesUser(@RequestParam("id") Long id) { |
| | | return comMngPopulationHouseUserService.detail(id); |
| | | } |
| | | |
| | | /** |
| | | * 历史数据人员类型填充 |
| | | * @param newVoList |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @PostMapping("/history/filled") |
| | | public R filledPopulationPersonType(@RequestBody List<ComMngPopulationServeExcelVO> newVoList, |
| | | @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId) { |
| | | return comMngPopulationService.filledPopulationPersonType(newVoList, communityId, userId); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerExcelVO; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | |
| | | |
| | | /** |
| | | * 社区后台分页查询社区活动 |
| | | * |
| | | * |
| | | * @param comActActivityVO |
| | | * 查询参数 |
| | | * @return 返回结果 |
| | |
| | | |
| | | /** |
| | | * 查询随手拍是否有活动 |
| | | * |
| | | * |
| | | * @return 活动详情 |
| | | */ |
| | | @PostMapping("getEasyPhotoActivity") |
| | |
| | | |
| | | /** |
| | | * 查询所有建筑类型 |
| | | * |
| | | * |
| | | * @return 类型列表 |
| | | */ |
| | | @PostMapping("listbuildtype") |
| | |
| | | |
| | | /** |
| | | * 分页查询 其他建筑 |
| | | * |
| | | * |
| | | * @param comMngStructOtherBuildVO |
| | | * 分页查询参数 |
| | | * @return 查询结果 |
| | |
| | | |
| | | /** |
| | | * 增加志愿者 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 志愿者信息 |
| | | * @return 增加结果 |
| | |
| | | |
| | | /** |
| | | * 获取志愿者详情 |
| | | * |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除志愿者 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 手机号 |
| | | * @return 删除结果 |
| | |
| | | |
| | | /** |
| | | * 编辑志愿者 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 编辑内容 |
| | | * @return 编辑结果 |
| | |
| | | |
| | | /** |
| | | * 分页展示志愿者 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 查询参数 |
| | | * @return 分页集合返回 |
| | |
| | | |
| | | /** |
| | | * 分页展示志愿者审核 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 查询参数 |
| | | * @return 查询结果 |
| | |
| | | |
| | | /** |
| | | * 志愿者审核详情 |
| | | * |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return 详情 |
| | |
| | | |
| | | /** |
| | | * 志愿者审核 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 审核操作 |
| | | * @return 审核结果 |
| | |
| | | |
| | | /** |
| | | * 删除志愿者审核 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 主键 |
| | | * @return 删除结果 |
| | |
| | | |
| | | /** |
| | | * 查询区域 |
| | | * |
| | | * |
| | | * @param comActVO |
| | | * 登录人的经纬度、或者指定区域的社区 |
| | | * @return 社区集合 |
| | |
| | | |
| | | /** |
| | | * 用户修改手机号对应的志愿者手机号也要修改 |
| | | * |
| | | * |
| | | * @param userPhoneVO |
| | | * 新旧手机号 |
| | | * @return 修改结果 |
| | |
| | | |
| | | /** |
| | | * 房屋地址下拉列表 |
| | | * |
| | | * |
| | | * @param parentCode |
| | | * 父级编码 |
| | | * @param areaId |
| | |
| | | |
| | | /** |
| | | * 新增房屋 |
| | | * |
| | | * |
| | | * @param comMngStructHouseVO |
| | | * 房屋信息 |
| | | * @return 新增结果 |
| | |
| | | |
| | | /** |
| | | * 查询小区 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 小区集合 |
| | |
| | | |
| | | /** |
| | | * 用户参加的所有社区活动 |
| | | * |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @return 活动列表 |
| | |
| | | |
| | | /** |
| | | * 用户确认心愿 |
| | | * |
| | | * |
| | | * @param comActMicroWishVO |
| | | * 用户评价 |
| | | * @return 确认结果 |
| | |
| | | |
| | | /** |
| | | * 建筑类型 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 建筑集合 |
| | |
| | | |
| | | /** |
| | | * 增加删除建筑类型 |
| | | * |
| | | * |
| | | * @param systemmanagementConfigVO |
| | | * 操作内容 |
| | | * @return 操作结果 |
| | |
| | | |
| | | /** |
| | | * 社区详情 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 社区详情 |
| | |
| | | |
| | | /** |
| | | * 小区详情 |
| | | * |
| | | * |
| | | * @param areaId |
| | | * 小区id |
| | | * @return 小区信息 |
| | |
| | | |
| | | /** |
| | | * 分页查询社区 |
| | | * |
| | | * |
| | | * @param pageComActDTO |
| | | * 查询参数 |
| | | * @return 分页集合 |
| | |
| | | |
| | | /** |
| | | * 志愿者详情 |
| | | * |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return 志愿者 |
| | |
| | | |
| | | /** |
| | | * 查询平台所有的社区 |
| | | * |
| | | * |
| | | * @return 社区集合 按照创建顺序倒序排列 |
| | | */ |
| | | @PostMapping("listcommunityall") |
| | |
| | | |
| | | /** |
| | | * 社区管理后台数据看板 代办事件 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @param userId |
| | |
| | | |
| | | /** |
| | | * 删除社区 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 删除结果 |
| | |
| | | |
| | | /** |
| | | * 定时任务刷新社区动态置顶状态 |
| | | * |
| | | * |
| | | * @return 刷新结果 |
| | | */ |
| | | @PostMapping("timedtaskdynistopping") |
| | |
| | | |
| | | /** |
| | | * 定时任务刷新社区动态发布状态 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | @PostMapping("timedtaskdynstatus") |
| | |
| | | |
| | | /** |
| | | * 定时任务查询所有要取消的社区活动 |
| | | * |
| | | * |
| | | * @return 社区活动集合 |
| | | */ |
| | | @PostMapping("timedtaskactactivity") |
| | |
| | | |
| | | /** |
| | | * 定时任务刷新社区活动的各个状态 除取消外 |
| | | * |
| | | * |
| | | * @return 更新结果 |
| | | */ |
| | | @PostMapping("timedtaskactactivityall") |
| | |
| | | |
| | | /** |
| | | * 定时任务刷新微心愿的状态 |
| | | * |
| | | * |
| | | * @return 更新结果 |
| | | */ |
| | | @PostMapping("timedtaskactmicrowish") |
| | |
| | | |
| | | /** |
| | | * 其他建筑详情 |
| | | * |
| | | * |
| | | * @param id |
| | | * 主键id |
| | | * @return 建筑内容 |
| | |
| | | |
| | | /** |
| | | * 编辑其他建筑 |
| | | * |
| | | * |
| | | * @param comMngStructOtherBuildVO |
| | | * 编辑内容 |
| | | * @return 编辑结果 |
| | |
| | | |
| | | /** |
| | | * 删除其他建筑 |
| | | * |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return 删除结果 |
| | |
| | | |
| | | /** |
| | | * 小程序分页查询随手拍 |
| | | * |
| | | * |
| | | * @param comActEasyPhotoVO |
| | | * 查询参数 |
| | | * @return 返回结果 |
| | |
| | | |
| | | /** |
| | | * 随手拍评论分页查询 |
| | | * |
| | | * |
| | | * @param pageComActEasyPhotoCommentDTO |
| | | * 查询参数 |
| | | * @return 查询结果 |
| | |
| | | |
| | | /** |
| | | * 评论点赞/取消点赞 |
| | | * |
| | | * |
| | | * @param comActEasyPhotoCommentUserDTO |
| | | * 操作 |
| | | * @return 操作结果 |
| | |
| | | |
| | | /** |
| | | * 随手拍--评论--新增评论 |
| | | * |
| | | * |
| | | * @param comActEasyPhotoCommentDTO |
| | | * 新增内容 |
| | | * @return 新增结果 |
| | |
| | | |
| | | /** |
| | | * 查询城市下属所有地区列表 |
| | | * |
| | | * |
| | | * @param cityAdcode |
| | | * 城市地址编码 |
| | | * @return 地区列表 |
| | |
| | | |
| | | /** |
| | | * 首页图表数据汇总 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 图表数据 IndexDataVO |
| | |
| | | |
| | | /** |
| | | * 选择导入的小区 |
| | | * |
| | | * |
| | | * @param param |
| | | * 小区名字 模糊查询 |
| | | * @param communityId |
| | |
| | | |
| | | /** |
| | | * 检查小区是否已经批量设置过房屋并且返回小区房屋门号规则 |
| | | * |
| | | * |
| | | * @param id |
| | | * 小区id |
| | | * @return ComMngStructAreaVO |
| | |
| | | |
| | | /** |
| | | * 新增留言 |
| | | * |
| | | * |
| | | * @param comActMessageVO |
| | | * 新增留言信息 |
| | | * @return 发布结果 |
| | |
| | | |
| | | /** |
| | | * 我发的留言 |
| | | * |
| | | * |
| | | * @return 结果集合 |
| | | */ |
| | | @PostMapping("pagemymessage") |
| | |
| | | |
| | | /** |
| | | * 发给我的留言 |
| | | * |
| | | * |
| | | * @return 结果集合 |
| | | */ |
| | | @PostMapping("pagesendtomemessage") |
| | |
| | | |
| | | /** |
| | | * 根据id查询留言集合 |
| | | * |
| | | * |
| | | * @return 结果集合 |
| | | */ |
| | | @PostMapping("pagemessagebyuser") |
| | |
| | | |
| | | /** |
| | | * 社区留言 |
| | | * |
| | | * |
| | | * @return 结果集合 |
| | | */ |
| | | @PostMapping("pagemycommunitymessage") |
| | |
| | | |
| | | /** |
| | | * 新增留言回复 |
| | | * |
| | | * |
| | | * @param comActMessageBackVO |
| | | * 新增留言回复信息 |
| | | * @return 发布结果 |
| | |
| | | |
| | | /** |
| | | * 导出房屋信息 |
| | | * |
| | | * |
| | | * @param areaId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查看用户问卷调查详细 |
| | | * |
| | | * |
| | | * @param userId |
| | | * 用户ID |
| | | * @param questId |
| | |
| | | |
| | | /** |
| | | * 查看问卷调查详细 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 问卷ID |
| | | * @return 用户问卷调查详细 |
| | |
| | | |
| | | /** |
| | | * 小程序-问卷调查详情 |
| | | * |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param questId |
| | |
| | | |
| | | /** |
| | | * 社区后台-查询问卷调查详情 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 问卷id |
| | | * @return 问卷调查详情 |
| | |
| | | |
| | | /** |
| | | * 新增社区问卷 |
| | | * |
| | | * |
| | | * @param questnaireVO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 小程序-社区问卷列表 |
| | | * |
| | | * |
| | | * @param pageQuestnaireDTO |
| | | * 请求参数 |
| | | * @return 社区问卷列表 |
| | |
| | | |
| | | /** |
| | | * 社区后台-社区问卷列表 |
| | | * |
| | | * |
| | | * @param pageQuestnaireDTO |
| | | * 请求参数 |
| | | * @return 社区问卷列表 |
| | |
| | | |
| | | /** |
| | | * 编辑问卷——问卷、题目、选项 |
| | | * |
| | | * |
| | | * @param questnaireVO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改问卷状态 |
| | | * |
| | | * |
| | | * @param editComActQuestnaireVo |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除问卷 ——隐藏 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 调查问卷Id |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 查看用户问卷调查统计信息 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 问卷ID |
| | | * @return 用户问卷调查统计信息 |
| | |
| | | |
| | | /** |
| | | * 社区问卷回答用户分页 |
| | | * |
| | | * |
| | | * @param pageQuestnaireAnswerDTO |
| | | * @return 分页数据 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 小程序-用户弹窗添加不在提醒接口 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 问卷id |
| | | * @param userId |
| | |
| | | |
| | | /** |
| | | * 删除微心愿 |
| | | * |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增高龄认证 |
| | | * |
| | | * |
| | | * @param eldersAuthAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改高龄认证 |
| | | * |
| | | * |
| | | * @param eldersAuthEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找高龄认证 |
| | | * |
| | | * |
| | | * @param pageEldersAuthDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除高龄认证 |
| | | * |
| | | * |
| | | * @param EldersAuthDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询高龄认证详细信息 |
| | | * |
| | | * |
| | | * @param id |
| | | * 高龄认证 id |
| | | * @return 查找结果 |
| | |
| | | |
| | | /** |
| | | * 新增高龄认证社区反馈 |
| | | * |
| | | * |
| | | * @param {classNameFirstLower}AddDTO |
| | | * 添加高龄认证社区反馈传递对象 |
| | | * @return 新增结果 |
| | |
| | | |
| | | /** |
| | | * 查询导出高龄老人 |
| | | * |
| | | * |
| | | * @param pageEldersAuthDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 设置社区认证方式 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区ID |
| | | * @param type |
| | |
| | | |
| | | /** |
| | | * 随手拍活动定时任务 |
| | | * |
| | | * |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("timeTaskEasyPhotoActivity") |
| | |
| | | |
| | | /** |
| | | * 社区随手拍列表统计 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 统计结果 |
| | |
| | | |
| | | /** |
| | | * 综治后台-查询社区列表 |
| | | * |
| | | * |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/eventgrid/community/list") |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/eventgrid/community/westList") |
| | | public R getWestCommunityLists(String areaCode) { |
| | | public R getWestCommunityLists(@RequestParam("areaCode")String areaCode) { |
| | | return comActService.getWestCommunityLists(areaCode); |
| | | } |
| | | |
| | | /** |
| | | * 随手拍发放奖励 |
| | | * |
| | | * |
| | | * @param grantRewardDTO |
| | | * 请求参数 |
| | | * @return 发放结果 |
| | |
| | | |
| | | /** |
| | | * 获取最新活动和用户最新收益 |
| | | * |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param communityId |
| | |
| | | |
| | | /** |
| | | * 读取用户随手拍奖励 |
| | | * |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @return 读取结果 |
| | |
| | | |
| | | /** |
| | | * 问卷调查统计汇总 |
| | | * |
| | | * |
| | | * @param summaryDTO |
| | | * 请求参数 |
| | | * @return 统计汇总 |
| | |
| | | |
| | | /** |
| | | * 问卷调查统计汇总导出数据查询 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 调查问卷id |
| | | * @return 调查统计汇总导出数据 |
| | |
| | | |
| | | /** |
| | | * 问卷调查统计汇总表头统计 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 调查问卷id |
| | | * @return 问卷调查统计汇总表头统计数据 |
| | |
| | | |
| | | /** |
| | | * 小程序-新增问卷调查浏览数量 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 问卷调查id |
| | | * @return 增加结果 |
| | |
| | | |
| | | /** |
| | | * 社区后台-切换随手拍公示状态 |
| | | * |
| | | * |
| | | * @param comActEasyPhotoVO |
| | | * 请求参数 |
| | | * @return 切换结果 |
| | |
| | | |
| | | /** |
| | | * 查询社区待处理随手拍id集合 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 社区待处理随手拍id集合 |
| | |
| | | public R listMyActivityEvaluate(@RequestParam("userId") Long userId, @RequestParam("activityId") Long activityId) { |
| | | return comActActEvaluateService.listMyActivityEvaluate(userId, activityId); |
| | | } |
| | | |
| | | /** |
| | | * 志愿者导入 |
| | | * |
| | | * @param list 志愿者数据列表 |
| | | * @param communityId 社区id |
| | | * @param userId 用户id |
| | | * @return 导入结果 |
| | | */ |
| | | @PostMapping("/volunteer/import/admin") |
| | | public R importVolunteerAdmin(@RequestBody List<ComMngVolunteerExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId) { |
| | | return comMngVolunteerMngService.importVolunteerAdmin(list,communityId,userId); |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/service-category/all") |
| | | public R getAllServiceCategories() { |
| | | return convenientServiceCategoryService.getAllServiceCategories(); |
| | | public R getAllServiceCategories(@RequestParam("areaCode") String areaCode) { |
| | | return convenientServiceCategoryService.getAllServiceCategories(areaCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/service-category/suitable") |
| | | public R getSuitableServiceCategories(@RequestParam("communityId") Long communityId) { |
| | | return convenientServiceCategoryService.getSuitableServiceCategories(communityId); |
| | | public R getSuitableServiceCategories(@RequestParam("communityId") Long communityId,@RequestParam("areaCode")String areaCode) { |
| | | return convenientServiceCategoryService.getSuitableServiceCategories(communityId,areaCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @GetMapping("/admin/list") |
| | | public R listPhotoClassify() { |
| | | return comActEasyPhotoClassifyService.listPhotoClassify(); |
| | | public R listPhotoClassify(@RequestParam("areaCode")String areaCode) { |
| | | return comActEasyPhotoClassifyService.listPhotoClassify(areaCode); |
| | | } |
| | | |
| | | /** |
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.microCommercialStreet.McsOrderVO; |
| | | import com.panzhihua.common.utlis.SmsUtil; |
| | | import com.panzhihua.service_community.entity.McsOrder; |
| | | import com.panzhihua.service_community.service.McsOrderService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 商业街订单表(McsOrder)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-04 16:10:07 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("mcsOrder") |
| | | public class McsOrderApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private McsOrderService mcsOrderService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.mcsOrderService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.mcsOrderService.detail(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param mcsOrderVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody McsOrderVO mcsOrderVO) { |
| | | return this.mcsOrderService.insert(mcsOrderVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param mcsOrderVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody McsOrderVO mcsOrderVO) { |
| | | McsOrder mcsOrder=new McsOrder(); |
| | | BeanUtils.copyProperties(mcsOrderVO,mcsOrder); |
| | | return R.ok(this.mcsOrderService.updateById(mcsOrder)); |
| | | } |
| | | |
| | | /** |
| | | * 微信支付 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/wxPay") |
| | | public R wxPay(@RequestBody McsOrderVO mcsOrderVO){ |
| | | return this.mcsOrderService.wxPay(mcsOrderVO); |
| | | } |
| | | |
| | | /** |
| | | * 发送提醒短信 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/sendContent") |
| | | public R sendContent(@RequestParam("id") Long id){ |
| | | return this.mcsOrderService.sendContent(id); |
| | | } |
| | | |
| | | /** |
| | | *微信支付回调 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/notify") |
| | | public R notify(@RequestBody McsOrderVO mcsOrderVO){ |
| | | return this.mcsOrderService.notify(mcsOrderVO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.DeleteProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PutUserInfoDTO; |
| | | 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.microCommercialStreet.DisableOrEnableMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsEvaluateDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageJoinGameListDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsEvaluateDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsInformationDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageVerifyRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetPopularForGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForProductDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsConfigVO; |
| | | import com.panzhihua.service_community.service.McsConfigService; |
| | | import com.panzhihua.service_community.service.McsCouponService; |
| | | import com.panzhihua.service_community.service.McsEvaluateService; |
| | | import com.panzhihua.service_community.service.McsGameService; |
| | | import com.panzhihua.service_community.service.McsInformationService; |
| | | import com.panzhihua.service_community.service.McsLabelService; |
| | | import com.panzhihua.service_community.service.McsMerchantService; |
| | | import com.panzhihua.service_community.service.McsProductService; |
| | | import com.panzhihua.service_community.service.McsVerifiedRecordService; |
| | | |
| | | /** |
| | | * @title: MicroCommercialStreetApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 微商业街相关接口 |
| | | * @author: hans |
| | | * @date: 2021/12/28 14:18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/microcommercialstreet") |
| | | public class MicroCommercialStreetApi { |
| | | |
| | | @Resource |
| | | private McsMerchantService mcsMerchantService; |
| | | @Resource |
| | | private McsConfigService mcsConfigService; |
| | | @Resource |
| | | private McsGameService mcsGameService; |
| | | @Resource |
| | | private McsInformationService mcsInformationService; |
| | | @Resource |
| | | private McsEvaluateService mcsEvaluateService; |
| | | @Resource |
| | | private McsProductService mcsProductService; |
| | | @Resource |
| | | private McsLabelService mcsLabelService; |
| | | @Resource |
| | | private McsCouponService mcsCouponService; |
| | | @Resource |
| | | private McsVerifiedRecordService mcsVerifiedRecordService; |
| | | |
| | | /** |
| | | * 新增数字商业街商家 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/add") |
| | | public R addMcsMerchant(@RequestBody McsMerchantDTO mcsMerchantDTO) { |
| | | return mcsMerchantService.addMcsMerchant(mcsMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑数字商业街商家 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/merchant/put") |
| | | public R putMcsMerchant(@RequestBody McsMerchantDTO mcsMerchantDTO) { |
| | | return mcsMerchantService.putMcsMerchant(mcsMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询数字商业街商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @GetMapping("/merchant/get") |
| | | public R getMcsMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return mcsMerchantService.getMcsMerchant(merchantId); |
| | | } |
| | | |
| | | /** |
| | | * 删除数字商业街商家 |
| | | * @param merchantId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/merchant/delete") |
| | | public R deleteMcsMerchant(@RequestParam("merchantId") Long merchantId, @RequestParam("userId") Long userId) { |
| | | return mcsMerchantService.deleteMcsMerchant(merchantId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询数字商业街商家 |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/page") |
| | | public R pageMcsMerchant(@RequestBody PageMcsMerchantDTO pageMcsMerchantDTO) { |
| | | return mcsMerchantService.pageMcsMerchant(pageMcsMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 禁用/启用数字商业街商家 |
| | | * @param disableOrEnableMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/merchant/disable-or-enable") |
| | | public R disableOrEnableMcsMerchant(@RequestBody DisableOrEnableMcsMerchantDTO disableOrEnableMcsMerchantDTO) { |
| | | return mcsMerchantService.disableOrEnableMcsMerchant(disableOrEnableMcsMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 获取所有数字商业街配置 |
| | | * @return |
| | | */ |
| | | @GetMapping("/config/all") |
| | | public R getAllMcsConfig() { |
| | | return mcsConfigService.getAllMcsConfig(); |
| | | } |
| | | |
| | | /** |
| | | * 修改数字商业街配置 |
| | | * @param configs |
| | | * @return |
| | | */ |
| | | @PutMapping("/config/put") |
| | | public R putMcsConfig(@RequestBody List<McsConfigVO> configs) { |
| | | return mcsConfigService.putMcsConfig(configs); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询戳戳游戏 |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/game/page") |
| | | public R pageMcsGame(@RequestBody PageMcsGameDTO pageMcsGameDTO) { |
| | | return mcsGameService.pageMcsGame(pageMcsGameDTO); |
| | | } |
| | | |
| | | /** |
| | | * 设为/取消游戏热门 |
| | | * @param setPopularForGameDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/game/setPopular") |
| | | public R setPopularForGame(@RequestBody SetPopularForGameDTO setPopularForGameDTO) { |
| | | return mcsGameService.setPopularForGame(setPopularForGameDTO); |
| | | } |
| | | |
| | | /** |
| | | * 上架/下架戳戳游戏 |
| | | * @param setShelfForGameDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/game/setShelf") |
| | | public R setShelfForGame(@RequestBody SetShelfForGameDTO setShelfForGameDTO) { |
| | | return mcsGameService.setShelfForGame(setShelfForGameDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/game/delete") |
| | | public R deleteMcsGame(@RequestParam("gameId") Long gameId, @RequestParam("userId") Long userId) { |
| | | return mcsGameService.deleteMcsGame(gameId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询戳戳资讯 |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/information/page") |
| | | public R pageMcsInfo(@RequestBody PageMcsInformationDTO pageMcsInformationDTO) { |
| | | return mcsInformationService.pageMcsInfo(pageMcsInformationDTO); |
| | | } |
| | | |
| | | /** |
| | | * 上架/下架戳戳资讯 |
| | | * @param setShelfForInfoDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/information/setShelf") |
| | | public R setShelfForMcsInfo(@RequestBody SetShelfForInfoDTO setShelfForInfoDTO) { |
| | | return mcsInformationService.setShelfForMcsInfo(setShelfForInfoDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除戳戳资讯 |
| | | * @param infoId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/information/delete") |
| | | public R deleteMcsInfo(@RequestParam("infoId") Long infoId, @RequestParam("userId") Long userId) { |
| | | return mcsInformationService.deleteMcsInfo(infoId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询评价记录 |
| | | * @param pageMcsEvaluateDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/evaluate/page") |
| | | public R pageMcsEvaluate(@RequestBody PageMcsEvaluateDTO pageMcsEvaluateDTO) { |
| | | return mcsEvaluateService.pageMcsEvaluate(pageMcsEvaluateDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询评价记录详情 |
| | | * @param evaluateId |
| | | * @return |
| | | */ |
| | | @GetMapping("/evaluate/get") |
| | | public R getMcsEvaluate(@RequestParam("evaluateId") Long evaluateId) { |
| | | return mcsEvaluateService.getMcsEvaluate(evaluateId); |
| | | } |
| | | |
| | | /** |
| | | * 删除评价记录 |
| | | * @param evaluateId |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/evaluate/delete") |
| | | public R deleteMcsEvaluate(@RequestParam("evaluateId") Long evaluateId) { |
| | | return mcsEvaluateService.deleteMcsEvaluate(evaluateId); |
| | | } |
| | | |
| | | /** |
| | | * 新增戳戳游戏 |
| | | * @param mcsGameDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/game/add") |
| | | public R addMcsGame(@RequestBody McsGameDTO mcsGameDTO) { |
| | | return mcsGameService.addMcsGame(mcsGameDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑戳戳游戏 |
| | | * @param mcsGameDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/game/put") |
| | | public R putMcsGame(@RequestBody McsGameDTO mcsGameDTO) { |
| | | return mcsGameService.putMcsGame(mcsGameDTO); |
| | | } |
| | | |
| | | /** |
| | | * 发布戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/game/publish") |
| | | public R publishMcsGame(@RequestParam("gameId") Long gameId, @RequestParam("userId") Long userId) { |
| | | return mcsGameService.publishMcsGame(gameId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 结束戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/game/finish") |
| | | public R finishMcsGame(@RequestParam("gameId") Long gameId, @RequestParam("userId") Long userId) { |
| | | return mcsGameService.finishMcsGame(gameId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 戳戳游戏/资讯顶部统计数据 |
| | | * @param type |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/statistics/top") |
| | | public R getTopStatistics(@RequestParam("type") Integer type, @RequestParam("userId") Long userId) { |
| | | return mcsGameService.getTopStatistics(userId, type); |
| | | } |
| | | |
| | | /** |
| | | * 新增戳戳资讯 |
| | | * @param mcsInfoDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/information/add") |
| | | public R addMcsInfo(@RequestBody McsInfoDTO mcsInfoDTO) { |
| | | return mcsInformationService.addMcsInfo(mcsInfoDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑戳戳资讯 |
| | | * @param mcsInfoDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/information/put") |
| | | public R putMcsInfo(@RequestBody McsInfoDTO mcsInfoDTO) { |
| | | return mcsInformationService.putMcsInfo(mcsInfoDTO); |
| | | } |
| | | |
| | | /** |
| | | * 发布戳戳资讯 |
| | | * @param infoId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/information/publish") |
| | | public R publishMcsInfo(@RequestParam("infoId") Long infoId, @RequestParam("userId") Long userId) { |
| | | return mcsInformationService.publishMcsInfo(infoId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 新增产品信息 |
| | | * @param mcsProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/product/add") |
| | | public R addMcsProduct(@RequestBody McsProductDTO mcsProductDTO) { |
| | | return mcsProductService.addMcsProduct(mcsProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑产品信息 |
| | | * @param mcsProductDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/product/put") |
| | | public R putMcsProduct(@RequestBody McsProductDTO mcsProductDTO) { |
| | | return mcsProductService.putMcsProduct(mcsProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除产品信息 |
| | | * @param deleteProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/product/delete") |
| | | public R deleteMcsProduct(@RequestBody DeleteProductDTO deleteProductDTO) { |
| | | return mcsProductService.deleteMcsProduct(deleteProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 上架/下架产品信息 |
| | | * @param setShelfForProductDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/product/setShelf") |
| | | public R setShelfForMcsProduct(@RequestBody SetShelfForProductDTO setShelfForProductDTO) { |
| | | return mcsProductService.setShelfForMcsProduct(setShelfForProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询产品信息 |
| | | * @param pageMcsProductDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/product/page") |
| | | public R pageMcsProduct(@RequestBody PageMcsProductDTO pageMcsProductDTO) { |
| | | return mcsProductService.pageMcsProduct(pageMcsProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 获取产品标签列表 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/label/list") |
| | | public R getMcsLabelList(@RequestParam("userId") Long userId) { |
| | | return mcsLabelService.getMcsLabelList(userId); |
| | | } |
| | | |
| | | /** |
| | | * 根据account查询微商业街商家信息 |
| | | * @param account |
| | | * @return |
| | | */ |
| | | @GetMapping("/getMcsMerchantByAccount") |
| | | public R getMcsMerchantByAccount(@RequestParam("account") String account) { |
| | | return mcsMerchantService.getMcsMerchantByAccount(account); |
| | | } |
| | | |
| | | /** |
| | | * 完成订单更新/新增商家信息 |
| | | * @param orderNo |
| | | * @param configId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/updateAfterOrder") |
| | | public R updateMcsMerchantAfterOrder(@RequestParam(value = "orderNo") String orderNo, |
| | | @RequestParam("configId") Long configId, |
| | | @RequestParam("userId") Long userId) { |
| | | return mcsMerchantService.updateOrAddMcsMerchantAfterOrder(orderNo, configId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 验证码登录 |
| | | * @param loginDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/loginWithPhone") |
| | | public R loginWithPhone(@RequestBody LoginWithPhoneDTO loginDTO) { |
| | | return mcsMerchantService.loginWithPhone(loginDTO); |
| | | } |
| | | |
| | | /** |
| | | * 首页顶部数据 |
| | | * @return |
| | | */ |
| | | @GetMapping("/index/topData") |
| | | public R getMcsIndexTopData() { |
| | | return mcsMerchantService.getMcsIndexTopData(); |
| | | } |
| | | |
| | | /** |
| | | * 戳戳卷领取 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/coupon/apply") |
| | | public R applyMcsCoupon(@RequestParam("gameId") Long gameId, @RequestParam("userId") Long userId) { |
| | | return mcsGameService.applyMcsCoupon(gameId, userId); |
| | | } |
| | | |
| | | /** |
| | | * h5分页查询戳戳资讯 |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/information/pageH5") |
| | | public R pageH5McsInfo(@RequestBody PageMcsInformationDTO pageMcsInformationDTO) { |
| | | return mcsInformationService.pageH5McsInfo(pageMcsInformationDTO); |
| | | } |
| | | |
| | | /** |
| | | * h5分页查询戳戳游戏 |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/game/pageH5") |
| | | public R pageH5McsGame(@RequestBody PageMcsGameDTO pageMcsGameDTO) { |
| | | return mcsGameService.pageH5McsGame(pageMcsGameDTO); |
| | | } |
| | | |
| | | /** |
| | | * 游戏详情 |
| | | * @param gameId |
| | | * @return |
| | | */ |
| | | @GetMapping("/game/get") |
| | | public R getMcsGame(@RequestParam("gameId") Long gameId) { |
| | | return mcsGameService.getMcsGame(gameId); |
| | | } |
| | | |
| | | /** |
| | | * 资讯详情 |
| | | * @param infoId |
| | | * @return |
| | | */ |
| | | @GetMapping("/info/get") |
| | | public R getMcsInfo(@RequestParam("infoId") Long infoId) { |
| | | return mcsInformationService.getMcsInfo(infoId); |
| | | } |
| | | |
| | | /** |
| | | * H5分页查询数字商业街商家 |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/pageH5") |
| | | public R pageH5McsMerchant(@RequestBody PageMcsMerchantDTO pageMcsMerchantDTO) { |
| | | return mcsMerchantService.pageH5McsMerchant(pageMcsMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 我的戳戳卷 |
| | | * @param type |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/myCoupon") |
| | | public R getMyCoupon(@RequestParam(value = "type", required = false) Integer type, @RequestParam("userId") Long userId) { |
| | | return mcsCouponService.getMyCoupon(type, userId); |
| | | } |
| | | |
| | | /** |
| | | * 新增评价记录 |
| | | * @param mcsEvaluateDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/evaluate/add") |
| | | public R addMcsEvaluate(@RequestBody McsEvaluateDTO mcsEvaluateDTO) { |
| | | return mcsEvaluateService.addMcsEvaluate(mcsEvaluateDTO); |
| | | } |
| | | |
| | | /** |
| | | * 我的评价-参与游戏列表 |
| | | * @param pageJoinGameListDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/joinGame/page") |
| | | public R getJoinGameList(@RequestBody PageJoinGameListDTO pageJoinGameListDTO) { |
| | | return mcsCouponService.getJoinGameList(pageJoinGameListDTO); |
| | | } |
| | | |
| | | /** |
| | | * 戳戳卷核销 |
| | | * @param couponId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/coupon/verify") |
| | | public R verifyMcsCoupon(@RequestParam("couponId") Long couponId, @RequestParam("userId") Long userId) { |
| | | return mcsCouponService.verifyMcsCoupon(couponId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询核销记录 |
| | | * @param pageVerifyRecordDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/verifyRecord/page") |
| | | public R pageMcsVerifyRecord(@RequestBody PageVerifyRecordDTO pageVerifyRecordDTO) { |
| | | return mcsVerifiedRecordService.pageMcsVerifyRecord(pageVerifyRecordDTO); |
| | | } |
| | | |
| | | /** |
| | | * 游戏统计 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/game/statistics") |
| | | public R getMcsGameStatistics(@RequestParam("userId") Long userId) { |
| | | return mcsCouponService.getMcsGameStatistics(userId); |
| | | } |
| | | |
| | | /** |
| | | * 修改用戶信息 |
| | | * @param putUserInfoDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/putUserInfo") |
| | | public R putUserInfo(@RequestBody PutUserInfoDTO putUserInfoDTO) { |
| | | return mcsMerchantService.putUserInfo(putUserInfoDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据userId获取商家信息 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/retrieveMcsMerchantInfoByUserId") |
| | | public R retrieveMcsMerchantInfoByUserId(@RequestParam("userId") Long userId) { |
| | | return mcsMerchantService.retrieveMcsMerchantInfoByUserId(userId); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街商家旗下所有的游戏/资讯全部下架 |
| | | * @return |
| | | */ |
| | | @GetMapping("/offResourceForMcsMerchant") |
| | | public R offResourceForMcsMerchant() { |
| | | return mcsMerchantService.offResourceForMcsMerchant(); |
| | | } |
| | | |
| | | /** |
| | | * 获取产品信息详情 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @GetMapping("/product/get") |
| | | public R getMcsProduct(@RequestParam("productId") Long productId) { |
| | | return mcsProductService.getMcsProduct(productId); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街游戏结束 |
| | | * @return |
| | | */ |
| | | @GetMapping("/endStatusForMcsGame") |
| | | public R endStatusForMcsGame() { |
| | | return mcsGameService.endStatusForMcsGame(); |
| | | } |
| | | } |
| | |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | 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.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.shop.*; |
| | | 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.dtos.shop.ComShopFundsExportDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopGoodsDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopOrderCreateDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopOrderDeliverDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopOrderExportDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopOrderPreviewDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopOrderQueryDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopOrderShipDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopSysConfDTO; |
| | | import com.panzhihua.common.model.dtos.shop.OrderPayDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderListDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopAddressDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopFundsSearchDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopSysConfDTO; |
| | | import com.panzhihua.common.model.dtos.shop.WxPayNotifyOrderDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.AddShopGoodsVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopSysConfVO; |
| | | import com.panzhihua.common.model.vos.shop.ShopOperLogVO; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.model.dos.ComShopSysConfDO; |
| | | import com.panzhihua.service_community.service.*; |
| | | import com.panzhihua.service_community.service.ComShopCartService; |
| | | import com.panzhihua.service_community.service.ComShopGoodsService; |
| | | import com.panzhihua.service_community.service.ComShopOperLogService; |
| | | import com.panzhihua.service_community.service.ComShopOrderService; |
| | | import com.panzhihua.service_community.service.ComShopStoreService; |
| | | import com.panzhihua.service_community.service.ComShopSysConfService; |
| | | import com.panzhihua.service_community.service.ComShopUserAddressService; |
| | | import com.panzhihua.service_community.service.ConvenientMerchantService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | private ComShopUserAddressService comShopUserAddressService; |
| | | @Resource |
| | | private ComShopSysConfService comShopSysConfService; |
| | | @Resource |
| | | private ConvenientMerchantService convenientMerchantService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 店铺列表-分页查询 |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * check商家/店铺是否有效 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/checkStoreIsValid") |
| | | public R checkStoreIsValid(@RequestParam("userId") Long userId) { |
| | | Boolean isShopValid = comShopStoreService.checkStoreIsValid(userId); |
| | | Boolean isConvenientValid = convenientMerchantService.checkStoreIsValid(userId); |
| | | Boolean isMcsValid = userService.checkUserIsValid(userId, 11); |
| | | return R.ok(isShopValid || isConvenientValid || isMcsValid); |
| | | } |
| | | } |
| | |
| | | public static final String Order_ROUTING_KEY="order.key"; |
| | | public static final String Order_EXCHANGE="order.exchange"; |
| | | |
| | | public static final String McsOrder_QUEUE="mcsOrder.queue"; |
| | | public static final String McsOrder_ROUTING_KEY="mcsOrder.key"; |
| | | public static final String McsOrder_EXCHANGE="mcsOrder.exchange"; |
| | | |
| | | |
| | | @Bean |
| | |
| | | } |
| | | |
| | | @Bean |
| | | public Queue mcsOrderQueue(){ |
| | | return new Queue(McsOrder_QUEUE,true,false,false,null); |
| | | } |
| | | |
| | | @Bean |
| | | public Exchange mcsOrderExchange(){ |
| | | Map<String, Object> arguments = new HashMap<>(); |
| | | arguments.put("x-delayed-type", ExchangeTypes.DIRECT); |
| | | return new CustomExchange(McsOrder_EXCHANGE,"x-delayed-message",true,false,arguments); |
| | | } |
| | | |
| | | @Bean |
| | | public Binding mcsOrderBinding(){ |
| | | return BindingBuilder.bind(mcsOrderQueue()).to(mcsOrderExchange()).with(McsOrder_ROUTING_KEY).noargs(); |
| | | } |
| | | |
| | | @Bean |
| | | public Queue orderQueue(){ |
| | | return new Queue(Order_QUEUE,true,false,false,null); |
| | | } |
| | |
| | | @Select("SELECT c.community_id, c.`name`, c.street_id, cs.`name` as streetName," + |
| | | "round( ST_Distance_Sphere ( Point ( #{communityDTO.longitude}, #{communityDTO.latitude} ), Point ( c.lng, c.lat ) )/ 1000, 2 ) AS distance " + |
| | | "FROM com_act c left join com_street as cs on cs.street_id = c.street_id " + |
| | | "where cs.area_code = #{areaCode} " + |
| | | "where cs.area_code = #{communityDTO.areaCode} " + |
| | | "HAVING distance >= 0 and distance <= #{communityDTO.distance} ORDER BY distance ASC") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByNearby(@Param("communityDTO") SearchCommunityDTO communityDTO); |
| | | |
| | | @Select("select community_id,name,lng,lat from com_act where state = 0 <if test='areaCode !=null'> and area_code = #{areaCode} </if> ") |
| | | @Select("<script> select community_id,name,lng,lat from com_act where state = 0 <if test='areaCode !=null'> and area_code = #{areaCode} </if> </script>") |
| | | List<EventGridCommunityAdminVO> getWestCommunityLists(@Param("areaCode") String areCode); |
| | | |
| | | @Select("select account,plaintext_password as password from com_act where community_id = ${communityId}") |
| | |
| | | * |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | List<ComActEasyPhotoClassifyVO> getPhotoClassifyList(); |
| | | List<ComActEasyPhotoClassifyVO> getPhotoClassifyList(String areaCode); |
| | | |
| | | } |
| | |
| | | * @return 某预约登记记录列表 |
| | | */ |
| | | IPage<ComActReserveRegisterDetailedVO> pageRegisterDetailedListAdmin(Page page, @Param("detailedAdminDTO") PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 查询用户填写某预约登记记录列表 |
| | | * @param detailedAdminDTO 请求参数 |
| | | * @return 某预约登记记录列表 |
| | | */ |
| | | List<ComActReserveRegisterDetailedVO> pageRegisterDetailedListAdminExport(@Param("detailedAdminDTO") PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | /** |
| | | * 导出某预约登记记录列表 |
| | | * @param detailedAdminDTO 请求参数 |
| | |
| | | * @return |
| | | */ |
| | | List<IndexReserveSub> IndexHomeQuarantineSub(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * reserveId查询社区电话 |
| | | * @param reserveId |
| | | * @return |
| | | */ |
| | | String selectCommunityPhoneByReserveId(@Param("reserveId")Long reserveId); |
| | | } |
| | |
| | | + "cmp.special_situation, " + "cmp.phone, " + "cmp.remark, " + "cmp.native_place, " + "cmp.nation, " |
| | | + "cmpct.label, " + "cmp.marriage, " + "cmp.culture_level, " + "cmp.profession, " + "cmp.out_or_local, " |
| | | + "cmp.census_register, " + "cmp.healthy, " + "cmp.birthday, " + "cmp.update_at, " + "cmp.address, " |
| | | + "cmp.is_rent " + "FROM " + "com_mng_population AS cmp " |
| | | + "cmp.is_rent,cmp.death " + "FROM " + "com_mng_population AS cmp " |
| | | + " LEFT JOIN com_mng_population_community_tags AS cmpct ON cmp.id = cmpct.population_id " + "<where>" |
| | | + "<if test='comMngPopulationVO.name != null and comMngPopulationVO.name != ""'>" |
| | | + "AND cmp.`name` LIKE concat(#{comMngPopulationVO.name},'%') " + " </if> " |
| | |
| | | + "<if test='comMngPopulationVO.ageStartTime != null and comMngPopulationVO.ageEndTime != null and comMngPopulationVO.ageStartTime != comMngPopulationVO.ageEndTime'>" |
| | | + "AND cmp.birthday BETWEEN #{comMngPopulationVO.ageEndTimeEnd} and #{comMngPopulationVO.ageStartTime}" |
| | | + " </if> " |
| | | + "<if test='comMngPopulationVO.searchKey != null and comMngPopulationVO.searchKey != "" '>" |
| | | + "AND (cmp.name like concat('%',#{comMngPopulationVO.searchKey},'%') or cmp.card_no_str like concat('%',#{comMngPopulationVO.searchKey},'%') or cmp.phone like concat('%',#{comMngPopulationVO.searchKey},'%') " |
| | | + " </if> " |
| | | + "<if test='comMngPopulationVO.nativePlace != null and comMngPopulationVO.nativePlace != ""'>" |
| | | + "AND cmp.native_place LIKE concat(#{comMngPopulationVO.nativePlace},'%') " + " </if> " |
| | | + "<if test='comMngPopulationVO.nation != null and comMngPopulationVO.nation != ""'>" |
| | |
| | | + "</script>") |
| | | IPage<ComMngPopulationVO> pagePopulation(Page page, |
| | | @Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | /** |
| | | * 导出老人列表 |
| | | * @param comMngPopulationVO |
| | | * @return |
| | | */ |
| | | List<ComMngPopulationVO> exportOld(@Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | /** |
| | | * 分页查询特殊群体列表 |
| | |
| | | AreaAddressVO getAreaAddress(@Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, |
| | | @Param("districtCode") String districtCode); |
| | | |
| | | @Select("select count(cmpct.id) as populationTotal " |
| | | + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 1) as localTotal " |
| | | + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 2) as outTotal " |
| | | + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmpct.label is not null) as specialTotal " |
| | | + ",(select count(DISTINCT `name`) from com_mng_village where community_id = ${communityId}) as villageTotal " |
| | | + ",(select count(id) from com_mng_building where act_id = #{communityId}) as buildNum " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','刑释人员','%')) as rehabilitationTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','高龄老人','%')) as elderTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','养老金人员','%')) as pensionTotal " |
| | | + " from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = ${communityId}") |
| | | // @Select("select count(cmpct.id) as populationTotal " |
| | | // + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 1) as localTotal " |
| | | // + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 2) as outTotal " |
| | | // + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmpct.label is not null) as specialTotal " |
| | | // + ",(select count(DISTINCT `name`) from com_mng_village where community_id = ${communityId}) as villageTotal " |
| | | // + ",(select count(id) from com_mng_building where act_id = #{communityId}) as buildNum " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','刑释人员','%')) as rehabilitationTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','高龄老人','%')) as elderTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','养老金人员','%')) as pensionTotal " |
| | | // + " from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = ${communityId}") |
| | | /** |
| | | * 实有人口统计 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId); |
| | | |
| | | @Select("select count(id) as populationTotal," + |
| | |
| | | @Param(value = "villageId") Long villageId); |
| | | |
| | | @Select("<script> " |
| | | + "select id as houseId,cmv.alley,cmv.house_num from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = ${communityId}" |
| | | + "select id as houseId,cmv.alley,cmv.house_num,cmv.name from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = ${communityId}" |
| | | + "<if test='name != null and name != ""'>" + "and cmv.alley = #{name}" + " </if> " |
| | | + "<if test='villageId != null'>" + "and cmv.village_id = #{villageId}" + " </if> " + " </script>") |
| | | List<ComMngCascadeHouseVO> getHouseLevelByHouseNum(@Param("name") String name, |
| | |
| | | **/ |
| | | @Mapper |
| | | public interface ComMngVolunteerMngDAO extends BaseMapper<ComMngVolunteerMngDO> { |
| | | // @Select("<script> " + |
| | | // " <where>" + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("<script> " + "SELECT\n" + "id,\n" + "`name`,\n" + "photo_path,\n" + "phone,\n" + "integral,\n" |
| | | + "create_at \n" + "FROM\n" + "com_mng_volunteer_mng \n" |
| | | + " where state=2 and community_id = ${comMngVolunteerMngVO.communityId}" |
| | | + "<if test='comMngVolunteerMngVO.name != null and comMngVolunteerMngVO.name.trim() != ""'>" |
| | | + " and name like concat(#{comMngVolunteerMngVO.name},'%') \n" + " </if> " |
| | | + "<if test='comMngVolunteerMngVO.phone != null and comMngVolunteerMngVO.phone.trim() != ""'>" |
| | | + "AND phone like concat(#{comMngVolunteerMngVO.phone},'%') " + " </if> " |
| | | + " order by integral desc,create_at desc" + "</script>") |
| | | |
| | | /** |
| | | * 分页查询志愿者列表 |
| | | * @param page 分页参数 |
| | | * @param comMngVolunteerMngVO 请求参数 |
| | | * @return 志愿者列表 |
| | | */ |
| | | IPage<ComMngVolunteerMngVO> pageVolunteer(Page page, |
| | | @Param("comMngVolunteerMngVO") ComMngVolunteerMngVO comMngVolunteerMngVO); |
| | | |
| | |
| | | @Select("select user_id from sys_user where type=1 and phone=#{phone}") |
| | | Long selectUserIdByPhone(String phone); |
| | | |
| | | @Select("select id_card from sys_user where type=1 and phone=#{idCard}") |
| | | Long selectUserIdByIdCard(String idCard); |
| | | |
| | | } |
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.common.*; |
| | | import com.panzhihua.common.model.vos.common.*; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerOrgTeam; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 志愿者组织队伍表表数据库访问层 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:20:44 |
| | | */ |
| | | @Mapper |
| | | public interface ComMngVolunteerOrgTeamMapper extends BaseMapper<ComMngVolunteerOrgTeam> { |
| | | |
| | | /** |
| | | * 通过ID查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 实例对象 |
| | | */ |
| | | ComMngVolunteerOrgTeamVo queryById(Long id); |
| | | |
| | | /** |
| | | * 查询指定行数据 |
| | | * |
| | | * @param comMngVolunteerOrgTeam 查询条件 |
| | | * @param page 分页对象 |
| | | * @return 对象列表 |
| | | */ |
| | | IPage<ComMngVolunteerOrgTeamVo> queryAllByLimit(@Param("dto") PageComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam, Page page); |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities List<ComMngVolunteerOrgTeam> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<ComMngVolunteerOrgTeam> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities List<ComMngVolunteerOrgTeam> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<ComMngVolunteerOrgTeam> entities); |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者组织列表 |
| | | * @param comMngVolunteerOrgTeam 请求参数 |
| | | * @return 志愿者组织列表 |
| | | */ |
| | | List<ComMngVolunteerOrgTeamVo> queryAll(@Param("dto") PageComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam); |
| | | |
| | | /** |
| | | * 社区后台-志愿者组织统计 |
| | | * @param communityId 社区id |
| | | * @return 志愿者组织统计 |
| | | */ |
| | | ComMngVolunteerStatisticsVo statisticsVolunteerOrgAdmin(@Param("communityId") 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.common.*; |
| | | import com.panzhihua.common.model.vos.common.*; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerServiceType; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 志愿者服务类型表表数据库访问层 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:09 |
| | | */ |
| | | @Mapper |
| | | public interface ComMngVolunteerServiceTypeMapper extends BaseMapper<ComMngVolunteerServiceType> { |
| | | |
| | | /** |
| | | * 通过ID查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 实例对象 |
| | | */ |
| | | ComMngVolunteerServiceTypeVo queryById(Long id); |
| | | |
| | | /** |
| | | * 查询指定行数据 |
| | | * |
| | | * @param comMngVolunteerServiceType 查询条件 |
| | | * @param page 分页对象 |
| | | * @return 对象列表 |
| | | */ |
| | | IPage<ComMngVolunteerServiceTypeVo> queryAllByLimit(@Param("dto") PageComMngVolunteerServiceTypeDto comMngVolunteerServiceType, Page page); |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities List<ComMngVolunteerServiceType> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<ComMngVolunteerServiceType> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities List<ComMngVolunteerServiceType> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<ComMngVolunteerServiceType> entities); |
| | | |
| | | /** |
| | | * 查询所有志愿者服务类型列表 |
| | | * @param comMngVolunteerServiceType 请求参数 |
| | | * @return 志愿者服务列表 |
| | | */ |
| | | List<ComMngVolunteerServiceTypeVo> queryAll(@Param("dto") PageComMngVolunteerServiceTypeDto comMngVolunteerServiceType); |
| | | } |
| | | |
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.common.*; |
| | | import com.panzhihua.common.model.vos.common.*; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerSkill; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 志愿者技能表表数据库访问层 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:36 |
| | | */ |
| | | @Mapper |
| | | public interface ComMngVolunteerSkillMapper extends BaseMapper<ComMngVolunteerSkill> { |
| | | |
| | | /** |
| | | * 通过ID查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 实例对象 |
| | | */ |
| | | ComMngVolunteerSkillVo queryById(Long id); |
| | | |
| | | /** |
| | | * 查询指定行数据 |
| | | * |
| | | * @param comMngVolunteerSkill 查询条件 |
| | | * @param page 分页对象 |
| | | * @return 对象列表 |
| | | */ |
| | | IPage<ComMngVolunteerSkillVo> queryAllByLimit(@Param("dto") PageComMngVolunteerSkillDto comMngVolunteerSkill, Page page); |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities List<ComMngVolunteerSkill> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<ComMngVolunteerSkill> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities List<ComMngVolunteerSkill> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<ComMngVolunteerSkill> entities); |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者技能列表 |
| | | * @param comMngVolunteerSkill 请求参数 |
| | | * @return 志愿者技能列表 |
| | | */ |
| | | List<ComMngVolunteerSkillVo> queryAll(@Param("dto") PageComMngVolunteerSkillDto comMngVolunteerSkill); |
| | | } |
| | | |
| | |
| | | * @param currentMon |
| | | * @return |
| | | */ |
| | | IPage<ConvenientMerchantVO> getPopularMerchants(@Param("page") Page page, @Param("communityId") Long communityId, @Param("currentMon") String currentMon); |
| | | IPage<ConvenientMerchantVO> getPopularMerchants(@Param("page") Page page, @Param("communityId") Long communityId, @Param("currentMon") String currentMon,@Param("areaCode")String areaCode); |
| | | |
| | | /** |
| | | * 获取指定类型的商家 |
| | |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<ConvenientServiceCategoryVO> selectSuitableServiceCategories(@Param("communityId") Long communityId); |
| | | List<ConvenientServiceCategoryVO> selectSuitableServiceCategories(@Param("communityId") Long communityId,@Param("areaCode")String areaCode); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.McsConfig; |
| | | |
| | | /** |
| | | * (McsConfig)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:06 |
| | | */ |
| | | @Mapper |
| | | public interface McsConfigDAO extends BaseMapper<McsConfig> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsConfig> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsConfig> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsConfig> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsConfig> entities); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | 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.microCommercialStreet.PageJoinGameListDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.GameStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsCouponVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.MyCouponVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.McsCoupon; |
| | | |
| | | /** |
| | | * (McsCoupon)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:07 |
| | | */ |
| | | @Mapper |
| | | public interface McsCouponDAO extends BaseMapper<McsCoupon> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsCoupon> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsCoupon> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsCoupon> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsCoupon> entities); |
| | | |
| | | /** |
| | | * 获取我的戳戳卷统计数据 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | MyCouponVO getMyCouponData(@Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 获取用户戳戳卷列表 |
| | | * @param type |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<McsCouponVO> getCouponList(@Param("type") Integer type, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 我的评价-参与游戏列表 |
| | | * @param page |
| | | * @param pageJoinGameListDTO |
| | | * @return |
| | | */ |
| | | IPage<McsCouponVO> pageJoinGameList(@Param("page") Page page, @Param("pageJoinGameListDTO") PageJoinGameListDTO pageJoinGameListDTO); |
| | | |
| | | /** |
| | | * 游戏统计 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | GameStatisticsVO getMcsGameStatistics(@Param("userId") Long userId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | 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.microCommercialStreet.PageMcsEvaluateDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsEvaluateVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.McsEvaluate; |
| | | |
| | | /** |
| | | * (McsEvaluate)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:08 |
| | | */ |
| | | @Mapper |
| | | public interface McsEvaluateDAO extends BaseMapper<McsEvaluate> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsEvaluate> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsEvaluate> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsEvaluate> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsEvaluate> entities); |
| | | |
| | | /** |
| | | * 分页查询戳戳游戏评价记录 |
| | | * @param page |
| | | * @param pageMcsEvaluateDTO |
| | | * @return |
| | | */ |
| | | IPage<McsEvaluateVO> pageMcsEvaluate(@Param("page") Page page, @Param("pageMcsEvaluateDTO") PageMcsEvaluateDTO pageMcsEvaluateDTO); |
| | | |
| | | /** |
| | | * 获取评价详情 |
| | | * @param evaluateId |
| | | * @return |
| | | */ |
| | | McsEvaluateVO getMcsEvaluate(@Param("evaluateId") Long evaluateId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | 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.microCommercialStreet.PageMcsGameDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.McsGame; |
| | | |
| | | /** |
| | | * (McsGame)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:09 |
| | | */ |
| | | @Mapper |
| | | public interface McsGameDAO extends BaseMapper<McsGame> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsGame> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsGame> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsGame> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsGame> entities); |
| | | |
| | | /** |
| | | * 分页查询戳戳游戏 |
| | | * @param page |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | IPage<McsGameVO> pageMcsGame(@Param("page") Page page, @Param("pageMcsGameDTO") PageMcsGameDTO pageMcsGameDTO); |
| | | |
| | | /** |
| | | * 查询商家已发布数 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | Integer selectPublishCount(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 查询商家下已被领取的卷总数 |
| | | * @param merchantId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | Integer selectAppliedCount(@Param("merchantId") Long merchantId, @Param("type") Integer type); |
| | | |
| | | /** |
| | | * 查询商家下已被核销的卷总数 |
| | | * @param merchantId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | Integer selectVerifiedCount(@Param("merchantId") Long merchantId, @Param("type") Integer type); |
| | | |
| | | /** |
| | | * 获取热门游戏 |
| | | * @return |
| | | */ |
| | | McsGameVO selectPopularGame(); |
| | | |
| | | /** |
| | | * h5分页游戏查询 |
| | | * @param page |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | IPage<McsGameVO> pageH5McsGame(@Param("page") Page page, @Param("pageMcsGameDTO") PageMcsGameDTO pageMcsGameDTO); |
| | | |
| | | /** |
| | | * 游戏详情 |
| | | * @param gameId |
| | | * @return |
| | | */ |
| | | McsGameVO selectDetailById(@Param("gameId") Long gameId); |
| | | |
| | | /** |
| | | * 通过商家id批量下架戳戳游戏 |
| | | * @param needDealIds |
| | | * @return |
| | | */ |
| | | Integer setOffByMerchantIds(@Param("needDealIds") List<Long> needDealIds); |
| | | |
| | | /** |
| | | * 获取需要处理的到期数据 |
| | | * @return |
| | | */ |
| | | List<McsGame> selectNeedDealExpire(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import 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.microCommercialStreet.PageMcsInformationDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsInformationVO; |
| | | import com.panzhihua.service_community.entity.McsInformation; |
| | | |
| | | /** |
| | | * (McsInformation)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:10 |
| | | */ |
| | | @Mapper |
| | | public interface McsInformationDAO extends BaseMapper<McsInformation> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsInformation> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsInformation> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsInformation> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsInformation> entities); |
| | | |
| | | /** |
| | | * 分页查询资讯 |
| | | * @param page |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | IPage<McsInformationVO> pageMcsInfo(@Param("page") Page page, @Param("pageMcsInformationDTO") PageMcsInformationDTO pageMcsInformationDTO); |
| | | |
| | | /** |
| | | * H5分页查询资讯 |
| | | * @param page |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | IPage<McsInformationVO> pageH5McsInfo(@Param("page") Page page, @Param("pageMcsInformationDTO") PageMcsInformationDTO pageMcsInformationDTO); |
| | | |
| | | /** |
| | | * 通过商家id批量下架戳戳资讯 |
| | | * @param needDealIds |
| | | * @return |
| | | */ |
| | | Integer setOffByMerchantIds(@Param("needDealIds") List<Long> needDealIds); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsLabelVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.McsLabel; |
| | | |
| | | /** |
| | | * (McsLabel)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:10 |
| | | */ |
| | | @Mapper |
| | | public interface McsLabelDAO extends BaseMapper<McsLabel> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsLabel> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsLabel> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsLabel> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsLabel> entities); |
| | | |
| | | /** |
| | | * 获取产品标签列表 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<McsLabelVO> selectVOList(@Param("userId") Long userId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import 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.microCommercialStreet.PageMcsMerchantDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.IndexTopStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO; |
| | | import com.panzhihua.service_community.entity.McsMerchant; |
| | | |
| | | /** |
| | | * (McsMerchant)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:11 |
| | | */ |
| | | @Mapper |
| | | public interface McsMerchantDAO extends BaseMapper<McsMerchant> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsMerchant> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsMerchant> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsMerchant> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsMerchant> entities); |
| | | |
| | | /** |
| | | * 根据id查询商家信息 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | McsMerchantVO getMcsMerchantById(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 分页查询数字商业街商家 |
| | | * @param page |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | IPage<McsMerchantVO> pageMcsMerchant(@Param("page") Page page, @Param("pageMcsMerchantDTO") PageMcsMerchantDTO pageMcsMerchantDTO); |
| | | |
| | | /** |
| | | * 根据账号查询商家 |
| | | * @param account |
| | | * @return |
| | | */ |
| | | McsMerchantVO getMcsMerchantByAccount(@Param("account") String account); |
| | | |
| | | /** |
| | | * 首页顶部数据 |
| | | * @return |
| | | */ |
| | | IndexTopStatisticsVO getMcsIndexTopData(); |
| | | |
| | | /** |
| | | * H5分页查询数字商业街商家 |
| | | * @param page |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | IPage<McsMerchantVO> pageH5McsMerchant(@Param("page") Page page, @Param("pageMcsMerchantDTO") PageMcsMerchantDTO pageMcsMerchantDTO); |
| | | |
| | | /** |
| | | * 查询需要处理的已到期商家 |
| | | * @return |
| | | */ |
| | | List<Long> selectNeedDealExpiredMerchant(); |
| | | |
| | | /** |
| | | * 修改is_pause状态为TRUE |
| | | * @param needDealIds |
| | | * @return |
| | | */ |
| | | Integer updateIsPauseStatus(@Param("needDealIds") List<Long> needDealIds); |
| | | } |
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.microCommercialStreet.McsOrderVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.McsOrder; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 商业街订单表(McsOrder)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-04 16:10:06 |
| | | */ |
| | | @Mapper |
| | | public interface McsOrderDao extends BaseMapper<McsOrder> { |
| | | /** |
| | | * 分页查询 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<McsOrderVO> pageList(Page page, @Param("commonPage")CommonPage commonPage); |
| | | |
| | | /** |
| | | * 详情接口 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | McsOrderVO detail(Long id); |
| | | |
| | | /** |
| | | * 订单id查询电话 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | String selectPhone(Long id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | 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.microCommercialStreet.PageMcsProductDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsProductVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.McsProduct; |
| | | |
| | | /** |
| | | * (McsProduct)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:12 |
| | | */ |
| | | @Mapper |
| | | public interface McsProductDAO extends BaseMapper<McsProduct> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsProduct> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsProduct> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsProduct> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsProduct> entities); |
| | | |
| | | /** |
| | | * 分页查询商家产品信息 |
| | | * @param page |
| | | * @param pageMcsProductDTO |
| | | * @return |
| | | */ |
| | | IPage<McsProductVO> pageMcsProduct(@Param("page") Page page, @Param("pageMcsProductDTO") PageMcsProductDTO pageMcsProductDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.McsProductLabel; |
| | | |
| | | /** |
| | | * (McsProductLabel)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:12 |
| | | */ |
| | | @Mapper |
| | | public interface McsProductLabelDAO extends BaseMapper<McsProductLabel> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsProductLabel> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsProductLabel> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsProductLabel> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsProductLabel> entities); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | 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.microCommercialStreet.PageVerifyRecordDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsVerifyRecordVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.McsVerifiedRecord; |
| | | |
| | | /** |
| | | * (McsVerifiedRecord)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:13 |
| | | */ |
| | | @Mapper |
| | | public interface McsVerifiedRecordDAO extends BaseMapper<McsVerifiedRecord> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsVerifiedRecord> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<McsVerifiedRecord> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<McsVerifiedRecord> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<McsVerifiedRecord> entities); |
| | | |
| | | /** |
| | | * 分页查询核销记录 |
| | | * @param pageVerifyRecordDTO |
| | | * @return |
| | | */ |
| | | IPage<McsVerifyRecordVO> pageMcsVerifyRecord(@Param("page") Page page, @Param("pageVerifyRecordDTO") PageVerifyRecordDTO pageVerifyRecordDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (McsConfig)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:07 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_config") |
| | | @SuppressWarnings("serial") |
| | | public class McsConfig implements Serializable { |
| | | private static final long serialVersionUID = 304699800613967550L; |
| | | |
| | | private Long id; |
| | | /** |
| | | * 商业街配置项名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 配置项 |
| | | */ |
| | | @TableField("`key`") |
| | | private String key; |
| | | /** |
| | | * 配置内容 |
| | | */ |
| | | private String value; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 由谁更新 |
| | | */ |
| | | private Long updatedBy; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * (McsCoupon)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:08 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_coupon") |
| | | @SuppressWarnings("serial") |
| | | public class McsCoupon implements Serializable { |
| | | private static final long serialVersionUID = 236342407932267836L; |
| | | |
| | | @TableId(type = IdType.INPUT) |
| | | private Long id; |
| | | /** |
| | | * 关联id |
| | | */ |
| | | private Long gameId; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | /** |
| | | * 二维码 |
| | | */ |
| | | private String qrCode; |
| | | /** |
| | | * 戳戳币 |
| | | */ |
| | | private Integer coin; |
| | | /** |
| | | * 奖品 |
| | | */ |
| | | private String award; |
| | | /** |
| | | * 是否核验 |
| | | */ |
| | | private Boolean isVerified; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 最后更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (McsEvaluate)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:08 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_evaluate") |
| | | @SuppressWarnings("serial") |
| | | public class McsEvaluate implements Serializable { |
| | | private static final long serialVersionUID = -64045498558186286L; |
| | | |
| | | private Long id; |
| | | /** |
| | | * 戳戳券码id |
| | | */ |
| | | private Long couponId; |
| | | /** |
| | | * 所属游戏id |
| | | */ |
| | | private Long gameId; |
| | | /** |
| | | * 评价用户id |
| | | */ |
| | | private Long userId; |
| | | /** |
| | | * 评分(1.差 2.一般 3.还不错 4.很满意 5.强烈推荐) |
| | | */ |
| | | private Integer star; |
| | | /** |
| | | * 评价内容 |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 评价图片(多张逗号隔开) |
| | | */ |
| | | private String photos; |
| | | /** |
| | | * 评价时间 |
| | | */ |
| | | private Date createdAt; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (McsGame)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:09 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_game") |
| | | @SuppressWarnings("serial") |
| | | public class McsGame implements Serializable { |
| | | private static final long serialVersionUID = 996990563935718402L; |
| | | |
| | | private Long id; |
| | | /** |
| | | * 游戏名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 戳戳卷数量 |
| | | */ |
| | | private Integer coupons; |
| | | /** |
| | | * 剩余戳戳卷数量 |
| | | */ |
| | | private Integer surplusCoupons; |
| | | /** |
| | | * 游戏类别(1.戳戳币游戏 2.体验游戏) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券) |
| | | */ |
| | | private Integer awardType; |
| | | /** |
| | | * 戳戳币分配方式(1.随机分配 2.平均分配) |
| | | */ |
| | | private Integer allocation; |
| | | /** |
| | | * 戳戳币总额 |
| | | */ |
| | | private Integer coins; |
| | | /** |
| | | * 剩余戳戳币 |
| | | */ |
| | | private Integer surplusCoins; |
| | | /** |
| | | * 地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | private String lat; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | private String lon; |
| | | /** |
| | | * 失效时间 |
| | | */ |
| | | private Date expireAt; |
| | | /** |
| | | * 封面 |
| | | */ |
| | | private String cover; |
| | | /** |
| | | * 其他图片(多张图片以逗号隔开) |
| | | */ |
| | | private String otherImages; |
| | | /** |
| | | * 游戏介绍 |
| | | */ |
| | | private String introduction; |
| | | /** |
| | | * 状态(1.未发布 2.进行中 3.已下架 4.已结束) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 是否设为热门 |
| | | */ |
| | | private Boolean isPopular; |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | private Date publishAt; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 所属商家 |
| | | */ |
| | | private Long merchantId; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 由谁更新 |
| | | */ |
| | | private Long updatedBy; |
| | | |
| | | |
| | | /** |
| | | * 状态(1.未发布 2.进行中 3.已下架 4.已结束) |
| | | */ |
| | | public interface Status { |
| | | int wfb = 1; |
| | | int jxz = 2; |
| | | int yxj = 3; |
| | | int yjs = 4; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (McsInformation)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:10 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_information") |
| | | @SuppressWarnings("serial") |
| | | public class McsInformation implements Serializable { |
| | | private static final long serialVersionUID = -78188903489439933L; |
| | | |
| | | private Long id; |
| | | /** |
| | | * 资讯标题 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | private String lat; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | private String lon; |
| | | /** |
| | | * 封面 |
| | | */ |
| | | private String cover; |
| | | /** |
| | | * 资讯内容 |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 状态(1.未发布 2.已发布 3.已下架) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | private Date publishAt; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 所属商家 |
| | | */ |
| | | private Long merchantId; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 由谁更新 |
| | | */ |
| | | private Long updatedBy; |
| | | |
| | | /** |
| | | * 状态(1.未发布 2.已发布 3.已下架) |
| | | */ |
| | | public interface Status{ |
| | | int wfb = 1; |
| | | int yfb = 2; |
| | | int yxj = 3; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (McsLabel)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:10 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_label") |
| | | @SuppressWarnings("serial") |
| | | public class McsLabel implements Serializable { |
| | | private static final long serialVersionUID = -23139583272426139L; |
| | | |
| | | private Long id; |
| | | /** |
| | | * 标签名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 说明 |
| | | */ |
| | | private String introduction; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 所属商家 |
| | | */ |
| | | private Long merchantId; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 由谁更新 |
| | | */ |
| | | private Long updatedBy; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * (McsMerchant)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:11 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_merchant") |
| | | @SuppressWarnings("serial") |
| | | public class McsMerchant implements Serializable { |
| | | private static final long serialVersionUID = 535915125894031919L; |
| | | |
| | | private Long id; |
| | | /** |
| | | * 商家名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 商家账号 |
| | | */ |
| | | private String account; |
| | | /** |
| | | * 商家logo |
| | | */ |
| | | @TableField(value = "logo", updateStrategy = FieldStrategy.IGNORED) |
| | | private String logo; |
| | | /** |
| | | * 关联用户id |
| | | */ |
| | | private Long userId; |
| | | /** |
| | | * 商家级别(1.临时商家 2.合作商家) |
| | | */ |
| | | private Integer level; |
| | | /** |
| | | * 戳戳点亮上限(发布次数上限) |
| | | */ |
| | | private Integer publishLimit; |
| | | /** |
| | | * 到期时间 |
| | | */ |
| | | private Date expireAt; |
| | | /** |
| | | * 是否暂停服务 |
| | | */ |
| | | private Boolean isPause; |
| | | /** |
| | | * 首次点亮时间 |
| | | */ |
| | | private Date firstLitAt; |
| | | /** |
| | | * 商家地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | private String lat; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | private String lon; |
| | | /** |
| | | * 商家简介 |
| | | */ |
| | | @TableField(value = "introduction", updateStrategy = FieldStrategy.IGNORED) |
| | | private String introduction; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 由谁更新 |
| | | */ |
| | | private Long updatedBy; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.math.BigDecimal; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * 商业街订单表(McsOrder)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-04 16:10:06 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("商业街订单表") |
| | | public class McsOrder implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -92724536016243196L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 支付配置id |
| | | */ |
| | | @ApiModelProperty(value = "支付配置id") |
| | | private Long configId; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer num; |
| | | |
| | | /** |
| | | * 支付状态 0 待支付 1已支付 2 已取消 3 已退款 |
| | | */ |
| | | @ApiModelProperty(value = "支付状态 0 待支付 1已支付 2 已取消 3 已退款") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 支付金额 |
| | | */ |
| | | @ApiModelProperty(value = "支付金额") |
| | | private BigDecimal money; |
| | | |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | @ApiModelProperty(value = "支付时间") |
| | | private Date payTime; |
| | | |
| | | /** |
| | | * 商家id |
| | | */ |
| | | @ApiModelProperty(value = "商家id") |
| | | private Long merchantId; |
| | | |
| | | /** |
| | | * 支付流水号 |
| | | */ |
| | | @ApiModelProperty(value = "支付流水号") |
| | | private String payNo; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | private Date createTime; |
| | | |
| | | private String merchantName; |
| | | |
| | | private String paymentMethod; |
| | | |
| | | /** |
| | | * 商家地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | private String lat; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | private String lon; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * (McsProduct)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:12 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_product") |
| | | @SuppressWarnings("serial") |
| | | public class McsProduct implements Serializable { |
| | | private static final long serialVersionUID = 415357403059379804L; |
| | | |
| | | @TableId(type = IdType.INPUT) |
| | | private Long id; |
| | | /** |
| | | * 产品名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 产品图片 |
| | | */ |
| | | private String image; |
| | | /** |
| | | * 产品介绍 |
| | | */ |
| | | private String introduction; |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | /** |
| | | * 状态(1.上架中 2.已下架) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | private Boolean isDel; |
| | | /** |
| | | * 所属商家 |
| | | */ |
| | | private Long merchantId; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createdBy; |
| | | /** |
| | | * 最后更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | /** |
| | | * 由谁更新 |
| | | */ |
| | | private Long updatedBy; |
| | | |
| | | /** |
| | | * 状态(1.上架中 2.已下架) |
| | | */ |
| | | public interface Status { |
| | | int sjz = 1; |
| | | int yxj = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (McsProductLabel)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:13 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_product_label") |
| | | @SuppressWarnings("serial") |
| | | public class McsProductLabel implements Serializable { |
| | | private static final long serialVersionUID = 292891837724574338L; |
| | | |
| | | private Long id; |
| | | /** |
| | | * 产品id |
| | | */ |
| | | private Long productId; |
| | | /** |
| | | * 标签id |
| | | */ |
| | | private Long labelId; |
| | | /** |
| | | * 标签名 |
| | | */ |
| | | private String labelName; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (McsVerifiedRecord)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:14 |
| | | */ |
| | | @Data |
| | | @TableName(value = "mcs_verified_record") |
| | | @SuppressWarnings("serial") |
| | | public class McsVerifiedRecord implements Serializable { |
| | | private static final long serialVersionUID = -81350642843928838L; |
| | | |
| | | private Long id; |
| | | /** |
| | | * 戳戳券码id |
| | | */ |
| | | private Long couponId; |
| | | /** |
| | | * 商家id |
| | | */ |
| | | private Long merchantId; |
| | | /** |
| | | * 核验所属资源名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private String nickName; |
| | | /** |
| | | * 游戏id |
| | | */ |
| | | private Long gameId; |
| | | /** |
| | | * 获得奖励 |
| | | */ |
| | | private String award; |
| | | /** |
| | | * 核验时间 |
| | | */ |
| | | private Date verifiedAt; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.message; |
| | | |
| | | import com.panzhihua.service_community.dao.McsOrderDao; |
| | | import com.panzhihua.service_community.entity.McsOrder; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Component |
| | | public class McsOrderMessage { |
| | | public static final String DELAYED_QUEUE="mcsOrder.queue"; |
| | | @Resource |
| | | private McsOrderDao mcsOrderDao; |
| | | @RabbitListener(queues=DELAYED_QUEUE) |
| | | public void cancelOrder(McsOrder mcsOrder){ |
| | | McsOrder nowOrder=mcsOrderDao.selectById(mcsOrder.getId()); |
| | | if(nowOrder.getStatus()==0){ |
| | | mcsOrder.setStatus(2); |
| | | mcsOrderDao.updateById(mcsOrder); |
| | | } |
| | | } |
| | | } |
| | |
| | | private String censusRegister; |
| | | |
| | | /** |
| | | * 人员类型(1、户籍人员2、留守人员3、外地人员4、境外人员) |
| | | * 人员类型(1、户籍人口2、留守人员3、外地人员4、境外人员5、流动人口6、常住人口7、暂住人口) |
| | | */ |
| | | private String personType; |
| | | |
| | |
| | | * 申请提交人ID |
| | | */ |
| | | private Long submitUserId; |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | private String idCard; |
| | | /** |
| | | * 组织id |
| | | */ |
| | | private Long orgId; |
| | | /** |
| | | * 队伍id |
| | | */ |
| | | private Long teamId; |
| | | /** |
| | | * 技能id |
| | | */ |
| | | private Long skillId; |
| | | /** |
| | | * 是否是在校大学生(1.是 2.否) |
| | | */ |
| | | private Integer isUniversity; |
| | | /** |
| | | * 大学名称 |
| | | */ |
| | | private String universityName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 志愿者组织队伍表(ComMngVolunteerOrgTeam)实体类 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 15:51:23 |
| | | */ |
| | | @Data |
| | | public class ComMngVolunteerOrgTeam implements Serializable { |
| | | private static final long serialVersionUID = -87266346603371467L; |
| | | /** |
| | | * 主键id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 父级id,为0时则为组织,不为0则为队伍 |
| | | */ |
| | | private Long parentId; |
| | | /** |
| | | * 服务类型 |
| | | */ |
| | | private Long serviceTypeId; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 志愿者服务类型表(ComMngVolunteerServiceType)实体类 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:09 |
| | | */ |
| | | @Data |
| | | public class ComMngVolunteerServiceType implements Serializable { |
| | | private static final long serialVersionUID = 884034720723106601L; |
| | | /** |
| | | * 主键id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | /** |
| | | * 创建人id |
| | | */ |
| | | private Long createBy; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | /** |
| | | * 修改人id |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 志愿者技能表(ComMngVolunteerSkill)实体类 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:36 |
| | | */ |
| | | @Data |
| | | public class ComMngVolunteerSkill implements Serializable { |
| | | private static final long serialVersionUID = -32441531233450711L; |
| | | /** |
| | | * 主键id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | /** |
| | | * 创建人id |
| | | */ |
| | | private Long createBy; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | /** |
| | | * 修改人id |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | * |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | R listPhotoClassify(); |
| | | R listPhotoClassify(String areaCode); |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类删除 |
| | |
| | | R registerDetailedListAdmin(PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 导出登记明细列表 |
| | | * @param detailedAdminDTO 请求参数 |
| | | * @return 登记明细列表 |
| | | */ |
| | | R registerDetailedListAdminExport(PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 分页查询居家隔离统计 |
| | | * @param detailedAdminDTO |
| | | * @return |
| | |
| | | R pagePopulation(ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | /** |
| | | * 老人导出 |
| | | * |
| | | * @param comMngPopulationVO |
| | | * 查询参数 |
| | | * @return 分页集合 |
| | | */ |
| | | R exportOld(ComMngPopulationDTO comMngPopulationVO); |
| | | |
| | | /** |
| | | * 查询平台所有的实有人口 |
| | | * |
| | | * @return 实有人口集合 按照创建顺序倒序排列 |
| | |
| | | * @return |
| | | */ |
| | | R indexInfo(Long communityId); |
| | | |
| | | /** |
| | | * 历史数据人员类型填充 |
| | | * @param newVoList |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R filledPopulationPersonType(List<ComMngPopulationServeExcelVO> newVoList, Long communityId, Long userId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerExcelVO; |
| | | import com.panzhihua.common.model.vos.user.UserPhoneVO; |
| | | |
| | | /** |
| | |
| | | public interface ComMngVolunteerMngService { |
| | | /** |
| | | * 增加志愿者 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 志愿者信息 |
| | | * @return 增加结果 |
| | |
| | | |
| | | /** |
| | | * 删除志愿者 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 手机号 |
| | | * @return 删除结果 |
| | |
| | | |
| | | /** |
| | | * 编辑志愿者 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 编辑内容 |
| | | * @return 编辑结果 |
| | |
| | | |
| | | /** |
| | | * 分页展示志愿者 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 查询参数 |
| | | * @return 分页集合返回 |
| | |
| | | |
| | | /** |
| | | * 分页展示志愿者审核 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 查询参数 |
| | | * @return 查询结果 |
| | |
| | | |
| | | /** |
| | | * 志愿者审核详情 |
| | | * |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return 详情 |
| | |
| | | |
| | | /** |
| | | * 志愿者审核 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 审核操作 |
| | | * @return 审核结果 |
| | |
| | | |
| | | /** |
| | | * 删除志愿者审核 |
| | | * |
| | | * |
| | | * @param comMngVolunteerMngVO |
| | | * 主键 |
| | | * @return 删除结果 |
| | |
| | | |
| | | /** |
| | | * 用户修改手机号对应的志愿者手机号也要修改 |
| | | * |
| | | * |
| | | * @param userPhoneVO |
| | | * 新旧手机号 |
| | | * @return 修改结果 |
| | |
| | | |
| | | /** |
| | | * 志愿者详情 |
| | | * |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return 志愿者 |
| | |
| | | |
| | | /** |
| | | * 社区后台数据看板 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @param userId |
| | |
| | | |
| | | /** |
| | | * 获取志愿者详情 |
| | | * |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R getVolunteerById(Long id); |
| | | |
| | | /** |
| | | * 志愿者导入 |
| | | * |
| | | * @param list 志愿者数据列表 |
| | | * @param communityId 社区id |
| | | * @param userId 用户id |
| | | * @return 导入结果 |
| | | */ |
| | | R importVolunteerAdmin(List<ComMngVolunteerExcelVO> list, Long communityId, Long userId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * 志愿者组织队伍表表服务接口 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 15:51:23 |
| | | */ |
| | | public interface ComMngVolunteerOrgTeamService { |
| | | |
| | | /** |
| | | * 通过ID查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 实例对象 |
| | | */ |
| | | R queryById(Long id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param comMngVolunteerOrgTeam 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | R queryByPage(PageComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comMngVolunteerOrgTeam 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | R insert(AddComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comMngVolunteerOrgTeam 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | R update(EditComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam); |
| | | |
| | | /** |
| | | * 通过主键删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 是否成功 |
| | | */ |
| | | R deleteById(Long id); |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者组织列表 |
| | | * @param comMngVolunteerOrgTeam 请求参数 |
| | | * @return 志愿者组织列表 |
| | | */ |
| | | R queryByList(PageComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam); |
| | | |
| | | /** |
| | | * 社区后台-志愿者组织统计 |
| | | * @param communityId 社区id |
| | | * @return 志愿者组织统计 |
| | | */ |
| | | R statisticsVolunteerOrgAdmin(Long communityId); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * 志愿者服务类型表表服务接口 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:10 |
| | | */ |
| | | public interface ComMngVolunteerServiceTypeService { |
| | | |
| | | /** |
| | | * 通过ID查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 实例对象 |
| | | */ |
| | | R queryById(Long id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param comMngVolunteerServiceType 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | R queryByPage(PageComMngVolunteerServiceTypeDto comMngVolunteerServiceType); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comMngVolunteerServiceType 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | R insert(AddComMngVolunteerServiceTypeDto comMngVolunteerServiceType); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comMngVolunteerServiceType 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | R update(EditComMngVolunteerServiceTypeDto comMngVolunteerServiceType); |
| | | |
| | | /** |
| | | * 通过主键删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 是否成功 |
| | | */ |
| | | R deleteById(Long id); |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者服务类型列表 |
| | | * @param comMngVolunteerServiceType 请求参数 |
| | | * @return 志愿者服务列表 |
| | | */ |
| | | R queryByList(PageComMngVolunteerServiceTypeDto comMngVolunteerServiceType); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * 志愿者技能表表服务接口 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:36 |
| | | */ |
| | | public interface ComMngVolunteerSkillService { |
| | | |
| | | /** |
| | | * 通过ID查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 实例对象 |
| | | */ |
| | | R queryById(Long id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param comMngVolunteerSkill 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | R queryByPage(PageComMngVolunteerSkillDto comMngVolunteerSkill); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comMngVolunteerSkill 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | R insert(AddComMngVolunteerSkillDto comMngVolunteerSkill); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comMngVolunteerSkill 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | R update(EditComMngVolunteerSkillDto comMngVolunteerSkill); |
| | | |
| | | /** |
| | | * 通过主键删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 是否成功 |
| | | */ |
| | | R deleteById(Long id); |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者技能列表 |
| | | * @param comMngVolunteerSkill 请求参数 |
| | | * @return 志愿者技能列表 |
| | | */ |
| | | R queryByList(PageComMngVolunteerSkillDto comMngVolunteerSkill); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R getUserStoreInfo(String account); |
| | | |
| | | /** |
| | | * check商家/店铺是否有效 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | Boolean checkStoreIsValid(Long userId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R timedTaskWriteDataToMerchantJobHandler(); |
| | | |
| | | /** |
| | | * check商家/店铺是否有效 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | Boolean checkStoreIsValid(Long userId); |
| | | } |
| | |
| | | * 获取所有便民服务分类 |
| | | * @return |
| | | */ |
| | | R getAllServiceCategories(); |
| | | R getAllServiceCategories(String areaCode); |
| | | |
| | | /** |
| | | * 获取该社区商家数量大于0的分类 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R getSuitableServiceCategories(Long communityId); |
| | | R getSuitableServiceCategories(Long communityId,String areaCode); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsConfigVO; |
| | | import com.panzhihua.service_community.entity.McsConfig; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (McsConfig)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:07 |
| | | */ |
| | | public interface McsConfigService extends IService<McsConfig> { |
| | | |
| | | /** |
| | | * 获取所有数字商业街配置 |
| | | * @return |
| | | */ |
| | | R getAllMcsConfig(); |
| | | |
| | | /** |
| | | * 修改数字商业街配置 |
| | | * @param configs |
| | | * @return |
| | | */ |
| | | R putMcsConfig(List<McsConfigVO> configs); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageJoinGameListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.McsCoupon; |
| | | |
| | | /** |
| | | * (McsCoupon)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:08 |
| | | */ |
| | | public interface McsCouponService extends IService<McsCoupon> { |
| | | |
| | | /** |
| | | * 我的戳戳卷 |
| | | * @return |
| | | * @param type |
| | | * @param userId |
| | | */ |
| | | R getMyCoupon(Integer type, Long userId); |
| | | |
| | | /** |
| | | * 我的评价-参与游戏列表 |
| | | * @param pageJoinGameListDTO |
| | | * @return |
| | | */ |
| | | R getJoinGameList(PageJoinGameListDTO pageJoinGameListDTO); |
| | | |
| | | /** |
| | | * 戳戳卷核销 |
| | | * @param couponId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R verifyMcsCoupon(Long couponId, Long userId); |
| | | |
| | | /** |
| | | * 游戏统计 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R getMcsGameStatistics(Long userId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsEvaluateDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsEvaluateDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.McsEvaluate; |
| | | |
| | | /** |
| | | * (McsEvaluate)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:08 |
| | | */ |
| | | public interface McsEvaluateService extends IService<McsEvaluate> { |
| | | |
| | | /** |
| | | * 分页查询评价记录 |
| | | * @param pageMcsEvaluateDTO |
| | | * @return |
| | | */ |
| | | R pageMcsEvaluate(PageMcsEvaluateDTO pageMcsEvaluateDTO); |
| | | |
| | | /** |
| | | * 查询评价记录详情 |
| | | * @param evaluateId |
| | | * @return |
| | | */ |
| | | R getMcsEvaluate(Long evaluateId); |
| | | |
| | | /** |
| | | * 删除评价记录 |
| | | * @param evaluateId |
| | | * @return |
| | | */ |
| | | R deleteMcsEvaluate(Long evaluateId); |
| | | |
| | | /** |
| | | * 新增评价记录 |
| | | * @param mcsEvaluateDTO |
| | | * @return |
| | | */ |
| | | R addMcsEvaluate(McsEvaluateDTO mcsEvaluateDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetPopularForGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForGameDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.McsGame; |
| | | |
| | | /** |
| | | * (McsGame)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:09 |
| | | */ |
| | | public interface McsGameService extends IService<McsGame> { |
| | | |
| | | /** |
| | | * 分页查询戳戳游戏 |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | R pageMcsGame(PageMcsGameDTO pageMcsGameDTO); |
| | | |
| | | /** |
| | | * 设为/取消游戏热门 |
| | | * @param setPopularForGameDTO |
| | | * @return |
| | | */ |
| | | R setPopularForGame(SetPopularForGameDTO setPopularForGameDTO); |
| | | |
| | | /** |
| | | * 上架/下架戳戳游戏 |
| | | * @param setShelfForGameDTO |
| | | * @return |
| | | */ |
| | | R setShelfForGame(SetShelfForGameDTO setShelfForGameDTO); |
| | | |
| | | /** |
| | | * 删除戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R deleteMcsGame(Long gameId, Long userId); |
| | | |
| | | /** |
| | | * 新增戳戳游戏 |
| | | * @param mcsGameDTO |
| | | * @return |
| | | */ |
| | | R addMcsGame(McsGameDTO mcsGameDTO); |
| | | |
| | | /** |
| | | * 编辑戳戳游戏 |
| | | * @param mcsGameDTO |
| | | * @return |
| | | */ |
| | | R putMcsGame(McsGameDTO mcsGameDTO); |
| | | |
| | | /** |
| | | * 发布戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R publishMcsGame(Long gameId, Long userId); |
| | | |
| | | /** |
| | | * 结束戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R finishMcsGame(Long gameId, Long userId); |
| | | |
| | | /** |
| | | * 戳戳游戏顶部统计数据 |
| | | * @param userId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | R getTopStatistics(Long userId, Integer type); |
| | | |
| | | /** |
| | | * 戳戳卷领取 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R applyMcsCoupon(Long gameId, Long userId); |
| | | |
| | | /** |
| | | * h5分页查询戳戳游戏 |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | R pageH5McsGame(PageMcsGameDTO pageMcsGameDTO); |
| | | |
| | | /** |
| | | * 游戏详情 |
| | | * @param gameId |
| | | * @return |
| | | */ |
| | | R getMcsGame(Long gameId); |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街游戏结束 |
| | | * @return |
| | | */ |
| | | R endStatusForMcsGame(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsInformationDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForInfoDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.McsInformation; |
| | | |
| | | /** |
| | | * (McsInformation)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:10 |
| | | */ |
| | | public interface McsInformationService extends IService<McsInformation> { |
| | | |
| | | /** |
| | | * 分页查询戳戳资讯 |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | R pageMcsInfo(PageMcsInformationDTO pageMcsInformationDTO); |
| | | |
| | | /** |
| | | * 上架/下架戳戳资讯 |
| | | * @param setShelfForInfoDTO |
| | | * @return |
| | | */ |
| | | R setShelfForMcsInfo(SetShelfForInfoDTO setShelfForInfoDTO); |
| | | |
| | | /** |
| | | * 删除戳戳资讯 |
| | | * @param infoId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R deleteMcsInfo(Long infoId, Long userId); |
| | | |
| | | /** |
| | | * 戳戳资讯顶部统计数据 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R getTopStatistics(Long userId); |
| | | |
| | | /** |
| | | * 新增戳戳资讯 |
| | | * @param mcsInfoDTO |
| | | * @return |
| | | */ |
| | | R addMcsInfo(McsInfoDTO mcsInfoDTO); |
| | | |
| | | /** |
| | | * 编辑戳戳资讯 |
| | | * @param mcsInfoDTO |
| | | * @return |
| | | */ |
| | | R putMcsInfo(McsInfoDTO mcsInfoDTO); |
| | | |
| | | /** |
| | | * 发布戳戳资讯 |
| | | * @param infoId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R publishMcsInfo(Long infoId, Long userId); |
| | | |
| | | /** |
| | | * h5分页查询戳戳资讯 |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | R pageH5McsInfo(PageMcsInformationDTO pageMcsInformationDTO); |
| | | |
| | | /** |
| | | * 资讯详情 |
| | | * @param infoId |
| | | * @return |
| | | */ |
| | | R getMcsInfo(Long infoId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.McsLabel; |
| | | |
| | | /** |
| | | * (McsLabel)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:11 |
| | | */ |
| | | public interface McsLabelService extends IService<McsLabel> { |
| | | |
| | | /** |
| | | * 获取产品标签列表 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R getMcsLabelList(Long userId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.DisableOrEnableMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PutUserInfoDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.McsMerchant; |
| | | |
| | | /** |
| | | * (McsMerchant)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:11 |
| | | */ |
| | | public interface McsMerchantService extends IService<McsMerchant> { |
| | | |
| | | /** |
| | | * 新增数字商业街商家 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | R addMcsMerchant(McsMerchantDTO mcsMerchantDTO); |
| | | |
| | | /** |
| | | * 编辑数字商业街商家 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | R putMcsMerchant(McsMerchantDTO mcsMerchantDTO); |
| | | |
| | | /** |
| | | * 查询数字商业街商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | R getMcsMerchant(Long merchantId); |
| | | |
| | | /** |
| | | * 删除数字商业街商家 |
| | | * @param merchantId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R deleteMcsMerchant(Long merchantId, Long userId); |
| | | |
| | | /** |
| | | * 分页查询数字商业街商家 |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | R pageMcsMerchant(PageMcsMerchantDTO pageMcsMerchantDTO); |
| | | |
| | | /** |
| | | * 禁用/启用数字商业街商家 |
| | | * @param disableOrEnableMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | R disableOrEnableMcsMerchant(DisableOrEnableMcsMerchantDTO disableOrEnableMcsMerchantDTO); |
| | | |
| | | /** |
| | | * 根据account查询微商业街商家信息 |
| | | * @param account |
| | | * @return |
| | | */ |
| | | R getMcsMerchantByAccount(String account); |
| | | |
| | | /** |
| | | * 完成订单更新/新增商家信息 |
| | | * |
| | | * @param orderNo |
| | | * @param configId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R updateOrAddMcsMerchantAfterOrder(String orderNo, Long configId, Long userId); |
| | | |
| | | /** |
| | | * 验证码登录 |
| | | * @param loginDTO |
| | | * @return |
| | | */ |
| | | R loginWithPhone(LoginWithPhoneDTO loginDTO); |
| | | |
| | | /** |
| | | * 首页顶部数据 |
| | | * @return |
| | | */ |
| | | R getMcsIndexTopData(); |
| | | |
| | | /** |
| | | * H5分页查询数字商业街商家 |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | R pageH5McsMerchant(PageMcsMerchantDTO pageMcsMerchantDTO); |
| | | |
| | | /** |
| | | * 修改用戶信息 |
| | | * @param putUserInfoDTO |
| | | * @return |
| | | */ |
| | | R putUserInfo(PutUserInfoDTO putUserInfoDTO); |
| | | |
| | | /** |
| | | * 根据userId获取商家信息 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R retrieveMcsMerchantInfoByUserId(Long userId); |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街商家旗下所有的游戏/资讯全部下架 |
| | | * @return |
| | | */ |
| | | R offResourceForMcsMerchant(); |
| | | } |
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.microCommercialStreet.McsOrderVO; |
| | | import com.panzhihua.service_community.entity.McsOrder; |
| | | |
| | | /** |
| | | * 商业街订单表(McsOrder)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-04 16:10:07 |
| | | */ |
| | | public interface McsOrderService extends IService<McsOrder> { |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 创建订单 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | R insert(McsOrderVO mcsOrderVO); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R detail(Long id); |
| | | |
| | | /** |
| | | * 支付 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | R wxPay(McsOrderVO mcsOrderVO); |
| | | |
| | | /** |
| | | *订单id查询手机号 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R sendContent(Long id); |
| | | |
| | | /** |
| | | *微信支付回调 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | R notify(McsOrderVO mcsOrderVO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.entity.McsProductLabel; |
| | | |
| | | /** |
| | | * (McsProductLabel)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:13 |
| | | */ |
| | | public interface McsProductLabelService extends IService<McsProductLabel> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.DeleteProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForProductDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.McsProduct; |
| | | |
| | | /** |
| | | * (McsProduct)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:12 |
| | | */ |
| | | public interface McsProductService extends IService<McsProduct> { |
| | | |
| | | /** |
| | | * 新增产品信息 |
| | | * @param mcsProductDTO |
| | | * @return |
| | | */ |
| | | R addMcsProduct(McsProductDTO mcsProductDTO); |
| | | |
| | | /** |
| | | * 编辑产品信息 |
| | | * @param mcsProductDTO |
| | | * @return |
| | | */ |
| | | R putMcsProduct(McsProductDTO mcsProductDTO); |
| | | |
| | | /** |
| | | * 删除产品信息 |
| | | * @param deleteProductDTO |
| | | * @return |
| | | */ |
| | | R deleteMcsProduct(DeleteProductDTO deleteProductDTO); |
| | | |
| | | /** |
| | | * 上架/下架产品信息 |
| | | * @param setShelfForProductDTO |
| | | * @return |
| | | */ |
| | | R setShelfForMcsProduct(SetShelfForProductDTO setShelfForProductDTO); |
| | | |
| | | /** |
| | | * 分页查询产品信息 |
| | | * @param pageMcsProductDTO |
| | | * @return |
| | | */ |
| | | R pageMcsProduct(PageMcsProductDTO pageMcsProductDTO); |
| | | |
| | | /** |
| | | * 获取产品信息详情 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | R getMcsProduct(Long productId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageVerifyRecordDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.McsVerifiedRecord; |
| | | |
| | | /** |
| | | * (McsVerifiedRecord)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:14 |
| | | */ |
| | | public interface McsVerifiedRecordService extends IService<McsVerifiedRecord> { |
| | | |
| | | /** |
| | | * 分页查询核销记录 |
| | | * @param pageVerifyRecordDTO |
| | | * @return |
| | | */ |
| | | R pageMcsVerifyRecord(PageVerifyRecordDTO pageVerifyRecordDTO); |
| | | } |
| | |
| | | public R addPhotoClassify(AddEasyPhotoClassifyDTO addPhotoClassify) { |
| | | ComActEasyPhotoClassifyDO photoClassifyDO = |
| | | this.baseMapper.selectOne(new QueryWrapper<ComActEasyPhotoClassifyDO>().lambda() |
| | | .eq(ComActEasyPhotoClassifyDO::getName, addPhotoClassify.getName())); |
| | | .eq(ComActEasyPhotoClassifyDO::getName, addPhotoClassify.getName()).eq(ComActEasyPhotoClassifyDO::getAreaCode,addPhotoClassify.getAreaCode())); |
| | | if (photoClassifyDO != null) { |
| | | return R.fail("该随手拍分类已存在,请勿重复添加"); |
| | | } |
| | |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @Override |
| | | public R listPhotoClassify() { |
| | | return R.ok(this.baseMapper.getPhotoClassifyList()); |
| | | public R listPhotoClassify(String areaCode) { |
| | | return R.ok(this.baseMapper.getPhotoClassifyList(areaCode)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserve; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserveMonth; |
| | | import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterExportVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.service_community.dao.ComActReserveMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveRecordMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private ComActReserveSubMapper comActReserveSubMapper; |
| | | @Resource |
| | | private ComActReserveRecordMapper comActReserveRecordMapper; |
| | | @Resource |
| | | private ComActReserveMapper comActReserveMapper; |
| | | |
| | | /** |
| | | * 导出登记明细数据 |
| | |
| | | return R.ok(resultPage); |
| | | } |
| | | |
| | | @Override |
| | | public R registerDetailedListAdminExport(PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | String communityPhone=comActReserveMapper.selectCommunityPhoneByReserveId(detailedAdminDTO.getReserveId()); |
| | | List<ComActReserveRegisterDetailedVO> comActReserveRegisterDetailedVOS = this.baseMapper.pageRegisterDetailedListAdminExport(detailedAdminDTO); |
| | | if(!comActReserveRegisterDetailedVOS.isEmpty()){ |
| | | List<ReservePdfExportVO> reservePdfExportVOS=new ArrayList<>(); |
| | | comActReserveRegisterDetailedVOS.forEach(comActReserveRegisterDetailedVO -> { |
| | | List<ComActReserveRegisterDetailedAnswerVO> registerDetailedAnswerList = this.baseMapper.getRegisterDetailedAnswerList(comActReserveRegisterDetailedVO.getId()); |
| | | if(!registerDetailedAnswerList.isEmpty()){ |
| | | ReservePdfExportVO reservePdfExportVO=new ReservePdfExportVO(); |
| | | reservePdfExportVO.setAddress(registerDetailedAnswerList.get(0).getAnswerContent()); |
| | | reservePdfExportVO.setSign(registerDetailedAnswerList.get(1).getAnswerContent()); |
| | | if(detailedAdminDTO.getPdfType()==1){ |
| | | reservePdfExportVO.setTime(registerDetailedAnswerList.get(2).getAnswerContent()); |
| | | } |
| | | if(detailedAdminDTO.getPdfType()==2){ |
| | | reservePdfExportVO.setPhone(registerDetailedAnswerList.get(2).getAnswerContent()); |
| | | reservePdfExportVO.setTime(registerDetailedAnswerList.get(3).getAnswerContent()); |
| | | reservePdfExportVO.setCommunityPhone(communityPhone); |
| | | } |
| | | reservePdfExportVOS.add(reservePdfExportVO); |
| | | } |
| | | }); |
| | | return R.ok(reservePdfExportVOS); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询居家隔离统计 |
| | | * @param detailedAdminDTO |
| | |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.model.dtos.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveIndexVo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.IndexBackReserve; |
| | |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubSelectionVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActReserveMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveSubMapper; |
| | |
| | | import com.panzhihua.service_community.service.ComActReserveSubSelectionService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.security.InvalidKeyException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.crypto.BadPaddingException; |
| | | import javax.crypto.IllegalBlockSizeException; |
| | | import javax.crypto.NoSuchPaddingException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | private ComActReserveSubSelectionService comActReserveSubSelectionService; |
| | | @Resource |
| | | private ComActReserveRecordService comActReserveRecordService; |
| | | @Resource |
| | | private ComMngPopulationDAO comMngPopulationDAO; |
| | | @Resource |
| | | private ComMngPopulationHouseDAO comMngPopulationHouseDAO; |
| | | @Resource |
| | | private ComMngPopulationCommunityTagsDAO comMngPopulationCommunityTagsDAO; |
| | | @Resource |
| | | private ComMngPopulationHouseUserDAO comMngPopulationHouseUserDAO; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | | private final static String COMMIT="用户已提交"; |
| | | @Override |
| | | @Transactional |
| | | public R commit(ComActReserveCommitVO comActReserveCommitVO) { |
| | | if(comActReserveCommitVO!=null){ |
| | | ComMngPopulationHouseDO comMngPopulationHouseDO=new ComMngPopulationHouseDO(); |
| | | Long userId=comActReserveCommitVO.getUserId(); |
| | | Date nowDate=DateUtil.date(); |
| | | //查询预约登记记录 |
| | |
| | | return R.fail("预约已上限"); |
| | | } |
| | | } |
| | | |
| | | if(comActReserveCommitVO.getRecordId()!=null){ |
| | | comActReserveRecordMapper.deleteById(comActReserveCommitVO.getRecordId()); |
| | | comActReserveDO.setJoinCount(comActReserveDO.getJoinCount()-1); |
| | | } |
| | | List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId()).eq("user_id",comActReserveCommitVO.getUserId()).in("status",1,2,3)); |
| | | if(!list.isEmpty()&&list.size()>1&&comActReserveDO.getIsRepeat()==ComActReserveDO.isRepeat.no){ |
| | | return R.fail("提交失败,不可重复预约"); |
| | |
| | | else { |
| | | List<QuestnaiteSubVO> questnaiteSubVOS = JSON.parseArray(comActReserveCommitVO.getJsonObject(),QuestnaiteSubVO.class); |
| | | if(!questnaiteSubVOS.isEmpty()){ |
| | | String idCard=""; |
| | | String houseId=""; |
| | | String phone=""; |
| | | Long questId=comActReserveCommitVO.getId(); |
| | | List<ComActReserveAnswerContentDO> answerContentList=new ArrayList<>(); |
| | | for(QuestnaiteSubVO questnaiteSub:questnaiteSubVOS){ |
| | |
| | | answerContentDO.setAnswerContent(subSelectionDO.getContent()); |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | }else{ |
| | | } |
| | | else{ |
| | | //文字描述不做处理 |
| | | if(!questnaiteSub.getType().equals(QuestnaiteSubVO.type.describe)){ |
| | | if(!questnaiteSub.getType().equals(QuestnaiteSubVO.type.describe)&&!questnaiteSub.getType().equals(QuestnaiteSubVO.type.address)){ |
| | | //问答题处理 |
| | | String values = questnaiteSub.getValues(); |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | |
| | | answerContentDO.setAnswerContent(values); |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | if(questnaiteSub.getType().equals(QuestnaiteSubVO.type.card)){ |
| | | idCard=questnaiteSub.getValues(); |
| | | } |
| | | if(questnaiteSub.getType().equals(QuestnaiteSubVO.type.phone)){ |
| | | phone=questnaiteSub.getValues(); |
| | | } |
| | | if(questnaiteSub.getType().equals(QuestnaiteSubVO.type.address)){ |
| | | houseId=questnaiteSub.getValues(); |
| | | comMngPopulationHouseDO=comMngPopulationHouseDAO.selectById(houseId); |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | | answerContentDO.setUserId(userId); |
| | | answerContentDO.setCreateAt(nowDate); |
| | | answerContentDO.setCreateBy(userId); |
| | | answerContentDO.setReserveSubId(queSubId); |
| | | answerContentDO.setType(2); |
| | | if(comMngPopulationHouseDO!=null){ |
| | | answerContentDO.setAnswerContent(comMngPopulationHouseDO.getAddress()); |
| | | } |
| | | else { |
| | | answerContentDO.setAnswerContent(""); |
| | | } |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | } |
| | | } |
| | | if(!answerContentList.isEmpty()){ |
| | | //判断实有人口情况 |
| | | if(StringUtils.isNotEmpty(idCard)&&StringUtils.isNotEmpty(houseId)){ |
| | | Integer count=comMngPopulationDAO.selectCount(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getCardNoStr,idCard)); |
| | | if(count==0){ |
| | | ComMngPopulationDO comMngPopulationDO=savePopulation(idCard); |
| | | if(comMngPopulationHouseDO!=null){ |
| | | comMngPopulationDO.setId(Snowflake.getId()); |
| | | comMngPopulationDO.setAddress(comMngPopulationHouseDO.getAddress()); |
| | | comMngPopulationDO.setActId(comMngPopulationHouseDO.getCommunityId()); |
| | | comMngPopulationDO.setStreetId(comMngPopulationHouseDO.getStreetId()); |
| | | comMngPopulationDO.setVillageId(comMngPopulationHouseDO.getVillageId()); |
| | | comMngPopulationDO.setHouseId(comMngPopulationHouseDO.getId()); |
| | | comMngPopulationDO.setOutOrLocal(1); |
| | | comMngPopulationDO.setPhone(phone); |
| | | comMngPopulationDO.setName(comActReserveCommitVO.getName()); |
| | | comMngPopulationDO.setRoad(comMngPopulationHouseDO.getAlley()); |
| | | comMngPopulationDO.setDoorNo(comMngPopulationHouseDO.getHouseNum()); |
| | | comMngPopulationDO.setFloor(comMngPopulationHouseDO.getFloor()); |
| | | comMngPopulationDO.setUnitNo(comMngPopulationHouseDO.getUnitNo()); |
| | | comMngPopulationDO.setHouseNo(comMngPopulationHouseDO.getHouseNo()); |
| | | comMngPopulationDAO.insert(comMngPopulationDO); |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO=new ComMngPopulationCommunityTagsDO(); |
| | | comMngPopulationCommunityTagsDO.setCommunityId(comMngPopulationDO.getActId()); |
| | | comMngPopulationCommunityTagsDO.setPopulationId(comMngPopulationDO.getId()); |
| | | comMngPopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | comMngPopulationCommunityTagsDO.setCreateAt(new Date()); |
| | | comMngPopulationCommunityTagsDAO.insert(comMngPopulationCommunityTagsDO); |
| | | ComMngPopulationHouseUserDO comMngPopulationHouseUserDO=new ComMngPopulationHouseUserDO(); |
| | | comMngPopulationHouseUserDO.setId(Snowflake.getId()); |
| | | comMngPopulationHouseUserDO.setPopulId(comMngPopulationDO.getId()); |
| | | comMngPopulationHouseUserDO.setHouseId(Long.parseLong(houseId)); |
| | | comMngPopulationHouseUserDO.setRelation(1); |
| | | comMngPopulationHouseUserDO.setRelationId(1); |
| | | comMngPopulationHouseUserDO.setResidence(1); |
| | | comMngPopulationHouseUserDO.setCreateAt(new Date()); |
| | | comMngPopulationHouseUserDAO.insert(comMngPopulationHouseUserDO); |
| | | } |
| | | } |
| | | } |
| | | //更新回答用户数量 |
| | | Integer joinCount = comActReserveDO.getJoinCount(); |
| | | comActReserveDO.setJoinCount(joinCount != null ? joinCount + 1 : 1); |
| | |
| | | return null; |
| | | } |
| | | |
| | | public ComMngPopulationDO savePopulation(String idCard){ |
| | | ComMngPopulationDO comMngPopulationDO=new ComMngPopulationDO(); |
| | | comMngPopulationDO.setDeath("1"); |
| | | comMngPopulationDO.setCardNoStr(idCard); |
| | | comMngPopulationDO.setCardNo(idCard); |
| | | comMngPopulationDO.setSex(getSex(idCard)); |
| | | comMngPopulationDO.setBirthday(getBirthday(idCard)); |
| | | return comMngPopulationDO; |
| | | } |
| | | public Integer getSex(String idCard){ |
| | | char c = idCard.charAt(idCard.length() - 2); |
| | | Integer gender = Integer.parseInt(String.valueOf(c)); |
| | | if(gender % 2 == 1){ |
| | | return 1; |
| | | }else{ |
| | | return 2; |
| | | } |
| | | } |
| | | public String getBirthday(String idCard){ |
| | | return idCard.substring(6).substring(0, 4)+"-"+idCard.substring(10).substring(0, 2)+"-"+idCard.substring(12).substring(0,2); |
| | | } |
| | | |
| | | |
| | | public static void getFileByBytes(byte[] bytes, String filePath, String fileName) { |
| | | BufferedOutputStream bos = null; |
| | |
| | | return R.fail("该办事指南分类不存在"); |
| | | } |
| | | ComActWorkGuideClassifyDO checkCreditCode = comActWorkGuideClassifyDAO.selectOne( |
| | | new QueryWrapper<ComActWorkGuideClassifyDO>().lambda().eq(ComActWorkGuideClassifyDO::getClassifyName, comActWorkGuideClassifyVO.getClassifyName())); |
| | | new QueryWrapper<ComActWorkGuideClassifyDO>().lambda() |
| | | .eq(ComActWorkGuideClassifyDO::getClassifyName, comActWorkGuideClassifyVO.getClassifyName()) |
| | | .eq(ComActWorkGuideClassifyDO::getAreaCode, comActWorkGuideClassifyVO.getAreaCode())); |
| | | if (null != checkCreditCode && !comActWorkGuideClassifyDO.getId().equals(checkCreditCode.getId())) { |
| | | return R.fail("该办事指南分类已存在,办事指南分类名称重复"); |
| | | } |
| | |
| | | } else { |
| | | // 新增 |
| | | Integer count = comActWorkGuideClassifyDAO.selectCount( |
| | | new QueryWrapper<ComActWorkGuideClassifyDO>().lambda().eq(ComActWorkGuideClassifyDO::getClassifyName, comActWorkGuideClassifyVO.getClassifyName())); |
| | | new QueryWrapper<ComActWorkGuideClassifyDO>().lambda() |
| | | .eq(ComActWorkGuideClassifyDO::getClassifyName, comActWorkGuideClassifyVO.getClassifyName()) |
| | | .eq(ComActWorkGuideClassifyDO::getAreaCode, comActWorkGuideClassifyVO.getAreaCode())); |
| | | if (count > 0) { |
| | | return R.fail("该办事指南分类已存在,办事指南分类名称重复"); |
| | | } |
| | |
| | | List<ComMngCarDO> existList = comMngCarDAO.selectList( |
| | | new QueryWrapper<ComMngCarDO>().lambda().eq(ComMngCarDO::getPlateNum, comMngCarSaveDTO.getPlateNum())); |
| | | if (!existList.isEmpty()) { |
| | | return R.ok("车辆已存在"); |
| | | return R.fail("车辆已存在"); |
| | | } |
| | | } |
| | | ComMngVillageDO comMngVillageDO = comMngVillageDAO.selectById(comMngCarSaveDTO.getAreaId()); |
| | |
| | | () -> new TreeSet<>(Comparator.comparing(o -> o.getAlley() + ";" + o.getHouseNum()))), |
| | | ArrayList::new)); |
| | | cascadeHouseVOList.forEach(cascade -> { |
| | | cascade.setName(cascade.getHouseNum()); |
| | | cascade.setName(cascade.getHouseNum()+"("+cascade.getName()+")"); |
| | | }); |
| | | } |
| | | break; |
| | |
| | | } |
| | | } |
| | | |
| | | if(comMngPopulationVO.getType()!=null){ |
| | | switch (comMngPopulationVO.getType()){ |
| | | case 1 : comMngPopulationVO.setAgeStart("80"); |
| | | comMngPopulationVO.setAgeEnd("89"); |
| | | break; |
| | | case 2 : comMngPopulationVO.setAgeStart("90"); |
| | | comMngPopulationVO.setAgeEnd("99"); |
| | | break; |
| | | case 3 : comMngPopulationVO.setAgeStart("100"); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(comMngPopulationVO.getAgeStart())) { |
| | | String ageStartTime = DateUtils.getDateFormatString( |
| | | DateUtils.yearAddNum(new Date(), -(Integer.parseInt(comMngPopulationVO.getAgeStart()))), "yyyy-MM-dd"); |
| | |
| | | populDO.setPoliticalOutlookName( |
| | | PopulPoliticalOutlookEnum.getCnDescByName(populDO.getPoliticalOutlook())); |
| | | populDO.setMarriageName(PopulMarriageEnum.getCnDescByName(populDO.getMarriage())); |
| | | if(populDO.getAge()>=80&&populDO.getAge()<=89){ |
| | | populDO.setType(1); |
| | | } |
| | | if(populDO.getAge()>=90&&populDO.getAge()<=99){ |
| | | populDO.setType(2); |
| | | } |
| | | if(populDO.getAge()>=100){ |
| | | populDO.setType(3); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R exportOld(ComMngPopulationDTO comMngPopulationVO) { |
| | | if (StringUtils.isNotEmpty(comMngPopulationVO.getAgeStart())) { |
| | | String ageStartTime = DateUtils.getDateFormatString( |
| | | DateUtils.yearAddNum(new Date(), -(Integer.parseInt(comMngPopulationVO.getAgeStart()))), "yyyy-MM-dd"); |
| | | if (StringUtils.isNotEmpty(ageStartTime)) { |
| | | comMngPopulationVO.setAgeStartTime(ageStartTime); |
| | | } |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(comMngPopulationVO.getAgeEnd())) { |
| | | String ageEndTime = DateUtils.getDateFormatString( |
| | | DateUtils.yearAddNum(new Date(), -(Integer.parseInt(comMngPopulationVO.getAgeEnd()))), "yyyy-MM-dd"); |
| | | if (StringUtils.isNotEmpty(ageEndTime)) { |
| | | comMngPopulationVO.setAgeEndTime(ageEndTime); |
| | | } |
| | | } |
| | | if (comMngPopulationVO.getAgeStartTime() != null && !"".equals(comMngPopulationVO.getAgeStartTime()) |
| | | && comMngPopulationVO.getAgeEndTime() != null && !"".equals(comMngPopulationVO.getAgeEndTime())) { |
| | | if (comMngPopulationVO.getAgeStartTime().equals(comMngPopulationVO.getAgeEndTime())) { |
| | | Date endAge = |
| | | DateUtils.stringToDate(comMngPopulationVO.getAgeEndTime(), new SimpleDateFormat("yyyy-MM-dd")); |
| | | String ageStartTime = DateUtils.getDateFormatString(DateUtils.yearAddNum(endAge, -1), "yyyy-MM-dd"); |
| | | if (StringUtils.isNotEmpty(ageStartTime)) { |
| | | comMngPopulationVO.setAgeStartTimeEnd(ageStartTime); |
| | | } |
| | | } else { |
| | | Date endAge = |
| | | DateUtils.stringToDate(comMngPopulationVO.getAgeEndTime(), new SimpleDateFormat("yyyy-MM-dd")); |
| | | String ageStartTime = DateUtils.getDateFormatString(DateUtils.yearAddNum(endAge, -1), "yyyy-MM-dd"); |
| | | if (StringUtils.isNotEmpty(ageStartTime)) { |
| | | comMngPopulationVO.setAgeEndTimeEnd(ageStartTime); |
| | | } |
| | | } |
| | | } |
| | | List<ComMngPopulationVO> comMngPopulationVOS=this.comMngPopulationDAO.exportOld(comMngPopulationVO); |
| | | if(!comMngPopulationVOS.isEmpty()){ |
| | | comMngPopulationVOS.forEach(populDO -> { |
| | | if (StringUtils.isNotEmpty(populDO.getBirthday())) { |
| | | populDO.setAge(AgeUtils.getAgeFromBirthTimes(populDO.getBirthday())); |
| | | populDO.setRelationName(PopulRelationEnum.getCnDescByName(populDO.getRelation())); |
| | | populDO.setCultureLevelName(PopulCultureLevelEnum.getCnDescByName(populDO.getCultureLevel())); |
| | | populDO.setPoliticalOutlookName( |
| | | PopulPoliticalOutlookEnum.getCnDescByName(populDO.getPoliticalOutlook())); |
| | | populDO.setMarriageName(PopulMarriageEnum.getCnDescByName(populDO.getMarriage())); |
| | | if(populDO.getAge()>=80&&populDO.getAge()<=89){ |
| | | populDO.setType(1); |
| | | } |
| | | if(populDO.getAge()>=90&&populDO.getAge()<=99){ |
| | | populDO.setType(2); |
| | | } |
| | | if(populDO.getAge()>=100){ |
| | | populDO.setType(3); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(comMngPopulationVOS); |
| | | } |
| | | |
| | | /** |
| | |
| | | private ComMngPopulationDO updatePopulationDO(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO, |
| | | Long communityId, Long userId) { |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | Integer personType = vo.getPersonType(); |
| | | if (nonNull(personType)) { |
| | | populationDO.setPersonType(personType.toString()); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | ComMngVillageDO comMngVillageDO, Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | Integer personType = vo.getPersonType(); |
| | | if (nonNull(personType)) { |
| | | populationDO.setPersonType(personType.toString()); |
| | | } |
| | | populationDO.setId(Snowflake.getId()); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | |
| | | return R.ok(indexInfo); |
| | | } |
| | | |
| | | /** |
| | | * 历史数据人员类型填充 |
| | | * @param list |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R filledPopulationPersonType(List<ComMngPopulationServeExcelVO> list, Long communityId, Long userId) { |
| | | // 需要修改的人口集合 |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationMistakeExcelVO> mistakes = new ArrayList<>(); |
| | | try { |
| | | // 查询所有人口数据放入HashMap中 |
| | | List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null); |
| | | HashMap<String, Object> populationMap = new HashMap<>(); |
| | | populationList.forEach(population -> { |
| | | String key = population.getCardNo(); |
| | | populationMap.put(key, population); |
| | | }); |
| | | for (ComMngPopulationServeExcelVO vo : list) { |
| | | // 判断实有人口是否已存在 |
| | | log.info("开始查询实有人口是否已存在"); |
| | | ComMngPopulationDO populationDO = null; |
| | | String populationKey = vo.getCardNo(); |
| | | if (!isOnly(populationKey, populationMap)) { |
| | | // 存在实有人口信息,则更新人员类型 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | Integer personType = vo.getPersonType(); |
| | | if (nonNull(personType)) { |
| | | populationDO.setPersonType(personType.toString()); |
| | | } |
| | | updateList.add(populationDO); |
| | | } else { |
| | | // 不存在实有人口,返回 |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("人口信息不存在,请下载实有人口模板导入"); |
| | | mistakes.add(mistake); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | | } |
| | | if (!updateList.isEmpty()) { |
| | | log.info("执行数据库更新人口"); |
| | | this.baseMapper.updateAll(updateList); |
| | | log.info("数据库更新人口完成"); |
| | | } |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("返回错误数据"); |
| | | return R.fail(mistakes); |
| | | } |
| | | return R.ok(mistakes); |
| | | } |
| | | |
| | | private void setMistake(ComMngPopulationMistakeExcelVO mvo, ComMngPopulationServeExcelVO vo) { |
| | | mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook())); |
| | | mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent())); |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerErrorExcelVO; |
| | | import com.panzhihua.common.model.vos.community.volunteer.ComMngVolunteerExcelVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerOrgTeamMapper; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerSkillMapper; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerOrgTeam; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerSkill; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | public class ComMngVolunteerMngServiceImpl implements ComMngVolunteerMngService { |
| | | @Resource |
| | | private ComMngVolunteerMngDAO comMngVolunteerMngDAO; |
| | | @Resource |
| | | private ComMngVolunteerOrgTeamMapper comMngVolunteerOrgTeamMapper; |
| | | @Resource |
| | | private ComMngVolunteerSkillMapper comMngVolunteerSkillMapper; |
| | | |
| | | /** |
| | | * 增加志愿者 |
| | |
| | | page.setCurrent(pageNum); |
| | | IPage<ComMngVolunteerMngVO> iPage = comMngVolunteerMngDAO.pageVolunteer(page, comMngVolunteerMngVO); |
| | | iPage.getRecords().forEach(record -> { |
| | | record.setPhone(SensitiveUtil.desensitizedPhoneNumber(record.getPhone())); |
| | | if(StringUtils.isNotEmpty(record.getIdCard())){ |
| | | record.setAge(IdcardUtil.getAgeByIdCard(record.getIdCard())); |
| | | } |
| | | }); |
| | | return R.ok(iPage); |
| | | } |
| | |
| | | BeanUtils.copyProperties(comMngVolunteerMngDO, vo); |
| | | return R.ok(vo); |
| | | } |
| | | |
| | | /** |
| | | * 志愿者导入 |
| | | * |
| | | * @param list 志愿者数据列表 |
| | | * @param communityId 社区id |
| | | * @param userId 用户id |
| | | * @return 导入结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R importVolunteerAdmin(List<ComMngVolunteerExcelVO> list, Long communityId, Long userId){ |
| | | //错误集合 |
| | | List<ComMngVolunteerErrorExcelVO> errorList = new ArrayList<>(); |
| | | for (ComMngVolunteerExcelVO excel : list) { |
| | | //查询组织 |
| | | ComMngVolunteerOrgTeam orgVo = comMngVolunteerOrgTeamMapper.selectOne(new QueryWrapper<ComMngVolunteerOrgTeam>().lambda() |
| | | .eq(ComMngVolunteerOrgTeam::getName,excel.getOrgName()).eq(ComMngVolunteerOrgTeam::getCommunityId,communityId) |
| | | .eq(ComMngVolunteerOrgTeam::getParentId,0)); |
| | | if(orgVo == null){ |
| | | ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | BeanUtils.copyProperties(excel,errorExcelVO); |
| | | errorExcelVO.setError("该志愿者组织不存在,请先通过后台添加该志愿者组织"); |
| | | errorList.add(errorExcelVO); |
| | | continue; |
| | | } |
| | | //查询队伍 |
| | | ComMngVolunteerOrgTeam teamVo = comMngVolunteerOrgTeamMapper.selectOne(new QueryWrapper<ComMngVolunteerOrgTeam>().lambda() |
| | | .eq(ComMngVolunteerOrgTeam::getName,excel.getTeamName()).eq(ComMngVolunteerOrgTeam::getCommunityId,communityId) |
| | | .eq(ComMngVolunteerOrgTeam::getParentId,orgVo.getId())); |
| | | if(teamVo == null){ |
| | | ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | BeanUtils.copyProperties(excel,errorExcelVO); |
| | | errorExcelVO.setError("该志愿者队伍不存在,请先通过后台添加该志愿者队伍"); |
| | | errorList.add(errorExcelVO); |
| | | continue; |
| | | } |
| | | //查询技能 |
| | | ComMngVolunteerSkill skillVo = comMngVolunteerSkillMapper.selectOne(new QueryWrapper<ComMngVolunteerSkill>().lambda() |
| | | .eq(ComMngVolunteerSkill::getName,excel.getSkillName()).eq(ComMngVolunteerSkill::getCommunityId,communityId)); |
| | | if(skillVo == null){ |
| | | ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | BeanUtils.copyProperties(excel,errorExcelVO); |
| | | errorExcelVO.setError("该志愿者技能不存在,请先通过后台添加该志愿者技能"); |
| | | errorList.add(errorExcelVO); |
| | | continue; |
| | | } |
| | | Date nowDate = new Date(); |
| | | ComMngVolunteerMngDO comMngVolunteerMngDO = comMngVolunteerMngDAO.selectOne(new QueryWrapper<ComMngVolunteerMngDO>().lambda() |
| | | .eq(ComMngVolunteerMngDO::getIdCard,excel.getIdCard()).in(ComMngVolunteerMngDO::getState,1,2)); |
| | | if(comMngVolunteerMngDO != null){ |
| | | if(comMngVolunteerMngDO.getState().equals(1)){ |
| | | BeanUtils.copyProperties(excel,comMngVolunteerMngDO); |
| | | comMngVolunteerMngDO.setState(2); |
| | | comMngVolunteerMngDO.setOrgId(orgVo.getId()); |
| | | comMngVolunteerMngDO.setTeamId(teamVo.getId()); |
| | | comMngVolunteerMngDO.setSkillId(skillVo.getId()); |
| | | comMngVolunteerMngDAO.updateById(comMngVolunteerMngDO); |
| | | }else{ |
| | | ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | BeanUtils.copyProperties(excel,errorExcelVO); |
| | | errorExcelVO.setError("该志愿者已存在,不可重复添加"); |
| | | errorList.add(errorExcelVO); |
| | | } |
| | | }else{ |
| | | comMngVolunteerMngDO = new ComMngVolunteerMngDO(); |
| | | BeanUtils.copyProperties(excel,comMngVolunteerMngDO); |
| | | comMngVolunteerMngDO.setCommunityId(communityId); |
| | | comMngVolunteerMngDO.setState(2); |
| | | comMngVolunteerMngDO.setOrgId(orgVo.getId()); |
| | | comMngVolunteerMngDO.setTeamId(teamVo.getId()); |
| | | comMngVolunteerMngDO.setSkillId(skillVo.getId()); |
| | | comMngVolunteerMngDO.setCreateAt(nowDate); |
| | | //查询用户id,如果存在则需要绑定 |
| | | Long volunteerUserId = comMngVolunteerMngDAO.selectUserIdByIdCard(excel.getIdCard()); |
| | | if(volunteerUserId != null){ |
| | | comMngVolunteerMngDO.setSubmitUserId(volunteerUserId); |
| | | } |
| | | comMngVolunteerMngDAO.insert(comMngVolunteerMngDO); |
| | | } |
| | | } |
| | | if(errorList.size() > 0){ |
| | | return R.fail(errorList); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerOrgTeamVo; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerMngDAO; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerOrgTeamMapper; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerMngDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerOrgTeam; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerOrgTeamService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 志愿者组织队伍表(ComMngVolunteerOrgTeam)表服务实现类 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:32:54 |
| | | */ |
| | | @Service("comMngVolunteerOrgTeamService") |
| | | public class ComMngVolunteerOrgTeamServiceImpl extends ServiceImpl<ComMngVolunteerOrgTeamMapper, ComMngVolunteerOrgTeam> implements ComMngVolunteerOrgTeamService { |
| | | |
| | | @Resource |
| | | private ComMngVolunteerMngDAO comMngVolunteerMngDAO; |
| | | |
| | | |
| | | /** |
| | | * 通过ID查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 实例对象 |
| | | */ |
| | | @Override |
| | | public R queryById(Long id) { |
| | | return R.ok(this.baseMapper.queryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param comMngVolunteerOrgTeam 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | @Override |
| | | public R queryByPage(PageComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam) { |
| | | return R.ok(this.baseMapper.queryAllByLimit(comMngVolunteerOrgTeam,new Page(comMngVolunteerOrgTeam.getPageNum(), comMngVolunteerOrgTeam.getPageSize()))); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comMngVolunteerOrgTeam 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | @Override |
| | | public R insert(AddComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam) { |
| | | ComMngVolunteerOrgTeam entity = new ComMngVolunteerOrgTeam(); |
| | | BeanUtils.copyProperties(comMngVolunteerOrgTeam, entity); |
| | | if (this.baseMapper.insert(entity) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param editDto 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | @Override |
| | | public R update(EditComMngVolunteerOrgTeamDto editDto) { |
| | | ComMngVolunteerOrgTeam entity = this.baseMapper.selectById(editDto.getId()); |
| | | if(entity == null){ |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | BeanUtils.copyProperties(editDto, entity); |
| | | if (this.baseMapper.updateById(entity) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败"); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 是否成功 |
| | | */ |
| | | @Override |
| | | public R deleteById(Long id) { |
| | | ComMngVolunteerOrgTeam volunteerOrgTeam = this.baseMapper.selectById(id); |
| | | if(volunteerOrgTeam != null){ |
| | | //组织 |
| | | if(volunteerOrgTeam.getParentId().equals(0L)){ |
| | | Integer count = this.baseMapper.selectCount(new QueryWrapper<ComMngVolunteerOrgTeam>().lambda() |
| | | .eq(ComMngVolunteerOrgTeam::getParentId,id)); |
| | | if(count > 0){ |
| | | return R.fail("内容已引用,无法删除!"); |
| | | } |
| | | Integer volunteerCount = comMngVolunteerMngDAO.selectCount(new QueryWrapper<ComMngVolunteerMngDO>().lambda() |
| | | .eq(ComMngVolunteerMngDO::getOrgId,id).ne(ComMngVolunteerMngDO::getState,3)); |
| | | if(volunteerCount > 0){ |
| | | return R.fail("内容已引用,无法删除!"); |
| | | } |
| | | }else{//队伍 |
| | | Integer volunteerCount = comMngVolunteerMngDAO.selectCount(new QueryWrapper<ComMngVolunteerMngDO>().lambda() |
| | | .eq(ComMngVolunteerMngDO::getTeamId,id).ne(ComMngVolunteerMngDO::getState,3)); |
| | | if(volunteerCount > 0){ |
| | | return R.fail("内容已引用,无法删除!"); |
| | | } |
| | | } |
| | | } |
| | | if(this.baseMapper.deleteById(id) > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者组织列表 |
| | | * @param comMngVolunteerOrgTeam 请求参数 |
| | | * @return 志愿者组织列表 |
| | | */ |
| | | @Override |
| | | public R queryByList(PageComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam){ |
| | | //查询所有组织列表 |
| | | List<ComMngVolunteerOrgTeamVo> orgList = this.baseMapper.queryAll(comMngVolunteerOrgTeam); |
| | | for (ComMngVolunteerOrgTeamVo org : orgList) { |
| | | comMngVolunteerOrgTeam = new PageComMngVolunteerOrgTeamDto(); |
| | | comMngVolunteerOrgTeam.setParentId(org.getId()); |
| | | comMngVolunteerOrgTeam.setCommunityId(org.getCommunityId()); |
| | | List<ComMngVolunteerOrgTeamVo> teamList = this.baseMapper.queryAll(comMngVolunteerOrgTeam); |
| | | if(!teamList.isEmpty()){ |
| | | org.setChildList(teamList); |
| | | } |
| | | } |
| | | return R.ok(orgList); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-志愿者组织统计 |
| | | * @param communityId 社区id |
| | | * @return 志愿者组织统计 |
| | | */ |
| | | @Override |
| | | public R statisticsVolunteerOrgAdmin(Long communityId){ |
| | | return R.ok(this.baseMapper.statisticsVolunteerOrgAdmin(communityId)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerOrgTeamMapper; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerServiceTypeMapper; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerOrgTeam; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerServiceType; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerServiceTypeService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 志愿者服务类型表(ComMngVolunteerServiceType)表服务实现类 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:10 |
| | | */ |
| | | @Service("comMngVolunteerServiceTypeService") |
| | | public class ComMngVolunteerServiceTypeServiceImpl extends ServiceImpl<ComMngVolunteerServiceTypeMapper, ComMngVolunteerServiceType> implements ComMngVolunteerServiceTypeService { |
| | | |
| | | @Resource |
| | | private ComMngVolunteerOrgTeamMapper comMngVolunteerOrgTeamMapper; |
| | | |
| | | /** |
| | | * 通过ID查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 实例对象 |
| | | */ |
| | | @Override |
| | | public R queryById(Long id) { |
| | | return R.ok(this.baseMapper.queryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param comMngVolunteerServiceType 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | @Override |
| | | public R queryByPage(PageComMngVolunteerServiceTypeDto comMngVolunteerServiceType) { |
| | | return R.ok(this.baseMapper.queryAllByLimit(comMngVolunteerServiceType,new Page(comMngVolunteerServiceType.getPageNum(), comMngVolunteerServiceType.getPageSize()))); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comMngVolunteerServiceType 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | @Override |
| | | public R insert(AddComMngVolunteerServiceTypeDto comMngVolunteerServiceType) { |
| | | ComMngVolunteerServiceType entity = new ComMngVolunteerServiceType(); |
| | | BeanUtils.copyProperties(comMngVolunteerServiceType, entity); |
| | | entity.setCreateAt(new Date()); |
| | | entity.setCreateBy(comMngVolunteerServiceType.getUserId()); |
| | | if (this.baseMapper.insert(entity) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param editDto 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | @Override |
| | | public R update(EditComMngVolunteerServiceTypeDto editDto) { |
| | | ComMngVolunteerServiceType entity = this.baseMapper.selectById(editDto.getId()); |
| | | if (entity == null) { |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | BeanUtils.copyProperties(editDto, entity); |
| | | entity.setUpdateAt(new Date()); |
| | | entity.setUpdateBy(editDto.getUserId()); |
| | | if (this.baseMapper.updateById(entity) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败"); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 是否成功 |
| | | */ |
| | | @Override |
| | | public R deleteById(Long id) { |
| | | Integer count = comMngVolunteerOrgTeamMapper.selectCount(new QueryWrapper<ComMngVolunteerOrgTeam>().lambda() |
| | | .eq(ComMngVolunteerOrgTeam::getServiceTypeId,id)); |
| | | if(count > 0){ |
| | | return R.fail("该分类名称已被引用,无法删除!"); |
| | | } |
| | | if (this.baseMapper.deleteById(id) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者服务类型列表 |
| | | * @param comMngVolunteerServiceType 请求参数 |
| | | * @return 志愿者服务列表 |
| | | */ |
| | | @Override |
| | | public R queryByList(PageComMngVolunteerServiceTypeDto comMngVolunteerServiceType){ |
| | | return R.ok(this.baseMapper.queryAll(comMngVolunteerServiceType)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.common.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerMngDAO; |
| | | import com.panzhihua.service_community.dao.ComMngVolunteerSkillMapper; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerMngDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerSkill; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerSkillService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 志愿者技能表(ComMngVolunteerSkill)表服务实现类 |
| | | * |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:37 |
| | | */ |
| | | @Service("comMngVolunteerSkillService") |
| | | public class ComMngVolunteerSkillServiceImpl extends ServiceImpl<ComMngVolunteerSkillMapper, ComMngVolunteerSkill> implements ComMngVolunteerSkillService { |
| | | |
| | | @Resource |
| | | private ComMngVolunteerMngDAO comMngVolunteerMngDAO; |
| | | |
| | | |
| | | /** |
| | | * 通过ID查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 实例对象 |
| | | */ |
| | | @Override |
| | | public R queryById(Long id) { |
| | | return R.ok(this.baseMapper.queryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param comMngVolunteerSkill 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | @Override |
| | | public R queryByPage(PageComMngVolunteerSkillDto comMngVolunteerSkill) { |
| | | return R.ok(this.baseMapper.queryAllByLimit(comMngVolunteerSkill,new Page(comMngVolunteerSkill.getPageNum(), comMngVolunteerSkill.getPageSize()))); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comMngVolunteerSkill 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | @Override |
| | | public R insert(AddComMngVolunteerSkillDto comMngVolunteerSkill) { |
| | | ComMngVolunteerSkill entity = new ComMngVolunteerSkill(); |
| | | BeanUtils.copyProperties(comMngVolunteerSkill, entity); |
| | | entity.setCreateBy(comMngVolunteerSkill.getUserId()); |
| | | entity.setCreateAt(new Date()); |
| | | if (this.baseMapper.insert(entity) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param editDto 实例对象 |
| | | * @return 实例对象 |
| | | */ |
| | | @Override |
| | | public R update(EditComMngVolunteerSkillDto editDto) { |
| | | ComMngVolunteerSkill entity = this.baseMapper.selectById(editDto.getId()); |
| | | if (entity == null) { |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | BeanUtils.copyProperties(editDto, entity); |
| | | entity.setUpdateAt(new Date()); |
| | | entity.setUpdateBy(editDto.getUserId()); |
| | | if (this.baseMapper.updateById(entity) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败"); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 是否成功 |
| | | */ |
| | | @Override |
| | | public R deleteById(Long id) { |
| | | Integer count = comMngVolunteerMngDAO.selectCount(new QueryWrapper<ComMngVolunteerMngDO>().lambda() |
| | | .eq(ComMngVolunteerMngDO::getSkillId,id).ne(ComMngVolunteerMngDO::getState,3)); |
| | | if(count > 0){ |
| | | return R.fail("该技能已被引用,无法删除!"); |
| | | } |
| | | if (this.baseMapper.deleteById(id) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-查询志愿者技能列表 |
| | | * @param comMngVolunteerSkill 请求参数 |
| | | * @return 志愿者技能列表 |
| | | */ |
| | | @Override |
| | | public R queryByList(PageComMngVolunteerSkillDto comMngVolunteerSkill){ |
| | | return R.ok(this.baseMapper.queryAll(comMngVolunteerSkill)); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isNull; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * check商家/店铺是否有效 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Boolean checkStoreIsValid(Long userId) { |
| | | ComShopStoreDO comShopStoreDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ComShopStoreDO>() |
| | | .eq(ComShopStoreDO::getDeleteStatus, 1).eq(ComShopStoreDO::getSysUserId, userId)); |
| | | if (isNull(comShopStoreDO) || comShopStoreDO.getStatus() != 1) { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | |
| | | @Resource |
| | | private ConvenientViewStatisticsDAO convenientViewStatisticsDAO; |
| | | |
| | | private static final String DQ="510402"; |
| | | private static final String RHQ="510411"; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addMerchant(ConvenientMerchantDTO convenientMerchantDTO) { |
| | | ConvenientMerchantDO convenientMerchantDO = new ConvenientMerchantDO(); |
| | | BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO); |
| | | if(convenientMerchantDTO.getCommunityId()==0){ |
| | | convenientMerchantDO.setCommunityName("西区社区"); |
| | | if(DQ.equals(convenientMerchantDTO.getAreaCode())){ |
| | | convenientMerchantDO.setCommunityName("东区社区"); |
| | | }else if(RHQ.equals(convenientMerchantDTO.getAreaCode())){ |
| | | convenientMerchantDO.setCommunityName("仁和区社区"); |
| | | }else{ |
| | | convenientMerchantDO.setCommunityName("西区社区"); |
| | | } |
| | | } |
| | | else { |
| | | ComActDO comActDO = comActDAO.selectById(convenientMerchantDTO.getCommunityId()); |
| | |
| | | Page page = new Page<>(); |
| | | page.setSize(pagePopularMerchantDTO.getPageSize()); |
| | | page.setCurrent(pagePopularMerchantDTO.getPageNum()); |
| | | IPage<ConvenientMerchantVO> merchantVOList = this.baseMapper.getPopularMerchants(page, pagePopularMerchantDTO.getCommunityId(), currentMon); |
| | | IPage<ConvenientMerchantVO> merchantVOList = this.baseMapper.getPopularMerchants(page, pagePopularMerchantDTO.getCommunityId(), currentMon,pagePopularMerchantDTO.getAreaCode()); |
| | | if(pagePopularMerchantDTO.getPageNum().equals(1L)){ |
| | | //第一页默认把犇师傅维修中心加载到第一个 |
| | | List<ConvenientMerchantVO> merchantList = this.baseMapper.selectMerchantByName(pagePopularMerchantDTO.getCommunityId(), currentMon); |
| | |
| | | this.baseMapper.batchUpdateMerchantViewNum(viewVOList); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * check商家/店铺是否有效 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Boolean checkStoreIsValid(Long userId) { |
| | | R<LoginUserInfoVO> loginUserInfo = userService.getUserInfoByUserId(userId.toString()); |
| | | LoginUserInfoVO loginUserInfoVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(loginUserInfo.getData()), LoginUserInfoVO.class); |
| | | if (isNull(loginUserInfoVO) || !loginUserInfoVO.getType().equals(10) || loginUserInfoVO.getStatus() != 1) { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getAllServiceCategories() { |
| | | public R getAllServiceCategories(String areaCode) { |
| | | List<ConvenientServiceCategoryVO> categoryVOList = new ArrayList<>(); |
| | | List<ConvenientServiceCategoryDO> categoryDOS = this.baseMapper.selectList(new QueryWrapper<ConvenientServiceCategoryDO>() |
| | | .lambda().orderByDesc(ConvenientServiceCategoryDO::getWeight)); |
| | | .lambda().eq(ConvenientServiceCategoryDO::getAreaCode,areaCode).orderByDesc(ConvenientServiceCategoryDO::getWeight)); |
| | | if (!ObjectUtils.isEmpty(categoryDOS)) { |
| | | categoryDOS.forEach(categoryDO -> { |
| | | ConvenientServiceCategoryVO categoryVO = new ConvenientServiceCategoryVO(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getSuitableServiceCategories(Long communityId) { |
| | | return R.ok(this.baseMapper.selectSuitableServiceCategories(communityId)); |
| | | public R getSuitableServiceCategories(Long communityId,String areaCode) { |
| | | return R.ok(this.baseMapper.selectSuitableServiceCategories(communityId,areaCode)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsConfigVO; |
| | | import com.panzhihua.service_community.dao.McsConfigDAO; |
| | | import com.panzhihua.service_community.entity.McsConfig; |
| | | import com.panzhihua.service_community.service.McsConfigService; |
| | | |
| | | /** |
| | | * (McsConfig)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:07 |
| | | */ |
| | | @Service("mcsConfigService") |
| | | public class McsConfigServiceImpl extends ServiceImpl<McsConfigDAO, McsConfig> implements McsConfigService { |
| | | |
| | | /** |
| | | * 获取所有数字商业街配置 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getAllMcsConfig() { |
| | | List<McsConfig> mcsConfigs = this.baseMapper.selectList(null); |
| | | List<McsConfigVO> configList = new ArrayList<>(); |
| | | if (!mcsConfigs.isEmpty()) { |
| | | mcsConfigs.forEach(e -> { |
| | | McsConfigVO configVO = new McsConfigVO(); |
| | | BeanUtils.copyProperties(e, configVO); |
| | | configList.add(configVO); |
| | | }); |
| | | } |
| | | return R.ok(configList); |
| | | } |
| | | |
| | | /** |
| | | * 修改数字商业街配置 |
| | | * @param configs |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R putMcsConfig(List<McsConfigVO> configs) { |
| | | if (nonNull(configs) && !configs.isEmpty()) { |
| | | List<McsConfig> mcsConfigs = new ArrayList<>(); |
| | | configs.forEach(e -> { |
| | | McsConfig mcsConfig = this.baseMapper.selectOne(new QueryWrapper<McsConfig>().lambda().eq(McsConfig::getKey, e.getKey())); |
| | | if (nonNull(mcsConfig)) { |
| | | mcsConfig.setValue(e.getValue()); |
| | | mcsConfigs.add(mcsConfig); |
| | | } |
| | | }); |
| | | if (!mcsConfigs.isEmpty()) { |
| | | this.updateBatchById(mcsConfigs); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.GameStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.VerifiedReturnVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.dao.McsGameDAO; |
| | | import com.panzhihua.service_community.dao.McsMerchantDAO; |
| | | import com.panzhihua.service_community.dao.McsVerifiedRecordDAO; |
| | | import com.panzhihua.service_community.entity.McsGame; |
| | | import com.panzhihua.service_community.entity.McsMerchant; |
| | | import com.panzhihua.service_community.entity.McsVerifiedRecord; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | 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.microCommercialStreet.PageJoinGameListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsCouponVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.MyCouponVO; |
| | | import com.panzhihua.service_community.dao.McsCouponDAO; |
| | | import com.panzhihua.service_community.entity.McsCoupon; |
| | | import com.panzhihua.service_community.service.McsCouponService; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * (McsCoupon)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:08 |
| | | */ |
| | | @Service("mcsCouponService") |
| | | public class McsCouponServiceImpl extends ServiceImpl<McsCouponDAO, McsCoupon> implements McsCouponService { |
| | | |
| | | @Resource |
| | | private McsVerifiedRecordDAO mcsVerifiedRecordDAO; |
| | | @Resource |
| | | private McsGameDAO mcsGameDAO; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private McsMerchantDAO mcsMerchantDAO; |
| | | |
| | | /** |
| | | * 我的戳戳卷 |
| | | * @return |
| | | * @param type |
| | | * @param userId |
| | | */ |
| | | @Override |
| | | public R getMyCoupon(Integer type, Long userId) { |
| | | MyCouponVO myCouponVO = this.baseMapper.getMyCouponData(userId); |
| | | List<McsCouponVO> mcsCoupons = this.baseMapper.getCouponList(type, userId); |
| | | myCouponVO.setCouponList(mcsCoupons); |
| | | return R.ok(myCouponVO); |
| | | } |
| | | |
| | | /** |
| | | * 我的评价-参与游戏列表 |
| | | * @param pageJoinGameListDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getJoinGameList(PageJoinGameListDTO pageJoinGameListDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageJoinGameListDTO.getPageSize()); |
| | | page.setCurrent(pageJoinGameListDTO.getPageNum()); |
| | | IPage<McsCouponVO> mcsCoupons = this.baseMapper.pageJoinGameList(page, pageJoinGameListDTO); |
| | | return R.ok(mcsCoupons); |
| | | } |
| | | |
| | | /** |
| | | * 戳戳卷核销 |
| | | * @param couponId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R verifyMcsCoupon(Long couponId, Long userId) { |
| | | McsCoupon mcsCoupon = this.baseMapper.selectById(couponId); |
| | | if (isNull(mcsCoupon)) { |
| | | return R.fail("无效券码"); |
| | | } |
| | | McsGame mcsGame = mcsGameDAO.selectById(mcsCoupon.getGameId()); |
| | | if (isNull(mcsGame)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectById(mcsGame.getMerchantId()); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | if (!mcsMerchant.getUserId().equals(userId)) { |
| | | return R.fail("限指定商家核验"); |
| | | } |
| | | if (mcsCoupon.getIsVerified()) { |
| | | return R.fail("该券已核销"); |
| | | } |
| | | Date nowDate = new Date(); |
| | | if (mcsGame.getExpireAt().before(nowDate)) { |
| | | return R.fail("已过期"); |
| | | } |
| | | R<LoginUserInfoVO> userInfoVOR = userService.getUserInfoByUserId(mcsCoupon.getUserId().toString()); |
| | | String nickName; |
| | | if (R.isOk(userInfoVOR) && nonNull(userInfoVOR.getData())) { |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(userInfoVOR.getData()), LoginUserInfoVO.class); |
| | | nickName = loginUserInfoVO.getName(); |
| | | } else { |
| | | nickName = "默认昵称"; |
| | | } |
| | | McsVerifiedRecord mcsVerifiedRecord = new McsVerifiedRecord(); |
| | | mcsVerifiedRecord.setCouponId(couponId); |
| | | mcsVerifiedRecord.setAward(mcsCoupon.getAward()); |
| | | mcsVerifiedRecord.setName(mcsGame.getName()); |
| | | mcsVerifiedRecord.setNickName(nickName); |
| | | mcsVerifiedRecord.setGameId(mcsGame.getId()); |
| | | mcsVerifiedRecord.setMerchantId(mcsGame.getMerchantId()); |
| | | int num = mcsVerifiedRecordDAO.insert(mcsVerifiedRecord); |
| | | if (num > 0) { |
| | | mcsCoupon.setIsVerified(true); |
| | | this.baseMapper.updateById(mcsCoupon); |
| | | VerifiedReturnVO verifiedReturnVO = new VerifiedReturnVO(); |
| | | verifiedReturnVO.setAward(mcsCoupon.getAward()); |
| | | verifiedReturnVO.setAwardType(mcsGame.getAwardType()); |
| | | verifiedReturnVO.setCouponId(couponId); |
| | | verifiedReturnVO.setCover(mcsGame.getCover()); |
| | | verifiedReturnVO.setGameName(mcsGame.getName()); |
| | | verifiedReturnVO.setNickName(nickName); |
| | | verifiedReturnVO.setVerifiedAt(nowDate); |
| | | return R.ok(verifiedReturnVO); |
| | | } |
| | | return R.fail("核验失败,请重试"); |
| | | } |
| | | |
| | | /** |
| | | * 游戏统计 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsGameStatistics(Long userId) { |
| | | GameStatisticsVO gameStatisticsVO = this.baseMapper.getMcsGameStatistics(userId); |
| | | return R.ok(gameStatisticsVO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsEvaluateDTO; |
| | | import com.panzhihua.service_community.dao.McsCouponDAO; |
| | | import com.panzhihua.service_community.entity.McsCoupon; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | 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.microCommercialStreet.PageMcsEvaluateDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsEvaluateVO; |
| | | import com.panzhihua.service_community.dao.McsEvaluateDAO; |
| | | import com.panzhihua.service_community.entity.McsEvaluate; |
| | | import com.panzhihua.service_community.service.McsEvaluateService; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * (McsEvaluate)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:09 |
| | | */ |
| | | @Service("mcsEvaluateService") |
| | | public class McsEvaluateServiceImpl extends ServiceImpl<McsEvaluateDAO, McsEvaluate> implements McsEvaluateService { |
| | | |
| | | @Resource |
| | | private McsCouponDAO mcsCouponDAO; |
| | | |
| | | /** |
| | | * 分页查询评价记录 |
| | | * @param pageMcsEvaluateDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageMcsEvaluate(PageMcsEvaluateDTO pageMcsEvaluateDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageMcsEvaluateDTO.getPageSize()); |
| | | page.setCurrent(pageMcsEvaluateDTO.getPageNum()); |
| | | IPage<McsEvaluateVO> mcsEvaluates = this.baseMapper.pageMcsEvaluate(page, pageMcsEvaluateDTO); |
| | | return R.ok(mcsEvaluates); |
| | | } |
| | | |
| | | /** |
| | | * 查询评价记录详情 |
| | | * @param evaluateId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsEvaluate(Long evaluateId) { |
| | | return R.ok(this.baseMapper.getMcsEvaluate(evaluateId)); |
| | | } |
| | | |
| | | /** |
| | | * 删除评价记录 |
| | | * @param evaluateId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R deleteMcsEvaluate(Long evaluateId) { |
| | | this.baseMapper.deleteById(evaluateId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 新增评价记录 |
| | | * @param mcsEvaluateDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R addMcsEvaluate(McsEvaluateDTO mcsEvaluateDTO) { |
| | | McsCoupon mcsCoupon = mcsCouponDAO.selectById(mcsEvaluateDTO.getCouponId()); |
| | | if (isNull(mcsCoupon)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | McsEvaluate mcsEvaluate = this.baseMapper.selectOne(new QueryWrapper<McsEvaluate>().lambda().eq(McsEvaluate::getCouponId, mcsEvaluateDTO.getCouponId())); |
| | | if (nonNull(mcsEvaluate)) { |
| | | return R.fail("请勿重复评论"); |
| | | } |
| | | mcsEvaluate = new McsEvaluate(); |
| | | BeanUtils.copyProperties(mcsEvaluateDTO, mcsEvaluate); |
| | | mcsEvaluate.setGameId(mcsCoupon.getGameId()); |
| | | int num = this.baseMapper.insert(mcsEvaluate); |
| | | if (num > 0) { |
| | | 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 java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | 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.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.microCommercialStreet.McsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetPopularForGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForGameDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsCouponVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.TopStatisticsVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.dao.McsCouponDAO; |
| | | import com.panzhihua.service_community.dao.McsEvaluateDAO; |
| | | import com.panzhihua.service_community.dao.McsGameDAO; |
| | | import com.panzhihua.service_community.dao.McsMerchantDAO; |
| | | import com.panzhihua.service_community.entity.McsCoupon; |
| | | import com.panzhihua.service_community.entity.McsGame; |
| | | import com.panzhihua.service_community.entity.McsMerchant; |
| | | import com.panzhihua.service_community.service.McsGameService; |
| | | import com.panzhihua.service_community.util.QRCodeUtil; |
| | | |
| | | /** |
| | | * (McsGame)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:09 |
| | | */ |
| | | @Service("mcsGameService") |
| | | public class McsGameServiceImpl extends ServiceImpl<McsGameDAO, McsGame> implements McsGameService { |
| | | |
| | | @Resource |
| | | private McsMerchantDAO mcsMerchantDAO; |
| | | @Resource |
| | | private McsCouponDAO mcsCouponDAO; |
| | | @Resource |
| | | private McsEvaluateDAO mcsEvaluateDAO; |
| | | |
| | | /** |
| | | * 分页查询戳戳游戏 |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageMcsGame(PageMcsGameDTO pageMcsGameDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageMcsGameDTO.getPageSize()); |
| | | page.setCurrent(pageMcsGameDTO.getPageNum()); |
| | | IPage<McsGameVO> mcsGames = this.baseMapper.pageMcsGame(page, pageMcsGameDTO); |
| | | return R.ok(mcsGames); |
| | | } |
| | | |
| | | /** |
| | | * 设为/取消游戏热门 |
| | | * @param setPopularForGameDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R setPopularForGame(SetPopularForGameDTO setPopularForGameDTO) { |
| | | McsGame mcsGame = this.baseMapper.selectById(setPopularForGameDTO.getGameId()); |
| | | if (isNull(mcsGame)) { |
| | | return R.fail("修改数据不存在"); |
| | | } |
| | | Integer type = setPopularForGameDTO.getType(); |
| | | if (type.equals(1)) { |
| | | //设为热门 |
| | | List<McsGame> popularGames = this.baseMapper.selectList(new QueryWrapper<McsGame>().lambda().eq(McsGame::getIsPopular, true)); |
| | | if (nonNull(popularGames) && !popularGames.isEmpty()) { |
| | | popularGames.forEach(e -> e.setIsPopular(false)); |
| | | this.updateBatchById(popularGames); |
| | | } |
| | | mcsGame.setIsPopular(true); |
| | | } else if (type.equals(2)) { |
| | | //取消热门 |
| | | mcsGame.setIsPopular(false); |
| | | } else { |
| | | return R.fail("未知错误"); |
| | | } |
| | | int num = this.baseMapper.updateById(mcsGame); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 上架/下架戳戳游戏 |
| | | * @param setShelfForGameDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R setShelfForGame(SetShelfForGameDTO setShelfForGameDTO) { |
| | | McsGame mcsGame = this.baseMapper.selectById(setShelfForGameDTO.getGameId()); |
| | | if (isNull(mcsGame)) { |
| | | return R.fail("修改数据不存在"); |
| | | } |
| | | Integer type = setShelfForGameDTO.getType(); |
| | | if (type.equals(1)) { |
| | | //上架 |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectById(mcsGame.getMerchantId()); |
| | | Integer publishLimit = mcsMerchant.getPublishLimit(); |
| | | Integer publishCount = this.baseMapper.selectPublishCount(mcsGame.getMerchantId()); |
| | | if (publishCount >= publishLimit) { |
| | | return R.fail("空闲戳戳点不足"); |
| | | } |
| | | mcsGame.setStatus(2); |
| | | } else if (type.equals(2)) { |
| | | //下架 |
| | | mcsGame.setStatus(3); |
| | | } else { |
| | | return R.fail("未知错误"); |
| | | } |
| | | int num = this.baseMapper.updateById(mcsGame); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 删除戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R deleteMcsGame(Long gameId, Long userId) { |
| | | McsGame mcsGame = this.baseMapper.selectById(gameId); |
| | | if (isNull(mcsGame)) { |
| | | return R.fail("修改数据不存在"); |
| | | } |
| | | mcsGame.setIsDel(true); |
| | | mcsGame.setStatus(McsGame.Status.yxj); |
| | | mcsGame.setUpdatedBy(userId); |
| | | int num = this.baseMapper.updateById(mcsGame); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 新增戳戳游戏 |
| | | * @param mcsGameDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R addMcsGame(McsGameDTO mcsGameDTO) { |
| | | Long userId = mcsGameDTO.getCreatedBy(); |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getUserId, userId)); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("未查询到商家信息"); |
| | | } |
| | | Integer type = mcsGameDTO.getType(); |
| | | McsGame mcsGame = new McsGame(); |
| | | if (type.equals(1)) { |
| | | //1.戳戳币游戏 |
| | | Integer allocation = mcsGameDTO.getAllocation(); |
| | | Integer coins = mcsGameDTO.getCoins(); |
| | | if (isNull(allocation)) { |
| | | return R.fail("缺少分配方式"); |
| | | } |
| | | if (isNull(coins)) { |
| | | return R.fail("未设置戳戳币额度"); |
| | | } |
| | | if (allocation.equals(1)) { |
| | | mcsGame.setSurplusCoins(mcsGameDTO.getCoins()); |
| | | } |
| | | } else if (type.equals(2)) { |
| | | //2.体验游戏 |
| | | Integer awardType = mcsGameDTO.getAwardType(); |
| | | if (isNull(awardType)) { |
| | | return R.fail("缺少奖励类型"); |
| | | } |
| | | } else { |
| | | return R.fail("未知错误"); |
| | | } |
| | | BeanUtils.copyProperties(mcsGameDTO, mcsGame); |
| | | mcsGame.setSurplusCoupons(mcsGameDTO.getCoupons()); |
| | | mcsGame.setStatus(McsGame.Status.wfb); |
| | | mcsGame.setMerchantId(mcsMerchant.getId()); |
| | | int num = this.baseMapper.insert(mcsGame); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("新增失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 编辑戳戳游戏 |
| | | * @param mcsGameDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R putMcsGame(McsGameDTO mcsGameDTO) { |
| | | McsGame mcsGame = this.baseMapper.selectById(mcsGameDTO.getId()); |
| | | if (isNull(mcsGame)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | Integer type = mcsGameDTO.getType(); |
| | | if (type.equals(1)) { |
| | | //1.戳戳币游戏 |
| | | Integer allocation = mcsGameDTO.getAllocation(); |
| | | Integer coins = mcsGameDTO.getCoins(); |
| | | if (isNull(allocation)) { |
| | | return R.fail("缺少分配方式"); |
| | | } |
| | | if (isNull(coins)) { |
| | | return R.fail("未设置戳戳币额度"); |
| | | } |
| | | Integer beforeCoins = mcsGame.getCoins(); |
| | | Integer beforeSurplusCoins = mcsGame.getSurplusCoins(); |
| | | if (isNull(beforeSurplusCoins)) { |
| | | beforeSurplusCoins = beforeCoins; |
| | | } |
| | | Integer beforeUsedCoins = beforeCoins - beforeSurplusCoins; |
| | | Integer surplusCoins = coins - beforeUsedCoins; |
| | | if (surplusCoins < 0) { |
| | | return R.fail("戳戳币总额少于已发出的数量"); |
| | | } |
| | | mcsGame.setSurplusCoins(surplusCoins); |
| | | } else if (type.equals(2)) { |
| | | //2.体验游戏 |
| | | Integer awardType = mcsGameDTO.getAwardType(); |
| | | if (isNull(awardType)) { |
| | | return R.fail("缺少奖励类型"); |
| | | } |
| | | } else { |
| | | return R.fail("未知错误"); |
| | | } |
| | | Integer beforeCoupons = mcsGame.getCoupons(); |
| | | Integer beforeSurplusCoupons = mcsGame.getSurplusCoupons(); |
| | | Integer beforeUsedCoupons = beforeCoupons - beforeSurplusCoupons; |
| | | BeanUtils.copyProperties(mcsGameDTO, mcsGame); |
| | | Integer coupons = mcsGame.getCoupons(); |
| | | Integer surplusCoupons = coupons - beforeUsedCoupons; |
| | | if (surplusCoupons < 0) { |
| | | return R.fail("卷总数少于已发出的数量"); |
| | | } |
| | | mcsGame.setSurplusCoupons(surplusCoupons); |
| | | int num = this.baseMapper.updateById(mcsGame); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("编辑失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 发布戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R publishMcsGame(Long gameId, Long userId) { |
| | | McsGame mcsGame = this.baseMapper.selectById(gameId); |
| | | if (isNull(mcsGame)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectById(mcsGame.getMerchantId()); |
| | | Integer publishLimit = mcsMerchant.getPublishLimit(); |
| | | Integer publishCount = this.baseMapper.selectPublishCount(mcsGame.getMerchantId()); |
| | | if (publishCount >= publishLimit) { |
| | | return R.fail("空闲戳戳点不足"); |
| | | } |
| | | mcsGame.setStatus(McsGame.Status.jxz); |
| | | mcsGame.setPublishAt(new Date()); |
| | | mcsGame.setUpdatedBy(userId); |
| | | int num = this.baseMapper.updateById(mcsGame); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("发布失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 结束戳戳游戏 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R finishMcsGame(Long gameId, Long userId) { |
| | | McsGame mcsGame = this.baseMapper.selectById(gameId); |
| | | if (isNull(mcsGame)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | mcsGame.setStatus(McsGame.Status.yjs); |
| | | mcsGame.setUpdatedBy(userId); |
| | | int num = this.baseMapper.updateById(mcsGame); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("结束失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 戳戳游戏顶部统计数据 |
| | | * @param userId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getTopStatistics(Long userId, Integer type) { |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getUserId, userId)); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("未查询到商家信息"); |
| | | } |
| | | TopStatisticsVO topStatisticsVO = new TopStatisticsVO(); |
| | | topStatisticsVO.setExpireAt(mcsMerchant.getExpireAt()); |
| | | if (nonNull(mcsMerchant.getExpireAt())) { |
| | | int surplusLitDays = DateUtils.retrieveRemainingDays(mcsMerchant.getExpireAt()); |
| | | topStatisticsVO.setSurplusLitDays(surplusLitDays > 0 ? surplusLitDays : 0); |
| | | } |
| | | Integer appliedCount = this.baseMapper.selectAppliedCount(mcsMerchant.getId(), type); |
| | | topStatisticsVO.setAppliedTotal(appliedCount); |
| | | Integer verifiedCount = this.baseMapper.selectVerifiedCount(mcsMerchant.getId(), type); |
| | | topStatisticsVO.setVerifiedTotal(verifiedCount); |
| | | |
| | | Integer publishLimit = mcsMerchant.getPublishLimit(); |
| | | Integer publishCount = this.baseMapper.selectPublishCount(mcsMerchant.getId()); |
| | | Integer idleTotal = publishLimit - publishCount; |
| | | topStatisticsVO.setIdleTotal(idleTotal > 0 ? idleTotal : 0); |
| | | return R.ok(topStatisticsVO); |
| | | } |
| | | |
| | | /** |
| | | * 戳戳卷领取 |
| | | * @param gameId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R applyMcsCoupon(Long gameId, Long userId) { |
| | | McsGame mcsGame = this.baseMapper.selectById(gameId); |
| | | if (isNull(mcsGame) || mcsGame.getIsDel()) { |
| | | return R.fail("游戏已下架"); |
| | | } |
| | | Integer userAppliedCount = mcsCouponDAO.selectCount(new QueryWrapper<McsCoupon>().lambda().eq(McsCoupon::getGameId, gameId).eq(McsCoupon::getUserId, userId)); |
| | | if (userAppliedCount > 0) { |
| | | return R.fail("请勿重复领取"); |
| | | } |
| | | Integer surplusCoupons = mcsGame.getSurplusCoupons(); |
| | | if (surplusCoupons <= 0) { |
| | | return R.fail("抢光了"); |
| | | } |
| | | McsCoupon mcsCoupon = new McsCoupon(); |
| | | Long snowflakeId = Snowflake.getId(); |
| | | mcsCoupon.setId(snowflakeId); |
| | | mcsCoupon.setGameId(gameId); |
| | | mcsCoupon.setUserId(userId); |
| | | mcsCoupon.setQrCode(QRCodeUtil.getBase64QRCode(snowflakeId.toString())); |
| | | Integer type = mcsGame.getType(); |
| | | if (type.equals(1)) { |
| | | //戳戳币游戏 |
| | | Integer allocation = mcsGame.getAllocation(); |
| | | if (allocation.equals(1)) { |
| | | //随机分配 |
| | | Integer surplusCoins = mcsGame.getSurplusCoins(); |
| | | Integer coin = getRandomCoins(surplusCoins, mcsGame.getSurplusCoupons()); |
| | | mcsCoupon.setCoin(coin); |
| | | mcsCoupon.setAward("戳戳币:" + coin); |
| | | mcsGame.setSurplusCoins(surplusCoins - coin); |
| | | } else { |
| | | //固定值 |
| | | mcsCoupon.setCoin(mcsGame.getCoins()); |
| | | mcsCoupon.setAward("戳戳币:" + mcsGame.getCoins()); |
| | | } |
| | | } else { |
| | | //体验游戏 |
| | | Integer awardType = mcsGame.getAwardType(); |
| | | if (awardType.equals(1)) { |
| | | mcsCoupon.setAward("免费领"); |
| | | } else if (awardType.equals(2)) { |
| | | mcsCoupon.setAward("产品试用"); |
| | | } else if (awardType.equals(3)) { |
| | | mcsCoupon.setAward("消费赠礼"); |
| | | } else { |
| | | mcsCoupon.setAward("优惠券"); |
| | | } |
| | | } |
| | | int num = mcsCouponDAO.insert(mcsCoupon); |
| | | if (num > 0) { |
| | | mcsGame.setSurplusCoupons(surplusCoupons - 1); |
| | | this.baseMapper.updateById(mcsGame); |
| | | McsCouponVO mcsCouponVO = new McsCouponVO(); |
| | | mcsCouponVO.setId(snowflakeId); |
| | | mcsCouponVO.setIsVerified(false); |
| | | mcsCouponVO.setQrCode(mcsCoupon.getQrCode()); |
| | | mcsCouponVO.setAward(mcsCoupon.getAward()); |
| | | return R.ok(mcsCouponVO); |
| | | } |
| | | return R.fail("领取失败,请重试"); |
| | | } |
| | | |
| | | /** |
| | | * h5分页查询戳戳游戏 |
| | | * @param pageMcsGameDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageH5McsGame(PageMcsGameDTO pageMcsGameDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageMcsGameDTO.getPageSize()); |
| | | page.setCurrent(pageMcsGameDTO.getPageNum()); |
| | | IPage<McsGameVO> mcsGames = this.baseMapper.pageH5McsGame(page, pageMcsGameDTO); |
| | | return R.ok(mcsGames); |
| | | } |
| | | |
| | | /** |
| | | * 游戏详情 |
| | | * @param gameId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsGame(Long gameId) { |
| | | McsGameVO mcsGameVO = this.baseMapper.selectDetailById(gameId); |
| | | Integer gameCount = this.baseMapper.selectCount(new QueryWrapper<McsGame>().lambda() |
| | | .eq(McsGame::getMerchantId, mcsGameVO.getMerchantId()).eq(McsGame::getStatus, McsGame.Status.jxz) |
| | | .eq(McsGame::getType, mcsGameVO.getType()).eq(McsGame::getIsDel, false)); |
| | | mcsGameVO.setGameCount(gameCount); |
| | | return R.ok(mcsGameVO); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街游戏结束 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R endStatusForMcsGame() { |
| | | List<McsGame> games = this.baseMapper.selectNeedDealExpire(); |
| | | if (nonNull(games) && !games.isEmpty()) { |
| | | games.forEach(e -> e.setStatus(McsGame.Status.yjs)); |
| | | this.updateBatchById(games); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | int total = 500; |
| | | int people = 10; |
| | | for (int i = 1;i <= 10; i++) { |
| | | Integer decrease = getRandomCoins(total, people); |
| | | total -= decrease; |
| | | people --; |
| | | System.out.println("第:" + i + "个人领取到:" + decrease + "戳戳币,总数还剩下:" + total); |
| | | } |
| | | } |
| | | |
| | | public static Integer getRandomCoins(int totalCoins, int peopleTotal) { |
| | | List<Integer> list = new ArrayList<>(peopleTotal); |
| | | if (peopleTotal == 1) { |
| | | return totalCoins; |
| | | } |
| | | Random random = new Random(); |
| | | // 平均分配 |
| | | int average = totalCoins / peopleTotal; |
| | | int max = (int) Math.floor(totalCoins * 0.6); |
| | | int min = (int) Math.floor(average * 0.5); |
| | | float thresh = 0.95F; |
| | | int rest = totalCoins - average * peopleTotal; |
| | | for (int i = 0; i < peopleTotal; i++) { |
| | | if (i < rest) { |
| | | list.add(average + 1); |
| | | } else { |
| | | list.add(average); |
| | | } |
| | | } |
| | | // 根据阀值进行数据随机处理 |
| | | int randOfRange = 0; |
| | | int randRom = 0; |
| | | int nextIndex = 0; |
| | | int nextValue = 0; |
| | | //多余 |
| | | int surplus = 0; |
| | | //缺少 |
| | | int lack = 0; |
| | | for (int i = 0; i < peopleTotal - 1; i++) { |
| | | nextIndex = i + 1; |
| | | int itemThis = list.get(i); |
| | | int itemNext = list.get(nextIndex); |
| | | boolean isLt = itemThis < itemNext; |
| | | int rangeThis = isLt ? max - itemThis : itemThis - min; |
| | | int rangeNext = isLt ? itemNext - min : max - itemNext; |
| | | int rangeFinal = (int) Math.ceil(thresh * (Math.min(rangeThis, rangeNext) + 1)); |
| | | randOfRange = random.nextInt(rangeFinal); |
| | | randRom = isLt ? 1 : -1; |
| | | int iValue = list.get(i) + randRom * randOfRange; |
| | | nextValue = list.get(nextIndex) + randRom * randOfRange * -1; |
| | | if (iValue > max) { |
| | | surplus += (iValue - max); |
| | | list.set(i, max); |
| | | } else if (iValue < min) { |
| | | list.set(i, min); |
| | | lack += (min - iValue); |
| | | } else { |
| | | list.set(i, iValue); |
| | | } |
| | | list.set(nextIndex, nextValue); |
| | | } |
| | | if (nextValue > max) { |
| | | surplus += (nextValue - max); |
| | | list.set(nextIndex, max); |
| | | } |
| | | if (nextValue < min) { |
| | | lack += (min - nextValue); |
| | | list.set(nextIndex, min); |
| | | } |
| | | if (surplus - lack > 0) { |
| | | //分少了 给低于max的凑到max |
| | | for (int i = 0; i < list.size(); i++) { |
| | | int value = list.get(i); |
| | | if (value < max) { |
| | | int tmp = max - value; |
| | | if (surplus >= tmp) { |
| | | surplus -= tmp; |
| | | list.set(i, max); |
| | | } else { |
| | | list.set(i, value + surplus); |
| | | return list.get(random.nextInt(list.size() - 1)); |
| | | } |
| | | } |
| | | } |
| | | } else if (lack - surplus > 0) { |
| | | //分多了 给超过高于min的人凑到min |
| | | for (int i = 0; i < list.size(); i++) { |
| | | int value = list.get(i); |
| | | if (value > min) { |
| | | int tmp = value - min; |
| | | if (lack >= tmp) { |
| | | lack -= tmp; |
| | | list.set(i, min); |
| | | } else { |
| | | list.set(i, min + tmp - lack); |
| | | return list.get(random.nextInt(list.size() - 1)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return list.get(random.nextInt(list.size() - 1)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | 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.microCommercialStreet.McsInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsInformationDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForInfoDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsInformationVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.TopStatisticsVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.service_community.dao.McsGameDAO; |
| | | import com.panzhihua.service_community.dao.McsInformationDAO; |
| | | import com.panzhihua.service_community.dao.McsMerchantDAO; |
| | | import com.panzhihua.service_community.entity.McsInformation; |
| | | import com.panzhihua.service_community.entity.McsMerchant; |
| | | import com.panzhihua.service_community.service.McsInformationService; |
| | | |
| | | /** |
| | | * (McsInformation)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:10 |
| | | */ |
| | | @Service("mcsInformationService") |
| | | public class McsInformationServiceImpl extends ServiceImpl<McsInformationDAO, McsInformation> |
| | | implements McsInformationService { |
| | | |
| | | @Resource |
| | | private McsGameDAO mcsGameDAO; |
| | | @Resource |
| | | private McsMerchantDAO mcsMerchantDAO; |
| | | |
| | | /** |
| | | * 分页查询戳戳资讯 |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageMcsInfo(PageMcsInformationDTO pageMcsInformationDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageMcsInformationDTO.getPageSize()); |
| | | page.setCurrent(pageMcsInformationDTO.getPageNum()); |
| | | IPage<McsInformationVO> mcsInfos = this.baseMapper.pageMcsInfo(page, pageMcsInformationDTO); |
| | | return R.ok(mcsInfos); |
| | | } |
| | | |
| | | /** |
| | | * 上架/下架戳戳资讯 |
| | | * @param setShelfForInfoDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R setShelfForMcsInfo(SetShelfForInfoDTO setShelfForInfoDTO) { |
| | | McsInformation mcsInformation = this.baseMapper.selectById(setShelfForInfoDTO.getInfoId()); |
| | | if (isNull(mcsInformation)) { |
| | | return R.fail("修改数据不存在"); |
| | | } |
| | | Integer type = setShelfForInfoDTO.getType(); |
| | | if (type.equals(1)) { |
| | | //上架 |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectById(mcsInformation.getMerchantId()); |
| | | Integer publishLimit = mcsMerchant.getPublishLimit(); |
| | | Integer publishCount = mcsGameDAO.selectPublishCount(mcsInformation.getMerchantId()); |
| | | if (publishCount >= publishLimit) { |
| | | return R.fail("空闲戳戳点不足"); |
| | | } |
| | | mcsInformation.setStatus(2); |
| | | } else if (type.equals(2)) { |
| | | //下架 |
| | | mcsInformation.setStatus(3); |
| | | } else { |
| | | return R.fail("未知错误"); |
| | | } |
| | | int num = this.baseMapper.updateById(mcsInformation); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 删除戳戳资讯 |
| | | * @param infoId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R deleteMcsInfo(Long infoId, Long userId) { |
| | | McsInformation mcsInformation = this.baseMapper.selectById(infoId); |
| | | if (isNull(mcsInformation)) { |
| | | return R.fail("修改数据不存在"); |
| | | } |
| | | mcsInformation.setIsDel(true); |
| | | mcsInformation.setStatus(McsInformation.Status.yxj); |
| | | mcsInformation.setUpdatedBy(userId); |
| | | int num = this.baseMapper.updateById(mcsInformation); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 戳戳资讯顶部统计数据 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getTopStatistics(Long userId) { |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getUserId, userId)); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("未查询到商家信息"); |
| | | } |
| | | TopStatisticsVO topStatisticsVO = new TopStatisticsVO(); |
| | | topStatisticsVO.setExpireAt(mcsMerchant.getExpireAt()); |
| | | if (nonNull(mcsMerchant.getExpireAt())) { |
| | | int surplusLitDays = DateUtils.retrieveRemainingDays(mcsMerchant.getExpireAt()); |
| | | topStatisticsVO.setSurplusLitDays(surplusLitDays > 0 ? surplusLitDays : 0); |
| | | } |
| | | |
| | | Integer publishLimit = mcsMerchant.getPublishLimit(); |
| | | Integer publishCount = mcsGameDAO.selectPublishCount(mcsMerchant.getId()); |
| | | Integer idleTotal = publishLimit - publishCount; |
| | | topStatisticsVO.setIdleTotal(idleTotal > 0 ? idleTotal : 0); |
| | | return R.ok(topStatisticsVO); |
| | | } |
| | | |
| | | /** |
| | | * 新增戳戳资讯 |
| | | * @param mcsInfoDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R addMcsInfo(McsInfoDTO mcsInfoDTO) { |
| | | Long userId = mcsInfoDTO.getCreatedBy(); |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getUserId, userId)); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("未查询到商家信息"); |
| | | } |
| | | McsInformation mcsInformation = new McsInformation(); |
| | | BeanUtils.copyProperties(mcsInfoDTO, mcsInformation); |
| | | mcsInformation.setMerchantId(mcsMerchant.getId()); |
| | | mcsInformation.setStatus(McsInformation.Status.wfb); |
| | | int num = this.baseMapper.insert(mcsInformation); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("新增失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 编辑戳戳资讯 |
| | | * @param mcsInfoDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R putMcsInfo(McsInfoDTO mcsInfoDTO) { |
| | | McsInformation mcsInformation = this.baseMapper.selectById(mcsInfoDTO.getId()); |
| | | if (isNull(mcsInformation)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | BeanUtils.copyProperties(mcsInfoDTO, mcsInformation); |
| | | int num = this.baseMapper.updateById(mcsInformation); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("编辑失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 发布戳戳资讯 |
| | | * @param infoId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R publishMcsInfo(Long infoId, Long userId) { |
| | | McsInformation mcsInformation = this.baseMapper.selectById(infoId); |
| | | if (isNull(mcsInformation)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectById(mcsInformation.getMerchantId()); |
| | | Integer publishLimit = mcsMerchant.getPublishLimit(); |
| | | Integer publishCount = mcsGameDAO.selectPublishCount(mcsInformation.getMerchantId()); |
| | | if (publishCount >= publishLimit) { |
| | | return R.fail("空闲戳戳点不足"); |
| | | } |
| | | mcsInformation.setStatus(McsInformation.Status.yfb); |
| | | mcsInformation.setPublishAt(new Date()); |
| | | int num = this.baseMapper.updateById(mcsInformation); |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("发布失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * h5分页查询戳戳资讯 |
| | | * @param pageMcsInformationDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageH5McsInfo(PageMcsInformationDTO pageMcsInformationDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageMcsInformationDTO.getPageSize()); |
| | | page.setCurrent(pageMcsInformationDTO.getPageNum()); |
| | | IPage<McsInformationVO> mcsInfos = this.baseMapper.pageH5McsInfo(page, pageMcsInformationDTO); |
| | | return R.ok(mcsInfos); |
| | | } |
| | | |
| | | /** |
| | | * 资讯详情 |
| | | * @param infoId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsInfo(Long infoId) { |
| | | McsInformation mcsInformation = this.baseMapper.selectById(infoId); |
| | | if (isNull(mcsInformation)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | McsInformationVO mcsInformationVO = new McsInformationVO(); |
| | | BeanUtils.copyProperties(mcsInformation, mcsInformationVO); |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectById(mcsInformation.getMerchantId()); |
| | | McsMerchantVO mcsMerchantVO = new McsMerchantVO(); |
| | | if (nonNull(mcsMerchant)) { |
| | | mcsMerchantVO.setId(mcsMerchant.getId()); |
| | | mcsMerchantVO.setName(mcsMerchant.getName()); |
| | | mcsMerchantVO.setLogo(mcsMerchant.getLogo()); |
| | | mcsMerchantVO.setIntroduction(mcsMerchant.getIntroduction()); |
| | | mcsMerchantVO.setLat(mcsMerchant.getLat()); |
| | | mcsMerchantVO.setLon(mcsMerchant.getLon()); |
| | | mcsMerchantVO.setAddress(mcsMerchant.getAddress()); |
| | | } |
| | | mcsInformationVO.setMerchantInfo(mcsMerchantVO); |
| | | return R.ok(mcsInformationVO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.McsLabelDAO; |
| | | import com.panzhihua.service_community.entity.McsLabel; |
| | | import com.panzhihua.service_community.service.McsLabelService; |
| | | |
| | | /** |
| | | * (McsLabel)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:11 |
| | | */ |
| | | @Service("mcsLabelService") |
| | | public class McsLabelServiceImpl extends ServiceImpl<McsLabelDAO, McsLabel> implements McsLabelService { |
| | | |
| | | /** |
| | | * 获取产品标签列表 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsLabelList(Long userId) { |
| | | return R.ok(this.baseMapper.selectVOList(userId)); |
| | | } |
| | | } |
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.isBlank; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | 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.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.DisableOrEnableMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PutUserInfoDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.IndexTopStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsLoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.service_community.dao.McsConfigDAO; |
| | | import com.panzhihua.service_community.dao.McsGameDAO; |
| | | import com.panzhihua.service_community.dao.McsInformationDAO; |
| | | import com.panzhihua.service_community.dao.McsMerchantDAO; |
| | | import com.panzhihua.service_community.dao.McsOrderDao; |
| | | import com.panzhihua.service_community.entity.McsConfig; |
| | | import com.panzhihua.service_community.entity.McsMerchant; |
| | | import com.panzhihua.service_community.entity.McsOrder; |
| | | import com.panzhihua.service_community.service.McsMerchantService; |
| | | |
| | | /** |
| | | * (McsMerchant)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:11 |
| | | */ |
| | | @Service("mcsMerchantService") |
| | | public class McsMerchantServiceImpl extends ServiceImpl<McsMerchantDAO, McsMerchant> implements McsMerchantService { |
| | | |
| | | private static final String MERCHANT_PUBLISH_LIMIT_KEY = "MERCHANT_PUBLISH_LIMIT"; |
| | | private static final String DEFAULT_IMAGE_URL = "https://www.psciio.com//idcard/91313573d071436ab1f934231b31c6e5.jpg"; |
| | | private static final int DEFAULT_PUBLISH_LIMIT = 2; |
| | | private static final String CUSTOMER_SERVICE_CONTACT_NUM="CUSTOMER_SERVICE_CONTACT_NUM"; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private McsConfigDAO mcsConfigDAO; |
| | | @Resource |
| | | private McsGameDAO mcsGameDAO; |
| | | @Resource |
| | | private McsInformationDAO mcsInformationDAO; |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | @Resource |
| | | private McsOrderDao mcsOrderDao; |
| | | |
| | | /** |
| | | * 新增数字商业街商家 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addMcsMerchant(McsMerchantDTO mcsMerchantDTO) { |
| | | McsMerchant existMerchant = this.baseMapper.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getPhone, mcsMerchantDTO.getPhone())); |
| | | if (nonNull(existMerchant)) { |
| | | if (existMerchant.getIsDel()) { |
| | | this.baseMapper.deleteById(existMerchant.getId()); |
| | | } else { |
| | | return R.fail("手机号已存在"); |
| | | } |
| | | } |
| | | McsMerchant mcsMerchant = new McsMerchant(); |
| | | BeanUtils.copyProperties(mcsMerchantDTO, mcsMerchant); |
| | | Integer litDays = mcsMerchantDTO.getLitDays(); |
| | | mcsMerchant.setExpireAt(DateUtils.addDay(new Date(), litDays)); |
| | | mcsMerchant.setFirstLitAt(new Date()); |
| | | McsConfig publishLimitConfig = mcsConfigDAO.selectOne(new QueryWrapper<McsConfig>().lambda().eq(McsConfig::getKey, MERCHANT_PUBLISH_LIMIT_KEY)); |
| | | mcsMerchant.setPublishLimit(nonNull(publishLimitConfig) ? Integer.parseInt(publishLimitConfig.getValue()) : DEFAULT_PUBLISH_LIMIT); |
| | | mcsMerchant.setUserId(0L); |
| | | int insertResult = this.baseMapper.insert(mcsMerchant); |
| | | if (insertResult > 0) { |
| | | //添加user |
| | | R addUserResult = userService.addMcsMerchantUser(mcsMerchantDTO); |
| | | if (R.isOk(addUserResult)) { |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(addUserResult.getData()), LoginUserInfoVO.class); |
| | | mcsMerchant.setUserId(loginUserInfoVO.getUserId()); |
| | | this.baseMapper.updateById(mcsMerchant); |
| | | } else { |
| | | throw new ServiceException("406", addUserResult.getMsg()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 编辑数字商业街商家 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R putMcsMerchant(McsMerchantDTO mcsMerchantDTO) { |
| | | McsMerchant mcsMerchant = this.baseMapper.selectById(mcsMerchantDTO.getId()); |
| | | Long userId = mcsMerchant.getUserId(); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | if (mcsMerchantDTO.getLevel().equals(1)) { |
| | | Integer litDays = mcsMerchantDTO.getLitDays(); |
| | | if (nonNull(litDays)) { |
| | | mcsMerchant.setExpireAt(DateUtils.addDay(new Date(), litDays)); |
| | | } |
| | | } |
| | | BeanUtils.copyProperties(mcsMerchantDTO, mcsMerchant); |
| | | int result = this.baseMapper.updateById(mcsMerchant); |
| | | if (result > 0) { |
| | | //修改商家绑定账户号 |
| | | mcsMerchantDTO.setUserId(userId); |
| | | R putResult = userService.putMcsMerchantUser(mcsMerchantDTO); |
| | | if (!R.isOk(putResult)) { |
| | | throw new ServiceException("406", putResult.getMsg()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 查询数字商业街商家详情 |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsMerchant(Long merchantId) { |
| | | McsMerchantVO merchantVO = this.baseMapper.getMcsMerchantById(merchantId); |
| | | if (nonNull(merchantVO)) { |
| | | retrieveMerchantSurplusLitDays(merchantVO); |
| | | } |
| | | return R.ok(merchantVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数字商业街商家 |
| | | * @param merchantId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R deleteMcsMerchant(Long merchantId, Long userId) { |
| | | McsMerchant mcsMerchant = this.baseMapper.selectById(merchantId); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | mcsMerchant.setIsDel(true); |
| | | this.baseMapper.updateById(mcsMerchant); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询数字商业街商家 |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageMcsMerchant(PageMcsMerchantDTO pageMcsMerchantDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageMcsMerchantDTO.getPageSize()); |
| | | page.setCurrent(pageMcsMerchantDTO.getPageNum()); |
| | | IPage<McsMerchantVO> mcsMerchants = this.baseMapper.pageMcsMerchant(page, pageMcsMerchantDTO); |
| | | List<McsMerchantVO> records = mcsMerchants.getRecords(); |
| | | if (nonNull(records) && !records.isEmpty()) { |
| | | records.forEach(e -> retrieveMerchantSurplusLitDays(e)); |
| | | } |
| | | return R.ok(mcsMerchants); |
| | | } |
| | | |
| | | /** |
| | | * 禁用/启用数字商业街商家 |
| | | * @param disableOrEnableMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R disableOrEnableMcsMerchant(DisableOrEnableMcsMerchantDTO disableOrEnableMcsMerchantDTO) { |
| | | McsMerchant mcsMerchant = this.baseMapper.selectById(disableOrEnableMcsMerchantDTO.getMerchantId()); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | Integer type = disableOrEnableMcsMerchantDTO.getType(); |
| | | if (type.equals(1) || type.equals(2)) { |
| | | //启用 or 禁用 |
| | | DisableOrEnableConvenientMerchantDTO dto = new DisableOrEnableConvenientMerchantDTO(); |
| | | dto.setType(type); |
| | | dto.setUserIds(Arrays.asList(mcsMerchant.getUserId())); |
| | | R r = userService.disableOrEnableMerchantUsers(dto); |
| | | return r; |
| | | } else { |
| | | return R.fail("未知错误"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据account查询微商业街商家信息 |
| | | * @param account |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsMerchantByAccount(String account) { |
| | | McsMerchantVO merchantVO = this.baseMapper.getMcsMerchantByAccount(account); |
| | | if (isNull(merchantVO)) { |
| | | return R.fail("账号不存在"); |
| | | } |
| | | retrieveMerchantSurplusLitDays(merchantVO); |
| | | McsConfig mcsConfig=mcsConfigDAO.selectOne(new QueryWrapper<McsConfig>().lambda().eq(McsConfig::getKey,CUSTOMER_SERVICE_CONTACT_NUM)); |
| | | if(mcsConfig!=null){ |
| | | merchantVO.setCustomPhone(mcsConfig.getValue()); |
| | | } |
| | | |
| | | return R.ok(merchantVO); |
| | | } |
| | | |
| | | /** |
| | | * 完成订单更新/新增商家信息 |
| | | * |
| | | * @param orderNo |
| | | * @param configId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R updateOrAddMcsMerchantAfterOrder(String orderNo, Long configId, Long userId) { |
| | | McsOrder mcsOrder = mcsOrderDao.selectOne(new QueryWrapper<McsOrder>().lambda().eq(McsOrder::getOrderNo, orderNo)); |
| | | if (isNull(mcsOrder)) { |
| | | return R.fail("订单不存在"); |
| | | } |
| | | McsMerchant mcsMerchant = this.baseMapper.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getUserId, userId)); |
| | | McsConfig mcsConfig = mcsConfigDAO.selectById(configId); |
| | | if (isNull(mcsConfig) || isBlank(mcsConfig.getValue())) { |
| | | return R.fail("套餐配置不存在"); |
| | | } |
| | | JSONObject packageObject = JSONObject.parseObject(mcsConfig.getValue()); |
| | | if (!packageObject.containsKey("day")) { |
| | | return R.fail("配置有误"); |
| | | } |
| | | Integer litDays = (Integer)packageObject.get("day"); |
| | | String merchantName = mcsOrder.getMerchantName(); |
| | | Date nowDate = new Date(); |
| | | int num; |
| | | if (isNull(mcsMerchant)) { |
| | | //新增商家 |
| | | R<LoginUserInfoVO> userInfoVOR = userService.getUserInfoByUserId(userId.toString()); |
| | | if (R.isOk(userInfoVOR) && nonNull(userInfoVOR.getData())) { |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(userInfoVOR.getData()), LoginUserInfoVO.class); |
| | | mcsMerchant = new McsMerchant(); |
| | | mcsMerchant.setName(isBlank(merchantName) ? loginUserInfoVO.getName() : merchantName); |
| | | mcsMerchant.setPhone(loginUserInfoVO.getPhone()); |
| | | mcsMerchant.setAccount(loginUserInfoVO.getAccount()); |
| | | mcsMerchant.setLevel(1); |
| | | mcsMerchant.setExpireAt(DateUtils.addDay(nowDate, litDays)); |
| | | mcsMerchant.setFirstLitAt(nowDate); |
| | | McsConfig publishLimitConfig = mcsConfigDAO.selectOne(new QueryWrapper<McsConfig>().lambda().eq(McsConfig::getKey, MERCHANT_PUBLISH_LIMIT_KEY)); |
| | | mcsMerchant.setPublishLimit(nonNull(publishLimitConfig) ? Integer.parseInt(publishLimitConfig.getValue()) : DEFAULT_PUBLISH_LIMIT); |
| | | mcsMerchant.setUserId(userId); |
| | | mcsMerchant.setCreatedBy(userId); |
| | | mcsMerchant.setUpdatedBy(userId); |
| | | mcsMerchant.setAddress(mcsOrder.getAddress()); |
| | | mcsMerchant.setLat(mcsOrder.getLat()); |
| | | mcsMerchant.setLon(mcsOrder.getLon()); |
| | | num = this.baseMapper.insert(mcsMerchant); |
| | | McsMerchantDTO mcsMerchantDTO = new McsMerchantDTO(); |
| | | mcsMerchantDTO.setName(mcsMerchant.getName()); |
| | | userService.putMcsMerchantUser(mcsMerchantDTO); |
| | | } else { |
| | | return R.fail("获取用户信息失败"); |
| | | } |
| | | } else { |
| | | //更新商家 |
| | | Date previousExpireAt = mcsMerchant.getExpireAt(); |
| | | Date nowExpireAt; |
| | | if (isNull(previousExpireAt) || previousExpireAt.before(nowDate)) { |
| | | nowExpireAt = DateUtils.addDay(nowDate, litDays); |
| | | } else { |
| | | nowExpireAt = DateUtils.addDay(previousExpireAt, litDays); |
| | | } |
| | | mcsMerchant.setExpireAt(nowExpireAt); |
| | | mcsMerchant.setUpdatedBy(userId); |
| | | num = this.baseMapper.updateById(mcsMerchant); |
| | | } |
| | | if (num > 0) { |
| | | return R.ok(mcsMerchant.getId()); |
| | | } else { |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 验证码登录 |
| | | * @param loginDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R loginWithPhone(LoginWithPhoneDTO loginDTO) { |
| | | String phone = loginDTO.getPhone(); |
| | | String redisKey = String.join("::", phone, loginDTO.getCode()); |
| | | Boolean hasKey = stringRedisTemplate.hasKey(redisKey); |
| | | if (hasKey) { |
| | | //通过验证 |
| | | R r = userService.getSysUserByPhone(phone, 11); |
| | | if (R.isOk(r)) { |
| | | if (nonNull(r.getData())) { |
| | | //已有用户 |
| | | McsLoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), McsLoginUserInfoVO.class); |
| | | stringRedisTemplate.delete(redisKey); |
| | | return R.ok(loginUserInfoVO); |
| | | } else { |
| | | //自动创建用户 |
| | | McsMerchantDTO mcsMerchantDTO = new McsMerchantDTO(); |
| | | mcsMerchantDTO.setAccount(phone); |
| | | mcsMerchantDTO.setPassword("88888888"); |
| | | mcsMerchantDTO.setAccountStatus(1); |
| | | mcsMerchantDTO.setPhone(phone); |
| | | mcsMerchantDTO.setName("用户" + retrieveRandomCode(5)); |
| | | mcsMerchantDTO.setImageUrl(DEFAULT_IMAGE_URL); |
| | | R addUserResult = userService.addMcsMerchantUser(mcsMerchantDTO); |
| | | if (R.isOk(addUserResult)) { |
| | | McsLoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(addUserResult.getData()), McsLoginUserInfoVO.class); |
| | | loginUserInfoVO.setPlaintextPassword("88888888"); |
| | | stringRedisTemplate.delete(redisKey); |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | return addUserResult; |
| | | } |
| | | } |
| | | return r; |
| | | } else { |
| | | return R.fail("验证码错误"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 首页顶部数据 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsIndexTopData() { |
| | | IndexTopStatisticsVO statisticsVO = this.baseMapper.getMcsIndexTopData(); |
| | | McsGameVO mcsGameVO = mcsGameDAO.selectPopularGame(); |
| | | statisticsVO.setPopularGame(mcsGameVO); |
| | | return R.ok(statisticsVO); |
| | | } |
| | | |
| | | /** |
| | | * H5分页查询数字商业街商家 |
| | | * @param pageMcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageH5McsMerchant(PageMcsMerchantDTO pageMcsMerchantDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageMcsMerchantDTO.getPageSize()); |
| | | page.setCurrent(pageMcsMerchantDTO.getPageNum()); |
| | | IPage<McsMerchantVO> mcsMerchants = this.baseMapper.pageH5McsMerchant(page, pageMcsMerchantDTO); |
| | | return R.ok(mcsMerchants); |
| | | } |
| | | |
| | | /** |
| | | * 修改用戶信息 |
| | | * @param putUserInfoDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R putUserInfo(PutUserInfoDTO putUserInfoDTO) { |
| | | McsMerchant mcsMerchant = this.baseMapper.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getUserId, putUserInfoDTO.getUserId())); |
| | | if (nonNull(mcsMerchant)) { |
| | | //修改商家名称 |
| | | mcsMerchant.setLogo(putUserInfoDTO.getImageUrl()); |
| | | mcsMerchant.setName(putUserInfoDTO.getName()); |
| | | this.baseMapper.updateById(mcsMerchant); |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO(); |
| | | loginUserInfoVO.setImageUrl(putUserInfoDTO.getImageUrl()); |
| | | loginUserInfoVO.setName(putUserInfoDTO.getName()); |
| | | loginUserInfoVO.setUserId(putUserInfoDTO.getUserId()); |
| | | userService.putUser(loginUserInfoVO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 根据userId获取商家信息 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R retrieveMcsMerchantInfoByUserId(Long userId) { |
| | | McsMerchant mcsMerchant = this.baseMapper.selectOne(new QueryWrapper<McsMerchant>().lambda() |
| | | .eq(McsMerchant::getUserId, userId).eq(McsMerchant::getIsDel, false)); |
| | | McsMerchantVO mcsMerchantVO = null; |
| | | if (nonNull(mcsMerchant)) { |
| | | mcsMerchantVO = new McsMerchantVO(); |
| | | BeanUtils.copyProperties(mcsMerchant, mcsMerchantVO); |
| | | } |
| | | return R.ok(mcsMerchantVO); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街商家旗下所有的游戏/资讯全部下架 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R offResourceForMcsMerchant() { |
| | | int num = 0; |
| | | List<Long> needDealIds = this.baseMapper.selectNeedDealExpiredMerchant(); |
| | | if (nonNull(needDealIds) && !needDealIds.isEmpty()) { |
| | | mcsGameDAO.setOffByMerchantIds(needDealIds); |
| | | mcsInformationDAO.setOffByMerchantIds(needDealIds); |
| | | num = this.baseMapper.updateIsPauseStatus(needDealIds); |
| | | } |
| | | return R.ok("执行任务数:" + num); |
| | | } |
| | | |
| | | private void retrieveMerchantSurplusLitDays(McsMerchantVO merchantVO) { |
| | | Integer publishLimit = merchantVO.getPublishLimit(); |
| | | Integer publishCount = mcsGameDAO.selectPublishCount(merchantVO.getId()); |
| | | Integer idleTotal = publishLimit - publishCount; |
| | | merchantVO.setIdleTotal(idleTotal > 0 ? idleTotal : 0); |
| | | if (nonNull(merchantVO.getExpireAt())) { |
| | | int surplusLitDays = DateUtils.retrieveRemainingDays(merchantVO.getExpireAt()); |
| | | merchantVO.setSurplusLitDays(surplusLitDays > 0 ? surplusLitDays : 0); |
| | | } |
| | | } |
| | | |
| | | private String retrieveRandomCode(int length) { |
| | | Random r = new Random(); |
| | | StringBuilder rs = new StringBuilder(); |
| | | for (int i = 0; i < length; i++) { |
| | | rs.append(r.nextInt(10)); |
| | | } |
| | | return rs.toString(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.microCommercialStreet.McsOrderVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.SmsUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxPayUtils; |
| | | import com.panzhihua.service_community.dao.McsMerchantDAO; |
| | | import com.panzhihua.service_community.entity.McsMerchant; |
| | | import com.panzhihua.service_community.entity.McsOrder; |
| | | import com.panzhihua.service_community.dao.McsOrderDao; |
| | | import com.panzhihua.service_community.service.McsMerchantService; |
| | | import com.panzhihua.service_community.service.McsOrderService; |
| | | import com.panzhihua.service_community.util.QRCodeUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * 商业街订单表(McsOrder)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-04 16:10:07 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class McsOrderServiceImpl extends ServiceImpl<McsOrderDao, McsOrder> implements McsOrderService { |
| | | @Value("${min.app.isTest}") |
| | | private Boolean isTest; |
| | | @Value("${min.app.appid}") |
| | | private String appid; |
| | | @Value("${min.app.payKey}") |
| | | private String payKey; |
| | | @Value("${min.app.mchId}") |
| | | private String mchId; |
| | | @Value("${mcs.notifyUrl}") |
| | | private String notifyUrl; |
| | | @Resource |
| | | private RabbitTemplate rabbitTemplate; |
| | | @Resource |
| | | private McsMerchantService mcsMerchantService; |
| | | @Resource |
| | | private McsMerchantDAO mcsMerchantDAO; |
| | | |
| | | private static String H5_LOGIN_APPID="wx475fcd33c8030df8"; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return R.ok(this.baseMapper.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(McsOrderVO mcsOrderVO) { |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectOne(new QueryWrapper<McsMerchant>().lambda() |
| | | .eq(McsMerchant::getUserId, mcsOrderVO.getUserId())); |
| | | McsOrder mcsOrder=new McsOrder(); |
| | | BeanUtils.copyProperties(mcsOrderVO,mcsOrder); |
| | | if (nonNull(mcsMerchant)) { |
| | | if (mcsMerchant.getIsDel()) { |
| | | mcsMerchantDAO.deleteById(mcsMerchant.getId()); |
| | | } else { |
| | | mcsOrder.setMerchantId(mcsMerchant.getId()); |
| | | } |
| | | } |
| | | mcsOrder.setStatus(0); |
| | | mcsOrder.setCreateTime(new Date()); |
| | | mcsOrder.setOrderNo(DateUtils.getCurrentDateStrNoSignal()); |
| | | this.baseMapper.insert(mcsOrder); |
| | | rabbitTemplate.convertAndSend("mcsOrder.exchange", "mcsOrder.key", mcsOrder, message -> { |
| | | message.getMessageProperties().setHeader("x-delay", 1000 * 1800); |
| | | return message; |
| | | }); |
| | | return R.ok(mcsOrder); |
| | | } |
| | | |
| | | @Override |
| | | public R detail(Long id) { |
| | | McsOrderVO detail = this.baseMapper.detail(id); |
| | | Date cancelAt = DateUtils.addMinutes(detail.getCreateTime(), 30); |
| | | Date nowDate = new Date(); |
| | | detail.setCancelCountdown(cancelAt.getTime() - nowDate.getTime()); |
| | | return R.ok(detail); |
| | | } |
| | | |
| | | @Override |
| | | public R wxPay(McsOrderVO mcsOrderVO) { |
| | | McsOrder mcsOrder=this.baseMapper.selectById(mcsOrderVO.getId()); |
| | | if(mcsOrder!=null&&mcsOrder.getStatus()==0){ |
| | | try { |
| | | BigDecimal money = mcsOrder.getMoney(); |
| | | if (isTest) { |
| | | money = BigDecimal.valueOf(0.01); |
| | | } |
| | | // 调用wx支付 |
| | | String realAppId=appid; |
| | | if(mcsOrderVO.getTradeType().equals("JSAPI")){ |
| | | realAppId=H5_LOGIN_APPID; |
| | | } |
| | | String result = WxPayUtils.h5pay(realAppId, mchId, payKey, notifyUrl, "点亮支付", mcsOrderVO.getOpenId(), |
| | | mcsOrder.getOrderNo(), money,mcsOrderVO.getTradeType(), mcsOrderVO.getClientIp()); |
| | | if (mcsOrderVO.getTradeType().equals("NATIVE")) { |
| | | JSONObject jsonObjectResult = JSONObject.parseObject(result); |
| | | result = QRCodeUtil.getBase64QRCode(jsonObjectResult.get("codeUrl").toString()); |
| | | } |
| | | return R.ok(result); |
| | | } catch (Exception e) { |
| | | log.error("调用微信支付异常,异常原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | return R.fail("订单状态异常"); |
| | | } |
| | | |
| | | @Override |
| | | public R sendContent(Long id) { |
| | | String phone=this.baseMapper.selectPhone(id); |
| | | if(StringUtils.isNotEmpty(phone)){ |
| | | SmsUtil smsUtil=new SmsUtil(); |
| | | int result=smsUtil.sendContent(phone); |
| | | if(result>0){ |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail("短信发送异常"); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public R notify(McsOrderVO mcsOrderVO) { |
| | | McsOrder mcsOrderBase=this.baseMapper.selectOne(new QueryWrapper<McsOrder>().lambda().eq(McsOrder::getOrderNo,mcsOrderVO.getOrderNo())); |
| | | mcsOrderBase.setStatus(1); |
| | | mcsOrderBase.setPayNo(mcsOrderVO.getPayNo()); |
| | | mcsOrderBase.setPayTime(mcsOrderVO.getPayTime()); |
| | | mcsOrderBase.setPaymentMethod("微信支付"); |
| | | int i=this.baseMapper.updateById(mcsOrderBase); |
| | | if(i>0){ |
| | | R r = mcsMerchantService.updateOrAddMcsMerchantAfterOrder(mcsOrderBase.getOrderNo(), mcsOrderBase.getConfigId(), mcsOrderBase.getUserId()); |
| | | if (R.isOk(r) && nonNull(r.getData())) { |
| | | mcsOrderBase.setMerchantId(JSONObject.parseObject(JSONObject.toJSONString(r.getData()), Long.class)); |
| | | this.baseMapper.updateById(mcsOrderBase); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.dao.McsProductLabelDAO; |
| | | import com.panzhihua.service_community.entity.McsProductLabel; |
| | | import com.panzhihua.service_community.service.McsProductLabelService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * (McsProductLabel)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:13 |
| | | */ |
| | | @Service("mcsProductLabelService") |
| | | public class McsProductLabelServiceImpl extends ServiceImpl<McsProductLabelDAO, McsProductLabel> |
| | | implements McsProductLabelService { |
| | | |
| | | } |
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.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | 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.microCommercialStreet.DeleteProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForProductDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsProductVO; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.dao.McsLabelDAO; |
| | | import com.panzhihua.service_community.dao.McsMerchantDAO; |
| | | import com.panzhihua.service_community.dao.McsProductDAO; |
| | | import com.panzhihua.service_community.dao.McsProductLabelDAO; |
| | | import com.panzhihua.service_community.entity.McsLabel; |
| | | import com.panzhihua.service_community.entity.McsMerchant; |
| | | import com.panzhihua.service_community.entity.McsProduct; |
| | | import com.panzhihua.service_community.entity.McsProductLabel; |
| | | import com.panzhihua.service_community.service.McsProductService; |
| | | |
| | | /** |
| | | * (McsProduct)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:12 |
| | | */ |
| | | @Service("mcsProductService") |
| | | public class McsProductServiceImpl extends ServiceImpl<McsProductDAO, McsProduct> implements McsProductService { |
| | | |
| | | @Resource |
| | | private McsMerchantDAO mcsMerchantDAO; |
| | | @Resource |
| | | private McsLabelDAO mcsLabelDAO; |
| | | @Resource |
| | | private McsProductLabelDAO mcsProductLabelDAO; |
| | | |
| | | /** |
| | | * 新增产品信息 |
| | | * @param mcsProductDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R addMcsProduct(McsProductDTO mcsProductDTO) { |
| | | Long userId = mcsProductDTO.getCreatedBy(); |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getUserId, userId)); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("商家信息不存在"); |
| | | } |
| | | McsProduct mcsProduct = new McsProduct(); |
| | | BeanUtils.copyProperties(mcsProductDTO, mcsProduct); |
| | | mcsProduct.setMerchantId(mcsMerchant.getId()); |
| | | mcsProduct.setStatus(McsProduct.Status.yxj); |
| | | mcsProduct.setId(Snowflake.getId()); |
| | | int num = this.baseMapper.insert(mcsProduct); |
| | | if (num > 0) { |
| | | List<Long> labelIds = mcsProductDTO.getLabelIds(); |
| | | if (nonNull(labelIds) && !labelIds.isEmpty()) { |
| | | List<McsLabel> mcsLabels = mcsLabelDAO.selectBatchIds(labelIds); |
| | | if (nonNull(mcsLabels) && !mcsLabels.isEmpty()) { |
| | | List<McsProductLabel> mcsProductLabelList = new ArrayList<>(); |
| | | mcsLabels.forEach(e -> { |
| | | McsProductLabel productLabel = new McsProductLabel(); |
| | | productLabel.setLabelId(e.getId()); |
| | | productLabel.setProductId(mcsProduct.getId()); |
| | | productLabel.setLabelName(e.getName()); |
| | | mcsProductLabelList.add(productLabel); |
| | | }); |
| | | mcsProductLabelDAO.insertBatch(mcsProductLabelList); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail("新增失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 编辑产品信息 |
| | | * @param mcsProductDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R putMcsProduct(McsProductDTO mcsProductDTO) { |
| | | McsProduct mcsProduct = this.baseMapper.selectById(mcsProductDTO.getId()); |
| | | if (isNull(mcsProduct)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | BeanUtils.copyProperties(mcsProductDTO, mcsProduct); |
| | | int num = this.baseMapper.updateById(mcsProduct); |
| | | if (num > 0) { |
| | | List<Long> labelIds = mcsProductDTO.getLabelIds(); |
| | | mcsProductLabelDAO.delete(new QueryWrapper<McsProductLabel>().lambda().eq(McsProductLabel::getProductId, mcsProduct.getId())); |
| | | if (nonNull(labelIds) && !labelIds.isEmpty()) { |
| | | List<McsLabel> mcsLabels = mcsLabelDAO.selectBatchIds(labelIds); |
| | | if (nonNull(mcsLabels) && !mcsLabels.isEmpty()) { |
| | | List<McsProductLabel> mcsProductLabelList = new ArrayList<>(); |
| | | mcsLabels.forEach(e -> { |
| | | McsProductLabel productLabel = new McsProductLabel(); |
| | | productLabel.setLabelId(e.getId()); |
| | | productLabel.setProductId(mcsProduct.getId()); |
| | | productLabel.setLabelName(e.getName()); |
| | | mcsProductLabelList.add(productLabel); |
| | | }); |
| | | mcsProductLabelDAO.insertBatch(mcsProductLabelList); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail("编辑失败,请重新尝试"); |
| | | } |
| | | |
| | | /** |
| | | * 删除产品信息 |
| | | * @param deleteProductDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R deleteMcsProduct(DeleteProductDTO deleteProductDTO) { |
| | | List<McsProduct> mcsProducts = this.baseMapper.selectBatchIds(deleteProductDTO.getProductIds()); |
| | | if (nonNull(mcsProducts) && !mcsProducts.isEmpty()) { |
| | | mcsProducts.forEach(e -> { |
| | | e.setIsDel(true); |
| | | e.setUpdatedBy(deleteProductDTO.getUpdatedBy()); |
| | | }); |
| | | this.updateBatchById(mcsProducts); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 上架/下架产品信息 |
| | | * @param setShelfForProductDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R setShelfForMcsProduct(SetShelfForProductDTO setShelfForProductDTO) { |
| | | Integer type = setShelfForProductDTO.getType(); |
| | | List<McsProduct> mcsProducts = this.baseMapper.selectBatchIds(setShelfForProductDTO.getProductIds()); |
| | | if (nonNull(mcsProducts) && !mcsProducts.isEmpty()) { |
| | | if (type.equals(1)) { |
| | | //上架 |
| | | mcsProducts.forEach(e -> { |
| | | e.setStatus(McsProduct.Status.sjz); |
| | | e.setUpdatedBy(setShelfForProductDTO.getUpdatedBy()); |
| | | }); |
| | | } else if (type.equals(2)) { |
| | | //下架 |
| | | mcsProducts.forEach(e -> { |
| | | e.setStatus(McsProduct.Status.yxj); |
| | | e.setUpdatedBy(setShelfForProductDTO.getUpdatedBy()); |
| | | }); |
| | | } else { |
| | | return R.fail("未知错误"); |
| | | } |
| | | this.updateBatchById(mcsProducts); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询产品信息 |
| | | * @param pageMcsProductDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageMcsProduct(PageMcsProductDTO pageMcsProductDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageMcsProductDTO.getPageSize()); |
| | | page.setCurrent(pageMcsProductDTO.getPageNum()); |
| | | IPage<McsProductVO> mcsProduct = this.baseMapper.pageMcsProduct(page, pageMcsProductDTO); |
| | | return R.ok(mcsProduct); |
| | | } |
| | | |
| | | /** |
| | | * 获取产品信息详情 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsProduct(Long productId) { |
| | | McsProduct mcsProduct = this.baseMapper.selectById(productId); |
| | | if (isNull(mcsProduct)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | McsProductVO mcsProductVO = new McsProductVO(); |
| | | BeanUtils.copyProperties(mcsProduct, mcsProductVO); |
| | | List<McsProductLabel> mcsProductLabelList = mcsProductLabelDAO.selectList(new QueryWrapper<McsProductLabel>().lambda() |
| | | .eq(McsProductLabel::getProductId, productId)); |
| | | if (nonNull(mcsProductLabelList) && !mcsProductLabelList.isEmpty()) { |
| | | List<Long> labelIds = mcsProductLabelList.stream().map(McsProductLabel::getLabelId).collect(Collectors.toList()); |
| | | mcsProductVO.setLabelIds(labelIds); |
| | | } |
| | | return R.ok(mcsProductVO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | 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.microCommercialStreet.PageVerifyRecordDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsCouponVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsVerifyRecordVO; |
| | | import com.panzhihua.service_community.dao.McsVerifiedRecordDAO; |
| | | import com.panzhihua.service_community.entity.McsVerifiedRecord; |
| | | import com.panzhihua.service_community.service.McsVerifiedRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * (McsVerifiedRecord)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-12-28 14:37:14 |
| | | */ |
| | | @Service("mcsVerifiedRecordService") |
| | | public class McsVerifiedRecordServiceImpl extends ServiceImpl<McsVerifiedRecordDAO, McsVerifiedRecord> |
| | | implements McsVerifiedRecordService { |
| | | |
| | | /** |
| | | * 分页查询核销记录 |
| | | * @param pageVerifyRecordDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageMcsVerifyRecord(PageVerifyRecordDTO pageVerifyRecordDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageVerifyRecordDTO.getPageSize()); |
| | | page.setCurrent(pageVerifyRecordDTO.getPageNum()); |
| | | IPage<McsVerifyRecordVO> verifyRecords = this.baseMapper.pageMcsVerifyRecord(page, pageVerifyRecordDTO); |
| | | return R.ok(verifyRecords); |
| | | } |
| | | } |
| | |
| | | String accessToken; |
| | | { |
| | | try { |
| | | accessToken = wxXCXTempSend.getAccessToken(); |
| | | accessToken = wxXCXTempSend.getXQAppAccessToken(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | String dayUrl="https://api.weixin.qq.com/datacube/getweanalysisappidmonthlyvisittrend?access_token="+accessToken; |
| | | WxRequestEntity wxRequestEntity=new WxRequestEntity(); |
| | | wxRequestEntity.setAccess_token(accessToken); |
| | | wxRequestEntity.setBegin_date(DateUtil.format(DateUtil.offsetMonth(DateUtils.getFirstDayOfMonth(),-1),"yyyyMMdd")); |
| | | wxRequestEntity.setEnd_date(DateUtil.format(DateUtil.offsetMonth(DateUtils.getLastDayOfMonth(),-1),"yyyyMMdd")); |
| | | wxRequestEntity.setBegin_date(DateUtils.getOldMonthFirstDay()); |
| | | wxRequestEntity.setEnd_date(DateUtils.getOldMonthLastDay()); |
| | | String result=HttpClientUtil.httpPost(dayUrl, JSONObject.toJSONString(wxRequestEntity)); |
| | | if(StringUtils.isNotEmpty(result)&result.contains("session_cnt")){ |
| | | JSONArray resultEntity= (JSONArray) JSONObject.parseObject(result).get("list"); |
| | |
| | | </select> |
| | | |
| | | <select id="getPhotoClassifyList" resultType="com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoClassifyVO"> |
| | | select id,`name`,`status`,weight,remark,create_at,update_at from com_act_easy_photo_classify |
| | | select id,`name`,`status`,weight,remark,create_at,update_at from com_act_easy_photo_classify where area_code = #{areaCode} |
| | | order by create_at desc |
| | | </select> |
| | | |
| | |
| | | group by carr.id order by carr.id desc |
| | | </select> |
| | | |
| | | <select id="pageRegisterDetailedListAdminExport" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO"> |
| | | SELECT |
| | | carr.id, |
| | | su.nick_name, |
| | | carr.create_at |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN sys_user AS su ON su.user_id = carr.user_id |
| | | left join com_act_reserve_answer_content carac on carr.id=carac.reserve_record_id |
| | | WHERE |
| | | reserve_id = #{detailedAdminDTO.reserveId} |
| | | <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != ""'> |
| | | AND carr.create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.endTime != null and detailedAdminDTO.endTime != ""'> |
| | | AND carr.create_at <![CDATA[ <= ]]> #{detailedAdminDTO.endTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.beginTime != null and detailedAdminDTO.beginTime != ""'> |
| | | AND STR_TO_DATE(carac.answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{detailedAdminDTO.beginTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.stopTime != null and detailedAdminDTO.stopTime != ""'> |
| | | AND STR_TO_DATE(carac.answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{detailedAdminDTO.stopTime} |
| | | </if> |
| | | <if test="detailedAdminDTO.keyword!=null and detailedAdminDTO.keyword != """> |
| | | AND carac.answer_content like concat ('%',#{detailedAdminDTO.keyword},'%') |
| | | </if> |
| | | group by carr.id order by carr.id desc |
| | | </select> |
| | | |
| | | <select id="getRegisterDetailedAnswerList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO"> |
| | | SELECT |
| | | car.content as reserveSubContent, carac.answer_content as answerContent,carac.reserve_sub_id as reserveSubId,car.`type` |
| | |
| | | </select> |
| | | |
| | | <select id="export" resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO"> |
| | | select ac.*,t.nick_name from ( SELECT |
| | | qs.type as optionType,ac.*,ac.create_at as `time` |
| | | FROM |
| | | com_act_reserve_record carr |
| | | LEFT JOIN com_act_reserve qn ON carr.reserve_id = qn.id |
| | | LEFT JOIN com_act_reserve_sub qs ON carr.reserve_id = qs.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content ac ON qs.id = ac.reserve_sub_id |
| | | WHERE |
| | | carr.id in ( |
| | | SELECT distinct |
| | | select ac.*,ac.create_at as time,u.nick_name,cars.type as optionType from com_act_reserve_record carr |
| | | left join com_act_reserve_answer_content ac on ac.reserve_record_id = carr.id |
| | | left join sys_user u on carr.user_id = u.user_id |
| | | left join com_act_reserve_sub cars on ac.reserve_sub_id = cars.id |
| | | where carr.reserve_id = #{detailedAdminDTO.reserveId} and ac.reserve_record_id in ( SELECT DISTINCT |
| | | carr.id |
| | | FROM |
| | | com_act_reserve_record carr |
| | | LEFT JOIN com_act_reserve qn ON carr.reserve_id = qn.id |
| | | LEFT JOIN sys_user su ON carr.user_id = su.user_id |
| | | LEFT JOIN com_act_reserve_sub qs ON carr.id = qs.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content ac ON carr.id = ac.reserve_record_id |
| | | where qn.id =#{detailedAdminDTO.reserveId} |
| | | WHERE |
| | | carr.reserve_id =#{detailedAdminDTO.reserveId} |
| | | <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != ""'> |
| | | AND carr.create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="detailedAdminDTO.keyword!=null and detailedAdminDTO.keyword != """> |
| | | AND ac.answer_content like concat ('%',#{detailedAdminDTO.keyword},'%') |
| | | </if> |
| | | )and ac.reserve_record_id in (select distinct reserve_record_id from com_act_reserve_answer_content where answer_content like concat('%',#{detailedAdminDTO.keyword},'%') |
| | | <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != ""'> |
| | | AND create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.endTime != null and detailedAdminDTO.endTime != ""'> |
| | | AND create_at <![CDATA[ <= ]]> #{detailedAdminDTO.endTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.beginTime != null and detailedAdminDTO.beginTime != ""'> |
| | | AND STR_TO_DATE(answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{detailedAdminDTO.beginTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.stopTime != null and detailedAdminDTO.stopTime != ""'> |
| | | AND STR_TO_DATE(answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{detailedAdminDTO.stopTime} |
| | | </if> |
| | | ) |
| | | GROUP BY ac.id ) ac left join sys_user t on ac.user_id = t.user_id |
| | | order by ac.reserve_record_id desc,ac.id asc |
| | | </if>) |
| | | order by ac.reserve_record_id DESC,ac.id ASC |
| | | </select> |
| | | <select id="pageRegisterHomeQuarantine" resultType="java.lang.String"> |
| | | SELECT answer_content FROM ( |
| | |
| | | <if test="pageReserveDTO.endTime != null and pageReserveDTO.endTime != """> |
| | | AND DATE_FORMAT(t.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{pageReserveDTO.endTime} |
| | | </if> |
| | | <if test="pageReserveDTO.isWjw !=null"> |
| | | AND (title like '%返攀%' or title like '%居家%') |
| | | </if> |
| | | </where> |
| | | order by t.create_at desc |
| | | </select> |
| | |
| | | LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id |
| | | where t.community_id = ${communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) and t2.answer_content = '是' group by t1.key) b on a.key = b.key |
| | | </select> |
| | | |
| | | <select id="selectCommunityPhoneByReserveId" resultType="string"> |
| | | select contacts_phone from com_act_reserve t left join com_act t1 on t.community_id = t1.community_id where t.id = #{reserveId} |
| | | </select> |
| | | </mapper> |
| | |
| | | cmp.special_situation, cmp.phone, cmp.remark, cmp.native_place, cmp.nation, |
| | | cmpct.label, cmp.marriage, cmp.culture_level, cmp.profession, cmp.out_or_local, |
| | | cmp.census_register, cmp.healthy, cmp.birthday, cmp.update_at, cmp.address, |
| | | cmp.is_rent, cmp.person_type FROM com_mng_population_community_tags as cmpct |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id |
| | | <where> |
| | | <if test='comMngPopulationVO.name != null and comMngPopulationVO.name != ""'> |
| | | AND cmp.`name` LIKE concat(#{comMngPopulationVO.name},'%') </if> |
| | | <if test='comMngPopulationVO.label != null and comMngPopulationVO.label != ""'> |
| | | AND cmpct.label LIKE concat('%',#{comMngPopulationVO.label},'%') </if> |
| | | <if test='comMngPopulationVO.actId != null'> and cmpct.community_id = ${comMngPopulationVO.actId} |
| | | </if> <if test='comMngPopulationVO.outOrLocal != null'> |
| | | and cmp.out_or_local = #{comMngPopulationVO.outOrLocal} </if> |
| | | <if test='comMngPopulationVO.villageId != null and comMngPopulationVO.villageId != ""'> |
| | | and cmp.village_id = #{comMngPopulationVO.villageId} </if> |
| | | <if test='comMngPopulationVO.road != null and comMngPopulationVO.road != ""'> |
| | | AND cmp.road = #{comMngPopulationVO.road} </if> |
| | | <if test='comMngPopulationVO.doorNo != null and comMngPopulationVO.doorNo != ""'> |
| | | AND cmp.door_no = #{comMngPopulationVO.doorNo} </if> |
| | | <if test='comMngPopulationVO.floor != null and comMngPopulationVO.floor != ""'> |
| | | AND cmp.floor = #{comMngPopulationVO.floor} </if> |
| | | <if test='comMngPopulationVO.isDeath != null'> |
| | | AND cmp.death = #{comMngPopulationVO.isDeath} </if> |
| | | <if test='comMngPopulationVO.unitNo != null and comMngPopulationVO.unitNo != ""'> |
| | | AND cmp.unit_no = #{comMngPopulationVO.unitNo} </if> |
| | | <if test='comMngPopulationVO.houseNo != null and comMngPopulationVO.houseNo != ""'> |
| | | AND cmp.house_no = #{comMngPopulationVO.houseNo} </if> |
| | | <if test='comMngPopulationVO.sex != null and comMngPopulationVO.sex != ""'> |
| | | AND cmp.sex = #{comMngPopulationVO.sex} </if> |
| | | <if test='comMngPopulationVO.ageStartTime != null and comMngPopulationVO.ageStartTime != "" and comMngPopulationVO.ageEndTime == null'> |
| | | AND date_format(cmp.birthday,'%Y-%m-%d') <![CDATA[ <= ]]> #{comMngPopulationVO.ageStartTime} </if> |
| | | <if test='comMngPopulationVO.ageEndTime != null and comMngPopulationVO.ageEndTime != "" and comMngPopulationVO.ageStartTime == null'> |
| | | AND date_format(cmp.birthday,'%Y-%m-%d') <![CDATA[ >= ]]> #{comMngPopulationVO.ageEndTime} </if> |
| | | <if test='comMngPopulationVO.ageStartTime != null and comMngPopulationVO.ageEndTime != null and comMngPopulationVO.ageStartTime == comMngPopulationVO.ageEndTime'> |
| | | AND cmp.birthday BETWEEN #{comMngPopulationVO.ageStartTimeEnd} and #{comMngPopulationVO.ageEndTime} |
| | | </if> |
| | | <if test='comMngPopulationVO.ageStartTime != null and comMngPopulationVO.ageEndTime != null and comMngPopulationVO.ageStartTime != comMngPopulationVO.ageEndTime'> |
| | | AND cmp.birthday BETWEEN #{comMngPopulationVO.ageEndTimeEnd} and #{comMngPopulationVO.ageStartTime} |
| | | </if> |
| | | <if test='comMngPopulationVO.nativePlace != null and comMngPopulationVO.nativePlace != ""'> |
| | | AND cmp.native_place LIKE concat(#{comMngPopulationVO.nativePlace},'%') </if> |
| | | <if test='comMngPopulationVO.nation != null and comMngPopulationVO.nation != ""'> |
| | | AND cmp.nation = #{comMngPopulationVO.nation} </if> |
| | | <if test='comMngPopulationVO.politicalOutlook != null and comMngPopulationVO.politicalOutlook != ""'> |
| | | AND cmp.political_outlook = #{comMngPopulationVO.politicalOutlook} </if> |
| | | <if test='comMngPopulationVO.cardNo != null and comMngPopulationVO.cardNo != ""'> |
| | | AND cmp.card_no = #{comMngPopulationVO.cardNo} </if> |
| | | <if test='comMngPopulationVO.remark != null and comMngPopulationVO.remark != ""'> |
| | | AND cmp.remark = #{comMngPopulationVO.remark} </if> |
| | | <if test='comMngPopulationVO.keyWord != null and comMngPopulationVO.keyWord != ""'> |
| | | AND (cmp.`name` like concat (#{comMngPopulationVO.keyWord},'%') or |
| | | cmp.card_no_str = #{comMngPopulationVO.keyWord} or cmpct.label like concat ('%',#{comMngPopulationVO.keyWord},'%') or cmp.phone like concat ('%',#{comMngPopulationVO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="comMngPopulationVO.personType != null and comMngPopulationVO.personType != """> |
| | | AND cmp.person_type = #{comMngPopulationVO.personType} |
| | | </if> |
| | | </where> |
| | | order by cmp.create_at desc |
| | | </select> |
| | | |
| | | <select id="exportOld" resultType="com.panzhihua.common.model.vos.community.ComMngPopulationVO"> |
| | | SELECT cmp.`name`, cmp.id, cmp.street_id, cmp.act_id, |
| | | cmp.village_id, cmp.sex, cmp.card_no, cmp.road, cmp.door_no, cmp.floor, |
| | | cmp.unit_no, cmp.house_no, cmp.political_outlook, cmp.work_company, |
| | | cmp.special_situation, cmp.phone, cmp.remark, cmp.native_place, cmp.nation, |
| | | cmpct.label, cmp.marriage, cmp.culture_level, cmp.profession, cmp.out_or_local, |
| | | cmp.census_register, cmp.healthy, cmp.birthday, cmp.update_at, cmp.address, |
| | | cmp.is_rent FROM com_mng_population_community_tags as cmpct |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id |
| | | <where> |
| | |
| | | AND cmp.remark = #{comMngPopulationVO.remark} </if> |
| | | <if test='comMngPopulationVO.keyWord != null and comMngPopulationVO.keyWord != ""'> |
| | | AND (cmp.`name` like concat (#{comMngPopulationVO.keyWord},'%') or |
| | | cmp.card_no_str = #{comMngPopulationVO.keyWord} or cmpct.label like concat ('%',#{comMngPopulationVO.keyWord},'%') |
| | | cmp.card_no_str = #{comMngPopulationVO.keyWord} or cmpct.label like concat ('%',#{comMngPopulationVO.keyWord},'%') or cmp.phone like concat ('%',#{comMngPopulationVO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | </where> |
| | |
| | | LEFT JOIN sys_user AS su ON su.user_id = caep.sponsor_id |
| | | WHERE id = #{eventId} |
| | | </select> |
| | | <select id="getPopulationTotalByAdmin" |
| | | resultType="com.panzhihua.common.model.vos.community.ComMngPopulationTotalVO"> |
| | | select count(cmpct.id) as populationTotal , |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 1) as localTotal , |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 2) as outTotal , |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmpct.label is not null) as specialTotal , |
| | | (select count(DISTINCT `name`) from com_mng_village where community_id = ${communityId}) as villageTotal , |
| | | (select count(id) from com_mng_building where act_id = ${communityId}) as buildNum , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','刑释人员','%')) as rehabilitationTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','高龄老人','%')) as elderTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','养老金人员','%')) as pensionTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 1) AS houseRegTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 2) AS leftTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 3) AS outOfTownTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 4) AS overseasTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 5) AS floatingTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 6) AS permanentTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 7) AS temporaryTotal |
| | | from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = ${communityId} |
| | | </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.ComMngVolunteerMngDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComMngVolunteerMngDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="state" property="state" /> |
| | | <result column="name" property="name" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="photo_path" property="photoPath" /> |
| | | <result column="political_face" property="politicalFace" /> |
| | | <result column="reject_reson" property="rejectReson" /> |
| | | <result column="apply_reson" property="applyReson" /> |
| | | <result column="address" property="address" /> |
| | | <result column="age" property="age" /> |
| | | <result column="job" property="job" /> |
| | | <result column="integral" property="integral" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="submit_user_id" property="submitUserId" /> |
| | | <result column="id_card" property="idCard" /> |
| | | <result column="org_id" property="orgId" /> |
| | | <result column="team_id" property="teamId" /> |
| | | <result column="skill_id" property="skillId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, create_at, state, name, phone, photo_path, political_face, reject_reson, apply_reson, address, age, job, integral, community_id, submit_user_id, id_card, org_id, team_id, skill_id |
| | | </sql> |
| | | |
| | | <select id="pageVolunteer" resultType="com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO"> |
| | | SELECT |
| | | cmvm.id, |
| | | cmvm.`name`, |
| | | cmvm.photo_path, |
| | | cmvm.phone, |
| | | cmvm.integral, |
| | | cmvm.id_card, |
| | | cmvm.skill_id, |
| | | cmvm.org_id, |
| | | cmvm.team_id, |
| | | cmvm.is_university, |
| | | cmvm.university_name, |
| | | cmvot.`name` as orgName, |
| | | cmvot1.`name` as teamName, |
| | | cmvot1.`service_type_id`, |
| | | cmvst.`name` as serviceTypeName, |
| | | cmvs.`name` as skillName, |
| | | cmvm.create_at |
| | | FROM |
| | | com_mng_volunteer_mng as cmvm |
| | | left join com_mng_volunteer_org_team as cmvot on cmvot.id = cmvm.org_id |
| | | left join com_mng_volunteer_org_team as cmvot1 on cmvot1.id = cmvm.team_id |
| | | left join com_mng_volunteer_skill as cmvs on cmvs.id = cmvm.skill_id |
| | | left join com_mng_volunteer_service_type as cmvst on cmvst.id = cmvot1.service_type_id |
| | | WHERE |
| | | cmvm.state = 2 |
| | | AND cmvm.community_id = #{comMngVolunteerMngVO.communityId} |
| | | <if test='comMngVolunteerMngVO.name != null and comMngVolunteerMngVO.name != ""'> |
| | | and cmvm.name like concat(#{comMngVolunteerMngVO.name},'%') |
| | | </if> |
| | | <if test='comMngVolunteerMngVO.keyWord != null and comMngVolunteerMngVO.keyWord != ""'> |
| | | and ( |
| | | cmvm.name like concat(#{comMngVolunteerMngVO.keyWord},'%') or |
| | | cmvm.phone like concat(#{comMngVolunteerMngVO.keyWord},'%') or |
| | | cmvm.id_card = #{comMngVolunteerMngVO.keyWord} or |
| | | cmvm.university_name like concat(#{comMngVolunteerMngVO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="comMngVolunteerMngVO.orgId != null"> |
| | | and cmvm.org_id = #{comMngVolunteerMngVO.orgId} |
| | | </if> |
| | | <if test="comMngVolunteerMngVO.teamId != null"> |
| | | and cmvm.team_id = #{comMngVolunteerMngVO.teamId} |
| | | </if> |
| | | <if test="comMngVolunteerMngVO.isUniversity != null"> |
| | | and cmvm.is_university = #{comMngVolunteerMngVO.isUniversity} |
| | | </if> |
| | | <if test="comMngVolunteerMngVO.skillId != null"> |
| | | and cmvm.skill_id = #{comMngVolunteerMngVO.skillId} |
| | | </if> |
| | | <if test="comMngVolunteerMngVO.serviceTypeId != null"> |
| | | and cmvot1.service_type_id = #{comMngVolunteerMngVO.serviceTypeId} |
| | | </if> |
| | | <if test='comMngVolunteerMngVO.phone != null and comMngVolunteerMngVO.phone != ""'> |
| | | AND cmvm.phone like concat(#{comMngVolunteerMngVO.phone},'%') |
| | | </if> |
| | | ORDER BY |
| | | integral DESC, |
| | | cmvm.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.ComMngVolunteerOrgTeamMapper"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.model.dos.ComMngVolunteerOrgTeam" id="ComMngVolunteerOrgTeamMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="communityId" column="community_id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="parentId" column="parent_id" jdbcType="INTEGER"/> |
| | | <result property="serviceTypeId" column="service_type_id" jdbcType="INTEGER"/> |
| | | <result property="createAt" column="create_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updateAt" column="update_at" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <!--查询单个--> |
| | | <select id="queryById" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerOrgTeamVo"> |
| | | select |
| | | id, community_id, name, parent_id, service_type_id, create_at, update_at |
| | | from com_mng_volunteer_org_team |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <!--查询指定行数据--> |
| | | <select id="queryAllByLimit" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerOrgTeamVo"> |
| | | select |
| | | id, community_id, name, parent_id, service_type_id, create_at, update_at |
| | | from com_mng_volunteer_org_team |
| | | <where> |
| | | <if test="dto.id != null"> |
| | | and id = #{dto.id} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.name != null and dto.name != ''"> |
| | | and `name` = #{name} |
| | | </if> |
| | | <if test="dto.parentId != null"> |
| | | and parent_id = #{dto.parentId} |
| | | </if> |
| | | <if test="dto.serviceTypeId != null"> |
| | | and service_type_id = #{dto.serviceTypeId} |
| | | </if> |
| | | <if test="dto.createAt != null"> |
| | | and create_at = #{dto.createAt} |
| | | </if> |
| | | <if test="dto.updateAt != null"> |
| | | and update_at = #{dto.updateAt} |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <!--新增所有列--> |
| | | <insert id="insert" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_org_team(community_id, name, parent_id, service_type_id, create_at, update_at) |
| | | values (#{communityId}, #{name}, #{parentId}, #{serviceTypeId}, #{createAt}, #{updateAt}) |
| | | </insert> |
| | | |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_org_team(community_id, name, parent_id, service_type_id, create_at, update_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.communityId}, #{entity.name}, #{entity.parentId}, #{entity.serviceTypeId}, #{entity.createAt}, #{entity.updateAt}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_org_team(community_id, name, parent_id, service_type_id, create_at, update_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.communityId}, #{entity.name}, #{entity.parentId}, #{entity.serviceTypeId}, #{entity.createAt}, #{entity.updateAt}) |
| | | </foreach> |
| | | on duplicate key update |
| | | community_id = values(community_id), |
| | | name = values(name), |
| | | parent_id = values(parent_id), |
| | | service_type_id = values(service_type_id), |
| | | create_at = values(create_at), |
| | | update_at = values(update_at) |
| | | </insert> |
| | | |
| | | <select id="queryAll" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerOrgTeamVo"> |
| | | select |
| | | cmvot.id, cmvot.community_id, cmvot.name, cmvot.parent_id, cmvot.service_type_id, cmvot.create_at, cmvot.update_at, cmvst.`name` as serviceTypeName |
| | | from com_mng_volunteer_org_team as cmvot |
| | | left join com_mng_volunteer_service_type as cmvst on cmvst.id = cmvot.service_type_id |
| | | <where> |
| | | <if test="dto.id != null"> |
| | | and cmvot.id = #{dto.id} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and cmvot.community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.name != null and dto.name != ''"> |
| | | and cmvot.`name` = #{name} |
| | | </if> |
| | | <if test="dto.parentId != null"> |
| | | and cmvot.parent_id = #{dto.parentId} |
| | | </if> |
| | | <if test="dto.serviceTypeId != null"> |
| | | and cmvot.service_type_id = #{dto.serviceTypeId} |
| | | </if> |
| | | <if test="dto.createAt != null"> |
| | | and cmvot.create_at = #{dto.createAt} |
| | | </if> |
| | | <if test="dto.updateAt != null"> |
| | | and cmvot.update_at = #{dto.updateAt} |
| | | </if> |
| | | </where> |
| | | order by cmvot.create_at desc |
| | | </select> |
| | | |
| | | <select id="statisticsVolunteerOrgAdmin" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerStatisticsVo"> |
| | | SELECT |
| | | count( id ) AS orgTotal,( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | com_mng_volunteer_org_team |
| | | WHERE |
| | | parent_id != 0 |
| | | AND community_id = #{communityId} |
| | | ) AS teamTotal,( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | com_mng_volunteer_mng |
| | | WHERE |
| | | state = 2 |
| | | AND community_id = #{communityId} |
| | | ) AS volunteerTotal |
| | | FROM |
| | | com_mng_volunteer_org_team |
| | | WHERE |
| | | parent_id = 0 |
| | | AND community_id = #{communityId} |
| | | </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.ComMngVolunteerServiceTypeMapper"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.model.dos.ComMngVolunteerServiceType" |
| | | id="ComMngVolunteerServiceTypeMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="communityId" column="community_id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="createAt" column="create_at" jdbcType="TIMESTAMP"/> |
| | | <result property="createBy" column="create_by" jdbcType="INTEGER"/> |
| | | <result property="updateAt" column="update_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updateBy" column="update_by" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <!--查询单个--> |
| | | <select id="queryById" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerServiceTypeVo"> |
| | | select |
| | | id, community_id, name, remark, create_at, create_by, update_at, update_by |
| | | from com_mng_volunteer_service_type |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <!--查询指定行数据--> |
| | | <select id="queryAllByLimit" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerServiceTypeVo"> |
| | | select |
| | | cmvst.id, cmvst.community_id, cmvst.name, cmvst.remark, cmvst.create_at, cmvst.create_by, cmvst.update_at, cmvst.update_by, IFNULL(su.`name`,su.nick_name) as createByName |
| | | from com_mng_volunteer_service_type as cmvst |
| | | left join sys_user as su on su.user_id = cmvst.create_by |
| | | <where> |
| | | <if test="dto.id != null"> |
| | | and cmvst.id = #{dto.id} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and cmvst.community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.name != null and dto.name != ''"> |
| | | and cmvst.name = #{dto.name} |
| | | </if> |
| | | <if test="dto.remark != null and dto.remark != ''"> |
| | | and cmvst.remark = #{dto.remark} |
| | | </if> |
| | | <if test="dto.keyWord != null and dto.keyWord != ''"> |
| | | and cmvst.name like concat(#{dto.keyWord},'%') |
| | | </if> |
| | | </where> |
| | | order by cmvst.create_at desc |
| | | </select> |
| | | |
| | | <!--新增所有列--> |
| | | <insert id="insert" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_service_type(community_id, name, remark, create_at, create_by, update_at, update_by) |
| | | values (#{communityId}, #{name}, #{remark}, #{createAt}, #{createBy}, #{updateAt}, #{updateBy}) |
| | | </insert> |
| | | |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_service_type(community_id, name, remark, create_at, create_by, update_at, |
| | | update_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.communityId}, #{entity.name}, #{entity.remark}, #{entity.createAt}, #{entity.createBy}, |
| | | #{entity.updateAt}, #{entity.updateBy}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_service_type(community_id, name, remark, create_at, create_by, update_at, |
| | | update_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.communityId}, #{entity.name}, #{entity.remark}, #{entity.createAt}, #{entity.createBy}, |
| | | #{entity.updateAt}, #{entity.updateBy}) |
| | | </foreach> |
| | | on duplicate key update |
| | | community_id = values(community_id), |
| | | name = values(name), |
| | | remark = values(remark), |
| | | create_at = values(create_at), |
| | | create_by = values(create_by), |
| | | update_at = values(update_at), |
| | | update_by = values(update_by) |
| | | </insert> |
| | | |
| | | <select id="queryAll" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerServiceTypeVo"> |
| | | select |
| | | id, community_id, name, remark, create_at, create_by, update_at, update_by |
| | | from com_mng_volunteer_service_type |
| | | <where> |
| | | <if test="dto.id != null"> |
| | | and id = #{dto.id} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.name != null and dto.name != ''"> |
| | | and name = #{dto.name} |
| | | </if> |
| | | <if test="dto.remark != null and dto.remark != ''"> |
| | | and remark = #{dto.remark} |
| | | </if> |
| | | </where> |
| | | 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.ComMngVolunteerSkillMapper"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.model.dos.ComMngVolunteerSkill" id="ComMngVolunteerSkillMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="communityId" column="community_id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="createAt" column="create_at" jdbcType="TIMESTAMP"/> |
| | | <result property="createBy" column="create_by" jdbcType="INTEGER"/> |
| | | <result property="updateAt" column="update_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updateBy" column="update_by" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <!--查询单个--> |
| | | <select id="queryById" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerSkillVo"> |
| | | select |
| | | id, community_id, name, remark, create_at, create_by, update_at, update_by |
| | | from com_mng_volunteer_skill |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <!--查询指定行数据--> |
| | | <select id="queryAllByLimit" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerSkillVo"> |
| | | select |
| | | cmvs.id, cmvs.community_id, cmvs.name, IFNULL(su.`name`,su.nick_name) as createByName, cmvs.remark, cmvs.create_at, cmvs.create_by, cmvs.update_at, cmvs.update_by |
| | | from com_mng_volunteer_skill as cmvs |
| | | left join sys_user as su on su.user_id = cmvs.create_by |
| | | <where> |
| | | <if test="dto.id != null"> |
| | | and cmvs.id = #{dto.id} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and cmvs.community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.name != null and dto.name != ''"> |
| | | and cmvs.name = #{dto.name} |
| | | </if> |
| | | <if test="dto.remark != null and dto.remark != ''"> |
| | | and cmvs.remark = #{dto.remark} |
| | | </if> |
| | | <if test="dto.createAt != null"> |
| | | and cmvs.create_at = #{dto.createAt} |
| | | </if> |
| | | <if test="dto.createBy != null"> |
| | | and cmvs.create_by = #{dto.createBy} |
| | | </if> |
| | | <if test="dto.updateAt != null"> |
| | | and cmvs.update_at = #{dto.updateAt} |
| | | </if> |
| | | <if test="dto.updateBy != null"> |
| | | and cmvs.update_by = #{dto.updateBy} |
| | | </if> |
| | | </where> |
| | | order by cmvs.create_at desc |
| | | </select> |
| | | |
| | | <!--新增所有列--> |
| | | <insert id="insert" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_skill(community_id, name, remark, create_at, create_by, update_at, update_by) |
| | | values (#{communityId}, #{name}, #{remark}, #{createAt}, #{createBy}, #{updateAt}, #{updateBy}) |
| | | </insert> |
| | | |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_skill(community_id, name, remark, create_at, create_by, update_at, update_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.communityId}, #{entity.name}, #{entity.remark}, #{entity.createAt}, #{entity.createBy}, |
| | | #{entity.updateAt}, #{entity.updateBy}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_skill(community_id, name, remark, create_at, create_by, update_at, update_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.communityId}, #{entity.name}, #{entity.remark}, #{entity.createAt}, #{entity.createBy}, |
| | | #{entity.updateAt}, #{entity.updateBy}) |
| | | </foreach> |
| | | on duplicate key update |
| | | community_id = values(community_id), |
| | | name = values(name), |
| | | remark = values(remark), |
| | | create_at = values(create_at), |
| | | create_by = values(create_by), |
| | | update_at = values(update_at), |
| | | update_by = values(update_by) |
| | | </insert> |
| | | |
| | | <select id="queryAll" resultType="com.panzhihua.common.model.vos.common.ComMngVolunteerSkillVo"> |
| | | select |
| | | id, community_id, name, remark, create_at, create_by, update_at, update_by |
| | | from com_mng_volunteer_skill |
| | | <where> |
| | | <if test="dto.id != null"> |
| | | and id = #{dto.id} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.name != null and dto.name != ''"> |
| | | and name = #{dto.name} |
| | | </if> |
| | | <if test="dto.remark != null and dto.remark != ''"> |
| | | and remark = #{dto.remark} |
| | | </if> |
| | | <if test="dto.createAt != null"> |
| | | and create_at = #{dto.createAt} |
| | | </if> |
| | | <if test="dto.createBy != null"> |
| | | and create_by = #{dto.createBy} |
| | | </if> |
| | | <if test="dto.updateAt != null"> |
| | | and update_at = #{dto.updateAt} |
| | | </if> |
| | | <if test="dto.updateBy != null"> |
| | | and update_by = #{dto.updateBy} |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | </mapper> |
| | | |
| | |
| | | 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_act ca on ccm.community_id = ca.community_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 ccm.community_id = ${pageConvenientMerchantDTO.communityId} |
| | | </if> |
| | | <if test="pageConvenientMerchantDTO.areaCode != null and pageConvenientMerchantDTO.areaCode != ''"> |
| | | AND ca.area_code = ${pageConvenientMerchantDTO.areaCode} |
| | | AND ccm.area_code = ${pageConvenientMerchantDTO.areaCode} |
| | | </if> |
| | | <if test="pageConvenientMerchantDTO.businessStatus != null"> |
| | | AND ccm.business_status = #{pageConvenientMerchantDTO.businessStatus} |
| | |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) 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} or ccm.community_id = 0) AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` != '犇师傅维修中心' GROUP BY cccs.id |
| | | WHERE ccm.area_code=#{areaCode} and ( ccm.community_id = ${communityId} or ccm.community_id = 0) AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` != '犇师傅维修中心' |
| | | ) 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"> |
| | |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) 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} or ccm.community_id = 0) and ccm.is_del = 0 AND ccm.business_status = 1 AND ccss.service_category_id = #{pageClassifyMerchantDTO.serviceId} |
| | | GROUP BY cccs.id |
| | | WHERE ccm.area_code=#{pageClassifyMerchantDTO.areaCode} and (ccm.community_id = ${pageClassifyMerchantDTO.communityId} or ccm.community_id = 0) and ccm.is_del = 0 AND ccm.business_status = 1 AND ccss.service_category_id = #{pageClassifyMerchantDTO.serviceId} |
| | | ) 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 * FROM ( |
| | | SELECT id, `name`, consultation_volume, view_num |
| | | FROM com_convenient_merchants |
| | | WHERE (community_id = ${pagePopularMerchantDTO.communityId} OR community_id = 0) AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100 |
| | | WHERE area_code=#{areaCode} and (community_id = ${pagePopularMerchantDTO.communityId} OR community_id = 0) AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100 |
| | | ) temp |
| | | </select> |
| | | <select id="getIndexMerchantBaseData" |
| | |
| | | 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} or ccm.community_id =0) AND ccm.business_status = 1 GROUP BY ccsc.id ORDER BY ccsc.weight desc |
| | | INNER 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} or ccm.community_id =0) and ccsc.area_code = #{areaCode} AND ccm.business_status = 1 GROUP BY ccsc.id ORDER BY ccsc.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.McsConfigDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsConfig" id="McsConfigMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="key" column="key" jdbcType="VARCHAR"/> |
| | | <result property="value" column="value" jdbcType="VARCHAR"/> |
| | | <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> |
| | | <result property="createdBy" column="created_by" jdbcType="INTEGER"/> |
| | | <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_config(name, key, value, created_at, created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.key}, #{entity.value}, #{entity.createdAt}, #{entity.createdBy}, |
| | | #{entity.updatedAt}, #{entity.updatedBy}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_config(name, key, value, created_at, created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.key}, #{entity.value}, #{entity.createdAt}, #{entity.createdBy}, |
| | | #{entity.updatedAt}, #{entity.updatedBy}) |
| | | </foreach> |
| | | on duplicate key update |
| | | name = values(name) , key = values(key) , value = values(value) , created_at = values(created_at) , created_by = |
| | | values(created_by) , updated_at = values(updated_at) , updated_by = values(updated_by) |
| | | </insert> |
| | | |
| | | </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.McsCouponDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsCoupon" id="McsCouponMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="gameId" column="game_id" jdbcType="INTEGER"/> |
| | | <result property="userId" column="user_id" jdbcType="INTEGER"/> |
| | | <result property="qrCode" column="qr_code" jdbcType="VARCHAR"/> |
| | | <result property="coin" column="coin" jdbcType="INTEGER"/> |
| | | <result property="award" column="award" jdbcType="VARCHAR"/> |
| | | <result property="isVerified" column="is_verified" jdbcType="VARCHAR"/> |
| | | <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_coupon(game_id, user_id, qr_code, is_verified, created_at, updated_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.gameId}, #{entity.userId}, #{entity.qrCode}, #{entity.isVerified}, #{entity.createdAt}, |
| | | #{entity.updatedAt}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_coupon(game_id, user_id, qr_code, is_verified, created_at, updated_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.gameId}, #{entity.userId}, #{entity.qrCode}, #{entity.isVerified}, #{entity.createdAt}, |
| | | #{entity.updatedAt}) |
| | | </foreach> |
| | | on duplicate key update |
| | | game_id = values(game_id) , user_id = values(user_id) , qr_code = values(qr_code) , is_verified = |
| | | values(is_verified) , created_at = values(created_at) , updated_at = values(updated_at) |
| | | </insert> |
| | | <select id="getMyCouponData" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.MyCouponVO"> |
| | | SELECT |
| | | (SELECT IF(SUM(coin) IS NULL,0,SUM(coin)) FROM mcs_coupon WHERE user_id = #{userId}) AS obtainedTotal, |
| | | (SELECT COUNT(t1.id) FROM mcs_coupon t1 LEFT JOIN mcs_game t2 ON t1.game_id = t2.id WHERE t1.user_id = #{userId} AND t1.is_verified = 1 AND t2.type = 2) AS trialTotal, |
| | | (SELECT COUNT(t1.id) FROM mcs_coupon t1 LEFT JOIN mcs_game t2 ON t1.game_id = t2.id WHERE t1.user_id = #{userId} AND t1.is_verified = 1 AND t2.type = 1) AS joinGameTotal, |
| | | (SELECT COUNT(id) FROM mcs_coupon WHERE user_id = #{userId} AND is_verified = 0) AS unVerifiedTotal |
| | | </select> |
| | | <select id="getCouponList" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsCouponVO"> |
| | | SELECT t1.*, t2.type, t2.award_type, t2.`name`, t2.expire_at |
| | | FROM mcs_coupon t1 |
| | | LEFT JOIN mcs_game t2 ON t1.game_id = t2.id |
| | | WHERE t1.user_id = #{userId} |
| | | <if test="type != null"> |
| | | AND t2.type = #{type} |
| | | </if> |
| | | ORDER BY t1.created_at DESC |
| | | </select> |
| | | <select id="pageJoinGameList" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsCouponVO"> |
| | | SELECT t1.*, t2.type, t2.`name`, t2.expire_at, t2.cover, t2.id AS gameId, t2.award_type, t2.allocation, |
| | | IF(t3.id IS NULL,2,1) AS isEvaluate, t3.id AS evaluateId |
| | | FROM mcs_coupon t1 |
| | | LEFT JOIN mcs_game t2 ON t1.game_id = t2.id |
| | | LEFT JOIN mcs_evaluate t3 ON t1.id = t3.coupon_id |
| | | WHERE t1.user_id = #{pageJoinGameListDTO.userId} AND t1.is_verified = 1 |
| | | <if test="pageJoinGameListDTO.keyword != null and pageJoinGameListDTO.keyword != """> |
| | | AND t2.`name` LIKE CONCAT(#{pageJoinGameListDTO.keyword}, '%') |
| | | </if> |
| | | ORDER BY t1.created_at DESC |
| | | </select> |
| | | <select id="getMcsGameStatistics" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.GameStatisticsVO"> |
| | | SELECT gameTotal, sendCouponTotal, |
| | | IF(ROUND((sendCouponTotal - unAppliedTotal)/sendCouponTotal * 100,2) IS NULL,0,ROUND((sendCouponTotal - unAppliedTotal)/sendCouponTotal * 100,2))AS appliedPercent, |
| | | IF(ROUND(unAppliedTotal/sendCouponTotal * 100,2) IS NULL,0,ROUND(unAppliedTotal/sendCouponTotal * 100,2)) AS unAppliedPercent, |
| | | IF(ROUND(verifiedTotal/(sendCouponTotal - unAppliedTotal) * 100,2) IS NULL,0,ROUND(verifiedTotal/(sendCouponTotal - unAppliedTotal) * 100,2)) AS verifiedPercent, |
| | | IF(ROUND((sendCouponTotal - unAppliedTotal - verifiedTotal)/(sendCouponTotal - unAppliedTotal) * 100,2) IS NULL,0,ROUND((sendCouponTotal - unAppliedTotal - verifiedTotal)/(sendCouponTotal - unAppliedTotal) * 100,2)) AS unVerifiedPercent |
| | | FROM( |
| | | SELECT |
| | | (SELECT COUNT(t1.id) FROM mcs_game t1 LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id WHERE t1.`status` != 1 AND t1.is_del = 0 AND t1.`type` = 1 AND t2.user_id = #{userId}) AS gameTotal, |
| | | (SELECT IF(SUM(coupons) IS NULL,0,SUM(coupons)) FROM mcs_game t1 LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id WHERE t1.`status` != 1 AND t1.is_del = 0 AND t1.`type` = 1 AND t2.user_id = #{userId}) AS sendCouponTotal, |
| | | (SELECT IF(SUM(surplus_coupons) IS NULL,0,SUM(surplus_coupons)) FROM mcs_game t1 LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id WHERE t1.`status` != 1 AND t1.is_del = 0 AND t1.`type` = 1 AND t2.user_id = #{userId}) AS unAppliedTotal, |
| | | (SELECT COUNT(t1.id) FROM mcs_verified_record t1 LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id LEFT JOIN mcs_game t3 ON t1.game_id = t3.id WHERE t3.is_del = 0 AND t3.`type` = 1 AND t2.user_id = #{userId}) AS verifiedTotal |
| | | ) temp |
| | | </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.McsEvaluateDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsEvaluate" id="McsEvaluateMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="couponId" column="coupon_id" jdbcType="INTEGER"/> |
| | | <result property="gameId" column="game_id" jdbcType="INTEGER"/> |
| | | <result property="userId" column="user_id" jdbcType="INTEGER"/> |
| | | <result property="star" column="star" jdbcType="INTEGER"/> |
| | | <result property="content" column="content" jdbcType="VARCHAR"/> |
| | | <result property="photos" column="photos" jdbcType="VARCHAR"/> |
| | | <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_evaluate(coupon_id, star, content, photos, created_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.couponId}, #{entity.star}, #{entity.content}, #{entity.photos}, #{entity.createdAt}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_evaluate(coupon_id, star, content, photos, created_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.couponId}, #{entity.star}, #{entity.content}, #{entity.photos}, #{entity.createdAt}) |
| | | </foreach> |
| | | on duplicate key update |
| | | coupon_id = values(coupon_id) , star = values(star) , content = values(content) , photos = values(photos) , |
| | | created_at = values(created_at) |
| | | </insert> |
| | | <select id="pageMcsEvaluate" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsEvaluateVO"> |
| | | SELECT t1.id, t1.star, t1.content, t1.photos, t1.created_at, t3.`name` AS nickName, t3.phone, t3.image_url, t2.`name` AS gameName |
| | | FROM mcs_evaluate t1 |
| | | LEFT JOIN mcs_game t2 ON t1.game_id = t2.id |
| | | LEFT JOIN sys_user t3 ON t1.user_id = t3.user_id |
| | | WHERE 1=1 |
| | | <if test="pageMcsEvaluateDTO.gameId != null"> |
| | | AND t1.game_id = #{pageMcsEvaluateDTO.gameId} |
| | | </if> |
| | | <if test="pageMcsEvaluateDTO.isMy != null and pageMcsEvaluateDTO.isMy == 1"> |
| | | AND t1.user_id = #{pageMcsEvaluateDTO.userId} |
| | | </if> |
| | | <if test="pageMcsEvaluateDTO.keyword != null and pageMcsEvaluateDTO.keyword != """> |
| | | AND ( |
| | | t3.`name` LIKE CONCAT(#{pageMcsEvaluateDTO.keyword}, '%') |
| | | OR t3.phone LIKE CONCAT(#{pageMcsEvaluateDTO.keyword}, '%') |
| | | ) |
| | | </if> |
| | | ORDER BY t1.created_at DESC |
| | | </select> |
| | | <select id="getMcsEvaluate" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsEvaluateVO"> |
| | | SELECT t1.id, t1.star, t1.content, t1.photos, t1.created_at, t3.`name` AS nickName, t3.phone, t2.`name` AS gameName |
| | | FROM mcs_evaluate t1 |
| | | LEFT JOIN mcs_game t2 ON t1.game_id = t2.id |
| | | LEFT JOIN sys_user t3 ON t1.user_id = t3.user_id |
| | | WHERE t1.id = #{evaluateId} |
| | | </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.McsGameDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsGame" id="McsGameMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="coupons" column="coupons" jdbcType="INTEGER"/> |
| | | <result property="surplusCoupons" column="surplus_coupons" jdbcType="INTEGER"/> |
| | | <result property="type" column="type" jdbcType="INTEGER"/> |
| | | <result property="awardType" column="award_type" jdbcType="INTEGER"/> |
| | | <result property="allocation" column="allocation" jdbcType="INTEGER"/> |
| | | <result property="coins" column="coins" jdbcType="INTEGER"/> |
| | | <result property="surplusCoins" column="surplus_coins" jdbcType="INTEGER"/> |
| | | <result property="address" column="address" jdbcType="VARCHAR"/> |
| | | <result property="lat" column="lat" jdbcType="VARCHAR"/> |
| | | <result property="lon" column="lon" jdbcType="VARCHAR"/> |
| | | <result property="expireAt" column="expire_at" jdbcType="TIMESTAMP"/> |
| | | <result property="cover" column="cover" jdbcType="VARCHAR"/> |
| | | <result property="otherImages" column="other_images" jdbcType="VARCHAR"/> |
| | | <result property="introduction" column="introduction" jdbcType="VARCHAR"/> |
| | | <result property="status" column="status" jdbcType="INTEGER"/> |
| | | <result property="isPopular" column="is_popular" jdbcType="VARCHAR"/> |
| | | <result property="publishAt" column="publish_at" jdbcType="TIMESTAMP"/> |
| | | <result property="isDel" column="is_del" jdbcType="VARCHAR"/> |
| | | <result property="merchantId" column="merchant_id" jdbcType="INTEGER"/> |
| | | <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> |
| | | <result property="createdBy" column="created_by" jdbcType="INTEGER"/> |
| | | <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_game(name, coupons, surplus_coupons, type, award_type, allocation, coins, address, |
| | | lat, lon, expire_at, cover, other_images, introduction, status, publish_at, is_del, merchant_id, created_at, |
| | | created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.coupons}, #{entity.surplusCoupons}, #{entity.type}, #{entity.awardType}, |
| | | #{entity.allocation}, #{entity.coins}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.expireAt}, |
| | | #{entity.cover}, #{entity.otherImages}, #{entity.introduction}, #{entity.status}, #{entity.publishAt}, |
| | | #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, |
| | | #{entity.updatedBy}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_game(name, coupons, surplus_coupons, type, award_type, allocation, coins, address, |
| | | lat, lon, expire_at, cover, other_images, introduction, status, publish_at, is_del, merchant_id, created_at, |
| | | created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.coupons}, #{entity.surplusCoupons}, #{entity.type}, #{entity.awardType}, |
| | | #{entity.allocation}, #{entity.coins}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.expireAt}, |
| | | #{entity.cover}, #{entity.otherImages}, #{entity.introduction}, #{entity.status}, #{entity.publishAt}, |
| | | #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, |
| | | #{entity.updatedBy}) |
| | | </foreach> |
| | | on duplicate key update |
| | | name = values(name) , coupons = values(coupons) , surplus_coupons = values(surplus_coupons) , type = |
| | | values(type) , award_type = values(award_type) , allocation = values(allocation) , coins = values(coins) , |
| | | address = values(address) , lat = values(lat) , lon = values(lon) , expire_at = values(expire_at) , cover = |
| | | values(cover) , other_images = values(other_images) , introduction = values(introduction) , status = |
| | | values(status) , publish_at = values(publish_at) , is_del = values(is_del) , merchant_id = values(merchant_id) , |
| | | created_at = values(created_at) , created_by = values(created_by) , updated_at = values(updated_at) , updated_by |
| | | = values(updated_by) |
| | | </insert> |
| | | <update id="setOffByMerchantIds"> |
| | | UPDATE mcs_game SET `status` = 3 WHERE merchant_id IN |
| | | <foreach collection="needDealIds" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </update> |
| | | <select id="pageMcsGame" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO"> |
| | | (SELECT t1.id, t1.`name`, t1.`type`, t1.coupons, t1.surplus_coupons, t1.award_type, |
| | | t1.publish_at, t1.expire_at, t1.`status`, t1.merchant_id, t2.`name` AS merchantName, t1.is_popular, t1.cover |
| | | FROM mcs_game t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | WHERE t1.is_del = 0 AND t1.`status` = 2 |
| | | <if test="pageMcsGameDTO.userId != null"> |
| | | AND t2.user_id = #{pageMcsGameDTO.userId} |
| | | </if> |
| | | <if test="pageMcsGameDTO.type != null"> |
| | | AND t1.`type` = #{pageMcsGameDTO.type} |
| | | </if> |
| | | <if test="pageMcsGameDTO.status != null"> |
| | | AND t1.`status` = #{pageMcsGameDTO.status} |
| | | </if> |
| | | <if test="pageMcsGameDTO.keyword != null and pageMcsGameDTO.keyword != """> |
| | | AND t1.`name` LIKE CONCAT(#{pageMcsGameDTO.keyword}, '%') |
| | | </if> |
| | | ORDER BY t1.created_at DESC LIMIT 99999) |
| | | UNION ALL |
| | | (SELECT t1.id, t1.`name`, t1.`type`, t1.coupons, t1.surplus_coupons, t1.award_type, |
| | | t1.publish_at, t1.expire_at, t1.`status`, t1.merchant_id, t2.`name` AS merchantName, t1.is_popular, t1.cover |
| | | FROM mcs_game t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | WHERE t1.is_del = 0 AND t1.`status` != 2 |
| | | <if test="pageMcsGameDTO.userId != null"> |
| | | AND t2.user_id = #{pageMcsGameDTO.userId} |
| | | </if> |
| | | <if test="pageMcsGameDTO.type != null"> |
| | | AND t1.`type` = #{pageMcsGameDTO.type} |
| | | </if> |
| | | <if test="pageMcsGameDTO.status != null"> |
| | | AND t1.`status` = #{pageMcsGameDTO.status} |
| | | </if> |
| | | <if test="pageMcsGameDTO.keyword != null and pageMcsGameDTO.keyword != """> |
| | | AND t1.`name` LIKE CONCAT(#{pageMcsGameDTO.keyword}, '%') |
| | | </if> |
| | | ORDER BY t1.created_at DESC LIMIT 99999) |
| | | </select> |
| | | <select id="selectPublishCount" resultType="java.lang.Integer"> |
| | | SELECT SUM(publishCount) AS publishCount FROM |
| | | ( |
| | | SELECT COUNT(1) AS publishCount FROM mcs_game WHERE merchant_id = #{merchantId} AND `status` = 2 AND is_del = 0 |
| | | UNION ALL |
| | | SELECT COUNT(1) AS publishCount FROM mcs_information WHERE merchant_id = #{merchantId} AND `status` = 2 AND is_del = 0 |
| | | ) temp |
| | | </select> |
| | | <select id="selectAppliedCount" resultType="java.lang.Integer"> |
| | | SELECT COUNT(1) |
| | | FROM mcs_coupon t1 |
| | | LEFT JOIN mcs_game t2 ON t1.game_id = t2.id |
| | | WHERE t2.merchant_id = #{merchantId} AND t2.`type` = #{type} |
| | | </select> |
| | | <select id="selectVerifiedCount" resultType="java.lang.Integer"> |
| | | SELECT COUNT(1) |
| | | FROM mcs_coupon t1 |
| | | LEFT JOIN mcs_game t2 ON t1.game_id = t2.id |
| | | WHERE t1.is_verified = 1 AND t2.merchant_id = #{merchantId} AND t2.`type` = #{type} |
| | | </select> |
| | | <select id="selectPopularGame" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO"> |
| | | SELECT t1.id, t1.`name`, t1.coupons, t1.surplus_coupons, t1.`type`, t1.award_type FROM mcs_game t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id |
| | | WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.is_popular = 1 AND t2.is_del = 0 AND t3.`status` = 1 LIMIT 1 |
| | | </select> |
| | | <select id="pageH5McsGame" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO"> |
| | | SELECT * FROM ( |
| | | SELECT t1.id, t1.`name`, t1.`type`, t1.coupons, t1.surplus_coupons, t1.award_type, t1.cover, |
| | | IF(t1.allocation = 1,t1.coins,t1.coins * t1.coupons) AS coins, t1.allocation, t1.surplus_coins, |
| | | t1.publish_at, t1.`status`, t1.merchant_id, t1.lat, t1.lon, t2.`name` AS merchantName, |
| | | ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN((t1.lat * PI() / 180 - #{pageMcsGameDTO.lat} * PI() / 180) / 2),2) |
| | | + |
| | | COS(t1.lat * PI() / 180) * COS(#{pageMcsGameDTO.lat} * PI() / 180) * POW(SIN((t1.lon * PI() / 180 - |
| | | #{pageMcsGameDTO.lon} * PI() / 180) / 2),2))), 2) AS distance |
| | | FROM mcs_game t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id |
| | | WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.expire_at > NOW() AND t3.`status` = 1 |
| | | <if test="pageMcsGameDTO.keyword != null and pageMcsGameDTO.keyword != """> |
| | | AND t1.`name` LIKE CONCAT(#{pageMcsGameDTO.keyword}, '%') |
| | | </if> |
| | | <if test="pageMcsGameDTO.type != null"> |
| | | AND t1.`type` = #{pageMcsGameDTO.type} |
| | | </if> |
| | | <if test="pageMcsGameDTO.merchantId != null"> |
| | | AND t1.merchant_id = #{pageMcsGameDTO.merchantId} |
| | | </if> |
| | | ORDER BY t1.created_at DESC |
| | | ) temp WHERE 1=1 |
| | | <if test="pageMcsGameDTO.distance != null"> |
| | | AND distance <= #{pageMcsGameDTO.distance} |
| | | </if> |
| | | </select> |
| | | <select id="selectDetailById" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO"> |
| | | SELECT t1.*, t2.`name` AS merchantName, t2.logo |
| | | FROM mcs_game t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | WHERE t1.id = #{gameId} |
| | | </select> |
| | | <select id="selectNeedDealExpire" resultType="com.panzhihua.service_community.entity.McsGame"> |
| | | SELECT * FROM mcs_game WHERE expire_at <= NOW() AND `status` != 4 |
| | | </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.McsInformationDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsInformation" id="McsInformationMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="address" column="address" jdbcType="VARCHAR"/> |
| | | <result property="lat" column="lat" jdbcType="VARCHAR"/> |
| | | <result property="lon" column="lon" jdbcType="VARCHAR"/> |
| | | <result property="cover" column="cover" jdbcType="VARCHAR"/> |
| | | <result property="content" column="content" jdbcType="VARCHAR"/> |
| | | <result property="status" column="status" jdbcType="INTEGER"/> |
| | | <result property="publishAt" column="publish_at" jdbcType="TIMESTAMP"/> |
| | | <result property="isDel" column="is_del" jdbcType="VARCHAR"/> |
| | | <result property="merchantId" column="merchant_id" jdbcType="INTEGER"/> |
| | | <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> |
| | | <result property="createdBy" column="created_by" jdbcType="INTEGER"/> |
| | | <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_information(name, address, lat, lon, cover, content, status, publish_at, is_del, |
| | | merchant_id, created_at, created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.cover}, #{entity.content}, |
| | | #{entity.status}, #{entity.publishAt}, #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, |
| | | #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_information(name, address, lat, lon, cover, content, status, publish_at, is_del, |
| | | merchant_id, created_at, created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.cover}, #{entity.content}, |
| | | #{entity.status}, #{entity.publishAt}, #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, |
| | | #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}) |
| | | </foreach> |
| | | on duplicate key update |
| | | name = values(name) , address = values(address) , lat = values(lat) , lon = values(lon) , cover = values(cover) |
| | | , content = values(content) , status = values(status) , publish_at = values(publish_at) , is_del = |
| | | values(is_del) , merchant_id = values(merchant_id) , created_at = values(created_at) , created_by = |
| | | values(created_by) , updated_at = values(updated_at) , updated_by = values(updated_by) |
| | | </insert> |
| | | <update id="setOffByMerchantIds"> |
| | | UPDATE mcs_information SET `status` = 3 WHERE merchant_id IN |
| | | <foreach collection="needDealIds" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </update> |
| | | <select id="pageMcsInfo" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsInformationVO"> |
| | | SELECT t1.id, t1.`name`, t1.publish_at, t1.`status`, t1.merchant_id, t2.`name` AS merchantName, t1.cover |
| | | FROM mcs_information t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | WHERE t1.is_del = 0 |
| | | <if test="pageMcsInformationDTO.userId != null"> |
| | | AND t2.user_id = #{pageMcsInformationDTO.userId} |
| | | </if> |
| | | <if test="pageMcsInformationDTO.status != null"> |
| | | AND t1.`status` = #{pageMcsInformationDTO.status} |
| | | </if> |
| | | <if test="pageMcsInformationDTO.keyword != null and pageMcsInformationDTO.keyword != """> |
| | | AND t1.`name` LIKE CONCAT(#{pageMcsInformationDTO.keyword}, '%') |
| | | </if> |
| | | ORDER BY t1.created_at DESC |
| | | </select> |
| | | <select id="pageH5McsInfo" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsInformationVO"> |
| | | SELECT * FROM ( |
| | | SELECT t1.id, t1.`name`, t1.publish_at, t1.`status`, t1.merchant_id, t1.lat, t1.lon, t1.cover, t2.`name` AS |
| | | merchantName, |
| | | ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN((t1.lat * PI() / 180 - #{pageMcsInformationDTO.lat} * PI() / 180) / 2),2) |
| | | + |
| | | COS(t1.lat * PI() / 180) * COS(#{pageMcsInformationDTO.lat} * PI() / 180) * POW(SIN((t1.lon * PI() / 180 - |
| | | #{pageMcsInformationDTO.lon} * PI() / 180) / 2),2))), 2) AS distance |
| | | FROM mcs_information t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id |
| | | WHERE t1.is_del = 0 AND t1.`status` = 2 AND t3.`status` = 1 |
| | | <if test="pageMcsInformationDTO.keyword != null and pageMcsInformationDTO.keyword != """> |
| | | AND t1.`name` LIKE CONCAT(#{pageMcsInformationDTO.keyword}, '%') |
| | | </if> |
| | | <if test="pageMcsInformationDTO.merchantId != null"> |
| | | AND t1.merchant_id = #{pageMcsInformationDTO.merchantId} |
| | | </if> |
| | | ORDER BY t1.created_at DESC |
| | | ) temp WHERE 1=1 |
| | | <if test="pageMcsInformationDTO.distance != null"> |
| | | AND distance <= #{pageMcsInformationDTO.distance} |
| | | </if> |
| | | </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.McsLabelDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsLabel" id="McsLabelMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="introduction" column="introduction" jdbcType="VARCHAR"/> |
| | | <result property="isDel" column="is_del" jdbcType="VARCHAR"/> |
| | | <result property="merchantId" column="merchant_id" jdbcType="INTEGER"/> |
| | | <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> |
| | | <result property="createdBy" column="created_by" jdbcType="INTEGER"/> |
| | | <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_label(name, introduction, is_del, merchant_id, created_at, created_by, updated_at, |
| | | updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.introduction}, #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, |
| | | #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_label(name, introduction, is_del, merchant_id, created_at, created_by, updated_at, |
| | | updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.introduction}, #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, |
| | | #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy}) |
| | | </foreach> |
| | | on duplicate key update |
| | | name = values(name) , introduction = values(introduction) , is_del = values(is_del) , merchant_id = |
| | | values(merchant_id) , created_at = values(created_at) , created_by = values(created_by) , updated_at = |
| | | values(updated_at) , updated_by = values(updated_by) |
| | | </insert> |
| | | <select id="selectVOList" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsLabelVO"> |
| | | SELECT id, `name`, introduction FROM mcs_label WHERE is_del = 0 |
| | | </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.McsMerchantDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsMerchant" id="McsMerchantMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="phone" column="phone" jdbcType="VARCHAR"/> |
| | | <result property="account" column="account" jdbcType="VARCHAR"/> |
| | | <result property="logo" column="logo" jdbcType="VARCHAR"/> |
| | | <result property="userId" column="user_id" jdbcType="INTEGER"/> |
| | | <result property="level" column="level" jdbcType="INTEGER"/> |
| | | <result property="publishLimit" column="publish_limit" jdbcType="INTEGER"/> |
| | | <result property="expireAt" column="expire_at" jdbcType="TIMESTAMP"/> |
| | | <result property="isPause" column="is_pause" jdbcType="VARCHAR"/> |
| | | <result property="firstLitAt" column="first_lit_at" jdbcType="TIMESTAMP"/> |
| | | <result property="address" column="address" jdbcType="VARCHAR"/> |
| | | <result property="lat" column="lat" jdbcType="VARCHAR"/> |
| | | <result property="lon" column="lon" jdbcType="VARCHAR"/> |
| | | <result property="introduction" column="introduction" jdbcType="VARCHAR"/> |
| | | <result property="isDel" column="is_del" jdbcType="VARCHAR"/> |
| | | <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> |
| | | <result property="createdBy" column="created_by" jdbcType="INTEGER"/> |
| | | <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_merchant(name, phone, account, logo, user_id, level, publish_limit, expire_at, |
| | | address, lat, lon, introduction, is_del, created_at, created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.phone}, #{entity.account}, #{entity.logo}, #{entity.userId}, #{entity.level}, |
| | | #{entity.publishLimit}, #{entity.expireAt}, #{entity.address}, #{entity.lat}, #{entity.lon}, |
| | | #{entity.introduction}, #{entity.isDel}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, |
| | | #{entity.updatedBy}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_merchant(name, phone, account, logo, user_id, level, publish_limit, expire_at, |
| | | address, lat, lon, introduction, is_del, created_at, created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.phone}, #{entity.account}, #{entity.logo}, #{entity.userId}, #{entity.level}, |
| | | #{entity.publishLimit}, #{entity.expireAt}, #{entity.address}, #{entity.lat}, #{entity.lon}, |
| | | #{entity.introduction}, #{entity.isDel}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, |
| | | #{entity.updatedBy}) |
| | | </foreach> |
| | | on duplicate key update |
| | | name = values(name) , phone = values(phone) , account = values(account) , logo = values(logo) , user_id = |
| | | values(user_id) , level = values(level) , publish_limit = values(publish_limit) , expire_at = values(expire_at) |
| | | , address = values(address) , lat = values(lat) , lon = values(lon) , introduction = values(introduction) , |
| | | is_del = values(is_del) , created_at = values(created_at) , created_by = values(created_by) , updated_at = |
| | | values(updated_at) , updated_by = values(updated_by) |
| | | </insert> |
| | | <update id="updateIsPauseStatus"> |
| | | UPDATE mcs_merchant SET is_pause = 1 WHERE id IN |
| | | <foreach collection="needDealIds" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </update> |
| | | <select id="getMcsMerchantById" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO"> |
| | | SELECT t1.id, t1.`name`, t1.phone, t1.account, t1.`level`, t1.expire_at, t1.first_lit_at, t1.publish_limit, |
| | | t1.logo, t1.address, t1.lat, t1.lon, t1.introduction, t2.`status` AS accountStatus |
| | | FROM mcs_merchant t1 |
| | | LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id |
| | | WHERE t1.id = #{merchantId} AND t1.is_del = 0 |
| | | </select> |
| | | <select id="pageMcsMerchant" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO"> |
| | | SELECT t1.id, t1.`name`, t1.phone, t1.account, t1.`level`, t1.expire_at, t1.first_lit_at, t1.publish_limit, t2.`status` AS accountStatus |
| | | FROM mcs_merchant t1 |
| | | LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id |
| | | WHERE t1.is_del = 0 |
| | | <if test="pageMcsMerchantDTO.accountStatus != null"> |
| | | AND t2.`status` = #{pageMcsMerchantDTO.accountStatus} |
| | | </if> |
| | | <if test="pageMcsMerchantDTO.level != null"> |
| | | AND t1.`level` = #{pageMcsMerchantDTO.level} |
| | | </if> |
| | | <if test="pageMcsMerchantDTO.keyword != null and pageMcsMerchantDTO.keyword != """> |
| | | AND ( |
| | | t1.`name` LIKE CONCAT(#{pageMcsMerchantDTO.keyword}, '%') |
| | | OR t1.phone LIKE CONCAT(#{pageMcsMerchantDTO.keyword}, '%') |
| | | ) |
| | | </if> |
| | | ORDER BY t1.created_at DESC |
| | | </select> |
| | | <select id="getMcsMerchantByAccount" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO"> |
| | | SELECT t1.id, t1.`name`, t1.phone, t1.account, t1.`level`, t1.expire_at, t1.first_lit_at, t1.publish_limit, |
| | | t1.logo, t1.address, t1.lat, t1.lon, t1.introduction, t2.`status` AS accountStatus |
| | | FROM mcs_merchant t1 |
| | | LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id |
| | | WHERE t1.account = #{account} AND t1.is_del = 0 |
| | | </select> |
| | | <select id="getMcsIndexTopData" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.IndexTopStatisticsVO"> |
| | | SELECT randomCoinTotal + averageCoinTotal AS coinTotal,appliedTotal,gameTotal,infoTotal FROM( |
| | | SELECT |
| | | (SELECT IF(SUM(coins) IS NULL,0,SUM(coins)) FROM mcs_game t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id |
| | | WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.expire_at > NOW() AND t1.allocation = 1 AND t2.is_del = 0 AND t3.`status` = 1) AS randomCoinTotal, |
| | | |
| | | (SELECT IF(SUM(t1.coins * t1.coupons) IS NULL,0,SUM(t1.coins * t1.coupons)) FROM mcs_game t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id |
| | | WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.expire_at > NOW() AND t1.allocation = 2 AND t2.is_del = 0 AND t3.`status` = 1) AS averageCoinTotal, |
| | | |
| | | (SELECT IF(SUM(coin) IS NULL,0,SUM(coin)) FROM mcs_coupon WHERE to_days(created_at) = to_days(now())) AS appliedTotal, |
| | | |
| | | (SELECT COUNT(t1.id) FROM mcs_game t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id |
| | | WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.`type` = 1 AND t1.expire_at > NOW() AND t2.is_del = 0 AND t3.`status` = 1) AS gameTotal, |
| | | |
| | | (SELECT COUNT(t1.id) FROM mcs_game t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id |
| | | WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.`type` = 2 AND t1.expire_at > NOW() AND t2.is_del = 0 AND t3.`status` = 1) AS infoTotal |
| | | ) temp |
| | | </select> |
| | | <select id="pageH5McsMerchant" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO"> |
| | | SELECT * FROM ( |
| | | SELECT t1.id, t1.`name`, t1.phone, t1.account, t1.`level`, t1.expire_at, t1.first_lit_at, t1.publish_limit, |
| | | t1.introduction, t1.logo, |
| | | ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN((t1.lat * PI() / 180 - #{pageMcsMerchantDTO.lat} * PI() / 180) / 2),2) + |
| | | COS(t1.lat * PI() / 180) * COS(#{pageMcsMerchantDTO.lat} * PI() / 180) * POW(SIN((t1.lon * PI() / 180 - |
| | | #{pageMcsMerchantDTO.lon} * PI() / 180) / 2),2))), 2) AS distance |
| | | FROM mcs_merchant t1 |
| | | LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id |
| | | <if test="pageMcsMerchantDTO.type != null"> |
| | | LEFT JOIN (SELECT * FROM mcs_game |
| | | WHERE `status` = 2 AND `type` = #{pageMcsMerchantDTO.type} AND expire_at > NOW() GROUP BY merchant_id) t3 ON t1.id = t3.merchant_id |
| | | </if> |
| | | WHERE t1.is_del = 0 AND t1.expire_at > NOW() AND t2.`status` = 1 |
| | | <if test="pageMcsMerchantDTO.type != null"> |
| | | AND t3.id IS NOT NULL |
| | | </if> |
| | | <if test="pageMcsMerchantDTO.keyword != null and pageMcsMerchantDTO.keyword != """> |
| | | AND t1.`name` LIKE CONCAT(#{pageMcsMerchantDTO.keyword}, '%') |
| | | </if> |
| | | ) temp WHERE 1=1 |
| | | <if test="pageMcsMerchantDTO.distance != null"> |
| | | <if test="pageMcsMerchantDTO.isMore != null and pageMcsMerchantDTO.isMore ==1"> |
| | | AND distance > #{pageMcsMerchantDTO.distance} |
| | | </if> |
| | | <if test="pageMcsMerchantDTO.isMore == null"> |
| | | AND distance <= #{pageMcsMerchantDTO.distance} |
| | | </if> |
| | | </if> |
| | | ORDER BY distance ASC |
| | | </select> |
| | | <select id="selectNeedDealExpiredMerchant" resultType="java.lang.Long"> |
| | | SELECT id FROM mcs_merchant WHERE expire_at <= NOW() AND is_pause = 0 |
| | | </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.McsOrderDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsOrder" id="McsOrderBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="orderNo" column="order_no"/> |
| | | <result property="configId" column="config_id"/> |
| | | <result property="num" column="num"/> |
| | | <result property="status" column="status"/> |
| | | <result property="money" column="money"/> |
| | | <result property="payTime" column="pay_time"/> |
| | | <result property="merchantId" column="merchant_id"/> |
| | | <result property="payNo" column="pay_no"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="paymentMethod" column="payment_method"/> |
| | | <result property="address" column="address"/> |
| | | <result property="lat" column="lat"/> |
| | | <result property="lon" column="lon"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsOrderVO"> |
| | | select t.*,t1.`name` as payName,t2.name as merchantName,t2.account as merchantAccount from mcs_order t |
| | | left join mcs_config t1 on t.config_id = t1.id |
| | | left join mcs_merchant t2 on t.merchant_id = t2.id |
| | | <where> |
| | | <if test="commonPage.status !=null"> |
| | | and t.status = #{commonPage.status} |
| | | </if> |
| | | <if test="commonPage.keyword !=null and commonPage.keyword !=''"> |
| | | and t.order_no like concat('%',#{commonPage.keyword},'%') |
| | | </if> |
| | | <if test="commonPage.userId !=null"> |
| | | and t.user_id = #{commonPage.userId} |
| | | </if> |
| | | <if test="commonPage.merchantId !=null"> |
| | | and t.merchant_id = #{commonPage.merchantId} |
| | | </if> |
| | | </where> |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | <select id="detail" resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsOrderVO"> |
| | | select t.*,t1.`name` as payName,t2.name as merchantName,t2.account as merchantAccount from mcs_order t |
| | | left join mcs_config t1 on t.config_id = t1.id |
| | | left join mcs_merchant t2 on t.merchant_id = t2.id |
| | | where t.id =#{id} |
| | | </select> |
| | | |
| | | <select id="selectPhone" resultType="string"> |
| | | select t1.phone from mcs_order t left join mcs_merchant t1 on t.merchant_id = t1.id where t.id=#{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.McsProductLabelDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsProductLabel" id="McsProductLabelMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="productId" column="product_id" jdbcType="INTEGER"/> |
| | | <result property="labelId" column="label_id" jdbcType="INTEGER"/> |
| | | <result property="labelName" column="label_name" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_product_label(product_id, label_id, label_name) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.productId}, #{entity.labelId}, #{entity.labelName}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_product_label(product_id, label_id, label_name) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.productId}, #{entity.labelId}, #{entity.labelName}) |
| | | </foreach> |
| | | on duplicate key update |
| | | product_id = values(product_id) , label_id = values(label_id) , label_name = values(label_name) |
| | | </insert> |
| | | |
| | | </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.McsProductDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsProduct" id="McsProductMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="image" column="image" jdbcType="VARCHAR"/> |
| | | <result property="introduction" column="introduction" jdbcType="VARCHAR"/> |
| | | <result property="viewNum" column="view_num" jdbcType="INTEGER"/> |
| | | <result property="status" column="status" jdbcType="INTEGER"/> |
| | | <result property="isDel" column="is_del" jdbcType="VARCHAR"/> |
| | | <result property="merchantId" column="merchant_id" jdbcType="INTEGER"/> |
| | | <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> |
| | | <result property="createdBy" column="created_by" jdbcType="INTEGER"/> |
| | | <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_product(name, image, introduction, view_num, status, is_del, merchant_id, created_at, |
| | | created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.image}, #{entity.introduction}, #{entity.viewNum}, #{entity.status}, |
| | | #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, |
| | | #{entity.updatedBy}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_product(name, image, introduction, view_num, status, is_del, merchant_id, created_at, |
| | | created_by, updated_at, updated_by) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.image}, #{entity.introduction}, #{entity.viewNum}, #{entity.status}, |
| | | #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt}, |
| | | #{entity.updatedBy}) |
| | | </foreach> |
| | | on duplicate key update |
| | | name = values(name) , image = values(image) , introduction = values(introduction) , view_num = values(view_num) |
| | | , status = values(status) , is_del = values(is_del) , merchant_id = values(merchant_id) , created_at = |
| | | values(created_at) , created_by = values(created_by) , updated_at = values(updated_at) , updated_by = |
| | | values(updated_by) |
| | | </insert> |
| | | <select id="pageMcsProduct" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsProductVO"> |
| | | SELECT t1.id, t1.`name`, t1.image, t1.view_num, t1.`status`, t1.introduction, t3.productLabel |
| | | FROM mcs_product t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | LEFT JOIN (SELECT product_id, GROUP_CONCAT(label_name) AS productLabel FROM mcs_product_label GROUP BY product_id) t3 ON t1.id = t3.product_id |
| | | WHERE t1.is_del = 0 AND t2.is_del = 0 |
| | | <if test="pageMcsProductDTO.merchantId != null"> |
| | | AND t1.merchant_id = #{pageMcsProductDTO.merchantId} |
| | | AND t1.status = 1 |
| | | </if> |
| | | <if test="pageMcsProductDTO.merchantId == null"> |
| | | AND t2.user_id = #{pageMcsProductDTO.userId} |
| | | </if> |
| | | <if test="pageMcsProductDTO.status != null"> |
| | | AND t1.`status` = #{pageMcsProductDTO.status} |
| | | </if> |
| | | <if test="pageMcsProductDTO.keyword != null and pageMcsProductDTO.keyword != """> |
| | | AND t1.`name` LIKE CONCAT(#{pageMcsProductDTO.keyword}, '%') |
| | | </if> |
| | | ORDER BY t1.created_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.McsVerifiedRecordDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.McsVerifiedRecord" id="McsVerifiedRecordMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="couponId" column="coupon_id" jdbcType="INTEGER"/> |
| | | <result property="merchantId" column="merchant_id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="award" column="award" jdbcType="VARCHAR"/> |
| | | <result property="gameId" column="game_id" jdbcType="INTEGER"/> |
| | | <result property="nickName" column="nick_name" jdbcType="VARCHAR"/> |
| | | <result property="verifiedAt" column="verified_at" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_verified_record(coupon_id, name, award, verified_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.couponId}, #{entity.name}, #{entity.award}, #{entity.verifiedAt}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into smart_life.mcs_verified_record(coupon_id, name, award, verified_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.couponId}, #{entity.name}, #{entity.award}, #{entity.verifiedAt}) |
| | | </foreach> |
| | | on duplicate key update |
| | | coupon_id = values(coupon_id) , name = values(name) , award = values(award) , verified_at = values(verified_at) |
| | | </insert> |
| | | <select id="pageMcsVerifyRecord" |
| | | resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsVerifyRecordVO"> |
| | | SELECT t1.*, t3.`type` |
| | | FROM mcs_verified_record t1 |
| | | LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id |
| | | LEFT JOIN mcs_game t3 ON t1.game_id = t3.id |
| | | WHERE t2.user_id = #{pageVerifyRecordDTO.userId} |
| | | <if test="pageVerifyRecordDTO.type != null"> |
| | | AND t3.`type` = #{pageVerifyRecordDTO.type} |
| | | </if> |
| | | <if test="pageVerifyRecordDTO.verifiedBegin != null"> |
| | | AND t1.verified_at >= #{pageVerifyRecordDTO.verifiedBegin} |
| | | </if> |
| | | <if test="pageVerifyRecordDTO.verifiedEnd != null"> |
| | | AND t1.verified_at <= #{pageVerifyRecordDTO.verifiedEnd} |
| | | </if> |
| | | <if test="pageVerifyRecordDTO.keyword != null and pageVerifyRecordDTO.keyword != """> |
| | | AND (t1.nick_name LIKE CONCAT('%', #{pageVerifyRecordDTO.keyword}, '%') |
| | | OR t1.coupon_id LIKE CONCAT('%', #{pageVerifyRecordDTO.keyword}, '%') |
| | | OR t1.`name` LIKE CONCAT('%', #{pageVerifyRecordDTO.keyword}, '%') |
| | | ) |
| | | </if> |
| | | ORDER BY t1.verified_at DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | | |
| | |
| | | import com.panzhihua.common.model.dtos.DataKanBansDto; |
| | | 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.microCommercialStreet.BindUserPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | |
| | | * @return 人员详情 |
| | | */ |
| | | @PostMapping("detailuser") |
| | | public R detailUser(@RequestParam("userId") Long userId) { |
| | | public R<LoginUserInfoVO> detailUser(@RequestParam("userId") Long userId) { |
| | | return userService.detailUser(userId); |
| | | } |
| | | |
| | |
| | | return userService.getUserInfoByUnionId(unionId); |
| | | } |
| | | |
| | | /** |
| | | * 微商业街新增商家账号 |
| | | * @param mcsMerchantDTO |
| | | * @return 商家用户id |
| | | */ |
| | | @PostMapping("insertMcsMerchantAccount") |
| | | public R addMcsMerchantUser(@RequestBody McsMerchantDTO mcsMerchantDTO) { |
| | | return userService.addMcsMerchantUser(mcsMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 微商业街修改商家账号 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("putMcsMerchantUser") |
| | | public R putMcsMerchantUser(@RequestBody McsMerchantDTO mcsMerchantDTO) { |
| | | return userService.putMcsMerchantUser(mcsMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 检查用户是否有效 |
| | | * @param userId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @PutMapping("checkUserIsValid") |
| | | public Boolean checkUserIsValid(@RequestParam("userId") Long userId, @RequestParam("type") Integer type) { |
| | | return userService.checkUserIsValid(userId, type); |
| | | } |
| | | |
| | | /** |
| | | * 根据手机号、用户类型查询用户 |
| | | * @param phone |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @GetMapping("/getSysUserByPhone") |
| | | public R getSysUserByPhone(@RequestParam("phone") String phone, @RequestParam("type") Integer type) { |
| | | return userService.getSysUserByPhone(phone, type); |
| | | } |
| | | |
| | | /** |
| | | * 发送验证码 |
| | | * @param phone 手机号 |
| | | * @param clientIP 用户ip |
| | | * @param prefixKey redis Key 前缀 |
| | | * @param limit 获取次数限制 |
| | | * @param timeout 超次数获取时间等待 |
| | | * @return |
| | | */ |
| | | @GetMapping("/sendMessageCode") |
| | | public R sendMessageCode(@RequestParam("phone") String phone, |
| | | @RequestParam(value = "clientIP", required = false) String clientIP, |
| | | @RequestParam("prefixKey") String prefixKey, |
| | | @RequestParam("limit") Integer limit, |
| | | @RequestParam("timeout") Integer timeout) { |
| | | return userService.sendMessageCode(phone, clientIP, prefixKey, limit, timeout); |
| | | } |
| | | |
| | | /** |
| | | * 根据openId获取微商业街用户 |
| | | * @param openid |
| | | * @return |
| | | */ |
| | | @GetMapping("/getMcsUserByOpenId") |
| | | public R getMcsUserByOpenId(@RequestParam("openid") String openid) { |
| | | return userService.getMcsUserByOpenId(openid); |
| | | } |
| | | |
| | | /** |
| | | * 商业街用户微信授权-绑定手机号 |
| | | * @param bindUserPhoneDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/mcs/bindPhone") |
| | | public R bindOrAddMcsUser(@RequestBody BindUserPhoneDTO bindUserPhoneDTO) { |
| | | return userService.bindOrAddMcsUser(bindUserPhoneDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | * 高龄认证显示提示(1.是 2.否) |
| | | */ |
| | | private Integer bigAgeTips; |
| | | /** |
| | | * 明文密码 |
| | | */ |
| | | private String plaintextPassword; |
| | | |
| | | } |
| | |
| | | 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.community.microCommercialStreet.BindUserPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.user.PageFeedBackDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageUserAppletsBackstageDTO; |
| | |
| | | * 用户id |
| | | * @return 人员详情 |
| | | */ |
| | | R detailUser(Long userId); |
| | | R<LoginUserInfoVO> detailUser(Long userId); |
| | | |
| | | /** |
| | | * 设置用户标签 |
| | |
| | | * @return |
| | | */ |
| | | R getUserInfoByUnionId(String unionId); |
| | | |
| | | /** |
| | | * 微商业街新增商家账号 |
| | | * @param mcsMerchantDTO |
| | | * @return 商家用户id |
| | | */ |
| | | R addMcsMerchantUser(McsMerchantDTO mcsMerchantDTO); |
| | | |
| | | /** |
| | | * 微商业街修改商家账号 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | R putMcsMerchantUser(McsMerchantDTO mcsMerchantDTO); |
| | | |
| | | /** |
| | | * 检查用户是否有效 |
| | | * @param userId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | Boolean checkUserIsValid(Long userId, Integer type); |
| | | |
| | | /** |
| | | * 根据手机号、用户类型查询用户 |
| | | * @param phone |
| | | * @param type |
| | | * @return |
| | | */ |
| | | R getSysUserByPhone(String phone, Integer type); |
| | | |
| | | /** |
| | | * 发送验证码 |
| | | * @param phone 手机号 |
| | | * @param clientIP 用户ip |
| | | * @param prefixKey redis Key 前缀 |
| | | * @param limit 获取次数限制 |
| | | * @param timeout 超次数获取时间等待 |
| | | * @return |
| | | */ |
| | | R sendMessageCode(String phone, String clientIP, String prefixKey, Integer limit, Integer timeout); |
| | | |
| | | /** |
| | | * 根据openId获取微商业街用户 |
| | | * @param openid |
| | | * @return |
| | | */ |
| | | R getMcsUserByOpenId(String openid); |
| | | |
| | | /** |
| | | * 商业街用户微信授权-绑定手机号 |
| | | * @param bindUserPhoneDTO |
| | | * @return |
| | | */ |
| | | R bindOrAddMcsUser(BindUserPhoneDTO bindUserPhoneDTO); |
| | | } |
| | |
| | | } |
| | | queryWrapper.orderByDesc(SysRoleDO::getCreateAt); |
| | | IPage<SysRoleDO> sysRoleDOIPage=this.roleDAO.selectPage(new Page<>(pageNum,pageSize),queryWrapper); |
| | | if (ObjectUtils.isEmpty(sysRoleDOIPage.getRecords())) { |
| | | return R.fail("角色列表为空"); |
| | | } |
| | | return R.ok(sysRoleDOIPage); |
| | | } |
| | | |
| | |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isNotBlank; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Random; |
| | | import java.util.Set; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.BindUserPhoneDTO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsLoginUserInfoVO; |
| | | import com.panzhihua.service_user.dao.*; |
| | | import com.panzhihua.service_user.entity.SysAppConfig; |
| | | import com.panzhihua.service_user.entity.SysTemplateConfig; |
| | |
| | | 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.community.microCommercialStreet.McsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberEditAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberEditStatusDTO; |
| | |
| | | import com.panzhihua.common.model.vos.user.UserPhoneVO; |
| | | import com.panzhihua.common.utlis.IdCard; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.common.utlis.SmsUtil; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class UserServiceImpl implements UserService { |
| | | |
| | | private static final String DEFAULT_IMAGE_URL = "https://www.psciio.com//idcard/91313573d071436ab1f934231b31c6e5.jpg"; |
| | | |
| | | @Resource |
| | | private UserDao userDao; |
| | | @Resource |
| | |
| | | new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, type).eq(SysUserDO::getOpenid, name)); |
| | | } else { |
| | | LambdaQueryWrapper<SysUserDO> wrapper = new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, type); |
| | | wrapper.and(sysUserDOLambdaQueryWrapper -> sysUserDOLambdaQueryWrapper.eq(SysUserDO::getAccount, name).or() |
| | | .eq(SysUserDO::getPhone, name)); |
| | | if (type == 11) { |
| | | //只允许通过account登录 |
| | | wrapper.and(sysUserDOLambdaQueryWrapper -> sysUserDOLambdaQueryWrapper.eq(SysUserDO::getAccount, name)); |
| | | } else { |
| | | wrapper.and(sysUserDOLambdaQueryWrapper -> sysUserDOLambdaQueryWrapper.eq(SysUserDO::getAccount, name).or() |
| | | .eq(SysUserDO::getPhone, name)); |
| | | } |
| | | sysUserDO = userDao.selectOne(wrapper); |
| | | } |
| | | boolean empty = ObjectUtils.isEmpty(sysUserDO); |
| | |
| | | * @return 人员详情 |
| | | */ |
| | | @Override |
| | | public R detailUser(Long userId) { |
| | | public R<LoginUserInfoVO> detailUser(Long userId) { |
| | | LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO(); |
| | | if (userId < 100000000l) { |
| | | SysUserDO sysUserDO = userDao.selectById(userId); |
| | |
| | | } |
| | | sysUserDO.setFaceState(null); |
| | | SysUserDO sysUserDO1 = |
| | | userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getIdCard, idCard)); |
| | | userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getIdCard, idCard).eq(SysUserDO::getCommunityId,loginUserInfoVO.getCommunityId())); |
| | | if (!ObjectUtils.isEmpty(sysUserDO1)) { |
| | | return R.fail("身份证已经存在"); |
| | | } |
| | |
| | | BeanUtils.copyProperties(sysUserDO, loginUserInfoVO); |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | |
| | | /** |
| | | * 微商业街新增商家账号 |
| | | * @param mcsMerchantDTO |
| | | * @return 商家用户id |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addMcsMerchantUser(McsMerchantDTO mcsMerchantDTO) { |
| | | SysUserDO sysUserDO; |
| | | sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda() |
| | | .eq(SysUserDO::getPhone, mcsMerchantDTO.getPhone()).eq(SysUserDO::getType, 11)); |
| | | String encode = new BCryptPasswordEncoder().encode(mcsMerchantDTO.getPassword()); |
| | | if (nonNull(sysUserDO)) { |
| | | sysUserDO.setAccount(mcsMerchantDTO.getAccount()); |
| | | sysUserDO.setStatus(mcsMerchantDTO.getAccountStatus()); |
| | | sysUserDO.setPhone(mcsMerchantDTO.getPhone()); |
| | | sysUserDO.setPassword(encode); |
| | | sysUserDO.setPlaintextPassword(mcsMerchantDTO.getPassword()); |
| | | sysUserDO.setImageUrl(mcsMerchantDTO.getLogo()); |
| | | sysUserDO.setName(mcsMerchantDTO.getName()); |
| | | userDao.updateById(sysUserDO); |
| | | McsLoginUserInfoVO loginUserInfoVO = new McsLoginUserInfoVO(); |
| | | BeanUtils.copyProperties(sysUserDO, loginUserInfoVO); |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | // sys_user 表 |
| | | sysUserDO = new SysUserDO(); |
| | | BeanUtils.copyProperties(mcsMerchantDTO, sysUserDO); |
| | | sysUserDO.setAccount(mcsMerchantDTO.getAccount()); |
| | | sysUserDO.setType(11); |
| | | sysUserDO.setAreaId(null); |
| | | sysUserDO.setStatus(mcsMerchantDTO.getAccountStatus()); |
| | | sysUserDO.setPhone(mcsMerchantDTO.getPhone()); |
| | | sysUserDO.setPassword(encode); |
| | | sysUserDO.setPlaintextPassword(mcsMerchantDTO.getPassword()); |
| | | sysUserDO.setImageUrl(mcsMerchantDTO.getLogo()); |
| | | try { |
| | | userDao.insert(sysUserDO); |
| | | McsLoginUserInfoVO loginUserInfoVO = new McsLoginUserInfoVO(); |
| | | BeanUtils.copyProperties(sysUserDO, loginUserInfoVO); |
| | | return R.ok(loginUserInfoVO); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("修改数字商业街商家用户报错【{}】", e.getMessage()); |
| | | if (e.getMessage().contains("union_account_type") || e.getMessage().contains("23000")) { |
| | | return R.fail("账户已经存在"); |
| | | } else { |
| | | return R.fail("账户或手机号已存在,请重新填写尝试"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 微商业街修改商家账号 |
| | | * @param mcsMerchantDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R putMcsMerchantUser(McsMerchantDTO mcsMerchantDTO) { |
| | | SysUserDO sysUserDO = userDao.selectById(mcsMerchantDTO.getUserId()); |
| | | if (isNull(sysUserDO)) { |
| | | return R.fail("用户不存在"); |
| | | } |
| | | String account = mcsMerchantDTO.getAccount(); |
| | | String phone = mcsMerchantDTO.getPhone(); |
| | | Integer accountStatus = mcsMerchantDTO.getAccountStatus(); |
| | | String name = mcsMerchantDTO.getName(); |
| | | if (isNotBlank(account)) { |
| | | sysUserDO.setAccount(account); |
| | | } |
| | | if (isNotBlank(phone)) { |
| | | sysUserDO.setPhone(phone); |
| | | } |
| | | if (nonNull(accountStatus)) { |
| | | sysUserDO.setStatus(accountStatus); |
| | | } |
| | | if (isNotBlank(name)) { |
| | | sysUserDO.setName(name); |
| | | } |
| | | try { |
| | | userDao.updateById(sysUserDO); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("修改数字商业街商家用户报错【{}】", e.getMessage()); |
| | | if (e.getMessage().contains("union_phone_type")) { |
| | | return R.fail("手机号已存在"); |
| | | } else if (e.getMessage().contains("union_account_type")) { |
| | | return R.fail("账户已经存在"); |
| | | }else if(e.getMessage().contains("23000")){ |
| | | return R.fail("手机号已存在"); |
| | | } else { |
| | | return R.fail("账户或手机号已存在,请重新填写尝试"); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 检查用户是否有效 |
| | | * @param userId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Boolean checkUserIsValid(Long userId, Integer type) { |
| | | SysUserDO sysUserDO = userDao.selectById(userId); |
| | | if (isNull(sysUserDO) || sysUserDO.getStatus() != 1 || !sysUserDO.getType().equals(type)) { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 根据手机号、用户类型查询用户 |
| | | * @param phone |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getSysUserByPhone(String phone, Integer type) { |
| | | SysUserDO sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, phone).eq(SysUserDO::getType, type)); |
| | | McsLoginUserInfoVO loginUserInfoVO = null; |
| | | if (nonNull(sysUserDO)) { |
| | | loginUserInfoVO = new McsLoginUserInfoVO(); |
| | | BeanUtils.copyProperties(sysUserDO, loginUserInfoVO); |
| | | } |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | |
| | | /** |
| | | * 发送验证码 |
| | | * @param phone 手机号 |
| | | * @param clientIP 用户ip |
| | | * @param prefixKey redis Key 前缀 |
| | | * @param limit 获取次数限制 |
| | | * @param timeout 超次数获取时间等待 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R sendMessageCode(String phone, String clientIP, String prefixKey, Integer limit, Integer timeout) { |
| | | ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue(); |
| | | if (isNotBlank(clientIP)) { |
| | | String redisKey = String.join("::", prefixKey, clientIP); |
| | | Long increment = opsForValue.increment(redisKey, 1); |
| | | if (increment > limit) { |
| | | return R.fail(String.format("请求过于频繁,请%d分钟后再次尝试!", timeout/60)); |
| | | } |
| | | stringRedisTemplate.expire(redisKey, timeout, TimeUnit.SECONDS); |
| | | } |
| | | Random r = new Random(); |
| | | StringBuilder rs = new StringBuilder(); |
| | | for (int i = 0; i < 5; i++) { |
| | | rs.append(r.nextInt(10)); |
| | | } |
| | | String code = rs.toString(); |
| | | int result = SmsUtil.sendCode(phone, code); |
| | | if (result == 1) { |
| | | String codeKey = String.join("::", phone, code); |
| | | opsForValue.set(codeKey, code, timeout, TimeUnit.SECONDS); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 根据openId获取微商业街用户 |
| | | * @param openid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getMcsUserByOpenId(String openid) { |
| | | SysUserDO sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getOpenid, openid).eq(SysUserDO::getType, 11)); |
| | | McsLoginUserInfoVO loginUserInfoVO = null; |
| | | if (nonNull(sysUserDO) && isNotBlank(sysUserDO.getOpenid())) { |
| | | loginUserInfoVO = new McsLoginUserInfoVO(); |
| | | BeanUtils.copyProperties(sysUserDO, loginUserInfoVO); |
| | | } |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | |
| | | /** |
| | | * 商业街用户微信授权-绑定手机号 |
| | | * @param bindUserPhoneDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R bindOrAddMcsUser(BindUserPhoneDTO bindUserPhoneDTO) { |
| | | String phone = bindUserPhoneDTO.getPhone(); |
| | | String openId = bindUserPhoneDTO.getOpenId(); |
| | | String redisKey = String.join("::", phone, bindUserPhoneDTO.getCode()); |
| | | Boolean hasKey = stringRedisTemplate.hasKey(redisKey); |
| | | if (hasKey) { |
| | | //通过验证 |
| | | SysUserDO sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, phone).eq(SysUserDO::getType, 11)); |
| | | if (nonNull(sysUserDO)) { |
| | | //已有用户 |
| | | sysUserDO.setOpenid(openId); |
| | | int result = userDao.updateById(sysUserDO); |
| | | if (result > 0) { |
| | | McsLoginUserInfoVO loginUserInfoVO = new McsLoginUserInfoVO(); |
| | | BeanUtils.copyProperties(sysUserDO, loginUserInfoVO); |
| | | stringRedisTemplate.delete(redisKey); |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | return R.fail("绑定失败,请重试"); |
| | | } else { |
| | | //自动创建用户 |
| | | McsMerchantDTO mcsMerchantDTO = new McsMerchantDTO(); |
| | | mcsMerchantDTO.setAccount(phone); |
| | | mcsMerchantDTO.setPassword("88888888"); |
| | | mcsMerchantDTO.setAccountStatus(1); |
| | | mcsMerchantDTO.setPhone(phone); |
| | | mcsMerchantDTO.setName("用户" + retrieveRandomCode(5)); |
| | | mcsMerchantDTO.setImageUrl(DEFAULT_IMAGE_URL); |
| | | mcsMerchantDTO.setOpenId(openId); |
| | | R addUserResult = addMcsMerchantUser(mcsMerchantDTO); |
| | | if (R.isOk(addUserResult)) { |
| | | McsLoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(addUserResult.getData()), McsLoginUserInfoVO.class); |
| | | loginUserInfoVO.setPlaintextPassword("88888888"); |
| | | stringRedisTemplate.delete(redisKey); |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | return addUserResult; |
| | | } |
| | | } else { |
| | | return R.fail("验证码错误"); |
| | | } |
| | | } |
| | | |
| | | private String retrieveRandomCode(int length) { |
| | | Random r = new Random(); |
| | | StringBuilder rs = new StringBuilder(); |
| | | for (int i = 0; i < length; i++) { |
| | | rs.append(r.nextInt(10)); |
| | | } |
| | | return rs.toString(); |
| | | } |
| | | } |
| | |
| | | <result property="workStartTime" column="work_start_time"/> |
| | | <result property="workEndTime" column="work_end_time"/> |
| | | <result property="bigAgeTips" column="big_age_tips"/> |
| | | <result property="plaintextPassword" column="plaintext_password"/> |
| | | |
| | | </resultMap> |
| | | <sql id="columns"> |
| | |
| | | e.role_id=#{administratorsUserVO.roleId} |
| | | </if> |
| | | <where> |
| | | u.type=3 |
| | | <if test='administratorsUserVO.communityId != null '>AND u.community_id = |
| | | #{administratorsUserVO.communityId} |
| | | </if> |
| | |
| | | <groupId>com.github.xiaoymin</groupId> |
| | | <artifactId>swagger-bootstrap-ui</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.binarywang</groupId> |
| | | <artifactId>weixin-java-miniapp</artifactId> |
| | | <version>3.9.9.B</version> |
| | | </dependency> |
| | | <!--添加监控依赖包--> |
| | | <dependency> |
| | | <groupId>io.micrometer</groupId> |
New file |
| | |
| | | package com.panzhihua.shop_backstage.aop; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Before; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.context.request.RequestAttributes; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.AES; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: CheckExpirationInterceptor |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 过期检测拦截器 |
| | | * @author: hans |
| | | * @date: 2022/01/11 10:36 |
| | | */ |
| | | @Aspect |
| | | @Component |
| | | @Slf4j |
| | | public class CheckExpirationInterceptor { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @Before("@annotation(com.panzhihua.shop_backstage.aop.CheckMcsMerchantExpiration)") |
| | | public void checkExpiration(JoinPoint joinPoint) { |
| | | MethodSignature signature = (MethodSignature) joinPoint.getSignature(); |
| | | log.info("拦截方法:【{}】", signature.getMethod().getName()); |
| | | // 获取RequestAttributes |
| | | RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); |
| | | // 从获取RequestAttributes中获取HttpServletRequest的信息 |
| | | HttpServletRequest request = (HttpServletRequest)requestAttributes.resolveReference(RequestAttributes.REFERENCE_REQUEST); |
| | | // 登录对象信息 |
| | | String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO); |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | log.error("获取登录用户信息失败【{}】", joinPoint); |
| | | throw new ServiceException("获取登录用户信息失败"); |
| | | } |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | R retrieveResult = communityService.retrieveMcsMerchantInfoByUserId(loginUserInfoVO.getUserId()); |
| | | if (R.isOk(retrieveResult) && nonNull(retrieveResult.getData())) { |
| | | McsMerchantVO mcsMerchantVO = JSONObject.parseObject(JSONObject.toJSONString(retrieveResult.getData()), McsMerchantVO.class); |
| | | Date expireAt = mcsMerchantVO.getExpireAt(); |
| | | if (expireAt.before(new Date())) { |
| | | throw new ServiceException("账户已过期,请及时续费"); |
| | | } |
| | | } else { |
| | | throw new ServiceException("未查询到商户信息"); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.shop_backstage.aop; |
| | | |
| | | import java.lang.annotation.Documented; |
| | | import java.lang.annotation.ElementType; |
| | | import java.lang.annotation.Retention; |
| | | import java.lang.annotation.RetentionPolicy; |
| | | import java.lang.annotation.Target; |
| | | |
| | | /** |
| | | * @title: CheckMcsMerchantExpiration |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 微商业街商家是否到期统一检测 |
| | | * @author: hans |
| | | * @date: 2022/01/11 10:28 |
| | | */ |
| | | @Target(ElementType.METHOD) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | @Documented |
| | | public @interface CheckMcsMerchantExpiration { |
| | | |
| | | } |
| | |
| | | |
| | | import static org.apache.commons.lang3.StringUtils.isBlank; |
| | | |
| | | import java.io.File; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.common.model.vos.UploadFilesVO; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | @ApiOperation(value = "所有服务分类", response = ConvenientServiceCategoryVO.class) |
| | | @GetMapping("/service-category/all") |
| | | public R getAllServiceCategories() { |
| | | return communityService.getAllServiceCategories(); |
| | | return communityService.getAllServiceCategories(this.getAreaCode()); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑便民服务商家") |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "上传文件-可批量") |
| | | @PostMapping(value = "/upload/files", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadFiles(@RequestParam MultipartFile[] file, HttpServletRequest request) { |
| | | List<UploadFilesVO> urlList = new ArrayList<>(); |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | for (MultipartFile f : file) { |
| | | String fileExtension = FilenameUtils.getExtension(f.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + fileExtension; |
| | | try { |
| | | InputStream is = f.getInputStream(); |
| | | String fileName = |
| | | UUID.randomUUID().toString().replace("-", "") + "." + fileExtension; |
| | | File file1 = new File(fileName); |
| | | f.transferTo(file1); |
| | | boolean delete = file1.delete(); |
| | | log.info("临时文件删除【{}】", delete); |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | | UploadFilesVO fileVO = new UploadFilesVO(); |
| | | fileVO.setUrl(url + "idcard/" + name); |
| | | urlList.add(fileVO); |
| | | } catch (Exception e) { |
| | | log.error("上传文件失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | sftp.logout(); |
| | | return R.ok(urlList); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增产品分类") |
| | | @PostMapping("/product-category/add") |
| | | public R addProductCategory(@RequestBody @Validated(AddGroup.class) ConvenientProductCategoryDTO convenientProductCategoryDTO) { |
New file |
| | |
| | | package com.panzhihua.shop_backstage.api; |
| | | |
| | | |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.json.XML; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | 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.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.microCommercialStreet.McsOrderVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | /** |
| | | * 商业街订单表(McsOrder)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-01-04 16:10:07 |
| | | */ |
| | | @Api(tags = {"商业街订单API"}) |
| | | @RestController |
| | | @RequestMapping("mcsOrder") |
| | | public class McsOrderApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询订单",response = McsOrderVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setUserId(this.getUserId()); |
| | | return communityService.selectAllMscOrder(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "通过主键查询单条数据",response = McsOrderVO.class) |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return communityService.selectOneMscOrder(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param mcsOrderVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody McsOrderVO mcsOrderVO) { |
| | | mcsOrderVO.setUserId(this.getUserId()); |
| | | return communityService.insertMscOrder(mcsOrderVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param mcsOrderVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改订单") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody McsOrderVO mcsOrderVO) { |
| | | return communityService.updateMscOrder(mcsOrderVO); |
| | | } |
| | | |
| | | /** |
| | | * 微信支付 |
| | | * @param mcsOrderVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("微信支付") |
| | | @PostMapping("/wxPay") |
| | | public R wxPay(@RequestBody McsOrderVO mcsOrderVO){ |
| | | String clientIp = this.getRequest().getHeader("X-Real-IP"); |
| | | mcsOrderVO.setClientIp(clientIp); |
| | | return communityService.wxPayMscOrder(mcsOrderVO); |
| | | } |
| | | |
| | | /** |
| | | * 发送提醒短信 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation("发送提醒短信") |
| | | @GetMapping("/sendContent") |
| | | public R sendContent(@RequestParam("id") Long id){ |
| | | return communityService.sendContentMcsOrder(id); |
| | | } |
| | | /** |
| | | *微信支付回调 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation("微信支付回调") |
| | | @PostMapping("wxNotify") |
| | | public void payCallback(HttpServletRequest request, HttpServletResponse response) { |
| | | String inputLine = ""; |
| | | String notityXml = ""; |
| | | try { |
| | | while ((inputLine = request.getReader().readLine()) != null) { |
| | | notityXml += inputLine; |
| | | } |
| | | // 关闭流 |
| | | request.getReader().close(); |
| | | // 解析成Json |
| | | org.json.JSONObject xmlJson = XML.toJSONObject(notityXml); |
| | | if (StringUtils.isNotEmpty(xmlJson.toString())) { |
| | | JSONObject resultData = JSON.parseObject(xmlJson.get("xml").toString()); |
| | | // 成功支付订单 |
| | | if (resultData.getString("result_code").equals("SUCCESS") |
| | | && resultData.getString("return_code").equals("SUCCESS")) { |
| | | McsOrderVO mcsOrderVO = new McsOrderVO(); |
| | | // 订单号 |
| | | String orderTradeNo = resultData.getString("out_trade_no"); |
| | | mcsOrderVO.setOrderNo(orderTradeNo); |
| | | // 微信支付订单号 |
| | | String wxTradeNo = resultData.getString("transaction_id"); |
| | | mcsOrderVO.setPayNo(wxTradeNo); |
| | | // 支付完成时间 |
| | | String payTime = resultData.getString("time_end"); |
| | | mcsOrderVO.setPayTime(DateUtils.stringToDate(payTime,DateUtils.format_yyyyMMddHHmmss)); |
| | | // 现金支付金额 |
| | | mcsOrderVO.setStatus(1); |
| | | |
| | | // 根据订单号修改订单信息 |
| | | communityService.notifyMcsOrder(mcsOrderVO); |
| | | |
| | | // 封装 返回值 |
| | | StringBuffer buffer = new StringBuffer(); |
| | | buffer.append("<xml>"); |
| | | buffer.append("<return_code>SUCCESS</return_code>"); |
| | | buffer.append("<return_msg>OK</return_msg>"); |
| | | buffer.append("</xml>"); |
| | | |
| | | // 给微信服务器返回 成功标示 否则会一直询问 咱们服务器 是否回调成功 |
| | | PrintWriter writer = response.getWriter(); |
| | | // 返回 |
| | | writer.print(buffer.toString()); |
| | | } else {// 未成功支付订单 |
| | | // 封装 返回值 |
| | | StringBuffer buffer = new StringBuffer(); |
| | | buffer.append("<xml>"); |
| | | buffer.append("<return_code>FAIL</return_code>"); |
| | | buffer.append("<return_msg>FAIL</return_msg>"); |
| | | buffer.append("</xml>"); |
| | | |
| | | // 给微信服务器返回 成功标示 否则会一直询问 咱们服务器 是否回调成功 |
| | | PrintWriter writer = response.getWriter(); |
| | | // 返回 |
| | | writer.print(buffer.toString()); |
| | | } |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.shop_backstage.api; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | import java.util.regex.Pattern; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | 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 com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.BindUserPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.DeleteProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsEvaluateDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageJoinGameListDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsEvaluateDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsInformationDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsProductDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageVerifyRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.PutUserInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForGameDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForProductDTO; |
| | | import com.panzhihua.common.model.vos.LoginReturnVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.GameStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.IndexTopStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsConfigVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsCouponVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsInformationVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsLabelVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsLoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsProductVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsVerifyRecordVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.MyCouponVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.TopStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.VerifiedReturnVO; |
| | | import com.panzhihua.common.service.auth.TokenService; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | import com.panzhihua.shop_backstage.aop.CheckMcsMerchantExpiration; |
| | | import com.panzhihua.shop_backstage.config.WxMaConfiguration; |
| | | import com.panzhihua.shop_backstage.model.request.LoginRequest; |
| | | import com.panzhihua.shop_backstage.model.vos.LoginBody; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: MicroCommercialStreetApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 微商业街相关接口 |
| | | * @author: hans |
| | | * @date: 2021/12/28 14:18 |
| | | */ |
| | | @Api(tags = {"微商业街"}) |
| | | @RestController |
| | | @RequestMapping("/microcommercialstreet") |
| | | @Slf4j |
| | | public class MicroCommercialStreetApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | |
| | | @ApiOperation(value = "H5授权登录", response = LoginReturnVO.class) |
| | | @PostMapping("/auth/login") |
| | | public R mcsAuthLogin(@RequestBody LoginRequest loginRequest) { |
| | | String code = loginRequest.getCode(); |
| | | if (ObjectUtils.isEmpty(code)) { |
| | | return R.fail("缺少登录参数"); |
| | | } |
| | | log.info(code); |
| | | String openid = wxMaConfiguration.retrieveOpenId(code); |
| | | if (isNull(openid)) { |
| | | return R.fail("登录失败"); |
| | | } |
| | | R r = userService.getMcsUserByOpenId(openid); |
| | | if (R.isOk(r) && nonNull(r.getData())) { |
| | | McsLoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), McsLoginUserInfoVO.class); |
| | | return tokenService.loginMcsUser(loginUserInfoVO.getAccount(), loginUserInfoVO.getPlaintextPassword()); |
| | | } |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setOpenId(openid); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取绑定验证码") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "phone", value = "手机号", required = true) |
| | | }) |
| | | @GetMapping("/bind/verifyCode") |
| | | public R getBindVerifyCode(@RequestParam("phone") String phone) { |
| | | if (!assertPhoneIsValid(phone)) { |
| | | return R.fail("手机号格式错误"); |
| | | } |
| | | String clientIP = this.getRequest().getHeader("X-Real-IP"); |
| | | log.info("获取验证码用户ip信息【{}】", clientIP); |
| | | try { |
| | | return userService.sendMessageCode(phone, clientIP, "MCS_BIND_WITH_PHONE", 5, 5 * 60); |
| | | } catch (Exception e) { |
| | | return R.fail("获取失败"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "微信授权-绑定手机号", response = LoginReturnVO.class) |
| | | @PostMapping("/bindPhone") |
| | | public R bindOrAddMcsUser(@RequestBody @Valid BindUserPhoneDTO bindUserPhoneDTO) { |
| | | R r = userService.bindOrAddMcsUser(bindUserPhoneDTO); |
| | | Boolean isValid = false; |
| | | if (R.isOk(r) && r.getData() != null) { |
| | | McsLoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), McsLoginUserInfoVO.class); |
| | | isValid = loginUserInfoVO.getStatus() == 1; |
| | | if (isValid) { |
| | | R result = tokenService.loginMcsUser(loginUserInfoVO.getAccount(), loginUserInfoVO.getPlaintextPassword()); |
| | | return result; |
| | | } else { |
| | | return R.fail("账号被禁用"); |
| | | } |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | } |
| | | |
| | | @ApiOperation(value = "微商业街商家后台登录", response = LoginReturnVO.class) |
| | | @PostMapping("/merchant/login") |
| | | public R merchantLogin(@RequestBody @Valid LoginBody loginBody) { |
| | | String account = loginBody.getAccount(); |
| | | log.info("登录用户信息【{}】", loginBody); |
| | | try { |
| | | R r = communityService.getMcsMerchantByAccount(account); |
| | | Boolean isValid = false; |
| | | if (R.isOk(r) && r.getData() != null) { |
| | | McsMerchantVO merchantVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), McsMerchantVO.class); |
| | | isValid = merchantVO.getAccountStatus() == 1; |
| | | if (isValid) { |
| | | R result = tokenService.loginMcsUser(account, loginBody.getPassword()); |
| | | return result; |
| | | } else { |
| | | return R.fail("账号被禁用"); |
| | | } |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | } catch (Exception e) { |
| | | return R.fail("登陆失败了"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "微商业街用户登录", response = LoginReturnVO.class) |
| | | @PostMapping("/loginWithPhone") |
| | | public R loginWithPhone(@RequestBody @Valid LoginWithPhoneDTO loginDTO) { |
| | | log.info("登录用户信息【{}】", loginDTO); |
| | | try { |
| | | R r = communityService.loginWithPhone(loginDTO); |
| | | Boolean isValid = false; |
| | | if (R.isOk(r) && r.getData() != null) { |
| | | McsLoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), McsLoginUserInfoVO.class); |
| | | isValid = loginUserInfoVO.getStatus() == 1; |
| | | if (isValid) { |
| | | R result = tokenService.loginMcsUser(loginUserInfoVO.getAccount(), loginUserInfoVO.getPlaintextPassword()); |
| | | return result; |
| | | } else { |
| | | return R.fail("账号被禁用"); |
| | | } |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | } catch (Exception e) { |
| | | return R.fail("登陆失败了"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "获取登录验证码") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "phone", value = "手机号", required = true) |
| | | }) |
| | | @GetMapping("/verifyCode") |
| | | public R getLoginVerifyCode(@RequestParam("phone") String phone) { |
| | | if (!assertPhoneIsValid(phone)) { |
| | | return R.fail("手机号格式错误"); |
| | | } |
| | | String clientIP = this.getRequest().getHeader("X-Real-IP"); |
| | | log.info("获取验证码用户ip信息【{}】", clientIP); |
| | | try { |
| | | return userService.sendMessageCode(phone, clientIP, "MCS_LOGIN_WITH_PHONE", 5, 5 * 60); |
| | | } catch (Exception e) { |
| | | return R.fail("获取失败"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "当前登录用户信息", response = McsLoginUserInfoVO.class) |
| | | @GetMapping("/userInfo") |
| | | public R detailUser() { |
| | | Long userId = this.getUserId(); |
| | | R<LoginUserInfoVO> loginUserInfoVOR = userService.detailUser(userId); |
| | | try { |
| | | LoginUserInfoVO loginUserInfoVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(loginUserInfoVOR.getData()), LoginUserInfoVO.class); |
| | | loginUserInfoVO.setPassword("******"); |
| | | R<McsMerchantVO> mcsMerchantVOR = communityService.getMcsMerchantByAccount(loginUserInfoVO.getAccount()); |
| | | McsLoginUserInfoVO mcsLoginUserInfoVO = new McsLoginUserInfoVO(); |
| | | BeanUtils.copyProperties(loginUserInfoVO, mcsLoginUserInfoVO); |
| | | if (R.isOk(mcsMerchantVOR) && mcsMerchantVOR.getData() != null) { |
| | | McsMerchantVO mcsMerchantVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(mcsMerchantVOR.getData()), McsMerchantVO.class); |
| | | mcsLoginUserInfoVO.setMcsMerchantVO(mcsMerchantVO); |
| | | } |
| | | return R.ok(mcsLoginUserInfoVO); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return R.fail("获取用户信息失败"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "修改用戶信息") |
| | | @PutMapping("/putUserInfo") |
| | | public R putUserInfo(@RequestBody PutUserInfoDTO putUserInfoDTO) { |
| | | putUserInfoDTO.setUserId(this.getUserId()); |
| | | return communityService.putUserInfo(putUserInfoDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增戳戳游戏") |
| | | @PostMapping("/game/add") |
| | | public R addMcsGame(@RequestBody @Validated(AddGroup.class) McsGameDTO mcsGameDTO) { |
| | | Long userId = this.getUserId(); |
| | | mcsGameDTO.setCreatedBy(userId); |
| | | mcsGameDTO.setUpdatedBy(userId); |
| | | return communityService.addMcsGame(mcsGameDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑戳戳游戏") |
| | | @PutMapping("/game/put") |
| | | public R putMcsGame(@RequestBody @Validated(PutGroup.class) McsGameDTO mcsGameDTO) { |
| | | mcsGameDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.putMcsGame(mcsGameDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "发布戳戳游戏") |
| | | @CheckMcsMerchantExpiration |
| | | @ApiImplicitParam(name = "gameId", value = "游戏id", required = true) |
| | | @GetMapping("/game/publish") |
| | | public R publishMcsGame(@RequestParam("gameId") Long gameId) { |
| | | return communityService.publishMcsGame(gameId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "结束戳戳游戏") |
| | | @ApiImplicitParam(name = "gameId", value = "游戏id", required = true) |
| | | @GetMapping("/game/finish") |
| | | public R finishMcsGame(@RequestParam("gameId") Long gameId) { |
| | | return communityService.finishMcsGame(gameId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "商家分页查询戳戳游戏", response = McsGameVO.class) |
| | | @PostMapping("/game/page") |
| | | public R pageMcsGame(@RequestBody @Valid PageMcsGameDTO pageMcsGameDTO) { |
| | | pageMcsGameDTO.setUserId(this.getUserId()); |
| | | return communityService.pageMcsGame(pageMcsGameDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "上架/下架戳戳游戏") |
| | | @CheckMcsMerchantExpiration |
| | | @PutMapping("/game/setShelf") |
| | | public R setShelfForGame(@RequestBody @Valid SetShelfForGameDTO setShelfForGameDTO) { |
| | | setShelfForGameDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.setShelfForGame(setShelfForGameDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除戳戳游戏") |
| | | @ApiImplicitParam(name = "gameId", value = "游戏id", required = true) |
| | | @DeleteMapping("/game/delete") |
| | | public R deleteMcsGame(@RequestParam("gameId") Long gameId) { |
| | | return communityService.deleteMcsGame(gameId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "戳戳游戏/资讯顶部统计数据", response = TopStatisticsVO.class) |
| | | @ApiImplicitParam(name = "type", value = "类型(1.戳戳游戏 2.戳戳资讯)", required = true) |
| | | @GetMapping("/statistics/top") |
| | | public R getTopStatistics(@RequestParam("type") Integer type) { |
| | | return communityService.getTopStatistics(type, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增戳戳资讯") |
| | | @PostMapping("/information/add") |
| | | public R addMcsInfo(@RequestBody @Validated(AddGroup.class) McsInfoDTO mcsInfoDTO) { |
| | | Long userId = this.getUserId(); |
| | | mcsInfoDTO.setCreatedBy(userId); |
| | | mcsInfoDTO.setUpdatedBy(userId); |
| | | return communityService.addMcsInfo(mcsInfoDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑戳戳资讯") |
| | | @PutMapping("/information/put") |
| | | public R putMcsInfo(@RequestBody @Validated(PutGroup.class) McsInfoDTO mcsInfoDTO) { |
| | | mcsInfoDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.putMcsInfo(mcsInfoDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "发布戳戳资讯") |
| | | @ApiImplicitParam(name = "infoId", value = "资讯id", required = true) |
| | | @CheckMcsMerchantExpiration |
| | | @GetMapping("/information/publish") |
| | | public R publishMcsInfo(@RequestParam("infoId") Long infoId) { |
| | | return communityService.publishMcsInfo(infoId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "商家分页查询戳戳资讯", response = McsInformationVO.class) |
| | | @PostMapping("/information/page") |
| | | public R pageMcsInfo(@RequestBody @Valid PageMcsInformationDTO pageMcsInformationDTO) { |
| | | pageMcsInformationDTO.setUserId(this.getUserId()); |
| | | return communityService.pageMcsInfo(pageMcsInformationDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "上架/下架戳戳资讯") |
| | | @CheckMcsMerchantExpiration |
| | | @PutMapping("/information/setShelf") |
| | | public R setShelfForMcsInfo(@RequestBody @Valid SetShelfForInfoDTO setShelfForInfoDTO) { |
| | | setShelfForInfoDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.setShelfForMcsInfo(setShelfForInfoDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除戳戳资讯") |
| | | @ApiImplicitParam(name = "infoId", value = "资讯id", required = true) |
| | | @DeleteMapping("/information/delete") |
| | | public R deleteMcsInfo(@RequestParam("infoId") Long infoId) { |
| | | return communityService.deleteMcsInfo(infoId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑数字商业街商家") |
| | | @PutMapping("/merchant/put") |
| | | public R putMcsMerchant(@RequestBody @Validated(PutGroup.class) McsMerchantDTO mcsMerchantDTO) { |
| | | mcsMerchantDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.putMcsMerchant(mcsMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询数字商业街商家详情", response = McsMerchantVO.class) |
| | | @ApiImplicitParam(name = "merchantId", value = "商家id", required = true) |
| | | @GetMapping("/merchant/get") |
| | | public R getMcsMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.getMcsMerchant(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增产品信息") |
| | | @PostMapping("/product/add") |
| | | public R addMcsProduct(@RequestBody @Validated(AddGroup.class) McsProductDTO mcsProductDTO) { |
| | | Long userId = this.getUserId(); |
| | | mcsProductDTO.setCreatedBy(userId); |
| | | mcsProductDTO.setUpdatedBy(userId); |
| | | return communityService.addMcsProduct(mcsProductDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑产品信息") |
| | | @PutMapping("/product/put") |
| | | public R putMcsProduct(@RequestBody @Validated(PutGroup.class) McsProductDTO mcsProductDTO) { |
| | | mcsProductDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.putMcsProduct(mcsProductDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除产品信息") |
| | | @PostMapping("/product/delete") |
| | | public R deleteMcsProduct(@RequestBody @Valid DeleteProductDTO deleteProductDTO) { |
| | | deleteProductDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.deleteMcsProduct(deleteProductDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取产品信息详情") |
| | | @ApiImplicitParam(name = "productId", value = "产品id", required = true) |
| | | @GetMapping("/product/get") |
| | | public R getMcsProduct(@RequestParam("productId") Long productId) { |
| | | return communityService.getMcsProduct(productId); |
| | | } |
| | | |
| | | @ApiOperation(value = "上架/下架产品信息") |
| | | @CheckMcsMerchantExpiration |
| | | @PutMapping("/product/setShelf") |
| | | public R setShelfForMcsProduct(@RequestBody @Valid SetShelfForProductDTO setShelfForProductDTO) { |
| | | setShelfForProductDTO.setUpdatedBy(this.getUserId()); |
| | | return communityService.setShelfForMcsProduct(setShelfForProductDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询产品信息", response = McsProductVO.class) |
| | | @PostMapping("/product/page") |
| | | public R pageMcsProduct(@RequestBody @Valid PageMcsProductDTO pageMcsProductDTO) { |
| | | pageMcsProductDTO.setUserId(this.getUserId()); |
| | | return communityService.pageMcsProduct(pageMcsProductDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取产品标签列表", response = McsLabelVO.class) |
| | | @GetMapping("/label/list") |
| | | public R getMcsLabelList() { |
| | | return communityService.getMcsLabelList(this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页顶部数据", response = IndexTopStatisticsVO.class) |
| | | @GetMapping("/index/topData") |
| | | public R getMcsIndexTopData() { |
| | | return communityService.getMcsIndexTopData(); |
| | | } |
| | | |
| | | @ApiOperation(value = "戳戳卷领取", response = McsCouponVO.class) |
| | | @ApiImplicitParam(name = "gameId", value = "戳戳游戏id", required = true) |
| | | @GetMapping("/coupon/apply") |
| | | public R applyMcsCoupon(@RequestParam("gameId") Long gameId) { |
| | | Long userId = this.getUserId(); |
| | | R r = communityService.retrieveMcsMerchantInfoByUserId(userId); |
| | | if (R.isOk(r) && nonNull(r.getData())) { |
| | | return R.fail("商家不能参与活动"); |
| | | } |
| | | return communityService.applyMcsCoupon(gameId, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "h5分页查询戳戳资讯", response = McsInformationVO.class) |
| | | @PostMapping("/information/pageH5") |
| | | public R pageH5McsInfo(@RequestBody @Valid PageMcsInformationDTO pageMcsInformationDTO) { |
| | | return communityService.pageH5McsInfo(pageMcsInformationDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "h5分页查询戳戳游戏", response = McsGameVO.class) |
| | | @PostMapping("/game/pageH5") |
| | | public R pageH5McsGame(@RequestBody @Valid PageMcsGameDTO pageMcsGameDTO) { |
| | | return communityService.pageH5McsGame(pageMcsGameDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "游戏详情", response = McsGameVO.class) |
| | | @ApiImplicitParam(name = "gameId", value = "游戏id", required = true) |
| | | @GetMapping("/game/get") |
| | | public R getMcsGame(@RequestParam("gameId") Long gameId) { |
| | | return communityService.getMcsGame(gameId); |
| | | } |
| | | |
| | | @ApiOperation(value = "资讯详情", response = McsInformationVO.class) |
| | | @ApiImplicitParam(name = "infoId", value = "资讯id", required = true) |
| | | @GetMapping("/info/get") |
| | | public R getMcsInfo(@RequestParam("infoId") Long infoId) { |
| | | return communityService.getMcsInfo(infoId); |
| | | } |
| | | |
| | | @ApiOperation(value = "H5分页查询数字商业街商家", response = McsMerchantVO.class) |
| | | @PostMapping("/merchant/pageH5") |
| | | public R pageH5McsMerchant(@RequestBody @Valid PageMcsMerchantDTO pageMcsMerchantDTO) { |
| | | return communityService.pageH5McsMerchant(pageMcsMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "我的戳戳卷", response = MyCouponVO.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "类型(1.戳戳币 2.免费体验)") |
| | | }) |
| | | @GetMapping("/myCoupon") |
| | | public R getMyCoupon(@RequestParam(value = "type", required = false) Integer type) { |
| | | return communityService.getMyCoupon(type, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "我的评价-参与游戏列表", response = McsCouponVO.class) |
| | | @PostMapping("/joinGame/page") |
| | | public R getJoinGameList(@RequestBody @Valid PageJoinGameListDTO pageJoinGameListDTO) { |
| | | pageJoinGameListDTO.setUserId(this.getUserId()); |
| | | return communityService.getJoinGameList(pageJoinGameListDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取所有数字商业街配置", response = McsConfigVO.class) |
| | | @GetMapping("/config/all") |
| | | public R getAllMcsConfig() { |
| | | return communityService.getAllMcsConfig(); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增评价记录") |
| | | @PostMapping("/evaluate/add") |
| | | public R addMcsEvaluate(@RequestBody @Validated(AddGroup.class) McsEvaluateDTO mcsEvaluateDTO) { |
| | | mcsEvaluateDTO.setUserId(this.getUserId()); |
| | | return communityService.addMcsEvaluate(mcsEvaluateDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "戳戳卷核销", response = VerifiedReturnVO.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "couponId", value = "戳戳卷id", required = true) |
| | | }) |
| | | @CheckMcsMerchantExpiration |
| | | @GetMapping("/coupon/verify") |
| | | public R verifyMcsCoupon(@RequestParam("couponId") Long couponId) { |
| | | return communityService.verifyMcsCoupon(couponId, this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询核销记录", response = McsVerifyRecordVO.class) |
| | | @PostMapping("/verifyRecord/page") |
| | | public R pageMcsVerifyRecord(@RequestBody @Valid PageVerifyRecordDTO pageVerifyRecordDTO) { |
| | | pageVerifyRecordDTO.setUserId(this.getUserId()); |
| | | return communityService.pageMcsVerifyRecord(pageVerifyRecordDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "游戏统计", response = GameStatisticsVO.class) |
| | | @GetMapping("/game/statistics") |
| | | public R getMcsGameStatistics() { |
| | | return communityService.getMcsGameStatistics(this.getUserId()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "分页查询评价记录", response = McsEvaluateVO.class) |
| | | @PostMapping("/evaluate/page") |
| | | public R pageMcsEvaluate(@RequestBody @Valid PageMcsEvaluateDTO pageMcsEvaluateDTO) { |
| | | pageMcsEvaluateDTO.setUserId(this.getUserId()); |
| | | return communityService.pageMcsEvaluate(pageMcsEvaluateDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询评价记录详情", response = McsEvaluateVO.class) |
| | | @ApiImplicitParam(name = "evaluateId", value = "评论id", required = true) |
| | | @GetMapping("/evaluate/get") |
| | | public R getMcsEvaluate(@RequestParam("evaluateId") Long evaluateId) { |
| | | return communityService.getMcsEvaluate(evaluateId); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除评价记录") |
| | | @ApiImplicitParam(name = "evaluateId", value = "评论id", required = true) |
| | | @DeleteMapping("/evaluate/delete") |
| | | public R deleteMcsEvaluate(@RequestParam("evaluateId") Long evaluateId) { |
| | | return communityService.deleteMcsEvaluate(evaluateId); |
| | | } |
| | | |
| | | @ApiOperation(value = "testTimeJob") |
| | | @GetMapping("/testTimeJob") |
| | | public R testTimeJob() { |
| | | return communityService.offResourceForMcsMerchant(); |
| | | } |
| | | |
| | | private Boolean assertPhoneIsValid(String phone) { |
| | | String regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$"; |
| | | return Pattern.matches(regexp, phone); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.shop_backstage.config; |
| | | |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 微信配置 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-23 14:52 |
| | | **/ |
| | | @Data |
| | | @Component |
| | | @ConfigurationProperties(prefix = "wx.h5") |
| | | public class WxH5Properties { |
| | | |
| | | /** |
| | | * 设置微信小程序的appid |
| | | */ |
| | | private String appid; |
| | | |
| | | /** |
| | | * 设置微信小程序的Secret |
| | | */ |
| | | private String secret; |
| | | |
| | | /** |
| | | * 设置微信小程序消息服务器配置的token |
| | | */ |
| | | private String token; |
| | | |
| | | /** |
| | | * 设置微信小程序消息服务器配置的EncodingAESKey |
| | | */ |
| | | private String aesKey; |
| | | |
| | | /** |
| | | * 消息格式,XML或者JSON |
| | | */ |
| | | private String msgDataFormat; |
| | | |
| | | /** |
| | | * 商户号 |
| | | */ |
| | | private String mchId; |
| | | |
| | | /** |
| | | * 微信支付密钥 |
| | | */ |
| | | private String payKey; |
| | | |
| | | /** |
| | | * 微信支付回调地址 |
| | | */ |
| | | private String notifyUrl; |
| | | } |
New file |
| | |
| | | package com.panzhihua.shop_backstage.config; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.utlis.HttpUtils; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: wexin |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-23 15:07 |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | public class WxMaConfiguration { |
| | | |
| | | private static final String OAUTH2_URL = "https://api.weixin.qq.com/sns/oauth2/access_token"; |
| | | |
| | | @Resource |
| | | private WxH5Properties wxH5Properties; |
| | | |
| | | public String retrieveOpenId(String code) { |
| | | HashMap<String, String> params = new HashMap<>(); |
| | | params.put("appid", wxH5Properties.getAppid()); |
| | | params.put("secret", wxH5Properties.getSecret()); |
| | | params.put("code", code); |
| | | params.put("grant_type", "authorization_code"); |
| | | String result = HttpUtils.sendGet(OAUTH2_URL, createLinkStringByGet(params)); |
| | | try { |
| | | JSONObject parseObject = JSONObject.parseObject(result); |
| | | if (parseObject.containsKey("openid")) { |
| | | String openid = parseObject.get("openid").toString(); |
| | | log.info("网页授权获取到openId:【{}】", openid); |
| | | return openid; |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("网页授权失败"); |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private static String createLinkStringByGet(Map<String, String> params) { |
| | | List<String> keys = new ArrayList<>(params.keySet()); |
| | | Collections.sort(keys); |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | for (int i = 0; i < keys.size(); i++) { |
| | | String key = keys.get(i); |
| | | String value = params.get(key); |
| | | if (i == keys.size() - 1) { |
| | | stringBuilder.append(key).append("=").append(value); |
| | | } else { |
| | | stringBuilder.append(key).append("=").append(value).append("&"); |
| | | } |
| | | } |
| | | return stringBuilder.toString(); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.shop_backstage.filter; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.Filter; |
| | |
| | | |
| | | String uri = request.getRequestURI(); |
| | | boolean isDoc = uri.contains("doc.html") || uri.contains("-docs"); |
| | | boolean convenientLogin = "/convenient/login".equals(uri); |
| | | boolean isConvenientReq = uri.contains("/convenient"); |
| | | boolean storeLogin = "/login".equals(uri); |
| | | boolean isUpload = "/convenient/upload/file".equals(uri); |
| | | boolean isLogin = uri.contains("login"); |
| | | boolean mcsGetCode = uri.contains("/microcommercialstreet/verifyCode") || uri.contains("/microcommercialstreet/bind/verifyCode"); |
| | | boolean mcsBindPhone = uri.contains("/microcommercialstreet/bindPhone"); |
| | | boolean wxNotify = uri.contains("/wxNotify"); |
| | | boolean getConfig = uri.contains("/config/all"); |
| | | boolean isUpload = uri.contains("upload"); |
| | | |
| | | if (isDoc || isUpload) { |
| | | List<String> noLoginUrl = new ArrayList<>(); |
| | | |
| | | noLoginUrl.add("/microcommercialstreet/merchant/get"); |
| | | noLoginUrl.add("/microcommercialstreet/index/topData"); |
| | | noLoginUrl.add("/microcommercialstreet/information/pageH5"); |
| | | noLoginUrl.add("/microcommercialstreet/game/pageH5"); |
| | | noLoginUrl.add("/microcommercialstreet/game/get"); |
| | | noLoginUrl.add("/microcommercialstreet/info/get"); |
| | | noLoginUrl.add("/microcommercialstreet/merchant/pageH5"); |
| | | |
| | | if (isDoc || isUpload || isLogin || mcsGetCode || wxNotify || mcsBindPhone || getConfig || noLoginUrl.contains(uri)) { |
| | | //放过swagger请求 |
| | | } else { |
| | | if (!storeLogin && !isConvenientReq) { |
| | | String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO); |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | log.error("获取登录用户信息失败【{}】", request); |
| | | ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token过期")); |
| | | return; |
| | | } |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO); |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | log.error("获取登录用户信息失败【{}】", request); |
| | | ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token过期")); |
| | | return; |
| | | } |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | |
| | | R r = communityService.getUserStoreInfo(loginUserInfoVO.getUserId()); |
| | | boolean shopStoreValid = false; |
| | | if (R.isOk(r) && r.getData() != null) { |
| | | ShopStoreVO shopStoreVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ShopStoreVO.class); |
| | | shopStoreValid = shopStoreVO.getStatus() == 1; |
| | | } |
| | | if (!shopStoreValid) { |
| | | // 返回请求被拒绝响应 |
| | | response.setContentType("application/json"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.getWriter().write(JSONObject.toJSONString(R.fail(403))); |
| | | response.flushBuffer(); |
| | | return; |
| | | } |
| | | } else if (!convenientLogin && isConvenientReq) { |
| | | String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO); |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | log.error("获取登录用户信息失败【{}】", request); |
| | | ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token过期")); |
| | | return; |
| | | } |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | |
| | | R r = communityService.getUserMerchantInfoByAccount(loginUserInfoVO.getAccount()); |
| | | boolean merchantValid = false; |
| | | if (R.isOk(r) && r.getData() != null) { |
| | | ConvenientMerchantVO merchantVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ConvenientMerchantVO.class); |
| | | merchantValid = merchantVO.getAccountStatus() == 1; |
| | | } |
| | | if (!merchantValid) { |
| | | // 返回请求被拒绝响应 |
| | | response.setContentType("application/json"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.getWriter().write(JSONObject.toJSONString(R.fail(403))); |
| | | response.flushBuffer(); |
| | | return; |
| | | } |
| | | R r = communityService.checkStoreIsValid(loginUserInfoVO.getUserId()); |
| | | Boolean isValid = false; |
| | | if (R.isOk(r) && r.getData() != null) { |
| | | isValid = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), Boolean.class); |
| | | } |
| | | if (!isValid) { |
| | | // 返回请求被拒绝响应 |
| | | response.setContentType("application/json"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.getWriter().write(JSONObject.toJSONString(R.fail(403))); |
| | | response.flushBuffer(); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | filterChain.doFilter(servletRequest, servletResponse); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.shop_backstage.model.request; |
| | | |
| | | import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 微信登录 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-23 14:12 |
| | | **/ |
| | | @Data |
| | | @ApiModel(value = "小程序登录") |
| | | public class LoginRequest { |
| | | |
| | | @ApiModelProperty(name = "code", value = "登录时获取的 code") |
| | | String code; |
| | | |
| | | @ApiModelProperty(name = "signature", value = "使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息") |
| | | String signature; |
| | | |
| | | @ApiModelProperty(name = "rawData", value = "不包括敏感信息的原始数据字符串,用于计算签名") |
| | | String rawData; |
| | | |
| | | @ApiModelProperty(name = "encryptedData", value = "包括敏感数据在内的完整用户信息的加密数据") |
| | | String encryptedData; |
| | | |
| | | @ApiModelProperty(name = "iv", value = "加密算法的初始向量") |
| | | String iv; |
| | | |
| | | @ApiModelProperty(name = "userInfo", value = "用户基本信息") |
| | | WxMaUserInfo userInfo; |
| | | |
| | | } |
| | |
| | | log.info("执行结果【{}】", r.toString()); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街商家旗下所有的游戏/资讯全部下架 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @XxlJob("offResourceForMcsMerchantJobHandler") |
| | | public ReturnT<String> offResourceForMcsMerchantJobHandler(String param) { |
| | | log.info("定时任务将已到期的微商业街商家旗下所有的游戏/资讯全部下架"); |
| | | R r = communityService.offResourceForMcsMerchant(); |
| | | log.info("执行结果【{}】", r.toString()); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | /** |
| | | * 定时任务-每隔5分钟执行一次,将已到期的微商业街游戏结束 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @XxlJob("endStatusForMcsGameJobHandler") |
| | | public ReturnT<String> endStatusForMcsGameJobHandler(String param) { |
| | | log.info("定时任务,将已到期的微商业街游戏结束"); |
| | | R r = communityService.endStatusForMcsGame(); |
| | | log.info("执行结果【{}】", r.toString()); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | } |
| | |
| | | noLoginUrl.add("/api/applets/convenient/merchant/incr-view"); |
| | | noLoginUrl.add("/api/applets/convenient/product/incr-view"); |
| | | noLoginUrl.add("/api/shopbackstage/convenient/upload/file"); |
| | | noLoginUrl.add("/api/shopbackstage/convenient/upload/files"); |
| | | noLoginUrl.add("/api/applets/warehouse/donates/page"); |
| | | noLoginUrl.add("/api/applets/warehouse/donates/get"); |
| | | noLoginUrl.add("/api/applets/property/publicity/page"); |
| | |
| | | noLoginUrl.add("/api/communitybackstage/screen/comprehensive/partydyn"); |
| | | noLoginUrl.add("/api/communitybackstage/screen/comprehensive/pagedynamic"); |
| | | noLoginUrl.add("/api/communitybackstage/screen/get/community/password"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/verifyCode"); |
| | | noLoginUrl.add("/api/shopbackstage/mcsOrder/wxNotify"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/bindPhone"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/bind/verifyCode"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/config/all"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/merchant/get"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/index/topData"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/information/pageH5"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/game/pageH5"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/game/get"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/info/get"); |
| | | noLoginUrl.add("/api/shopbackstage/microcommercialstreet/merchant/pageH5"); |
| | | if (noLoginUrl.contains(requestURI)) { |
| | | List<SimpleGrantedAuthority> authorities = new ArrayList<>(); |
| | | authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS)); |