bug
jiangqs
2023-08-06 6ab383249b70a9646ffde1474b59dcc7d0b97df6
bug
8个文件已修改
1个文件已添加
83 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/constant/AppErrorConstant.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-member/pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/util/MsgUtils.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberSuggestMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopSuggestMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/resources/mapper/task/MemberTaskMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/constant/AppErrorConstant.java
@@ -94,6 +94,8 @@
    String BIRTHDAY_ERROR = "只有生日当月领取";
    String BIRTHDAY_BEYOND = "不能选择未来的日期作为生日";
    String COUPON_GET_ERROR = "该优惠券不可领取";
    String COUPON_GET_ALL = "该优惠券已领取完";
ruoyi-modules/ruoyi-member/pom.xml
@@ -109,6 +109,12 @@
            <artifactId>weixin-java-miniapp</artifactId>
            <version>4.5.0</version>
        </dependency>
        <dependency>
            <groupId>com.aliyun</groupId>
            <artifactId>alibabacloud-dysmsapi20170525</artifactId>
            <version>2.0.24</version>
        </dependency>
    </dependencies>
    <build>
ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/member/MemberServiceImpl.java
@@ -358,6 +358,9 @@
                member.setGender(Integer.valueOf(editValue));
                break;
            case 4:
                if(editValue.compareTo(DateUtils.getDate())>0){
                    throw new ServiceException(AppErrorConstant.BIRTHDAY_BEYOND);
                }
                member.setBirthday(editValue);
                break;
            case 5:
ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/util/MsgUtils.java
New file
@@ -0,0 +1,50 @@
package com.ruoyi.member.util;
import com.alibaba.nacos.shaded.com.google.gson.Gson;
import com.aliyun.auth.credentials.Credential;
import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
import com.aliyun.sdk.service.dysmsapi20170525.AsyncClient;
import com.aliyun.sdk.service.dysmsapi20170525.models.SendSmsRequest;
import com.aliyun.sdk.service.dysmsapi20170525.models.SendSmsResponse;
import darabonba.core.client.ClientOverrideConfiguration;
import java.util.concurrent.CompletableFuture;
/**
 * @author jqs34
 * @version 1.0
 * @classname MsgUtils
 * @description: TODO
 * @date 2023 2023/8/6 12:48
 */
