소스 검색

修改字段名

luyanwen-001 3 년 전
부모
커밋
01d525dfad

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/vo/result/QueryWxFactoryVO.java

@@ -22,6 +22,6 @@ public class QueryWxFactoryVO implements Serializable {
     private Long activation;
 
     @ApiModelProperty(value = "月")
-    private String march;
+    private String month;
 
 }

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/QueryWxFactoryRes.java

@@ -38,7 +38,7 @@ public class QueryWxFactoryRes implements Serializable {
         private Long inStock;
 
         @ApiModelProperty(value = "月")
-        private String march;
+        private String month;
     }
 
 }

+ 4 - 4
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/ReportServiceImpl.java

@@ -133,9 +133,9 @@ public class ReportServiceImpl implements ReportService {
             AssertUtil.isNull(queryWxFactorySumNumber,"查询为空!");
             //激活量
             List<QueryWxFactoryVO> queryWxFactoryActivationNumber = reportServiceMapper.queryWxFactoryActivationNumber(queryWxFactoryReq,getMonth());
-            Map<String, Long> activationNumberMap = queryWxFactoryActivationNumber.stream().collect(Collectors.toMap(QueryWxFactoryVO::getMarch, QueryWxFactoryVO::getActivation));
+            Map<String, Long> activationNumberMap = queryWxFactoryActivationNumber.stream().collect(Collectors.toMap(QueryWxFactoryVO::getMonth, QueryWxFactoryVO::getActivation));
             queryWxFactorySumNumber.forEach(factorySumNumber->{
-                Long aLong = (null == activationNumberMap.get(factorySumNumber.getMarch()) ? 0L : activationNumberMap.get(factorySumNumber.getMarch()));
+                Long aLong = (null == activationNumberMap.get(factorySumNumber.getMonth()) ? 0L : activationNumberMap.get(factorySumNumber.getMonth()));
                 factorySumNumber.setActivation(aLong);
             });
             List<QueryWxFactoryRes.QueryWxFactoryBean> queryWxFactoryBeans = PojoConverterUtils.copyList(queryWxFactorySumNumber, QueryWxFactoryRes.QueryWxFactoryBean.class);
@@ -151,9 +151,9 @@ public class ReportServiceImpl implements ReportService {
         AssertUtil.isNull(queryWxFactorySumNumber,"查询为空!");
         //激活量
         List<QueryWxFactoryVO> queryWxFactoryActivationNumber = reportServiceMapper.queryWxFactoryActivationNumber(queryWxFactoryReq,null);
-        Map<String, Long> activationNumberMap = queryWxFactoryActivationNumber.stream().collect(Collectors.toMap(QueryWxFactoryVO::getMarch, QueryWxFactoryVO::getActivation));
+        Map<String, Long> activationNumberMap = queryWxFactoryActivationNumber.stream().collect(Collectors.toMap(QueryWxFactoryVO::getMonth, QueryWxFactoryVO::getActivation));
         queryWxFactorySumNumber.forEach(factorySumNumber->{
-            Long aLong = (null == activationNumberMap.get(factorySumNumber.getMarch()) ? 0L : activationNumberMap.get(factorySumNumber.getMarch()));
+            Long aLong = (null == activationNumberMap.get(factorySumNumber.getMonth()) ? 0L : activationNumberMap.get(factorySumNumber.getMonth()));
             factorySumNumber.setActivation(aLong);
         });
         List<QueryWxFactoryRes.QueryWxFactoryBean> queryWxFactoryBeans = PojoConverterUtils.copyList(queryWxFactorySumNumber, QueryWxFactoryRes.QueryWxFactoryBean.class);

+ 6 - 6
abi-cloud-qr-platform-server/src/main/resources/dao/mapper/ReportServiceMapper.xml

@@ -101,7 +101,7 @@
 
         SELECT
             SUM( mapping.qr_code_count ) activation,
-            DATE_FORMAT( qpackage.create_time, "%Y-%m" ) march
+            DATE_FORMAT( qpackage.create_time, "%Y-%m" ) `month`
         FROM
             qr_package AS qpackage
             LEFT JOIN qr_box_mapping AS mapping ON qpackage.id = mapping.package_id
@@ -114,15 +114,15 @@
                 AND #{month} <![CDATA[<=]]> qpackage.create_time
             </if>
         </where>
-        GROUP BY march
-        ORDER BY march
+        GROUP BY `month`
+        ORDER BY `month`
     </select>
 
 
     <select id="queryWxFactorySumNumber" resultType="com.abi.qms.platform.dao.vo.result.QueryWxFactoryVO">
         SELECT
         sum( qpackage.qr_number ) total,
-        DATE_FORMAT( qpackage.create_time, "%Y-%m" ) march
+        DATE_FORMAT( qpackage.create_time, "%Y-%m" ) `month`
         FROM
         qr_package qpackage
         <where>
@@ -134,8 +134,8 @@
                 AND #{month} <![CDATA[<=]]> qpackage.create_time
             </if>
         </where>
-        GROUP BY march
-        ORDER BY march
+        GROUP BY `month`
+        ORDER BY `month`
     </select>