Sfoglia il codice sorgente

Merge branch 'saas' of http://git.dayaedu.com/yonge/mec into saas

liujunchi 2 anni fa
parent
commit
54b9339d39

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysConfigService.java

@@ -393,6 +393,9 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
 
     //平台收款账户
     String PLATFORM_PAYEE_ACCOUNT = "platform_payee_account";
+    
+    //机构云教室账户余额提醒
+    String TENANT_CLOUD_ROOM_BALANCE_NOTICE = "tenant_cloud_room_balance_notice_";
 
     static Date checkActivityDate(String startTimeStr, String endTimeStr) {
         Date now = new Date();

+ 9 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantAssetsInfoServiceImpl.java

@@ -49,6 +49,9 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
     private TenantInfoService tenantInfoService;
     @Autowired
     private SysMessageService sysMessageService;
+    
+    @Autowired
+    private SysConfigService sysConfigService;
 
     private final Predicate<String> VipPredicate = (o) -> Objects.equals(o, CourseSchedule.CourseScheduleType.VIP.getCode());
 
@@ -175,7 +178,12 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
     private void sendMsg(Integer tenantId, BigDecimal balance, BigDecimal after) {
         TenantInfo t = tenantInfoService.getById(tenantId);
         //当前余额大于300 并且 本次扣除后剩余额度小于300
-        BigDecimal threeHundred = new BigDecimal(300);
+        int balanceThresholdValue = 300;
+        SysConfig config = sysConfigService.findByParamName(SysConfigService.TENANT_CLOUD_ROOM_BALANCE_NOTICE);
+        if(config != null && StringUtils.isNotBlank(config.getParanValue())){
+        	balanceThresholdValue = Integer.parseInt(config.getParanValue());
+        }
+        BigDecimal threeHundred = new BigDecimal(balanceThresholdValue);
         if (balance.compareTo(threeHundred) >= 0 && after.compareTo(threeHundred) < 0) {
 
             //邮件

+ 0 - 10
mec-biz/src/main/resources/config/contracts/latest_contract_template.ftl

@@ -99,16 +99,6 @@
                 <div class="iInfo">
                     <span>学生姓名:${studentInfo.username!}</span>
                 </div>
-                <#if studentInfo.grade?default("")?trim?length gt 1>
-                <div class="iInfo">
-                    <span>所在班级:${studentInfo.grade!} ${studentInfo.clazz!}</span>
-                </div>
-                </#if>
-                <#if studentInfo.subject.name?default("")?trim?length gt 1>
-                <div class="iInfo">
-                    <span>所在声部:${studentInfo.subject.name!}</span>
-                </div>
-                </#if>
             </div>
         </div>
         <div>(本协议中“乙方“指学员及家长;”乙方学员“指购买甲方产品或服务的学员;”乙方家长“仅指乙方学员的法定监护人。)</div>