yangzian 3 anni fa
parent
commit
a1bf41a1f5

+ 1 - 1
jeecg-boot-bytedance-ad/pom.xml

@@ -28,7 +28,7 @@
         </dependency>
         <dependency>
             <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-system-local-api</artifactId>
+            <artifactId>jeecg-system-cloud-api</artifactId>
         </dependency>
 
         <dependency>

+ 3 - 3
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/common/utils/ExcelUtil.java

@@ -133,13 +133,13 @@ public class ExcelUtil {
          *     ERROR(5);
          */
 
-        CellType cellTypeEnum = cell.getCellType();
+        CellType cellTypeEnum = cell.getCellTypeEnum();
         //把数字当成String来读,避免出现1读成1.0的情况
-        if(cell.getCellType() == CellType.NUMERIC){
+        if(cell.getCellTypeEnum() == CellType.NUMERIC){
             cell.setCellType(CellType.STRING);
         }
         //判断数据的类型
-        switch (cell.getCellType()){
+        switch (cell.getCellTypeEnum()){
             case NUMERIC: //数字
                 cellValue = String.valueOf(cell.getNumericCellValue());
                 break;

+ 18 - 2
jeecg-boot-finance/pom.xml

@@ -7,7 +7,6 @@
         <groupId>org.jeecgframework.boot</groupId>
         <version>2.4.5</version>
     </parent>
-    <version>1.0.0</version>
     <modelVersion>4.0.0</modelVersion>
 <!--
     <groupId>org.jeecg.framework.boot</groupId>-->
@@ -22,6 +21,22 @@
         </dependency>
 
         <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-webflux</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+        <!--健康监控-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
+
+
+        <dependency>
             <groupId>org.jeecgframework.boot</groupId>
             <artifactId>jeecg-boot-base-core</artifactId>
             <exclusions>
@@ -34,7 +49,7 @@
 
         <dependency>
             <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-system-local-api</artifactId>
+            <artifactId>jeecg-system-cloud-api</artifactId>
         </dependency>
 
         <dependency>
@@ -59,6 +74,7 @@
         </dependency>
 
 
+
     </dependencies>
 
     <build>

+ 8 - 1
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/controller/SettlementFileController.java

@@ -56,7 +56,14 @@ public class SettlementFileController {
         if (Check.isNull(settlementFileInfo.getSettlementList())){
             return Result.errorMsg("账户截图不能为空!");
         }
-        return settlementFileInfoService.insertAccountImages(settlementFileInfo,settlementFileInfo.getSettlementList());
+        return settlementFileInfoService.insertAccountImages(settlementFileInfo);
+    }
+
+
+    @ApiOperation(value="结算单-查询账户数量以及上传图片数量", notes="结算单-查询账户数量以及上传图片数量")
+    @PostMapping(value = "/getAccountNumAndImgNum")
+    public Result getAccountNumAndImgNum(@RequestBody SettlementFileParamsVo paramsVo) {
+        return settlementFileInfoService.getAccountNumAndImgNum(paramsVo);
     }
 
 

+ 8 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/SettlementFileInfoMapper.java

@@ -34,4 +34,12 @@ public interface SettlementFileInfoMapper extends BaseMapper<ctopCwjsSettlementF
      * @return
      */
     Integer deleteSettlementFile(SettlementFileParamsVo paramsVo);
+
+
+    /**
+     * 查询账户数量以及上传图片数量
+     * @param paramsVo
+     * @return
+     */
+    Map<String,String> getAccountNumAndImgNum(SettlementFileParamsVo paramsVo);
 }

+ 41 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/xml/SettlementFileInfoMapper.xml

@@ -88,6 +88,47 @@
           and create_user_id = #{createUserId}
     </update>
 
+    <!-- 查询账户数量以及上传图片数量 -->
+    <select id="getAccountNumAndImgNum" resultType="java.util.Map">
+        SELECT * from
+                     (
+                         SELECT
+                                COUNT(account_id) as accountNum
+                         FROM
+                             ctop_cwjs_settlement_info
+                            where del_flag = 0
+                        <if test="advertiserId !=null and advertiserId != ''">
+                            AND advertiser_id = #{advertiserId}
+                        </if>
+                        <if test="productId !=null and productId != ''">
+                            AND product_id = #{productId}
+                        </if>
+                        <if test="mediaId !=null and mediaId != ''">
+                            AND media_id = #{mediaId}
+                        </if>
+                         ) t1,
+                     (
+                         SELECT
+                                COUNT(DISTINCT account_id) as imageNum
+                            FROM
+                                 ctop_cwjs_settlement_file_info
+                         where del_flag = 0
+                        <if test="advertiserId !=null and advertiserId != ''">
+                            AND advertiser_id = #{advertiserId}
+                        </if>
+                        <if test="productId !=null and productId != ''">
+                            AND product_id = #{productId}
+                        </if>
+                        <if test="mediaId !=null and mediaId != ''">
+                            AND media_id = #{mediaId}
+                        </if>
+                     ) t2
+
+
+
+    </select>
+
+
 
 
 

+ 2 - 1
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/service/ISettlementFileInfoService.java

@@ -17,8 +17,9 @@ public interface ISettlementFileInfoService extends IService<ctopCwjsSettlementF
 
     Result deleteSettlementFile(SettlementFileParamsVo paramsVo);
 
-    Result insertAccountImages(ctopCwjsSettlementFileInfo settlementFileInfo, List<ctopCwjsSettlementFileInfo> settlementList);
+    Result insertAccountImages(ctopCwjsSettlementFileInfo settlementFileInfo);
 
+    Result getAccountNumAndImgNum(SettlementFileParamsVo paramsVo);
 
 
 }

+ 16 - 5
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/service/serviceImpl/SettlementFileInfoServiceImpl.java

@@ -128,17 +128,14 @@ public class SettlementFileInfoServiceImpl extends ServiceImpl<SettlementFileInf
 
 
     /**
-     *
      * @description: 上传账户截图
-     *
      * @param settlementFileInfo
-     * @param settlementList
      * @return: org.jeecg.common.api.vo.Result
      * @author: zianY
      */
     @Override
-    public Result insertAccountImages(ctopCwjsSettlementFileInfo settlementFileInfo, List<ctopCwjsSettlementFileInfo> settlementList) {
-        settlementList.forEach(settlement -> {
+    public Result insertAccountImages(ctopCwjsSettlementFileInfo settlementFileInfo) {
+        settlementFileInfo.getSettlementList().forEach(settlement -> {
             settlement.setAccountId(SettlementUtil.subAccountName(settlement.getFileName()));
             //BeanUtils.copyProperties(settlementFileInfo,settlement,true,CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
             BeanUtils.copyProperties(settlementFileInfo,settlement,SettlementUtil.getNullPropertyNames(settlementFileInfo));
@@ -148,4 +145,18 @@ public class SettlementFileInfoServiceImpl extends ServiceImpl<SettlementFileInf
     }
 
 
+    /**
+     * @description: 查询账户数量以及上传图片数量
+     * @param paramsVo
+     * @return: org.jeecg.common.api.vo.Result
+     * @author: zianY
+     */
+    @Override
+    public Result getAccountNumAndImgNum(SettlementFileParamsVo paramsVo) {
+        Map<String,String> map =  settlementFileInfoMapper.getAccountNumAndImgNum(paramsVo);
+        return Result.successMsg("查询成功。",map);
+
+    }
+
+
 }

+ 5 - 0
jeecg-boot-finance/src/main/resources/application.yml

@@ -3,5 +3,10 @@ server:
 spring:
   application:
     name: jeecg-boot-finance
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 127.0.0.1:8848
+        service: jeecg-boot-finance
   main:
     allow-bean-definition-overriding: true

+ 1 - 19
jeecg-cloud-module/jeecg-cloud-gateway/pom.xml

@@ -27,25 +27,7 @@
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-gateway</artifactId>
         </dependency>
-        <!--Spring Webflux-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-webflux</artifactId>
-        </dependency>
-        <!-- 熔断、降级 -->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-        <!--健康监控-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-        </dependency>
+
 
         <!-- 限流Redis实现 -->
         <dependency>

+ 2 - 0
pom.xml

@@ -307,6 +307,8 @@
 					<include>**/*.xml</include>
 					<include>**/*.json</include>
 					<include>**/*.ftl</include>
+					<include>**/*.properties</include>
+					<include>**/*.yml</include>
 				</includes>
 			</resource>
 		</resources>