public class MsgUtils {
    public static void sendMsg(String phoneNumber,Integer sendType,String sendContent) throws Exception {
        StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
                .accessKeyId(System.getenv("LTAI5tAfKFuhyKFH12CTkXFj"))
                .accessKeySecret(System.getenv("tIBRuonHuQQPdcYrmlCdXlexOSwVXe"))
                .build());
        AsyncClient client = AsyncClient.builder()
                .credentialsProvider(provider)
                .overrideConfiguration(
                        ClientOverrideConfiguration.create()
                                // Endpoint 请参考 https://api.aliyun.com/product/Dysmsapi
                                .setEndpointOverride("dysmsapi.aliyuncs.com")
                )
                .build();
        SendSmsRequest sendSmsRequest = SendSmsRequest.builder()
                .phoneNumbers(phoneNumber)
                .signName("鸿瑞堂")
                .build();
        CompletableFuture<SendSmsResponse> response = client.sendSms(sendSmsRequest);
        SendSmsResponse resp = response.get();
        System.out.println(new Gson().toJson(resp));
        client.close();
    }
}
ruoyi-modules/ruoyi-member/src/main/resources/mapper/member/MemberSuggestMapper.xml
@@ -45,8 +45,14 @@
            t_member_suggest tms
        INNER JOIN t_member tm ON tms.create_user_id = tm.user_id
        WHERE tms.del_flag = 0
        <if test="param.keyword!=null and param.keyword !=''">
        <if test="param.keyword!=null and param.keyword !='' and param.shopIds==null">
            AND (tm.real_name LIKE CONCAT('%',#{param.keyword},'%') OR tm.nick_name LIKE CONCAT('%',#{param.keyword},'%') OR tm.mobile LIKE CONCAT('%',#{param.keyword},'%') OR tms.replay_user_name LIKE CONCAT('%',#{param.keyword},'%') OR tms.shop_replay_user_name LIKE CONCAT('%',#{param.keyword},'%'))
        </if>
        <if test="param.keyword!=null and param.keyword !='' and param.shopIds != null">
            AND (tm.real_name LIKE CONCAT('%',#{param.keyword},'%') OR tm.nick_name LIKE CONCAT('%',#{param.keyword},'%') OR tm.mobile LIKE CONCAT('%',#{param.keyword},'%') OR tms.replay_user_name LIKE CONCAT('%',#{param.keyword},'%') OR tms.shop_replay_user_name LIKE CONCAT('%',#{param.keyword},'%') OR FIND_IN_SET(tms.shop_id, #{param.shopIds}) > 0)
        </if>
        <if test="param.keyword == null and param.shopIds!=null and param.shopIds!=''">
            AND FIND_IN_SET(tms.shop_id, #{param.shopIds}) > 0
        </if>
        <if test="param.createStartTime!=null and param.createStartTime!=''">
            AND Date(tms.create_time) &gt;= #{param.createStartTime}
@@ -77,9 +83,6 @@
        </if>
        <if test="param.suggestType!=null and param.suggestType!=''">
            AND tms.suggest_type = #{param.suggestType}
        </if>
        <if test="param.shopIds!=null and param.shopIds!=''">
            AND FIND_IN_SET(tms.shop_id, #{param.shopIds}) > 0
        </if>
        ORDER BY
        <if test="param.suggestSort!=null and param.suggestSort==1">
ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -1331,7 +1331,7 @@
    <select id="getMerHomeShopTotalVo" resultType="com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo">
        SELECT
            IFNULL(SUM(CASE WHEN order_status = 2 THEN 1 ELSE 0 END),0) unHandleOrder,
            IFNULL(SUM(pay_money),0) shopTurnover
            IFNULL(SUM(change_receivable_money),0) shopTurnover
        FROM t_order
        WHERE del_flag = 0 AND shop_id = #{shopId}
    </select>
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
@@ -6,7 +6,6 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsResult;
import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsStatusResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.ruoyi.common.core.constant.CacheConstants;
@@ -28,8 +27,6 @@
import com.ruoyi.shop.service.task.ShopFileService;
import com.ruoyi.shop.service.task.ShopTaskService;
import com.ruoyi.shop.util.WechatPayUtils;
import com.ruoyi.shop.util.WxShopUtils;
import com.ruoyi.shop.util.dto.*;
import com.ruoyi.system.api.constant.AppErrorConstant;
import com.ruoyi.system.api.domain.dto.*;
import com.ruoyi.system.api.domain.poji.config.SysTag;
ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopSuggestMapper.xml
@@ -46,10 +46,10 @@
            AND Date(tss.create_time) &lt;= #{param.createEndTime}
        </if>
        <if test="param.suggestStatus!=null">
            AND Date(tss.replay_flag) = #{param.suggestStatus}
            AND tss.replay_flag = #{param.suggestStatus}
        </if>
        <if test="param.tags!=null and param.tags!=''">
            AND Date(tss.suggest_tags) REGEXP #{param.tags}
            AND tss.suggest_tags REGEXP #{param.tags}
        </if>
        <if test="param.replayStartTime!=null and param.replayStartTime!=''">
            AND Date(tss.replay_time) &gt;= #{param.replayStartTime}
ruoyi-modules/ruoyi-shop/src/main/resources/mapper/task/MemberTaskMapper.xml
@@ -97,7 +97,7 @@
    <select id="getMemberIngTotal" resultType="java.lang.Integer">
        SELECT COUNT(task_id)
        FROM t_member_task
        WHERE del_flag = 0 AND task_status = 1 AND shop_id = #{shopId} AND task_date = DATE(NOW())
        WHERE del_flag = 0 AND task_status = 1 AND shop_id = #{shopId} AND task_date = CURRENT_DATE()
    </select>