lidongdong
2023-11-01 c89479173efa4299ab2c0557bd7fa082392d464c
金汇大屏社区服务接口
2个文件已添加
8个文件已修改
390 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiCommunityServicesVO.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiIndexInfoVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiMerchantTypeVO.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/jinhui/JinhuiCommunityService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/JinhuiLargeScreenAppi.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/api/JinhuiLargeScreenApi.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/dao/JinhuiLargeScreenDao.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/service/JinhuiLargeScreenService.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/service/impl/JinhuiLargeScreenImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiLargeScreenMapper.xml 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiCommunityServicesVO.java
New file
@@ -0,0 +1,67 @@
package com.panzhihua.common.model.vos.jinhui;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("金汇大屏社区服务")
public class JinhuiCommunityServicesVO
{
    @ApiModelProperty("党员数")
    private String partyMember;
    @ApiModelProperty("志愿者")
    private String volunteer;
    /**
     * 便民服务商家  审核状态 (1待审核 2已通过 3未通过 )
     * @return
     */
    @ApiModelProperty("便民服务商家")
    private String convenientMerchantsNum="0";
    /**
     * 办事直指南
     * @return
     */
    @ApiModelProperty("办事指南")
    private String workGuideNum="0";
    /**
     * 空间预约 `state` 状态(1待处理  2未通过  3已通过)',
     * @return
     */
    @ApiModelProperty("空间预约")
    private String interspaceApplyNum="0";
    /**
     * 商城订单
     * @param cancelType `cancel_type` '核销状态(0待核销  1已核销  2订单已取消)
     * @return
     */
    @ApiModelProperty("商城订单")
    private String shoppingOrderNum="0";
    /**
     * 获取社区工作者
     * @param communityId `type`  '1社区工作人员2物业',
     * @return
     */
    @ApiModelProperty("获取社区工作者")
    private String serviceTeam="0";
    @ApiModelProperty("商家分类")
    List<JinhuiMerchantTypeVO> list;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiIndexInfoVO.java
@@ -7,6 +7,8 @@
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiMerchantTypeVO.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.common.model.vos.jinhui;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("金汇商家分类")
public class JinhuiMerchantTypeVO
{
    /**
     * 获取金汇风采数量
     * @param
     * @return
     */
    @ApiModelProperty(value = "分类名称")
    private String name="0";
    /**
     * 获取志愿者服务
     * @return
     */
    @ApiModelProperty(value = "分类商家数量")
    private String number="0";
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/jinhui/JinhuiCommunityService.java
@@ -14,6 +14,7 @@
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
 * 金汇社区
@@ -1128,4 +1129,13 @@
    public R getIndexInfo();
    /**
     * 金汇大屏社区服务
     * @return
     */
    @GetMapping("/JinhuiLargeScreen/getCommunityServices")
    public R getCommunityServices();
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/JinhuiLargeScreenAppi.java
@@ -48,6 +48,15 @@
        return jinhuiCommunityService.getIndexInfo();
    }
    /**
     * 金汇大屏社区服务
     * @return
     */
    @ApiOperation(value = "金汇大屏首页数据",response = JinhuiCommunityServicesVO.class)
    @GetMapping("/getCommunityServices")
    public R getCommunityServices()
    {
        return jinhuiCommunityService.getCommunityServices();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/api/JinhuiLargeScreenApi.java
@@ -2,9 +2,7 @@
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.jinhui.JinhuiIndexInfoVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotClassifyVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotVO;
import com.panzhihua.common.model.vos.jinhui.*;
import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshot;
import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshotClassify;
import com.panzhihua.service_jinhui_community.service.JinhuiLargeScreenService;
@@ -15,6 +13,7 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
 *  金汇大屏api
@@ -50,6 +49,58 @@
        return R.ok(jinhuiIndexInfoVO);
    }
    /**
     * 金汇大屏社区服务
     * @return
     */
    @GetMapping("/getCommunityServices")
    public R getCommunityServices()
    {
        //志愿者  党员
        JinhuiCommunityServicesVO vo=screenService.baseInfo(getCommunityId()+"");
        List<JinhuiMerchantTypeVO> list=screenService.getMerchantTypeNum();
        /**
         * 便民服务商家  审核状态 (1待审核 2已通过 3未通过 )
         * @return
         */
        String ConvenientMerchantsNum=screenService.getConvenientMerchantsNum(null);
        /**
         * 办事直指南
         * @return
         */
        String WorkGuideNum=screenService.getWorkGuideNum();
        /**
         * 空间预约 `state` 状态(1待处理  2未通过  3已通过)',
         * @return
         */
        String InterspaceApplyNum=screenService.getInterspaceApplyNum(null);
        /**
         * 商城订单
         * @param cancelType `cancel_type` '核销状态(0待核销  1已核销  2订单已取消)
         * @return
         */
        String ShoppingOrderNum=screenService.getShoppingOrderNum(null);
        /**
         * 获取社区工作者
         * @param communityId `type`  '1社区工作人员2物业',
         * @return
         */
        String ServiceTeam=screenService.getServiceTeam(getCommunityId()+"",null);
        vo.setWorkGuideNum(WorkGuideNum);
        vo.setShoppingOrderNum(ShoppingOrderNum);
        vo.setInterspaceApplyNum(InterspaceApplyNum);
        vo.setConvenientMerchantsNum(ConvenientMerchantsNum);
        vo.setServiceTeam(ServiceTeam);
        vo.setList(list);
        return R.ok(vo);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/dao/JinhuiLargeScreenDao.java
@@ -1,8 +1,13 @@
package com.panzhihua.service_jinhui_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panzhihua.common.model.vos.jinhui.JinhuiCommunityServicesVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiIndexInfoVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiMerchantTypeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface JinhuiLargeScreenDao extends BaseMapper<String>
@@ -34,6 +39,46 @@
     */
    String getConvenientMerchantsNum(@Param("auditType") String auditType);
    /**
     * 商家分类统计
     * @return
     */
    List<JinhuiMerchantTypeVO> getMerchantTypeNum();
    /**
     * 办事直指南
     * @return
     */
    String getWorkGuideNum();
    /**
     * 空间预约
     * @return
     */
    String getInterspaceApplyNum(@Param("state") String state);
    /**
     * 商城订单
     * @param cancelType
     * @return
     */
    String getShoppingOrderNum(@Param("cancelType") String cancelType);
    /**
     * 获取党员  志愿者
     * @param communityId
     * @return
     */
    JinhuiCommunityServicesVO baseInfo(@Param("communityId") String communityId);
    /**
     * 获取社区工作者
     * @param communityId
     * @return
     */
    String getServiceTeam(@Param("communityId") String communityId,
                          @Param("type") String type);
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/service/JinhuiLargeScreenService.java
@@ -1,7 +1,12 @@
package com.panzhihua.service_jinhui_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.vos.jinhui.JinhuiCommunityServicesVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiIndexInfoVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiMerchantTypeVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface JinhuiLargeScreenService extends IService<String>
{
@@ -10,25 +15,70 @@
     * @param
     * @return
     */
    String getMienNum(@Param("communityId") String communityId);
    String getMienNum(String communityId);
    /**
     * 获取志愿者服务
     * @return
     */
    String getVolunteerServeNum(@Param("communityId") String communityId);
    String getVolunteerServeNum(String communityId);
    /**
     * 获取微心愿数量
     * @param
     * @return
     */
    String getMicroVolunteeringNum(@Param("state") String state);
    String getMicroVolunteeringNum(String state);
    /**
     * 便民服务商家
     * @return
     */
    String getConvenientMerchantsNum(@Param("auditType") String auditType);
    String getConvenientMerchantsNum(String auditType);
    /**
     * 商家分类统计
     * @return
     */
    List<JinhuiMerchantTypeVO> getMerchantTypeNum();
    /**
     * 获取党员  志愿者
     * @param communityId
     * @return
     */
    JinhuiCommunityServicesVO baseInfo(String communityId);
    /**
     * 办事直指南
     * @return
     */
    String getWorkGuideNum();
    /**
     * 空间预约
     * @return
     */
    String getInterspaceApplyNum(@Param("state") String state);
    /**
     * 商城订单
     * @param cancelType
     * @return
     */
    String getShoppingOrderNum(@Param("cancelType") String cancelType);
    /**
     * 获取社区工作者
     * @param communityId
     * @return
     */
    String getServiceTeam(@Param("communityId") String communityId,
                          @Param("type") String type);
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/service/impl/JinhuiLargeScreenImpl.java
@@ -1,10 +1,15 @@
package com.panzhihua.service_jinhui_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.vos.jinhui.JinhuiCommunityServicesVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiIndexInfoVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiMerchantTypeVO;
import com.panzhihua.service_jinhui_community.dao.JinhuiLargeScreenDao;
import com.panzhihua.service_jinhui_community.service.JinhuiLargeScreenService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@@ -33,4 +38,35 @@
    public String getConvenientMerchantsNum(String auditType) {
        return baseMapper.getConvenientMerchantsNum(auditType);
    }
    @Override
    public List<JinhuiMerchantTypeVO> getMerchantTypeNum() {
        return baseMapper.getMerchantTypeNum();
    }
    @Override
    public JinhuiCommunityServicesVO baseInfo(String communityId) {
        return baseMapper.baseInfo(communityId);
    }
    @Override
    public String getWorkGuideNum() {
        return baseMapper.getWorkGuideNum();
    }
    @Override
    public String getInterspaceApplyNum(String state) {
        return baseMapper.getInterspaceApplyNum(state);
    }
    @Override
    public String getShoppingOrderNum(String cancelType) {
        return baseMapper.getShoppingOrderNum(cancelType);
    }
    @Override
    public String getServiceTeam(String communityId, String type)
    {
        return baseMapper.getServiceTeam(communityId,type);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiLargeScreenMapper.xml
@@ -33,6 +33,75 @@
            count(id) as number
        from jinhui_com_convenient_merchants
        where audit_type=#{auditType}
    </select>
    <!--  商家类型  -->
    <select id="getMerchantTypeNum" resultType="com.panzhihua.common.model.vos.jinhui.JinhuiMerchantTypeVO">
        select
            jccsc.name,
            count(jccm.id) as number
        from jinhui_com_convenient_service_categories as jccsc
        left join jinhui_com_convenient_merchants as jccm on jccm.convenient_type=jccsc.id
        GROUP BY jccsc.name
    </select>
    <!--  商家类型  -->
    <select id="getWorkGuideNum" resultType="String">
        select
            count(id) as number
        from jinhui_com_act_work_guide
    </select>
    <!--  商家类型  -->
    <select id="getInterspaceApplyNum" resultType="String">
        select
            count(id) as number
        from jinhui_interspace_apply_for
        <where>
            <if test="state!=null and state != ''">
                state=#{state}
            </if>
        </where>
    </select>
    <!--  商家类型  -->
    <select id="getShoppingOrderNum" resultType="String">
        select
            count(id) as number
        from jinhui_shopping_order
        <where>
            <if test="cancelType!=null and cancelType != ''">
                cancel_type=#{cancelType}
            </if>
        </where>
    </select>
    <!--  党员  志愿者数量  -->
    <select id="baseInfo" resultType="com.panzhihua.common.model.vos.jinhui.JinhuiCommunityServicesVO">
        select
            IFNULL((select count(id) from com_pb_member where community_id = ${communityId} and audit_result =1 ),0) as partyMember,
            IFNULL((select count(id) from com_mng_volunteer_mng where community_id = ${communityId} and state=2 ),0) as volunteer
        from com_mng_population_community_tags AS cmpct
        where cmpct.community_id = ${communityId}
    </select>
    <!--  获取社区工作者  -->
    <select id="getServiceTeam" resultType="String">
        SELECT
            count(id) as number
        from com_pb_service_team
        <where>
            1=1
            <if test="communityId != null and communityId !=''">
               and community_id=#{communityId}
            </if>
            <if test="type != null and type !=''">
                and `type`=#{type}
            </if>
        </where>
    </select>