张天森
2022-11-11 b9a56efdf60d3c0b3d7690ead68ca831d161cc3d
token获取物业id处理
9个文件已修改
72 ■■■■■ 已修改文件
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/vos/community/ComActProceedingsVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAnnouncementApi.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActFeedBackApi.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyRepairApi.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAnnouncementMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/CommonPage.java
@@ -77,4 +77,6 @@
    private Long orgId;
    @ApiModelProperty("物业id")
    private Long propertyId;
    @ApiModelProperty("是否为物业查看报事报修")
    private Integer propertyCheck;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActProceedingsVO.java
@@ -1,5 +1,6 @@
package com.panzhihua.common.model.vos.community;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -53,6 +54,8 @@
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;
    /**
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAnnouncementApi.java
@@ -3,6 +3,7 @@
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActAnnouncementVO;
import com.panzhihua.common.service.community.CommunityService;
@@ -55,10 +56,11 @@
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询所有数据",response = ComActAnnouncementVO.class)
    @ApiOperation(value = "分页查询所有数据(物业公告)",response = ComActAnnouncementVO.class)
    @PostMapping("queryAllProperty")
    public R selectAllProperty(@RequestBody CommonPage commonPage) {
        commonPage.setCommunityId(this.getCommunityId());
        commonPage.setPropertyId(userService.detailUser(this.getLoginUserInfo().getUserId()).getData().getPropertyId());
        return this.communityService.comActAnnouncementSelectAll(commonPage);
    }
@@ -90,6 +92,22 @@
    }
    /**
     * 新增数据
     *
     * @param comActAnnouncementVO 实体对象
     * @return 新增结果
     */
    @ApiOperation("新增物业公告")
    @PostMapping("/addPropertyAnnouncement")
    public R insertProperty(@RequestBody ComActAnnouncementVO comActAnnouncementVO) {
        comActAnnouncementVO.setCreateTime(new Date());
        comActAnnouncementVO.setCommunityId(this.getCommunityId());
        comActAnnouncementVO.setUserId(this.getUserId());
        comActAnnouncementVO.setPropertyId(userService.detailUser(this.getLoginUserInfo().getUserId()).getData().getPropertyId());
        return this.communityService.comActAnnouncementInsert(comActAnnouncementVO);
    }
    /**
     * 修改数据
     *
     * @param comActAnnouncementVO 实体对象
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActFeedBackApi.java
@@ -36,6 +36,18 @@
        return userService.pageFeedback(pageFeedBackDTO);
    }
    @ApiOperation(value = "分页查询用户意见反馈", response = SysUserFeedbackVO.class)
    @PostMapping("pagefeedbackProperty")
    public R pageFeedbackProperty(@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);
    }
    @ApiOperation(value = "反馈意见详情", response = SysUserFeedbackVO.class)
    @GetMapping("feedback")
    public R detailFeedback(@RequestParam("id") Long id) {
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyRepairApi.java
@@ -3,9 +3,11 @@
import cn.hutool.core.date.DateUtil;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.property.ComPropertyRepairVO;
import com.panzhihua.common.service.property.PropertyService;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.utlis.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -14,6 +16,8 @@
import javax.annotation.Resource;
import static java.util.Objects.nonNull;
@Slf4j
@RestController
@RequestMapping("propertyRepair")
@@ -21,6 +25,8 @@
public class ComPropertyRepairApi extends BaseController {
    @Resource
    private PropertyService propertyService;
    @Resource
    private UserService userService;
    /**
     * 分页查询所有数据
@@ -29,10 +35,18 @@
    @ApiOperation(value = "后台列表接口",response = ComPropertyRepairVO.class)
    @PostMapping("/queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        commonPage.setParamId(this.getCommunityId());
        if(this.getAreaId()!=null&&this.getAreaId()!=0L){
            commonPage.setAreaId(this.getAreaId());
        }
        if (nonNull(commonPage.getPropertyCheck()) && commonPage.getPropertyCheck().equals(1)){
            //物业公司查看
            LoginUserInfoVO user = userService.detailUser(loginUserInfo.getUserId()).getData();
            if (nonNull(user.getPropertyId())){
                commonPage.setPropertyId(user.getPropertyId());
            }
        }
        return this.propertyService.comPropertyRepairSelectAll(commonPage);
    }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java
@@ -623,6 +623,18 @@
        return partyBuildingService.addServiceTeam(comPbServiceTeamDTO);
    }
    @ApiOperation(value = "新增物业服务团队人员")
    @PostMapping("serviceteamProperty")
    public R addServiceTeamProperty(@RequestBody @Validated(AddGroup.class) ComPbServiceTeamDTO comPbServiceTeamDTO) {
        comPbServiceTeamDTO.setCommunityId(this.getCommunityId());
        comPbServiceTeamDTO.setAppid(this.getAppId());
        //获取物业id
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        R<LoginUserInfoVO> r = userService.detailUser(loginUserInfo.getUserId());
        comPbServiceTeamDTO.setPropertyId(r.getData().getPropertyId());
        return partyBuildingService.addServiceTeam(comPbServiceTeamDTO);
    }
    @ApiOperation(value = "编辑服务团队人员")
    @PutMapping("serviceteam")
    public R putServiceTeam(@RequestBody ComPbServiceTeamDTO comPbServiceTeamDTO) {
@@ -654,7 +666,6 @@
        } else {
            pageComPbServiceTeamDTO.setCommunityId(this.getCommunityId());
        }
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        return partyBuildingService.pageServiceTeam(pageComPbServiceTeamDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java
@@ -442,6 +442,8 @@
            }else if(level.equals(4)){
                return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,loginUserInfoVO.getCommunityId(),loginUserInfoVO.getAppId()));
            }
        }else {
            return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,loginUserInfoVO.getCommunityId(),loginUserInfoVO.getAppId()));
        }
        return null;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAnnouncementMapper.xml
@@ -24,6 +24,9 @@
            <if test="commonPage.keyword!=null and commonPage.keyword !=''">
                and t.content like concat('%',#{commonPage.keyword},'%')
            </if>
            <if test="commonPage.propertyId!=null and commonPage.propertyId !=''">
                and t.property_id=#{commonPage.propertyId}
            </if>
        </where>
        order by t.create_time desc
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml
@@ -57,6 +57,9 @@
            <if test="commonPage.userId !=null">
                and t.create_by =#{commonPage.userId}
            </if>
            <if test="commonPage.propertyId != null and commonPage.propertyId != ''">
                t.property_id=#{commonPage.propertyId}
            </if>
        </where>
    order by t.create_time desc
    </select>