Browse Source

fixed 统计报表问题

fushengqian 1 year ago
parent
commit
114109a40c

+ 2 - 2
fuint-application/src/main/java/com/fuint/common/util/VelocityInitializer.java

@@ -4,7 +4,7 @@ import java.util.Properties;
 import org.apache.velocity.app.Velocity;
 
 /**
- * VelocityEngine工厂
+ * 模板引擎初始化
  *
  * Created by FSQ
  * CopyRight https://www.fuint.cn
@@ -14,7 +14,7 @@ public class VelocityInitializer {
     /**
      * 初始化vm方法
      */
-    public static void initVelocity()  {
+    public static void initVelocity() {
         Properties p = new Properties();
         try {
             // 加载classpath目录下的vm文件

+ 12 - 16
fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientAddressController.java

@@ -87,7 +87,6 @@ public class ClientAddressController extends BaseController {
         mtAddress.setIsDefault(isDefault);
 
         addressService.saveAddress(mtAddress);
-
         return getSuccessResult(true);
     }
 
@@ -114,41 +113,39 @@ public class ClientAddressController extends BaseController {
 
         List<AddressDto> dataList = new ArrayList<>();
         for (MtAddress mtAddress : addressList) {
-            AddressDto dto = new AddressDto();
-            BeanUtils.copyProperties(mtAddress, dto);
+            AddressDto address = new AddressDto();
+            BeanUtils.copyProperties(mtAddress, address);
 
             String province = "";
             String city = "";
             String region = "";
 
-            if (dto.getProvinceId() > 0) {
-                MtRegion mtProvince = mtRegionMapper.selectById(dto.getProvinceId());
+            if (address.getProvinceId() > 0) {
+                MtRegion mtProvince = mtRegionMapper.selectById(address.getProvinceId());
                 if (mtProvince != null) {
                     province = mtProvince.getName();
                 }
             }
-            if (dto.getCityId() > 0) {
-                MtRegion mtCity = mtRegionMapper.selectById(dto.getCityId());
+            if (address.getCityId() > 0) {
+                MtRegion mtCity = mtRegionMapper.selectById(address.getCityId());
                 if (mtCity != null) {
                     city = mtCity.getName();
                 }
             }
-            if (dto.getCityId() > 0) {
-                MtRegion mtRegion = mtRegionMapper.selectById(dto.getRegionId());
+            if (address.getCityId() > 0) {
+                MtRegion mtRegion = mtRegionMapper.selectById(address.getRegionId());
                 if (mtRegion != null) {
                     region = mtRegion.getName();
                 }
             }
 
-            dto.setProvinceName(province);
-            dto.setCityName(city);
-            dto.setRegionName(region);
-
-            dataList.add(dto);
+            address.setProvinceName(province);
+            address.setCityName(city);
+            address.setRegionName(region);
+            dataList.add(address);
         }
 
         result.put("list", dataList);
-
         return getSuccessResult(result);
     }
 
@@ -214,7 +211,6 @@ public class ClientAddressController extends BaseController {
                 dto.setProvinceName(province);
                 dto.setCityName(city);
                 dto.setRegionName(region);
-
                 result.put("address", dto);
             }
         }

+ 1 - 1
fuint-application/src/main/java/com/fuint/module/merchantApi/controller/MerchantMemberController.java

@@ -56,7 +56,7 @@ public class MerchantMemberController extends BaseController {
     /**
      * 会员列表查询
      *
-     * @param  request HttpServletRequest对象
+     * @param request HttpServletRequest对象
      * @return 会员列表
      */
     @ApiOperation(value = "查询会员列表")

+ 1 - 1
fuint-repository/src/main/resources/mapper/MtUserMapper.xml

@@ -75,7 +75,7 @@
     </select>
 
     <select id="getMemberConsumeTopList" resultType="com.fuint.repository.bean.MemberTopBean">
-        SELECT u.id AS ID,u.name AS NAME,u.`USER_NO`,SUM(o.`AMOUNT`) AS amount FROM `mt_user` u,`mt_order` o WHERE u.`ID` = o.`USER_ID` AND o.PAY_STATUS = 'B'
+        SELECT u.id AS ID,u.name AS NAME,u.`USER_NO`,SUM(o.`AMOUNT`) AS amount FROM `mt_user` u,`mt_order` o WHERE u.`ID` = o.`USER_ID` AND u.STATUS = 'A' AND o.STATUS != 'G' AND o.PAY_STATUS = 'B'
         <if test="merchantId != null and merchantId > 0">
             AND u.MERCHANT_ID = #{merchantId}
         </if>