Explorar o código

Excel ,下载次数

lyhzzz %!s(int64=2) %!d(string=hai) anos
pai
achega
934fb1dd3b

+ 11 - 1
src/main/java/com/fdkankan/agent/response/LogListVo.java

@@ -35,9 +35,12 @@ public class LogListVo {
     @ExcelProperty("授权数量")
     private Integer count;
 
-    @ExcelProperty("授权总期限(年/月)")
+    @ExcelIgnore
     private Integer totalTime;
 
+    @ExcelProperty("授权总期限(年/月)")
+    private String totalTimeStr;
+
 
     public String getTypeStr() {
         if(type == null){
@@ -64,4 +67,11 @@ public class LogListVo {
         return giveTypeStr;
     }
 
+    public String getTotalTimeStr() {
+        if(type == 2){
+            return "-";
+        }
+        return totalTimeStr;
+    }
+
 }

+ 1 - 1
src/main/java/com/fdkankan/agent/service/impl/UserIncrementServiceImpl.java

@@ -121,7 +121,7 @@ public class UserIncrementServiceImpl extends ServiceImpl<IUserIncrementMapper,
 
         if(userIncrementList.size() >0){
             this.saveBatch(userIncrementList);
-            user.setDownloadNumTotal(user.getDownloadNumTotal() + param.getCount() * incrementType.getDownloadNum());
+            user.setDownloadNumTotal(user.getDownloadNumTotal() + param.getCount() *param.getTotalTime() *  incrementType.getDownloadNum());
             userService.updateById(user);
             agentNewService.subNum(agentNewVo,user.getId(),incrementType,param.getCount(),param.getTotalTime(),0);
 

+ 2 - 2
src/main/resources/mapper/agent/CameraIncrementLogMapper.xml

@@ -14,10 +14,10 @@
             <if test="param.snCode != null and param.snCode !=''">
                 and c.sn_code like concat ('%',#{param.snCode},'%')
             </if>
-            <if test="param.operationType">
+            <if test="param.operationType != null">
                 and cil.operation_type  = #{param.operationType}
             </if>
-            <if test="param.incrementTypeId">
+            <if test="param.incrementTypeId ! = null">
                 and ui.increment_type_id  = #{param.incrementTypeId}
             </if>
             <if test="param.operationUserName != null and param.operationUserName !=''">