张天森
2022-11-11 5662c51cf1566d0a882d98ba96b52eef8b5d6ace
token获取物业id处理
8个文件已修改
1个文件已添加
104 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActProceedings.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/CommonPage.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/PageFeedBackDTO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserFeedbackVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAnnouncementApi.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActFeedBackApi.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyWorkerApi.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysUserFeedbackDAO.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActProceedings.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.applets.api;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
@RequestMapping("/proceedings")
@Api(tags = "议事委员会")
public class ComActProceedings {
    @Resource
    private CommunityService communityService;
    @GetMapping("/list")
    @ApiOperation("议事委员会列表")
    public R list(@RequestParam("page")Integer page,@RequestParam("size")Integer size){
        return communityService.proceedingsList(page,size ,null );
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/CommonPage.java
@@ -75,4 +75,6 @@
    private Integer userType;
    @ApiModelProperty(value = "社会组织id", hidden = true)
    private Long orgId;
    @ApiModelProperty("物业id")
    private Long propertyId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/PageFeedBackDTO.java
@@ -38,5 +38,7 @@
    private String areaCode;
    @ApiModelProperty("1投诉建议2问题留言")
    private Integer type;
    private Long propertyId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserFeedbackVO.java
@@ -64,4 +64,7 @@
    @ApiModelProperty("回复内容")
    private String reply;
    private Long propertyId;
    private Integer type;
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAnnouncementApi.java
@@ -6,6 +6,7 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActAnnouncementVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.service.user.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
@@ -32,6 +33,8 @@
     */
    @Resource
    private CommunityService communityService;
    @Resource
    private UserService userService;
    /**
     * 分页查询所有数据
@@ -47,6 +50,19 @@
    }
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询所有数据",response = ComActAnnouncementVO.class)
    @PostMapping("queryAllProperty")
    public R selectAllProperty(@RequestBody CommonPage commonPage) {
        commonPage.setCommunityId(this.getCommunityId());
        return this.communityService.comActAnnouncementSelectAll(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActFeedBackApi.java
@@ -3,6 +3,7 @@
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.user.PageFeedBackDTO;
import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.user.SysUserFeedbackVO;
import com.panzhihua.common.service.user.UserService;
@@ -13,6 +14,8 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import static java.util.Objects.nonNull;
@RestController
@RequestMapping("/feedBack")
@@ -25,6 +28,11 @@
    @PostMapping("pagefeedback")
    public R pageFeedback(@RequestBody @Validated(PageGroup.class) PageFeedBackDTO pageFeedBackDTO) {
        pageFeedBackDTO.setAreaCode(this.getAreaCode());
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        LoginUserInfoVO user = userService.detailUser(loginUserInfo.getUserId()).getData();
        if(nonNull(user.getPropertyId())){
            pageFeedBackDTO.setPropertyId(user.getPropertyId());
        }
        return userService.pageFeedback(pageFeedBackDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyWorkerApi.java
@@ -3,7 +3,9 @@
import javax.annotation.Resource;
import javax.validation.Valid;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO;
import com.panzhihua.common.service.user.UserService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
@@ -27,6 +29,7 @@
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
/**
@@ -45,6 +48,12 @@
     */
    @Resource
    private CommunityService communityService;
    /**
     * 用户对象
     * */
    @Resource
    private UserService userService;
    @ApiOperation(value = "添加物业工作人员")
@@ -69,8 +78,13 @@
    @ApiOperation(value = "分页查询物业工作人员", response = ComPropertyWorkerVO.class)
    @PostMapping("/page")
    public R pagePropertyWorker(@RequestBody @Valid PagePropertyWorkerDTO pagePropertyWorkerDTO) {
        if(nonNull(getLoginUserInfo().getPropertyId())){
            pagePropertyWorkerDTO.setRefId(getLoginUserInfo().getPropertyId());
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        if (nonNull(loginUserInfo.getPhone()) && isNull(pagePropertyWorkerDTO.getRefId())){
            //设置物业id
            LoginUserInfoVO user = userService.detailUser(loginUserInfo.getUserId()).getData();
            if (nonNull(user.getPropertyId())){
                pagePropertyWorkerDTO.setRefId(user.getPropertyId());
            }
        }
        return communityService.pagePropertyWorker(pagePropertyWorkerDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java
@@ -655,10 +655,21 @@
            pageComPbServiceTeamDTO.setCommunityId(this.getCommunityId());
        }
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        if (nonNull(loginUserInfo.getPropertyId())){
            pageComPbServiceTeamDTO.setPropertyId(loginUserInfo.getPropertyId());
        return partyBuildingService.pageServiceTeam(pageComPbServiceTeamDTO);
        }
        log.info("==============物业公司id"+loginUserInfo.getPropertyId());
    @ApiOperation(value = "分页查询物业党员先锋", response = ComPbServiceTeamVO.class)
    @PostMapping("pageserviceteamProperty")
    public R pageServiceTeamProperty(@RequestBody PageComPbServiceTeamDTO pageComPbServiceTeamDTO) {
        if(nonNull(this.getLoginUserInfo().getStreetId())) {
            pageComPbServiceTeamDTO.setStreetId(this.getLoginUserInfo().getStreetId());
        } else {
            pageComPbServiceTeamDTO.setCommunityId(this.getCommunityId());
        }
        //获取物业id
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        R<LoginUserInfoVO> r = userService.detailUser(loginUserInfo.getUserId());
        pageComPbServiceTeamDTO.setPropertyId(r.getData().getPropertyId());
        return partyBuildingService.pageServiceTeam(pageComPbServiceTeamDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysUserFeedbackDAO.xml
@@ -22,17 +22,13 @@
        select
        u.name,
        u.nick_name,
        f.id,
        f.content,
        f.photo_path,
        f.*,
        u.phone,
        f.create_at,
        c.name communityName
        from sys_user_feedback f
        join sys_user u on f.user_id=u.user_id
        join com_act c on u.community_id=c.community_id
        where f.id=#{id}
    </select>
    <select id="pageFeedback" resultType="com.panzhihua.common.model.vos.user.SysUserFeedbackVO">
@@ -61,6 +57,12 @@
            <if test='pageFeedBackDTO.areaCode != null and pageFeedBackDTO.areaCode.trim() != &quot;&quot;'>
                and c.area_code = #{pageFeedBackDTO.areaCode}
            </if>
            <if test="pageFeedBackDTO.propertyId != null and pageFeedBackDTO.propertyId != ''">
                and f.property_id = #{pageFeedBackDTO.propertyId}
            </if>
            <if test="pageFeedBackDTO.type != null and pageFeedBackDTO.type != ''">
                and f.type = #{pageFeedBackDTO.type}
            </if>
        </where>
        order by f.create_at desc