Browse Source

问题修改:视频课不能入账

liweifan 2 years ago
parent
commit
870989d19d

+ 4 - 9
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PlatformCashAccountRecordServiceImpl.java

@@ -28,6 +28,7 @@ import com.yonge.cooleshow.biz.dal.service.SysConfigService;
 import com.yonge.cooleshow.biz.dal.vo.PlatformCashAccountRecordSummaryVo;
 import com.yonge.cooleshow.common.constant.SysConfigConstant;
 import com.yonge.cooleshow.common.enums.PostStatusEnum;
+import org.springframework.util.CollectionUtils;
 
 /**
  * 平台账户流水表(PlatformCashAccountRecord)表服务实现类
@@ -76,19 +77,13 @@ public class PlatformCashAccountRecordServiceImpl extends ServiceImpl<PlatformCa
         paramNames.add(AccountBizTypeEnum.VIP_SHARE.getCode());
 
         List<PlatformCashAccountRecord> list = getDao().queryCanAccountByBizType(paramNames);
-        if (list.size() > 0) {
-            Date date = new Date();
-            List<PlatformCashAccountRecord> batchUpdateList = new ArrayList<>();
+        if(!CollectionUtils.isEmpty(list)){
             for (PlatformCashAccountRecord pcar : list) {
                 //预收改成实收
                 pcar.setPostStatus(PostStatusEnum.RECORDED);
-                pcar.setUpdateTime(date);
-                batchUpdateList.add(pcar);
-            }
-
-            if (batchUpdateList.size() > 0) {
-                getDao().batchUpdate(batchUpdateList);
+                pcar.setUpdateTime(new Date());
             }
+            getDao().batchUpdate(list);
         }
         //老师账户修改
         userAccountRecordService.updateWaitRecord();

+ 2 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/PlatformCashAccountRecordMapper.xml

@@ -57,8 +57,8 @@
 	    		<if test="param.bizType">
 	    			biz_type_ = #{param.bizType}
 	    		</if>
-	    		<if test="param.status">
-	    			post_status_ = #{param.status}
+	    		<if test="param.postStatus">
+	    			post_status_ = #{param.postStatus}
 	    		</if>
 				<if test="param.accountPeriodTime">
 					account_period_time_ = #{param.accountPeriodTime}