Browse Source

Merge remote-tracking branch 'origin/master'

Joburgess 4 years ago
parent
commit
544312d9ed

+ 15 - 8
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -42,6 +42,7 @@ import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysMessageService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.service.IdGeneratorService;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
@@ -64,6 +65,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 	private MusicGroupOrganizationCourseSettingsDetailDao musicGroupOrganizationCourseSettingsDetailDao;
 	
 	@Autowired
+	private IdGeneratorService idGeneratorService;
+	
+	@Autowired
 	private MusicGroupDao musicGroupDao;
 	@Autowired
 	private SysConfigDao sysConfigDao;
@@ -170,7 +174,8 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 				musicGroupPaymentCalenderDetailList.add(musicGroupPaymentCalenderDetail);
 			}
 		}
-		
+		//设置批次号
+		musicGroupPaymentCalender.setBatchNo(idGeneratorService.generatorId()+"");
 		musicGroupPaymentCalenderDao.insert(musicGroupPaymentCalender);
 		
 		for(MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings : musicGroupPaymentCalenderCourseSettingsList){
@@ -435,13 +440,15 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 						mgpcd.setUpdateTime(date);
 						updateMusicGroupPaymentCalenderDetailList.add(mgpcd);
 
-						// 更新fee表,且加1
-						musicGroupStudentFee = feeMap.get(mgpcd.getUserId());
-						if (musicGroupStudentFee != null) {
-							musicGroupStudentFee.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
-							musicGroupStudentFee.setUpdateTime(date);
-							musicGroupStudentFee.setRemainNetworkClassTimes(musicGroupStudentFee.getContinuousAbsenteeismTimes() + 1);
-							updateMusicGroupStudentFeeList.add(musicGroupStudentFee);
+						if (mgpc.getIsGiveMusicNetwork()) {
+							// 更新fee表,且加1
+							musicGroupStudentFee = feeMap.get(mgpcd.getUserId());
+							if (musicGroupStudentFee != null) {
+								musicGroupStudentFee.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
+								musicGroupStudentFee.setUpdateTime(date);
+								musicGroupStudentFee.setRemainNetworkClassTimes(musicGroupStudentFee.getContinuousAbsenteeismTimes() + 1);
+								updateMusicGroupStudentFeeList.add(musicGroupStudentFee);
+							}
 						}
 					}
 				}

+ 4 - 4
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml

@@ -186,10 +186,10 @@
         	<if test="musicGroupId != null">
         		and mgpc.music_group_id_ = #{musicGroupId}
         	</if>
-        	<if test="musicGroupId != null">
+        	<if test="payUserType != null">
         		and mgpc.pay_user_type_ = #{payUserType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         	</if>
-        	<if test="musicGroupId != null">
+        	<if test="status != null">
         		and mgpc.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         	</if>
         </where>
@@ -204,10 +204,10 @@
         	<if test="musicGroupId != null">
         		and mgpc.music_group_id_ = #{musicGroupId}
         	</if>
-        	<if test="musicGroupId != null">
+        	<if test="payUserType != null">
         		and mgpc.pay_user_type_ = #{payUserType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         	</if>
-        	<if test="musicGroupId != null">
+        	<if test="status != null">
         		and mgpc.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         	</if>
         </where>

+ 6 - 0
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -72,6 +72,8 @@ public class StudentOrderController extends BaseController {
     private StudentPaymentRouteOrderDao studentPaymentRouteOrderDao;
     @Autowired
     private StudentGoodsSellDao studentGoodsSellDao;
+    @Autowired
+    private LuckDrawCountService luckDrawCountService;
 
 
     @Value("${spring.profiles.active:dev}")
@@ -135,6 +137,10 @@ public class StudentOrderController extends BaseController {
         } else if (orderByOrderNo.getGroupType().equals(GroupType.SPORADIC)) {
             SporadicChargeInfo info = sporadicChargeInfoService.get(Integer.valueOf(orderByOrderNo.getMusicGroupId()));
             orderDetail.put("detail", info);
+            if (orderByOrderNo.getType().equals(OrderTypeEnum.DOUBLE_ELEVEN2020)) {
+                LuckDrawCount luckDrawCount = luckDrawCountService.get(orderByOrderNo.getUserId().longValue());
+                orderDetail.put("drawTimes", luckDrawCount==null? 0: luckDrawCount.getAvailableCount());
+            }
         } else if (orderByOrderNo.getGroupType().equals(GroupType.GOODS_SELL)) {
             orderDetail.put("detail", studentGoodsSellDao.getStudentGoodsSellDto(orderNo));
         }