lidongdong
2023-10-31 ea6b70f5785e3cbd94ddae475f64d3c621dce160
金汇大屏首页接口
6个文件已添加
251 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiIndexInfoVO.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/api/JinhuiLargeScreenApi.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/dao/JinhuiLargeScreenDao.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/service/JinhuiLargeScreenService.java 34 ●●●●● 补丁 | 查看 | 原始文档 | 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 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiIndexInfoVO.java
New file
@@ -0,0 +1,48 @@
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 JinhuiIndexInfoVO
{
    /**
     * 获取金汇风采数量
     * @param
     * @return
     */
    @ApiModelProperty(value = "金汇风采数量")
    private String mienNum="0";
    /**
     * 获取志愿者服务
     * @return
     */
    @ApiModelProperty(value = "志愿者服务")
    private String volunteerServeNum="0";
    /**
     * 获取微心愿数量
     * @param
     * @return
     */
    @ApiModelProperty(value = "微心愿数量")
    private String microVolunteeringNum="0";
    /**
     * 便民服务商家
     * @return
     */
    @ApiModelProperty(value = "便民服务商家数量")
    private String convenientMerchantsNum="0";
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/api/JinhuiLargeScreenApi.java
New file
@@ -0,0 +1,55 @@
package com.panzhihua.service_jinhui_community.api;
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.service_jinhui_community.entity.JinhuiSnapshot;
import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshotClassify;
import com.panzhihua.service_jinhui_community.service.JinhuiLargeScreenService;
import com.panzhihua.service_jinhui_community.service.JinhuiSnapshotClassifyService;
import com.panzhihua.service_jinhui_community.service.JinhuiSnapshotService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 *  金汇大屏api
 */
@Slf4j
@RestController
@RequestMapping("/JinhuiLargeScreen")
public class JinhuiLargeScreenApi extends BaseController
{
    @Resource
    private JinhuiLargeScreenService screenService;
    /**
     * 金汇首页数据
     * @return
     */
    @GetMapping("/getIndexInfo")
    public R getIndexInfo()
    {
        JinhuiIndexInfoVO jinhuiIndexInfoVO=new JinhuiIndexInfoVO();
        String mienNum=screenService.getMienNum(this.getCommunityId()+"");
        String volunteerServeNum=screenService.getVolunteerServeNum(this.getCommunityId()+"");
        String convenientMerchantsNum=screenService.getConvenientMerchantsNum("2");
        String volunteeringNum=screenService.getMicroVolunteeringNum("2");
        jinhuiIndexInfoVO.setMienNum(mienNum);
        jinhuiIndexInfoVO.setConvenientMerchantsNum(convenientMerchantsNum);
        jinhuiIndexInfoVO.setMicroVolunteeringNum(volunteeringNum);
        jinhuiIndexInfoVO.setVolunteerServeNum(volunteerServeNum);
        return R.ok(jinhuiIndexInfoVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/dao/JinhuiLargeScreenDao.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_jinhui_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface JinhuiLargeScreenDao extends BaseMapper<String>
{
    /**
     * 获取金汇风采数量
     * @param
     * @return
     */
    String getMienNum(@Param("communityId") String communityId);
    /**
     * 获取志愿者服务
     * @return
     */
    String getVolunteerServeNum(@Param("communityId") String communityId);
    /**
     * 获取微心愿数量
     * @param
     * @return
     */
    String getMicroVolunteeringNum(@Param("state") String state);
    /**
     * 便民服务商家
     * @return
     */
    String getConvenientMerchantsNum(@Param("auditType") String auditType);
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/service/JinhuiLargeScreenService.java
New file
@@ -0,0 +1,34 @@
package com.panzhihua.service_jinhui_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
public interface JinhuiLargeScreenService extends IService<String>
{
    /**
     * 获取金汇风采数量
     * @param
     * @return
     */
    String getMienNum(@Param("communityId") String communityId);
    /**
     * 获取志愿者服务
     * @return
     */
    String getVolunteerServeNum(@Param("communityId") String communityId);
    /**
     * 获取微心愿数量
     * @param
     * @return
     */
    String getMicroVolunteeringNum(@Param("state") String state);
    /**
     * 便民服务商家
     * @return
     */
    String getConvenientMerchantsNum(@Param("auditType") String auditType);
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/service/impl/JinhuiLargeScreenImpl.java
New file
@@ -0,0 +1,36 @@
package com.panzhihua.service_jinhui_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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;
@Slf4j
@Service
public class JinhuiLargeScreenImpl extends ServiceImpl<JinhuiLargeScreenDao,
        String> implements JinhuiLargeScreenService
{
    @Override
    public String getMienNum(String communityId) {
        return baseMapper.getMienNum(communityId);
    }
    @Override
    public String getVolunteerServeNum(String communityId) {
        return baseMapper.getVolunteerServeNum(communityId);
    }
    @Override
    public String getMicroVolunteeringNum(String state) {
        return baseMapper.getMicroVolunteeringNum(state);
    }
    @Override
    public String getConvenientMerchantsNum(String auditType) {
        return baseMapper.getConvenientMerchantsNum(auditType);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiLargeScreenMapper.xml
New file
@@ -0,0 +1,39 @@
<?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_jinhui_community.dao.JinhuiLargeScreenDao">
    <!-- 获取金汇风采数量 -->
    <select id="getMienNum" resultType="String">
        select
            count(id) as number
        from com_act_activity
        where community_id=#{communityId}
    </select>
    <!--  获取志愿者服务  -->
    <select id="getVolunteerServeNum" resultType="String">
        select
            count(id) as number
        from com_act_activity
        where community_id=#{communityId}
          and aattend_people in ('志愿者')
    </select>
<!--  获取微心愿数量  -->
    <select id="getMicroVolunteeringNum" resultType="String">
        select
            count(id) as number
        from jinhui_micro_volunteering
        where state=#{state}
    </select>
<!--  便民服务商家  -->
    <select id="getConvenientMerchantsNum" resultType="String">
        select
            count(id) as number
        from jinhui_com_convenient_merchants
        where audit_type=#{auditType}
    </select>
</mapper>