ソースを参照

Merge remote-tracking branch 'origin/master'

wzq 1 日 前
コミット
52f0cb793d

+ 51 - 0
src/main/java/com/zsElectric/boot/business/controller/PolicyFeeController.java

@@ -0,0 +1,51 @@
+package com.zsElectric.boot.business.controller;
+
+import com.zsElectric.boot.business.model.vo.PartyStationInfoVO;
+import com.zsElectric.boot.business.service.PolicyFeeService;
+import com.zsElectric.boot.business.service.ThirdPartyChargingService;
+import com.zsElectric.boot.business.service.ThirdPartyInfoService;
+import com.zsElectric.boot.core.web.Result;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 策略费用控制器
+ *
+ * @author system
+ * @since 2025-12-15
+ */
+@Tag(name = "策略费用管理接口")
+@RestController
+@RequestMapping("/api/v1/policy-fee")
+@RequiredArgsConstructor
+public class PolicyFeeController {
+
+    private final PolicyFeeService policyFeeService;
+
+    private final ThirdPartyChargingService chargingService;
+    private final ThirdPartyInfoService thirdPartyInfoService;
+    /**
+     * 获取充电桩信息集合
+     *
+     */
+    @Operation(summary = "获取充电桩信息集合(下拉使用)")
+    @PostMapping("/getPartyStationInfo")
+    public Result<List<PartyStationInfoVO>> getPartyStationInfo(){
+        return Result.success(chargingService.getPartyStationInfo());
+    }
+
+    /**
+     * 获取渠道方集合
+     * */
+    @Operation(summary = "获取渠道方集合(下拉使用)")
+    @PostMapping("/getPartyStationInfoList")
+    public Result<List<PartyStationInfoVO>> getPartyStationInfoList(){
+        return Result.success(thirdPartyInfoService.getPartyStationInfoList());
+    }
+}

+ 0 - 9
src/main/java/com/zsElectric/boot/business/controller/ThirdPartyChargingController.java

@@ -51,13 +51,4 @@ public class ThirdPartyChargingController {
         return PageResult.success(result);
     }
 
-    /**
-     * 获取充电桩信息集合
-     *
-     */
-    @Operation(summary = "获取充电桩信息集合(下拉使用)")
-    @PostMapping("/equipments/getPartyStationInfo")
-    public Result<List<PartyStationInfoVO>> getPartyStationInfo(){
-        return Result.success(chargingService.getPartyStationInfo());
-    }
 }

+ 16 - 0
src/main/java/com/zsElectric/boot/business/mapper/PolicyFeeMapper.java

@@ -0,0 +1,16 @@
+package com.zsElectric.boot.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zsElectric.boot.business.model.entity.PolicyFee;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 策略费用Mapper接口
+ *
+ * @author system
+ * @since 2025-12-15
+ */
+@Mapper
+public interface PolicyFeeMapper extends BaseMapper<PolicyFee> {
+
+}

+ 84 - 0
src/main/java/com/zsElectric/boot/business/model/entity/PolicyFee.java

@@ -0,0 +1,84 @@
+package com.zsElectric.boot.business.model.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * 策略费用实体
+ *
+ * @author system
+ * @since 2025-12-15
+ */
+@TableName("c_policy_fee")
+@Getter
+@Setter
+public class PolicyFee implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 站点信息ID(关联third_party_station_info表)
+     */
+    private Long stationInfoId;
+
+    /**
+     * 策略明细ID(关联third_party_policy_info表)
+     */
+    private Long policyInfoId;
+
+    /**
+     * 运营费
+     */
+    private BigDecimal opFee;
+
+    /**
+     * 综合销售费
+     */
+    private BigDecimal compSalesFee;
+
+    /**
+     * 销售类型(0-平台 1-企业 2-渠道方)
+     */
+    private Integer salesType;
+
+    /**
+     * 渠道方ID(销售类型为2时必填)关联c_third_party_info
+     */
+    private Long thirdPartyId;
+
+    /**
+     * 创建时间
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    /**
+     * 创建人ID
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private Long createBy;
+
+    /**
+     * 逻辑删除(0-未删除 1-已删除)
+     */
+    @TableLogic
+    private Integer isDeleted;
+}

+ 11 - 0
src/main/java/com/zsElectric/boot/business/service/PolicyFeeService.java

@@ -0,0 +1,11 @@
+package com.zsElectric.boot.business.service;
+
+/**
+ * 策略费用服务接口
+ *
+ * @author system
+ * @since 2025-12-15
+ */
+public interface PolicyFeeService {
+
+}

+ 22 - 0
src/main/java/com/zsElectric/boot/business/service/impl/PolicyFeeServiceImpl.java

@@ -0,0 +1,22 @@
+package com.zsElectric.boot.business.service.impl;
+
+import com.zsElectric.boot.business.mapper.PolicyFeeMapper;
+import com.zsElectric.boot.business.service.PolicyFeeService;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+/**
+ * 策略费用服务实现
+ *
+ * @author system
+ * @since 2025-12-15
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class PolicyFeeServiceImpl implements PolicyFeeService {
+
+    private final PolicyFeeMapper policyFeeMapper;
+
+}

+ 7 - 16
src/main/java/com/zsElectric/boot/config/SecurityConfig.java

@@ -29,7 +29,6 @@ import org.springframework.security.authentication.dao.DaoAuthenticationProvider
 import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer;
 import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
 import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer;
 import org.springframework.security.config.http.SessionCreationPolicy;
@@ -118,6 +117,13 @@ public class SecurityConfig {
                             if (ArrayUtil.isNotEmpty(ignoreUrls)) {
                                 requestMatcherRegistry.requestMatchers(ignoreUrls).permitAll();
                             }
+                            
+                            // 配置完全绕过安全检查的路径(原 unsecuredUrls)
+                            String[] unsecuredUrls = securityProperties.getUnsecuredUrls();
+                            if (ArrayUtil.isNotEmpty(unsecuredUrls)) {
+                                requestMatcherRegistry.requestMatchers(unsecuredUrls).permitAll();
+                            }
+                            
                             // 其他所有请求需登录后访问
                             requestMatcherRegistry.anyRequest().authenticated();
                         }
@@ -146,21 +152,6 @@ public class SecurityConfig {
                 .build();
     }
 
-    /**
-     * 配置Web安全自定义器,以忽略特定请求路径的安全性检查。
-     * <p>
-     * 该配置用于指定哪些请求路径不经过Spring Security过滤器链。通常用于静态资源文件。
-     */
-    @Bean
-    public WebSecurityCustomizer webSecurityCustomizer() {
-        return (web) -> {
-            String[] unsecuredUrls = securityProperties.getUnsecuredUrls();
-            if (ArrayUtil.isNotEmpty(unsecuredUrls)) {
-                web.ignoring().requestMatchers(unsecuredUrls);
-            }
-        };
-    }
-
     /**
      * 默认密码认证的 Provider
      */