lubo 3 ay önce
ebeveyn
işleme
665898f482

+ 1 - 0
ruoyi-admin/src/main/resources/application.yml

@@ -407,5 +407,6 @@ task0h10: 0 10 0 * * ?
 online-order:
   payExpireMinute: 30
   endOrderDay: 7
+  openBalance: false
 
 authorizationLetterUrl: 2025/12/12/c778b429e92f48e1a8621fdf57ead6c5.docx

+ 8 - 0
ruoyi-api/src/main/java/com/ruoyi/api/controller/shop/ApiShopOrderController.java

@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.ruoyi.api.controller.common.AbstractApiController;
 import com.ruoyi.business.domain.Business;
+import com.ruoyi.business.domain.OnLineOrderProperties;
 import com.ruoyi.common.annotation.RepeatSubmit;
 import com.ruoyi.common.core.domain.PageQuery;
 import com.ruoyi.common.core.domain.R;
@@ -80,6 +81,8 @@ public class ApiShopOrderController extends AbstractApiController {
     @Resource(name = "userThirdIdentityServiceImpl")
     private IUserThirdIdentityService userThirdIdentityService;
 
+    private final OnLineOrderProperties onLineOrderProperties;
+
     @Autowired
     private NewWxPayService wxPayService;
     private final ISendPrivateMessageMsgService sendPrivateMessageMsgService;
@@ -230,6 +233,11 @@ public class ApiShopOrderController extends AbstractApiController {
     @RepeatSubmit()
     @PostMapping("/balance")
     public R balance(@Validated(AddGroup.class) @RequestBody ShopOrderPayDto dto) {
+        Boolean openBalance = onLineOrderProperties.getOpenBalance();
+        if(!openBalance)
+        {
+            throw new ServiceException("余额支付功能未开启");
+        }
         Long userId = getUserId();
 
         ShopOrder order = iShopOrderService.loadByOrderNo(dto.getOrderNo(), true);

+ 6 - 0
ruoyi-business/src/main/java/com/ruoyi/business/domain/OnLineOrderProperties.java

@@ -21,4 +21,10 @@ public class OnLineOrderProperties {
      */
     private  Integer endOrderDay;
 
+
+    /**
+     * 是否开启余额支付
+     */
+    private Boolean openBalance;
+
 }

+ 7 - 0
ruoyi-business/src/main/java/com/ruoyi/businessDayBill/domain/bo/BusinessDayBillCountBo.java

@@ -66,4 +66,11 @@ public class BusinessDayBillCountBo implements Serializable {
     @ApiModelProperty(value = "连锁商家IDs", required = true)
     private List<Long> chainBusinessIds;
 
+
+    @ApiModelProperty(value = "商家名称")
+    private String businessName;
+
+    @ApiModelProperty(value = "法人名称")
+    private String legalName;
+
 }

+ 13 - 6
ruoyi-business/src/main/resources/mapper/businessDayBill/BusinessDayBillMapper.xml

@@ -52,25 +52,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         IFNULL(sum(platform_income), 0) as platform_income,
         IFNULL(sum(point_verified_order_num), 0) as point_verified_order_num,
         IFNULL(sum(point_verified_order_amount), 0) as point_verified_order_amount
-        from tb_business_day_bill
+        from tb_business_day_bill as  tbdb
+        left join tb_business as tb on tbdb.business_id = tb.business_id
         <where>
             <if test="bo.businessId!=null">
-                and business_id = #{bo.businessId}
+                and tbdb.business_id = #{bo.businessId}
+            </if>
+            <if test="bo.businessName!=null and bo.businessName!=''">
+                and tbdb.business_name like concat('%',#{bo.businessName},'%')
+            </if>
+            <if test="bo.legalName!=null and bo.legalName!=''">
+                and tb.legal_name like concat('%',#{bo.legalName},'%')
             </if>
             <if test="bo.chainBusinessIds!=null and bo.chainBusinessIds.size>0">
-                and business_id in
+                and tbdb.business_id in
                 <foreach item="item" collection="bo.chainBusinessIds" separator="," open="(" close=")" index="">
                     #{item}
                 </foreach>
             </if>
             <if test="bo.startTime!=null">
-                and bill_day &gt;= #{bo.startTime}
+                and tbdb.bill_day &gt;= #{bo.startTime}
             </if>
             <if test="bo.endTime!=null">
-                and bill_day &lt;= #{bo.endTime}
+                and tbdb.bill_day &lt;= #{bo.endTime}
             </if>
             <if test="bo.dayValue!=null and bo.dayValue!=''">
-                and day_value = #{bo.dayValue}
+                and tbdb.day_value = #{bo.dayValue}
             </if>
         </where>
     </select>