三说会堂专家,事件类型,业务中心模块搭建,基本接口创建。
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanShuoEventVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanShuoIndustryCenterVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ExpertShowVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("sanshuo") |
| | | @Api(tags = "三说会堂小程序接口") |
| | | public class ComSanShuoApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "小程序获取可选择行业分中心列表",response = ComSanShuoIndustryCenterVO.class ) |
| | | @GetMapping("/industryCenter/appletsList") |
| | | public R industryCenterAppList(){ |
| | | return communityService.industryCenterAppList(); |
| | | } |
| | | |
| | | @ApiOperation(value = "小程序获取可选择行专家列表",response = ComSanShuoEventVO.class ) |
| | | @GetMapping("/industryCenter/appletsList") |
| | | public R expertAppList(){ |
| | | return communityService.expertAppList(); |
| | | } |
| | | |
| | | @ApiOperation(value = "专家风采",response = ExpertShowVO.class) |
| | | @GetMapping("/expert/expertShow") |
| | | public R expertShow(){ |
| | | return communityService.expertShow(); |
| | | } |
| | | |
| | | @ApiOperation("专家详情") |
| | | @GetMapping("/expert/{id}") |
| | | public R expertDetail(@PathVariable("id")Long id){ |
| | | return communityService.expertDetail(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.sanshuo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("创建事件类型入参") |
| | | public class ComMediateTypeDTO { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty("id,修改时传") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 类型名称 |
| | | */ |
| | | @ApiModelProperty("类型名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * code码 |
| | | */ |
| | | @ApiModelProperty("code码") |
| | | private String key; |
| | | |
| | | /** |
| | | * 父id((根节点为0)) |
| | | */ |
| | | @ApiModelProperty("父id((根节点为0))") |
| | | private Long parentId; |
| | | |
| | | /** |
| | | * 路径(格式 : `pid1`pid2`id` ) |
| | | */ |
| | | @ApiModelProperty("路径(格式 : `pid1`pid2`id` )") |
| | | private String pathId; |
| | | |
| | | /** |
| | | * 所在层级 |
| | | */ |
| | | @ApiModelProperty("所在层级") |
| | | private Integer levelIndex; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty("排序") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 启用状态(0:停用,1:启用) |
| | | */ |
| | | @ApiModelProperty("启用状态(0:停用,1:启用)") |
| | | private Boolean enabled; |
| | | |
| | | /** |
| | | * 备注说明 |
| | | */ |
| | | @ApiModelProperty("备注说明") |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty("创建者") |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty("创建时间") |
| | | private Date createDate; |
| | | |
| | | /** |
| | | * 修改者 |
| | | */ |
| | | @ApiModelProperty("修改者") |
| | | private Long modifyUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty("修改时间") |
| | | private Date modifyDate; |
| | | |
| | | /** |
| | | * 删除标识(0:未删除,1:已删除) |
| | | */ |
| | | @ApiModelProperty("0:未删除,1:已删除") |
| | | private Boolean deleteFlag; |
| | | } |
| | |
| | | /** |
| | | * 擅长解决时间类型 |
| | | */ |
| | | @ApiModelProperty("擅长解决时间类型,多类型已,隔开") |
| | | @ApiModelProperty("擅长解决时间类型,多类型用,隔开") |
| | | private String goodAt; |
| | | |
| | | /** |
| | |
| | | * 行业分中心id |
| | | */ |
| | | @ApiModelProperty("行业分中心id") |
| | | private String industryCenterId; |
| | | private Long industryCenterId; |
| | | |
| | | /** |
| | | * 备用字段1 |
New file |
| | |
| | | package com.panzhihua.common.model.vos.sanshuo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | @Data |
| | | @ApiModel("创建事件类型") |
| | | public class ComMediaTypeVO { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty("id,修改时传") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 类型名称 |
| | | */ |
| | | @ApiModelProperty("类型名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * code码 |
| | | */ |
| | | @ApiModelProperty("code码") |
| | | private String key; |
| | | |
| | | /** |
| | | * 父id((根节点为0)) |
| | | */ |
| | | @ApiModelProperty("父id((根节点为0))") |
| | | private Long parentId; |
| | | |
| | | /** |
| | | * 路径(格式 : `pid1`pid2`id` ) |
| | | */ |
| | | @ApiModelProperty("路径(格式 : `pid1`pid2`id` )") |
| | | private String pathId; |
| | | |
| | | /** |
| | | * 所在层级 |
| | | */ |
| | | @ApiModelProperty("所在层级") |
| | | private Integer levelIndex; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty("排序") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 启用状态(0:停用,1:启用) |
| | | */ |
| | | @ApiModelProperty("启用状态(0:停用,1:启用)") |
| | | private Boolean enabled; |
| | | |
| | | /** |
| | | * 备注说明 |
| | | */ |
| | | @ApiModelProperty("备注说明") |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty("创建者") |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty("创建时间") |
| | | private Date createDate; |
| | | |
| | | /** |
| | | * 修改者 |
| | | */ |
| | | @ApiModelProperty("修改者") |
| | | private Long modifyUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty("修改时间") |
| | | private Date modifyDate; |
| | | |
| | | /** |
| | | * 删除标识(0:未删除,1:已删除) |
| | | */ |
| | | @ApiModelProperty("0:未删除,1:已删除") |
| | | private Boolean deleteFlag; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | @Data |
| | | @ApiModel("事件类型") |
| | |
| | | */ |
| | | @ApiModelProperty("0删除1正常") |
| | | private Integer delFlag; |
| | | |
| | | @ApiModelProperty("调解成功次数") |
| | | private Integer success; |
| | | |
| | | @ApiModelProperty("调解成功率") |
| | | private BigDecimal rate; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.sanshuo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("专家风采列表") |
| | | public class ExpertShowVO { |
| | | |
| | | @ApiModelProperty("名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("专家数量") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty("子列表") |
| | | List<ExpertShowVO> childList; |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.dpc.PageDpcDTO; |
| | | import com.panzhihua.common.model.dtos.community.enterprise.*; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanShuoIndustryCenterDTO; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoEventDTO; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO; |
| | | import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseApplyDTO; |
| | | import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; |
| | | import com.panzhihua.common.model.dtos.community.cluster.PageClusterMemberDto; |
| | |
| | | import com.panzhihua.common.model.vos.community.raffle.ComActRaffleRecordVO; |
| | | import com.panzhihua.common.model.vos.community.raffle.ComActRaffleVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveDangerAreaVO; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | |
| | | */ |
| | | @PostMapping("/comActAcidRecord/batchCheck") |
| | | R batchCheck(@RequestBody BatchCheckAcidRecordDTO batchCheckAcidRecordDTO); |
| | | |
| | | /** |
| | | * 小程序获取可用的行业中心列表 |
| | | * @return |
| | | * */ |
| | | @GetMapping("/sanshuo/industryCenter/appletsList") |
| | | R industryCenterAppList(); |
| | | |
| | | /** |
| | | * 后台获取行业中心列表 |
| | | * */ |
| | | @GetMapping("/sanshuo/industryCenter/list") |
| | | R backIndustrytList(@RequestParam(value = "keyWord",required = false)String keyWord, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size); |
| | | |
| | | /** |
| | | * 添加业务中心 |
| | | * */ |
| | | @PostMapping("/sanshuo/industryCenter") |
| | | R addIndustry(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO); |
| | | |
| | | /** |
| | | * 修改业务中心 |
| | | * */ |
| | | @PutMapping("/sanshuo/industryCenter") |
| | | R updateIndustry(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO); |
| | | |
| | | /** |
| | | * 删除业务中心 |
| | | * */ |
| | | @DeleteMapping("/sanshuo/industryCenter/remove") |
| | | R removeIndustry(@RequestParam Long id); |
| | | |
| | | /** |
| | | * 重置业务中心密码 |
| | | * */ |
| | | @PostMapping("/sanshuo/industryCenter/resetPass") |
| | | R resetIndustryPassword(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO); |
| | | |
| | | /** |
| | | * 业务中心详情 |
| | | * */ |
| | | @GetMapping("/sanshuo/industryCenter/detail") |
| | | R industryCenterDetail(@RequestParam Long id); |
| | | |
| | | /** |
| | | * 后台获取专家列表 |
| | | * */ |
| | | @GetMapping("/sanshuo/expert/backstageList") |
| | | R backExpertList(@RequestParam(value = "keyWord",required = false)@ApiParam("搜索关键字") String keyWord, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size); |
| | | |
| | | /** |
| | | * 添加专家 |
| | | * */ |
| | | @PostMapping("/sanshuo/expert") |
| | | R addExpert(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO); |
| | | |
| | | /** |
| | | * 修改专家 |
| | | * */ |
| | | @PutMapping("/sanshuo/expert") |
| | | R updateExpert(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO); |
| | | |
| | | /** |
| | | * 删除专家 |
| | | * */ |
| | | @DeleteMapping("/sanshuo/expert/remove") |
| | | R removeExpert(@RequestParam("id")Long id); |
| | | |
| | | /** |
| | | * 重置专家登陆密码 |
| | | * */ |
| | | @PostMapping("/sanshuo/expert/resetPassword") |
| | | R resetExpertPassword(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO); |
| | | |
| | | /** |
| | | * 小程序获取可选择专家列表 |
| | | * */ |
| | | @GetMapping("/sanshuo/expert/appletsList") |
| | | R expertAppList(); |
| | | |
| | | /** |
| | | * 获取专家详情 |
| | | * */ |
| | | @GetMapping("/sanshuo/expert/detail") |
| | | R expertDetail(@RequestParam Long id); |
| | | |
| | | /** |
| | | * 后台事件列表 |
| | | * */ |
| | | @GetMapping("/sanshuo/event/list") |
| | | R backEventList(@RequestParam(value = "keyWord",required = false)String keyWord, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size); |
| | | |
| | | /** |
| | | * 事件详情 |
| | | * */ |
| | | @GetMapping("/sanshuo/event/detail") |
| | | R eventDetail(@RequestParam(value = "id",required = false)Long id); |
| | | |
| | | /** |
| | | * 小程序获取事件列表 |
| | | * */ |
| | | @GetMapping("/sanshuo/event/appletsList") |
| | | R eventAppList(); |
| | | |
| | | /** |
| | | * 新增事件类型 |
| | | * */ |
| | | @PostMapping("/sanshuo/event") |
| | | R addEvent(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO); |
| | | |
| | | /** |
| | | * 新增事件类型 |
| | | * */ |
| | | @PutMapping("/sanshuo/event") |
| | | R updateEvent(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO); |
| | | |
| | | /** |
| | | * 删除事件类型 |
| | | * */ |
| | | @DeleteMapping("/sanshuo/event/remove") |
| | | R removeEvent(@RequestParam(value = "id",required = false)Long id); |
| | | |
| | | /** |
| | | * 专家风采 |
| | | * */ |
| | | @GetMapping("/sanshuo/expert/expertShow") |
| | | R expertShow(); |
| | | } |
| | |
| | | |
| | | @PostMapping("/tfLogin") |
| | | R tfLogin(@RequestBody UuLoginVO uuLoginVO); |
| | | |
| | | /** |
| | | * 三说会堂添加后台账户 |
| | | * */ |
| | | @PostMapping("/sanshuoAddUser") |
| | | R sanShuoAddUser(@RequestBody AdministratorsUserVO administratorsUserVO); |
| | | |
| | | /** |
| | | * 三说会堂重置密码 |
| | | * */ |
| | | @GetMapping("/sanshuoResetPassword") |
| | | R sanShuoResetPassword(@RequestParam("id") Long userId,@RequestParam("pass")String password); |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanShuoIndustryCenterDTO; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoEventDTO; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanShuoIndustryCenterVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @RestController |
| | | @RequestMapping("sanshuo") |
| | | @Api(tags = "三说会堂后台接口") |
| | | public class ComSanShuoApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "后台获取专家列表",response = ComSanshuoExpertVO.class) |
| | | @GetMapping("/expert/backList") |
| | | public R expertBackList(@RequestParam(value = "keyWord",required = false)@ApiParam("搜索关键字") String keyWord, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size){ |
| | | return communityService.backExpertList(keyWord, page, size); |
| | | } |
| | | |
| | | @PostMapping("/expert") |
| | | @ApiOperation("添加专家") |
| | | public R addExpert(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | return communityService.addExpert(comSanshuoExpertDTO); |
| | | } |
| | | |
| | | @PutMapping("/expert") |
| | | @ApiOperation("添加专家") |
| | | public R updateExpert(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | return communityService.updateExpert(comSanshuoExpertDTO); |
| | | } |
| | | |
| | | @ApiOperation("重置专家登陆密码") |
| | | @PostMapping("/expert/resetPassword") |
| | | public R resetExpertPassword(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | return communityService.resetExpertPassword(comSanshuoExpertDTO); |
| | | } |
| | | |
| | | @ApiOperation("专家详情") |
| | | @GetMapping("/expert/{id}") |
| | | public R expertDetail(@PathVariable("id") Long id){ |
| | | return communityService.expertDetail(id); |
| | | } |
| | | |
| | | @ApiOperation("删除专家") |
| | | @GetMapping("/expert/remove/{id}") |
| | | public R removeExpert(@PathVariable("id") Long id){ |
| | | return communityService.removeExpert(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "后台获取业务中心列表",response = ComSanShuoIndustryCenterVO.class) |
| | | @GetMapping("/industryCenter/backList") |
| | | public R industryCenterBackList(@RequestParam(value = "keyWord",required = false)String keyWord, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size){ |
| | | return communityService.backIndustrytList(keyWord, page, size); |
| | | } |
| | | |
| | | @ApiOperation("添加业务中心") |
| | | @PostMapping("/industryCenter") |
| | | public R addIndustry(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO){ |
| | | return communityService.addIndustry(comSanShuoIndustryCenterDTO); |
| | | } |
| | | |
| | | @ApiOperation("修改业务中心") |
| | | @PutMapping("/industryCenter") |
| | | public R updateIndustryCenter(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO){ |
| | | return communityService.updateIndustry(comSanShuoIndustryCenterDTO); |
| | | } |
| | | |
| | | @ApiOperation("删除业务中心") |
| | | @GetMapping("/industryCenter/remove/{id}") |
| | | public R removeIndustry(@PathVariable("id") Long id){ |
| | | return communityService.removeIndustry(id); |
| | | } |
| | | |
| | | @ApiOperation("业务中心详情") |
| | | @GetMapping("/industryCenter/{id}") |
| | | public R industryDetail(@PathVariable("id") Long id){ |
| | | return communityService.industryCenterDetail(id); |
| | | } |
| | | |
| | | @ApiOperation("重置业务中心密码") |
| | | @PostMapping("/industryCenter/resetPassword") |
| | | public R resetIndustryPassword(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO){ |
| | | return communityService.resetIndustryPassword(comSanShuoIndustryCenterDTO); |
| | | } |
| | | |
| | | @ApiOperation("后台事件类型列表") |
| | | @GetMapping("/event/backList") |
| | | public R eventBackList(@RequestParam(value = "keyWord",required = false)String keyWord, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size){ |
| | | return communityService.backEventList(keyWord, page, size); |
| | | } |
| | | |
| | | @ApiOperation("添加事件类型") |
| | | @PostMapping("/event") |
| | | public R addEvent(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO){ |
| | | return communityService.addEvent(comSanshuoEventDTO); |
| | | } |
| | | |
| | | @ApiOperation("修改事件类型") |
| | | @PutMapping("/event") |
| | | public R updateEvent(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO){ |
| | | return communityService.updateEvent(comSanshuoEventDTO); |
| | | } |
| | | |
| | | @ApiOperation("删除事件类型") |
| | | @DeleteMapping("/event/{id}") |
| | | public R removeEvent(@PathVariable("id") Long id){ |
| | | return communityService.removeEvent(id); |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | 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.QRActivityCodeVO; |
| | | import com.panzhihua.common.model.vos.community.warehouse.QRCodeVO; |
| | | import com.panzhihua.service_community.entity.ComActActivityCode; |
| | | import com.panzhihua.service_community.service.ComActActivityCodeService; |
| | | import com.panzhihua.service_community.util.QRCodeUtil; |
| | | import com.panzhihua.service_community.schedule.util.QRCodeUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 签到二维码表(ComActActivityCode)表控制层 |
| | |
| | | import com.panzhihua.common.model.vos.community.warehouse.QRCodeVO; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseApply; |
| | | import com.panzhihua.service_community.service.ComActWarehouseApplyService; |
| | | import com.panzhihua.service_community.util.QRCodeUtil; |
| | | import com.panzhihua.service_community.schedule.util.QRCodeUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComMediateTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoEventDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.ComMediateType; |
| | | import com.panzhihua.service_community.entity.ComSanshuoEvent; |
| | | import com.panzhihua.service_community.service.ComSanShuoEventService; |
| | | import com.panzhihua.service_community.service.CommediateTypeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * */ |
| | | @RestController |
| | | @RequestMapping("/sanshuo/event") |
| | | public class ComSanShuoEventApi { |
| | | public class ComSanShuoEventApi extends BaseController { |
| | | |
| | | // @Resource |
| | | // private ComSanShuoEventService comSanShuoEventService; |
| | | |
| | | @Resource |
| | | private ComSanShuoEventService comSanShuoEventService; |
| | | private CommediateTypeService commediateTypeService; |
| | | |
| | | /** |
| | | * 后台事件类型管理 |
| | | * */ |
| | | @PostMapping("/backStageList") |
| | | public R backList(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO){ |
| | | return R.ok(comSanShuoEventService.backStageList(comSanshuoEventDTO)); |
| | | @GetMapping ("/list") |
| | | public R list(@RequestParam(value = "keyWord",required = false)String keyWord, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size){ |
| | | return commediateTypeService.listEvent(keyWord,page,size); |
| | | } |
| | | |
| | | /** |
| | | * 小程序获取可用事件类型 |
| | | * */ |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam("id")Long id){ |
| | | return R.ok(commediateTypeService.getById(id)); |
| | | } |
| | | |
| | | @GetMapping("/appletsList") |
| | | public R<List<ComSanshuoEvent>> appList(){ |
| | | return R.ok(comSanShuoEventService.list(new QueryWrapper<ComSanshuoEvent>().eq("status",1).eq("del_flag",1))); |
| | | public R appletList(){ |
| | | return R.ok(commediateTypeService.list(new QueryWrapper<ComMediateType>().eq("enabled",1))); |
| | | } |
| | | |
| | | /** |
| | | * 添加或修改事件类型 |
| | | * 新增事件类型 |
| | | * */ |
| | | @PostMapping |
| | | public R add(@RequestBody ComSanshuoEventDTO comSanshuoEventDTO){ |
| | | ComSanshuoEvent event=new ComSanshuoEvent(); |
| | | BeanUtil.copyProperties(comSanshuoEventDTO,event); |
| | | return R.ok(comSanShuoEventService.addOrUpdate(event)); |
| | | public R add(@RequestBody ComMediateTypeDTO comMediateTypeDTO){ |
| | | comMediateTypeDTO.setCreateUser(this.getLoginUserInfo().getUserId()); |
| | | return commediateTypeService.addOrUpdate(comMediateTypeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除事件类型 |
| | | * 修改事件类型 |
| | | * */ |
| | | @DeleteMapping("remove/{id}") |
| | | public R remove(@PathVariable("id") Integer id){ |
| | | ComSanshuoEvent comSanshuoEvent = comSanShuoEventService.getById(id); |
| | | comSanshuoEvent.setDelFlag(0); |
| | | comSanshuoEvent.setUpdateTime(new Date()); |
| | | return R.ok(comSanShuoEventService.updateById(comSanshuoEvent)); |
| | | @PutMapping |
| | | public R update(@RequestBody ComMediateTypeDTO comMediateTypeDTO){ |
| | | comMediateTypeDTO.setModifyUser(this.getLoginUserInfo().getUserId()); |
| | | return commediateTypeService.addOrUpdate(comMediateTypeDTO); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除事件 |
| | | * */ |
| | | @DeleteMapping("/remove") |
| | | public R remove(@RequestParam("id")Long id){ |
| | | ComMediateType comMediateType = commediateTypeService.getById(id); |
| | | comMediateType.setDeleteFlag(true); |
| | | comMediateType.setEnabled(false); |
| | | comMediateType.setModifyUser(this.getLoginUserInfo().getUserId()); |
| | | return R.ok(commediateTypeService.updateById(comMediateType)); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.entity.ComSanshuoExpert; |
| | | import com.panzhihua.service_community.schedule.util.MyAESUtil; |
| | | import com.panzhihua.service_community.service.ComSanShuoExpertService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Resource |
| | | private ComSanShuoExpertService comSanShuoExpertService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 添加专家 |
| | |
| | | @PostMapping |
| | | public R add(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | comSanshuoExpertDTO.setCreateBy(this.getLoginUserInfo().getName()); |
| | | return R.ok(comSanShuoExpertService.addExpert(comSanshuoExpertDTO)); |
| | | return comSanShuoExpertService.addExpert(comSanshuoExpertDTO); |
| | | } |
| | | |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam Long id){ |
| | | return R.ok(comSanShuoExpertService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 小程序获取可选择专家 |
| | | * */ |
| | | @GetMapping("appletsList") |
| | | @GetMapping("/appletsList") |
| | | public R appList(){ |
| | | return R.ok(comSanShuoExpertService.list(new QueryWrapper<ComSanshuoExpert>().eq("status",1).eq("del_flag",1))); |
| | | } |
| | |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size){ |
| | | //TODO 获取当前账号级别确定范围 |
| | | Integer range=null; |
| | | Long id=null; |
| | | return R.ok(comSanShuoExpertService.expertPage(keyWord,page,size,range,id)); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | return comSanShuoExpertService.expertPage(keyWord,page,size,loginUserInfo); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * */ |
| | | @DeleteMapping("/remove/{id}") |
| | | public R remove(@PathVariable("id")Long id){ |
| | | @DeleteMapping("/remove") |
| | | public R remove(@RequestParam("id")Long id){ |
| | | //TODO 是否有为解决事件 |
| | | ComSanshuoExpert expert = comSanShuoExpertService.getById(id); |
| | | expert.setStatus(0); |
| | |
| | | expert.setPassword(comSanshuoExpertDTO.getPassword()); |
| | | return R.ok(comSanShuoExpertService.updateById(expert)); |
| | | } |
| | | |
| | | /** |
| | | * 专家风采 |
| | | * */ |
| | | @GetMapping("/expertShow") |
| | | public R expertShow(){ |
| | | return comSanShuoExpertService.expertShow(); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanShuoIndustryCenterDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.entity.ComSanshuoIndustryCenter; |
| | | import com.panzhihua.service_community.schedule.util.MyAESUtil; |
| | | import com.panzhihua.service_community.service.ComSanShuoIndustryCenterService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public class ComSanShuoIndustryCenterApi extends BaseController { |
| | | @Resource |
| | | private ComSanShuoIndustryCenterService comSanShuoIndustryCenterService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @GetMapping("/list") |
| | | public R list(@RequestParam(value = "keyWord",required = false)String keyWord, |
| | |
| | | return R.ok(comSanShuoIndustryCenterService.pageIndustryCenter(keyWord,page,size)); |
| | | } |
| | | |
| | | @GetMapping("/appletsList") |
| | | public R appletsList(){ |
| | | return R.ok(comSanShuoIndustryCenterService.list(new QueryWrapper<ComSanshuoIndustryCenter>().eq("status",1).eq("del_flag",1))); |
| | | } |
| | | |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam Long id){ |
| | | return R.ok(comSanShuoIndustryCenterService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 添加业务中心 |
| | | * */ |
| | | @PostMapping |
| | | public R add(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO){ |
| | | comSanShuoIndustryCenterDTO.setCreateBy(this.getLoginUserInfo().getName()); |
| | | return R.ok(comSanShuoIndustryCenterService.addOrUpdate(comSanShuoIndustryCenterDTO)); |
| | | return comSanShuoIndustryCenterService.addOrUpdate(comSanShuoIndustryCenterDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | * */ |
| | | @PutMapping |
| | | public R update(@RequestBody ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO){ |
| | | return R.ok(comSanShuoIndustryCenterService.addOrUpdate(comSanShuoIndustryCenterDTO)); |
| | | return comSanShuoIndustryCenterService.addOrUpdate(comSanShuoIndustryCenterDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除业务中心 |
| | | * */ |
| | | @DeleteMapping("/remove/{id}") |
| | | public R remove(@PathVariable("id") Long id){ |
| | | @DeleteMapping("/remove") |
| | | public R remove(@RequestParam("id") Long id){ |
| | | ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(id); |
| | | center.setDelFlag(0); |
| | | center.setStatus(0); |
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.service_community.entity.ComMediateType; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author Frozen |
| | | * @description 针对表【com_mediate_type(事件调解类型表)】的数据库操作Mapper |
| | | * @createDate 2022-09-07 10:31:38 |
| | | * @Entity generator.entity.ComMediateType |
| | | */ |
| | | public interface ComMediateTypeDao extends BaseMapper<ComMediateType> { |
| | | |
| | | /** |
| | | * 后台获取事件列表 |
| | | * @param keyWord |
| | | * @param page |
| | | * @param size |
| | | * @return 处理结果 |
| | | * */ |
| | | IPage<ComMediateType> eventList(Page page, @Param("keyWord") String keyWord); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ExpertShowVO; |
| | | import com.panzhihua.service_community.entity.ComSanshuoExpert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Frozen |
| | |
| | | * @return 处理结果 |
| | | * */ |
| | | IPage<ComSanshuoExpertVO> expertPage(Page page, @Param("keyWord")String keyWord, @Param("range") Integer range, @Param("id")Long id); |
| | | |
| | | /** |
| | | * 专家风采列表 |
| | | * */ |
| | | List<ExpertShowVO> expertShow(); |
| | | |
| | | /** |
| | | * 行业分中心分组专家 |
| | | * */ |
| | | List<ExpertShowVO> selectExpertIndustry(); |
| | | |
| | | /** |
| | | * 获取范围内的 |
| | | * */ |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 事件调解类型表 |
| | | * @TableName com_mediate_type |
| | | */ |
| | | @TableName(value ="com_mediate_type") |
| | | @Data |
| | | @ApiModel("事件类型") |
| | | public class ComMediateType implements Serializable { |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId |
| | | @ApiModelProperty("id,修改时传") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 类型名称 |
| | | */ |
| | | @ApiModelProperty("类型名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * code码 |
| | | */ |
| | | @ApiModelProperty("code码") |
| | | private String key; |
| | | |
| | | /** |
| | | * 父id((根节点为0)) |
| | | */ |
| | | @ApiModelProperty("父id((根节点为0))") |
| | | private Long parentId; |
| | | |
| | | /** |
| | | * 路径(格式 : `pid1`pid2`id` ) |
| | | */ |
| | | @ApiModelProperty("路径(格式 : `pid1`pid2`id` )") |
| | | private String pathId; |
| | | |
| | | /** |
| | | * 所在层级 |
| | | */ |
| | | @ApiModelProperty("所在层级") |
| | | private Integer levelIndex; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty("排序") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 启用状态(0:停用,1:启用) |
| | | */ |
| | | @ApiModelProperty("启用状态(0:停用,1:启用)") |
| | | private Boolean enabled; |
| | | |
| | | /** |
| | | * 备注说明 |
| | | */ |
| | | @ApiModelProperty("备注说明") |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty("创建者") |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty("创建时间") |
| | | private Date createDate; |
| | | |
| | | /** |
| | | * 修改者 |
| | | */ |
| | | @ApiModelProperty("修改者") |
| | | private Long modifyUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty("修改时间") |
| | | private Date modifyDate; |
| | | |
| | | /** |
| | | * 删除标识(0:未删除,1:已删除) |
| | | */ |
| | | @ApiModelProperty("0:未删除,1:已删除") |
| | | private Boolean deleteFlag; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Override |
| | | public boolean equals(Object that) { |
| | | if (this == that) { |
| | | return true; |
| | | } |
| | | if (that == null) { |
| | | return false; |
| | | } |
| | | if (getClass() != that.getClass()) { |
| | | return false; |
| | | } |
| | | ComMediateType other = (ComMediateType) that; |
| | | return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
| | | && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) |
| | | && (this.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey())) |
| | | && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) |
| | | && (this.getPathId() == null ? other.getPathId() == null : this.getPathId().equals(other.getPathId())) |
| | | && (this.getLevelIndex() == null ? other.getLevelIndex() == null : this.getLevelIndex().equals(other.getLevelIndex())) |
| | | && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort())) |
| | | && (this.getEnabled() == null ? other.getEnabled() == null : this.getEnabled().equals(other.getEnabled())) |
| | | && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) |
| | | && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser())) |
| | | && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate())) |
| | | && (this.getModifyUser() == null ? other.getModifyUser() == null : this.getModifyUser().equals(other.getModifyUser())) |
| | | && (this.getModifyDate() == null ? other.getModifyDate() == null : this.getModifyDate().equals(other.getModifyDate())) |
| | | && (this.getDeleteFlag() == null ? other.getDeleteFlag() == null : this.getDeleteFlag().equals(other.getDeleteFlag())); |
| | | } |
| | | |
| | | @Override |
| | | public int hashCode() { |
| | | final int prime = 31; |
| | | int result = 1; |
| | | result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
| | | result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); |
| | | result = prime * result + ((getKey() == null) ? 0 : getKey().hashCode()); |
| | | result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode()); |
| | | result = prime * result + ((getPathId() == null) ? 0 : getPathId().hashCode()); |
| | | result = prime * result + ((getLevelIndex() == null) ? 0 : getLevelIndex().hashCode()); |
| | | result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode()); |
| | | result = prime * result + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); |
| | | result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); |
| | | result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode()); |
| | | result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); |
| | | result = prime * result + ((getModifyUser() == null) ? 0 : getModifyUser().hashCode()); |
| | | result = prime * result + ((getModifyDate() == null) ? 0 : getModifyDate().hashCode()); |
| | | result = prime * result + ((getDeleteFlag() == null) ? 0 : getDeleteFlag().hashCode()); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | StringBuilder sb = new StringBuilder(); |
| | | sb.append(getClass().getSimpleName()); |
| | | sb.append(" ["); |
| | | sb.append("Hash = ").append(hashCode()); |
| | | sb.append(", id=").append(id); |
| | | sb.append(", name=").append(name); |
| | | sb.append(", key=").append(key); |
| | | sb.append(", parentId=").append(parentId); |
| | | sb.append(", pathId=").append(pathId); |
| | | sb.append(", levelIndex=").append(levelIndex); |
| | | sb.append(", sort=").append(sort); |
| | | sb.append(", enabled=").append(enabled); |
| | | sb.append(", remarks=").append(remarks); |
| | | sb.append(", createUser=").append(createUser); |
| | | sb.append(", createDate=").append(createDate); |
| | | sb.append(", modifyUser=").append(modifyUser); |
| | | sb.append(", modifyDate=").append(modifyDate); |
| | | sb.append(", deleteFlag=").append(deleteFlag); |
| | | sb.append(", serialVersionUID=").append(serialVersionUID); |
| | | sb.append("]"); |
| | | return sb.toString(); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.ComSanshuoExpert; |
| | | |
| | |
| | | * @param page |
| | | * @param keyWord |
| | | * @param size |
| | | * @param range 数据范围:1街道下属/2社区下属/3业务中心下属/null三说会堂下属 |
| | | * @param id 社区或街道或业务中心id |
| | | * @return 处理结果 |
| | | * */ |
| | | R expertPage(String keyWord, Integer page, Integer size,Integer range,Long id); |
| | | R expertPage(String keyWord, Integer page, Integer size, LoginUserInfoVO loginUserInfo); |
| | | |
| | | /** |
| | | * 专家风采列表 |
| | | * @return 出列记过 |
| | | * */ |
| | | R expertShow(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComMediateTypeDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.ComMediateType; |
| | | |
| | | public interface CommediateTypeService extends IService<ComMediateType> { |
| | | /** |
| | | * 后台获取事件列表 |
| | | * @param keyWord |
| | | * @param page |
| | | * @param size |
| | | * @return 处理结果 |
| | | * */ |
| | | R listEvent(String keyWord, Integer page, Integer size); |
| | | |
| | | /** |
| | | * 新增或修改事件类型 |
| | | * @param comMediateTypeDTO |
| | | * @return 处理结果 |
| | | * */ |
| | | R addOrUpdate(ComMediateTypeDTO comMediateTypeDTO); |
| | | } |
| | |
| | | import com.panzhihua.service_community.entity.ComActRaffleRecord; |
| | | import com.panzhihua.service_community.dao.ComActRaffleRecordDao; |
| | | import com.panzhihua.service_community.service.ComActRaffleRecordService; |
| | | import com.panzhihua.service_community.util.QRCodeUtil; |
| | | import com.panzhihua.service_community.schedule.util.QRCodeUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.util.RSAUtils; |
| | | import com.panzhihua.service_community.schedule.util.RSAUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActPasswordVo; |
| | | import com.panzhihua.service_community.util.MyAESUtil; |
| | | import com.panzhihua.service_community.schedule.util.MyAESUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.crypto.digest.MD5; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.sanshuo.ExpertShowVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComSanshuoEventDao; |
| | | import com.panzhihua.service_community.dao.ComSanshuoExpertDao; |
| | | import com.panzhihua.service_community.entity.ComSanshuoExpert; |
| | | import com.panzhihua.service_community.schedule.util.MyAESUtil; |
| | | import com.panzhihua.service_community.service.ComSanShuoExpertService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class ComSanShuoExpertServiceImpl extends ServiceImpl<ComSanshuoExpertDao, ComSanshuoExpert> implements ComSanShuoExpertService { |
| | | public class ComSanShuoExpertServiceImpl extends ServiceImpl<ComSanshuoExpertDao, ComSanshuoExpert> implements ComSanShuoExpertService { |
| | | |
| | | @Resource |
| | | private ComSanshuoExpertDao comSanshuoExpertDao; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 添加专家 |
| | | * |
| | | * @param comSanshuoExpertDTO |
| | | * @return 处理结果 |
| | | */ |
| | | * */ |
| | | @Override |
| | | public R addExpert(ComSanshuoExpertDTO comSanshuoExpertDTO) { |
| | | ComSanshuoExpert expert = new ComSanshuoExpert(); |
| | | BeanUtil.copyProperties(comSanshuoExpertDTO, expert); |
| | | ComSanshuoExpert expert=new ComSanshuoExpert(); |
| | | BeanUtil.copyProperties(comSanshuoExpertDTO,expert); |
| | | expert.setId(Snowflake.getId()); |
| | | expert.setCreateTime(new Date()); |
| | | int insert = comSanshuoExpertDao.insert(expert); |
| | | if (insert > 0) { |
| | | return R.ok(); |
| | | if (insert>0){ |
| | | try { |
| | | comSanshuoExpertDTO.setPassword(MyAESUtil.Encrypt(comSanshuoExpertDTO.getPassword(),"Ryo7M3n8loC5Abcd")); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | //生成后台账号 |
| | | AdministratorsUserVO user=new AdministratorsUserVO(); |
| | | user.setUserId(Snowflake.getId()); |
| | | user.setAccount(comSanshuoExpertDTO.getAccount()); |
| | | user.setPassword(comSanshuoExpertDTO.getPassword()); |
| | | user.setName(comSanshuoExpertDTO.getName()); |
| | | user.setType(11); |
| | | user.setImageUrl(comSanshuoExpertDTO.getAvatar()); |
| | | return userService.sanShuoAddUser(user); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 后台获取专家列表 |
| | | * |
| | | * @param page |
| | | * @param keyWord |
| | | * @param size |
| | | * @param range 数据范围:1街道下属/2社区下属/3业务中心下属/null三说会堂下属 |
| | | * @param id 社区或街道或业务中心id |
| | | * @param loginUserInfo 登陆账号信息 |
| | | * @return 处理结果 |
| | | */ |
| | | * */ |
| | | @Override |
| | | public R expertPage(String keyWord, Integer page, Integer size, Integer range, Long id) { |
| | | return R.ok(comSanshuoExpertDao.expertPage(new Page(page, size), keyWord, range, id)); |
| | | public R expertPage(String keyWord, Integer page, Integer size, LoginUserInfoVO loginUserInfo) { |
| | | //range:1.三说会堂下属,2业务中心下属,3街道下属,4社区下属 |
| | | //id:社区或街道或业务中心id |
| | | //账号级别 |
| | | Long id=null; |
| | | Integer range=null; |
| | | return R.ok(comSanshuoExpertDao.expertPage(new Page(page,size),keyWord,range,id)); |
| | | } |
| | | |
| | | @Override |
| | | public R expertShow() { |
| | | List<ExpertShowVO> expertShowVOS = comSanshuoExpertDao.expertShow(); |
| | | for (ExpertShowVO expertShowVO : expertShowVOS) { |
| | | comSanshuoExpertDao.selectExpertIndustry(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 数据范围 |
| | | * */ |
| | | public void getRange(LoginUserInfoVO loginUserInfo){ |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.db.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanShuoIndustryCenterDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.dao.ComSanshuoIndustryCenterDao; |
| | | import com.panzhihua.service_community.dao.SysUserDao; |
| | | import com.panzhihua.service_community.entity.ComSanshuoIndustryCenter; |
| | | import com.panzhihua.service_community.entity.SysUser; |
| | | import com.panzhihua.service_community.schedule.util.MyAESUtil; |
| | | import com.panzhihua.service_community.service.ComSanShuoIndustryCenterService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | import java.util.Date; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | @Service |
| | | public class ComSanShuoIndustryCenterServiceImpl extends ServiceImpl<ComSanshuoIndustryCenterDao, ComSanshuoIndustryCenter> implements ComSanShuoIndustryCenterService { |
| | | |
| | | @Resource |
| | | private ComSanshuoIndustryCenterDao comSanshuoIndustryCenterDao; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 后台业务中心列表 |
| | |
| | | * */ |
| | | @Override |
| | | public R addOrUpdate(ComSanShuoIndustryCenterDTO comSanShuoIndustryCenterDTO) { |
| | | ComSanshuoIndustryCenter comSanshuoIndustryCenter = comSanshuoIndustryCenterDao.selectOne(new QueryWrapper<ComSanshuoIndustryCenter>().eq("name", comSanShuoIndustryCenterDTO.getName())); |
| | | if (isNull(comSanShuoIndustryCenterDTO.getId())){ |
| | | ComSanshuoIndustryCenter center=new ComSanshuoIndustryCenter(); |
| | | BeanUtil.copyProperties(comSanShuoIndustryCenterDTO,center); |
| | |
| | | center.setCreateTime(new Date()); |
| | | int insert = comSanshuoIndustryCenterDao.insert(center); |
| | | if (insert>0){ |
| | | return R.ok(); |
| | | //创建后台登陆账号 |
| | | AdministratorsUserVO user=new AdministratorsUserVO(); |
| | | user.setUserId(Snowflake.getId()); |
| | | user.setAccount(comSanShuoIndustryCenterDTO.getAccount()); |
| | | user.setType(11); |
| | | user.setName(comSanShuoIndustryCenterDTO.getName()); |
| | | try { |
| | | user.setPassword(MyAESUtil.Encrypt(comSanShuoIndustryCenterDTO.getPassword(),"Ryo7M3n8loC5Abcd")); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return userService.sanShuoAddUser(user); |
| | | } |
| | | }else { |
| | | if (nonNull(comSanshuoIndustryCenter)){ |
| | | return R.fail("业务中心已存在"); |
| | | } |
| | | ComSanshuoIndustryCenter center=new ComSanshuoIndustryCenter(); |
| | | BeanUtil.copyProperties(comSanShuoIndustryCenterDTO,center); |
| | | center.setUpdateTime(new Date()); |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | 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.community.sanshuo.ComMediateTypeDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.dao.ComMediateTypeDao; |
| | | import com.panzhihua.service_community.entity.ComMediateType; |
| | | import com.panzhihua.service_community.service.CommediateTypeService; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | @Service |
| | | public class CommediateTypeServiceImpl extends ServiceImpl<ComMediateTypeDao, ComMediateType> implements CommediateTypeService { |
| | | @Resource |
| | | private ComMediateTypeDao comMediateTypeDao; |
| | | |
| | | /** |
| | | * 后台获取事件列表 |
| | | * @param keyWord |
| | | * @param page |
| | | * @param size |
| | | * @return 处理结果 |
| | | * */ |
| | | @Override |
| | | public R listEvent(String keyWord, Integer page, Integer size) { |
| | | return R.ok(comMediateTypeDao.eventList(new Page(page,size),keyWord)); |
| | | } |
| | | |
| | | /** |
| | | * 新增事件类型 |
| | | * @param comMediateTypeDTO |
| | | * @return 处理结果 |
| | | * */ |
| | | @Override |
| | | public R addOrUpdate(ComMediateTypeDTO comMediateTypeDTO) { |
| | | ComMediateType name = comMediateTypeDao.selectOne(new QueryWrapper<ComMediateType>().eq("name", comMediateTypeDTO.getName())); |
| | | ComMediateType mediateType=new ComMediateType(); |
| | | if (nonNull(comMediateTypeDTO.getId())){ |
| | | //修改 |
| | | BeanUtil.copyProperties(comMediateTypeDTO,mediateType); |
| | | return R.ok(comMediateTypeDao.updateById(mediateType)); |
| | | } |
| | | //新增 |
| | | if (nonNull(name)){ |
| | | return R.fail("事件已存在"); |
| | | } |
| | | BeanUtil.copyProperties(comMediateTypeDTO,mediateType); |
| | | mediateType.setId(Snowflake.getId()); |
| | | mediateType.setCreateDate(new Date()); |
| | | return R.ok(comMediateTypeDao.insert(mediateType)); |
| | | } |
| | | } |
| | |
| | | introduction,street_id,industry_center_id, |
| | | param1,unit from com_sanshuo_expert |
| | | </sql> |
| | | <select id="expertShow" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> |
| | | select count(id) as 'count',level from com_sanshuo_expert group by level |
| | | </select> |
| | | <select id="expertPage" resultType="com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO"> |
| | | select id,level,community_id, |
| | | work_time,good_at,name, |
| | |
| | | OR phone like concat('%',#{keyWord},'%') |
| | | </if> |
| | | <if test="range != null and range != ''"> |
| | | <if test="range == 1"> |
| | | <if test="range == 3"> |
| | | AND street_id=#{id} |
| | | </if> |
| | | <if test="range == 2"> |
| | | <if test="range == 4"> |
| | | AND community_id=#{id} |
| | | </if> |
| | | <if test="range == 3"> |
| | | <if test="range == 2"> |
| | | AND industry_center_id=#{id} |
| | | </if> |
| | | </if> |
| | | </select> |
| | | <select id="selectExpertIndustry" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> |
| | | select count(t.id) as 'count',t1.name from com_sanshuo_expert t |
| | | left join com_sanshuo_industry_center t1 on t.industry_center_id=t1.id |
| | | where t.level=2 |
| | | group by t1.name |
| | | </select> |
| | | <select id="selectExpertIndustryThree" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> |
| | | select count(t.id) as 'count',t1.name from com_sanshuo_expert t |
| | | left join com_street t1 on t.street_id=t1.street_id |
| | | where t.level=3 |
| | | group by t1.name |
| | | </select> |
| | | </mapper> |
| | |
| | | public R tfLogin(@RequestBody UuLoginVO uuLoginVO){ |
| | | return userService.tfLogin(uuLoginVO); |
| | | } |
| | | |
| | | /** |
| | | * 三说会堂新增业务中心或专家账号 |
| | | * */ |
| | | @PostMapping("/sanshuoAddUser") |
| | | public R sanshuoAddUser(@RequestBody AdministratorsUserVO administratorsUserVO){ |
| | | return userService.addExpertOrIndustryCenter(administratorsUserVO); |
| | | } |
| | | |
| | | /** |
| | | * 三说会堂后台重置密码 |
| | | * */ |
| | | @GetMapping("/sanshuoResetPassword") |
| | | public R sanshuoAddUser(@RequestParam("id") Long userId,@RequestParam("pass")String password){ |
| | | return userService.resetPassExpertOrIndustryCenter(userId,password); |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R tfLogin(UuLoginVO uuLoginVO); |
| | | |
| | | /** |
| | | * 三说会堂新增业务中心或专家账号 |
| | | * */ |
| | | R addExpertOrIndustryCenter(AdministratorsUserVO administratorsUserVO); |
| | | |
| | | /** |
| | | * 三说会堂后台重置密码 |
| | | * */ |
| | | R resetPassExpertOrIndustryCenter(Long userId,String password); |
| | | } |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 三说会堂新增业务中心或专家账号 |
| | | * */ |
| | | @Override |
| | | public R addExpertOrIndustryCenter(AdministratorsUserVO administratorsUserVO) { |
| | | SysUserDO sysUserDO=new SysUserDO(); |
| | | //是否存在相同账号 |
| | | SysUserDO userDO = userDao.selectOne(new QueryWrapper<SysUserDO>().eq("account", administratorsUserVO.getAccount())); |
| | | if (isNull(userDO)){ |
| | | sysUserDO.setCreateAt(new Date()); |
| | | sysUserDO.setUserId(administratorsUserVO.getUserId()); |
| | | sysUserDO.setAccount(administratorsUserVO.getAccount()); |
| | | sysUserDO.setPassword(administratorsUserVO.getPassword()); |
| | | sysUserDO.setName(administratorsUserVO.getName()); |
| | | if (nonNull(administratorsUserVO.getImageUrl())){ |
| | | sysUserDO.setImageUrl(administratorsUserVO.getImageUrl()); |
| | | } |
| | | sysUserDO.setType(administratorsUserVO.getType()); |
| | | userDao.insert(sysUserDO); |
| | | return R.ok(); |
| | | } |
| | | return R.fail("账户名已存在"); |
| | | } |
| | | |
| | | /** |
| | | * 三说会堂后台重置密码 |
| | | * */ |
| | | @Override |
| | | public R resetPassExpertOrIndustryCenter(Long userId,String password) { |
| | | SysUserDO sysUserDO = userDao.selectById(userId); |
| | | if (nonNull(sysUserDO)){ |
| | | sysUserDO.setPassword(password); |
| | | userDao.updateById(sysUserDO); |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败"); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R getAreaAndStreet() { |