101captain
2022-01-21 8b724bc2be81fc0625c9ed7171244974f53400e4
Merge remote-tracking branch 'origin/test' into test
10个文件已修改
51 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/microCommercialStreet/McsGameVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsGameDAO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsGameService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsCouponMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsEvaluateMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsGameMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsMerchantMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsVerifiedRecordMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/microCommercialStreet/McsGameVO.java
@@ -43,6 +43,9 @@
    @ApiModelProperty("戳戳币总额")
    private Integer coins;
    @ApiModelProperty("戳戳币剩余数量")
    private Integer surplusCoins;
    @ApiModelProperty("地址")
    private String address;
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java
@@ -307,15 +307,7 @@
     */
    @GetMapping("/statistics/top")
    public R getTopStatistics(@RequestParam("type") Integer type, @RequestParam("userId") Long userId) {
        if (type.equals(1)) {
            //戳戳游戏
            return mcsGameService.getTopStatistics(userId);
        } else if (type.equals(2)) {
            //戳戳资讯
            return mcsInformationService.getTopStatistics(userId);
        } else {
            return R.fail("未知错误");
        }
        return mcsGameService.getTopStatistics(userId, type);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsGameDAO.java
@@ -58,16 +58,18 @@
    /**
     * 查询商家下已被领取的卷总数
     * @param merchantId
     * @param type
     * @return
     */
    Integer selectAppliedCount(@Param("merchantId") Long merchantId);
    Integer selectAppliedCount(@Param("merchantId") Long merchantId, @Param("type") Integer type);
    /**
     * 查询商家下已被核销的卷总数
     * @param merchantId
     * @param type
     * @return
     */
    Integer selectVerifiedCount(@Param("merchantId") Long merchantId);
    Integer selectVerifiedCount(@Param("merchantId") Long merchantId, @Param("type") Integer type);
    /**
     * 获取热门游戏
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsGameService.java
@@ -78,9 +78,10 @@
    /**
     * 戳戳游戏顶部统计数据
     * @param userId
     * @param type
     * @return
     */
    R getTopStatistics(Long userId);
    R getTopStatistics(Long userId, Integer type);
    /**
     * 戳戳卷领取
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java
@@ -316,10 +316,11 @@
    /**
     * 戳戳游戏顶部统计数据
     * @param userId
     * @param type
     * @return
     */
    @Override
    public R getTopStatistics(Long userId) {
    public R getTopStatistics(Long userId, Integer type) {
        McsMerchant mcsMerchant = mcsMerchantDAO.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getUserId, userId));
        if (isNull(mcsMerchant)) {
            return R.fail("未查询到商家信息");
@@ -330,9 +331,9 @@
            int surplusLitDays = DateUtils.retrieveRemainingDays(mcsMerchant.getExpireAt());
            topStatisticsVO.setSurplusLitDays(surplusLitDays > 0 ? surplusLitDays : 0);
        }
        Integer appliedCount = this.baseMapper.selectAppliedCount(mcsMerchant.getId());
        Integer appliedCount = this.baseMapper.selectAppliedCount(mcsMerchant.getId(), type);
        topStatisticsVO.setAppliedTotal(appliedCount);
        Integer verifiedCount = this.baseMapper.selectVerifiedCount(mcsMerchant.getId());
        Integer verifiedCount = this.baseMapper.selectVerifiedCount(mcsMerchant.getId(), type);
        topStatisticsVO.setVerifiedTotal(verifiedCount);
        Integer publishLimit = mcsMerchant.getPublishLimit();
@@ -435,7 +436,8 @@
    public R getMcsGame(Long gameId) {
        McsGameVO mcsGameVO = this.baseMapper.selectDetailById(gameId);
        Integer gameCount = this.baseMapper.selectCount(new QueryWrapper<McsGame>().lambda()
                .eq(McsGame::getMerchantId, mcsGameVO.getMerchantId()).eq(McsGame::getStatus, McsGame.Status.jxz).eq(McsGame::getIsDel, false));
                .eq(McsGame::getMerchantId, mcsGameVO.getMerchantId()).eq(McsGame::getStatus, McsGame.Status.jxz)
                .eq(McsGame::getType, mcsGameVO.getType()).eq(McsGame::getIsDel, false));
        mcsGameVO.setGameCount(gameCount);
        return R.ok(mcsGameVO);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsCouponMapper.xml
@@ -52,6 +52,7 @@
        <if test="type != null">
            AND t2.type = #{type}
        </if>
        ORDER BY t1.created_at DESC
    </select>
    <select id="pageJoinGameList"
            resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsCouponVO">
@@ -64,6 +65,7 @@
        <if test="pageJoinGameListDTO.keyword != null and pageJoinGameListDTO.keyword != &quot;&quot;">
            AND t2.`name` LIKE CONCAT(#{pageJoinGameListDTO.keyword}, '%')
        </if>
        ORDER BY t1.created_at DESC
    </select>
    <select id="getMcsGameStatistics"
            resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.GameStatisticsVO">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsEvaluateMapper.xml
@@ -51,6 +51,7 @@
            OR t3.phone LIKE CONCAT(#{pageMcsEvaluateDTO.keyword}, '%')
            )
        </if>
        ORDER BY t1.created_at DESC
    </select>
    <select id="getMcsEvaluate"
            resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsEvaluateVO">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsGameMapper.xml
@@ -124,13 +124,13 @@
        SELECT COUNT(1)
        FROM mcs_coupon t1
        LEFT JOIN mcs_game t2 ON t1.game_id = t2.id
        WHERE t2.merchant_id = #{merchantId}
        WHERE t2.merchant_id = #{merchantId} AND t2.`type` = #{type}
    </select>
    <select id="selectVerifiedCount" resultType="java.lang.Integer">
        SELECT COUNT(1)
        FROM mcs_coupon t1
        LEFT JOIN mcs_game t2 ON t1.game_id = t2.id
        WHERE t1.is_verified = 1 AND t2.merchant_id = #{merchantId}
        WHERE t1.is_verified = 1 AND t2.merchant_id = #{merchantId} AND t2.`type` = #{type}
    </select>
    <select id="selectPopularGame"
            resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO">
@@ -142,7 +142,7 @@
    <select id="pageH5McsGame"
            resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO">
        SELECT * FROM (
            SELECT t1.id, t1.`name`, t1.`type`, t1.coupons, t1.surplus_coupons, t1.award_type, t1.cover,
            SELECT t1.id, t1.`name`, t1.`type`, t1.coupons, t1.surplus_coupons, t1.award_type, t1.cover, t1.coins, t1.surplus_coins,
            t1.publish_at, t1.`status`, t1.merchant_id, t1.lat, t1.lon, t2.`name` AS merchantName,
            ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN((t1.lat * PI() / 180 - #{pageMcsGameDTO.lat} * PI() / 180) / 2),2)
            +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsMerchantMapper.xml
@@ -134,12 +134,9 @@
            #{pageMcsMerchantDTO.lon} * PI() / 180) / 2),2))), 2) AS distance
            FROM mcs_merchant t1
            LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id
            <if test="pageMcsMerchantDTO.type != null and pageMcsMerchantDTO.type == 1">LEFT JOIN (SELECT * FROM mcs_game
            WHERE `status` = 2 GROUP BY merchant_id) t3 ON t1.id = t3.merchant_id
            </if>
            <if test="
            pageMcsMerchantDTO.type != null and pageMcsMerchantDTO.type == 2">LEFT JOIN (SELECT * FROM mcs_information WHERE
            `status` = 2 GROUP BY merchant_id) t3 ON t1.id = t3.merchant_id
            <if test="pageMcsMerchantDTO.type != null">
            LEFT JOIN (SELECT * FROM mcs_game
            WHERE `status` = 2 AND `type` = #{pageMcsMerchantDTO.type} AND expire_at &gt; NOW() GROUP BY merchant_id) t3 ON t1.id = t3.merchant_id
            </if>
            WHERE t1.is_del = 0 AND t1.expire_at &gt; NOW() AND t2.`status` = 1
            <if test="pageMcsMerchantDTO.type != null">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsVerifiedRecordMapper.xml
@@ -53,6 +53,7 @@
            OR t1.`name` LIKE CONCAT('%', #{pageVerifyRecordDTO.keyword}, '%')
            )
        </if>
        ORDER BY t1.verified_at DESC
    </select>
</mapper>