Merge remote-tracking branch 'origin/test' into txb
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | |
| | | } |
| | | return communityService.detailWorkGuide(workGuideId, communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "办事指南列表-按分类查询", response = ComActWorkGuideAppletsVO.class) |
| | | @PostMapping("list") |
| | | public R listWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | return communityService.listWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "办事指南列表-按分类查询", response = ComActWorkGuideDetailAppletsVO.class) |
| | | @GetMapping("list/classify") |
| | | public R listWorkGuideByClassifyId(@RequestParam("classifyId") Long classifyId) { |
| | | return communityService.listWorkGuideByClassifyId(classifyId); |
| | | } |
| | | } |
| | |
| | | private Integer classify; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | private Long pageSize = 10L; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 办事指南分类列表 |
| | | */ |
| | | @Data |
| | | @ApiModel("办事指南分类列表") |
| | | public class ComActWorkGuideAppletsVO { |
| | | |
| | | @ApiModelProperty("分类id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | private String classifyName; |
| | | |
| | | @ApiModelProperty("分类图标url") |
| | | private String pictureUrl; |
| | | |
| | | @ApiModelProperty("办事指南数量") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty("办事指南列表") |
| | | private List<ComActWorkGuideDetailAppletsVO> guideDetailList = Lists.newArrayList(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther llming |
| | | * @describe 办事指南 |
| | | */ |
| | | @Data |
| | | @ApiModel("办事指南信息") |
| | | public class ComActWorkGuideDetailAppletsVO { |
| | | @ApiModelProperty("办事指南id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("办事指南标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("办事指南内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("所属分类") |
| | | private Integer classify; |
| | | |
| | | @ApiModelProperty("办理时间") |
| | | private String timeAt; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private String createAt; |
| | | |
| | | @ApiModelProperty("办理地点") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("咨询电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | private List<ComActWorkGuideMaterialVO> materials = Lists.newArrayList(); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/elders/auth/record/task") |
| | | R timedTaskEldersAuthRecordJobHandler(); |
| | | |
| | | /** |
| | | * 办事指南列表-按分类查询 |
| | | * @param pageActWorkGuideDTO 请求参数 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | @PostMapping("/listworkguide") |
| | | R listWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO); |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南列表 |
| | | * @param classifyId 办事指南分类id |
| | | * @return 办事指南列表数据 |
| | | */ |
| | | @GetMapping("/listworkguide/classify") |
| | | R listWorkGuideByClassifyId(@RequestParam("classifyId") Long classifyId); |
| | | } |
| | |
| | | return comActWorkGuideClassifyService.getWorkGuideClassifyList(); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南列表-按分类查询 |
| | | * @param pageActWorkGuideDTO 请求参数 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | @PostMapping("listworkguide") |
| | | public R listWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | return workGuideService.listWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南列表 |
| | | * @param classifyId 办事指南分类id |
| | | * @return 办事指南列表数据 |
| | | */ |
| | | @GetMapping("listworkguide/classify") |
| | | public R listWorkGuideByClassifyId(@RequestParam("classifyId") Long classifyId) { |
| | | return workGuideService.listWorkGuideByClassifyId(classifyId); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.service_community.model.dos.ComActWorkGuideClassifyDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * title: ComActWorkGuideClassifyDAO 社区》办事指南》分类管理mapper类 |
| | |
| | | IPage<ComActWorkGuideClassifyVO> pageWorkGuideClassify(Page page, |
| | | @Param("comActWorkGuideClassifyVO") ComActWorkGuideClassifyVO comActWorkGuideClassifyVO); |
| | | |
| | | /** |
| | | * 查询办事指南分类列表 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | List<ComActWorkGuideAppletsVO> listWorkGuideClassify(); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideVO; |
| | | import com.panzhihua.service_community.model.dos.ComActWorkGuideDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 办事指南 |
| | |
| | | + "</script>") |
| | | IPage<ComActWorkGuideVO> pageWorkGuide(Page page, |
| | | @Param("pageActWorkGuideDTO") PageActWorkGuideDTO pageActWorkGuideDTO); |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南 |
| | | * @param classifyId 办事指南分类id |
| | | * @param pageSize 默认展示条数 |
| | | * @return 办事指南列表 |
| | | */ |
| | | List<ComActWorkGuideDetailAppletsVO> getWorkGuideListByClassifyId(@Param("classifyId") Long classifyId,@Param("pageSize") Long pageSize); |
| | | } |
| | |
| | | * @return 删除结果 |
| | | */ |
| | | R delectWorkGuide(Long workGuideId); |
| | | |
| | | /** |
| | | * 办事指南列表-按分类查询 |
| | | * @param pageActWorkGuideDTO 请求参数 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | R listWorkGuide(PageActWorkGuideDTO pageActWorkGuideDTO); |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南列表 |
| | | * @param classifyId 办事指南分类id |
| | | * @return 办事指南列表数据 |
| | | */ |
| | | R listWorkGuideByClassifyId(Long classifyId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActReserveAnswerContentMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveSubMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActQuestnaireAnswerContentDO; |
| | |
| | | if(!registerDetailedAnswerList.isEmpty()){ |
| | | for (ComActReserveRegisterDetailedAnswerVO detailed:registerDetailedAnswerList) { |
| | | if(!detailed.getType().equals(5)){ |
| | | map.put(detailed.getReserveSubId() + "",detailed.getAnswerContent()); |
| | | if(detailed.getType().equals(1)){ |
| | | String key = detailed.getReserveSubId() + ""; |
| | | String value = map.get(key).toString(); |
| | | if(StringUtils.isNotEmpty(value)){ |
| | | value = value + "," + detailed.getAnswerContent(); |
| | | }else{ |
| | | value = detailed.getAnswerContent(); |
| | | } |
| | | map.put(key,value); |
| | | }else{ |
| | | map.put(detailed.getReserveSubId() + "",detailed.getAnswerContent()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActWorkGuideClassifyDO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO; |
| | | import com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO; |
| | | import com.panzhihua.service_community.service.ComActWorkGuideClassifyService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | private ComActWorkGuideClassifyDAO comActWorkGuideClassifyDAO; |
| | | @Resource |
| | | ComActDAO comActDAO; |
| | | @Resource |
| | | private ComActWorkGuideClassifyDAO comActWorkGuideClassifyDAO; |
| | | |
| | | @Override |
| | | public R addWorkGuide(ComActWorkGuideDTO workGuideDTO, Long userId) { |
| | |
| | | .eq(ComActWorkGuideMaterialDO::getWorkGuideId, workGuideId)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南列表-按分类查询 |
| | | * @param pageActWorkGuideDTO 请求参数 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | @Override |
| | | public R listWorkGuide(PageActWorkGuideDTO pageActWorkGuideDTO){ |
| | | //结果数据集合 |
| | | List<ComActWorkGuideAppletsVO> resultList = new ArrayList<>(); |
| | | |
| | | List<ComActWorkGuideAppletsVO> workGuideClassifyList = comActWorkGuideClassifyDAO.listWorkGuideClassify(); |
| | | //通过办事指南分类查询分类下办事指南 |
| | | workGuideClassifyList.forEach(workGuideClassify -> { |
| | | List<ComActWorkGuideDetailAppletsVO> workGuideList = this.baseMapper.getWorkGuideListByClassifyId(workGuideClassify.getId(),10L); |
| | | if(workGuideList != null && workGuideList.size() > 0){ |
| | | workGuideClassify.setGuideDetailList(workGuideList); |
| | | //分类下办事指南数据大于0加入到结果集中向小程序展示 |
| | | resultList.add(workGuideClassify); |
| | | } |
| | | }); |
| | | return R.ok(resultList); |
| | | } |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南列表 |
| | | * @param classifyId 办事指南分类id |
| | | * @return 办事指南列表数据 |
| | | */ |
| | | @Override |
| | | public R listWorkGuideByClassifyId(Long classifyId){ |
| | | return R.ok(this.baseMapper.getWorkGuideListByClassifyId(classifyId,null)); |
| | | } |
| | | } |
| | |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <select id="listWorkGuideClassify" resultType="com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO"> |
| | | SELECT cawgc.id, cawgc.classify_name, cawgc.picture_url,( SELECT count( id ) FROM com_act_work_guide WHERE classify = cawgc.id ) AS `count` |
| | | FROM |
| | | com_act_work_guide_classify AS cawgc |
| | | </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.ComActWorkGuideDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActWorkGuideDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="title" property="title" /> |
| | | <result column="content" property="content" /> |
| | | <result column="classify" property="classify" /> |
| | | <result column="time_at" property="timeAt" /> |
| | | <result column="address" property="address" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="lon" property="lon" /> |
| | | <result column="lat" property="lat" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, title, content, classify, time_at, address, phone, lon, lat, create_at, create_by, update_at, update_by |
| | | </sql> |
| | | |
| | | <select id="getWorkGuideListByClassifyId" resultType="com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO"> |
| | | select id ,title,content,classify,time_at,address,phone,create_at from com_act_work_guide where classify = #{classifyId} |
| | | order by create_at desc |
| | | <if test="pageSize != null"> |
| | | limit #{pageSize} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | noLoginUrl.add("/api/applets/community/listactivitysign"); |
| | | noLoginUrl.add("/api/applets/workguide/pageworkguide"); |
| | | noLoginUrl.add("/api/applets/workguide/detailworkguide"); |
| | | noLoginUrl.add("/api/applets/workguide/list"); |
| | | noLoginUrl.add("/api/applets/workguide/list/classify"); |
| | | noLoginUrl.add("/api/applets/partybuilding/pagedynamic"); |
| | | noLoginUrl.add("/api/applets/partybuilding/infodynamic"); |
| | | noLoginUrl.add("/api/applets/convenient/business/area/page"); |