Explorar el Código

Merge remote-tracking branch 'origin/saas' into saas

zouxuan hace 3 años
padre
commit
2898c093d4
Se han modificado 21 ficheros con 153 adiciones y 46 borrados
  1. 0 11
      cms/src/main/java/com/ym/mec/cms/controller/queryinfo/NewsInformationQueryInfo.java
  2. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/RedemptionCodeDao.java
  3. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysManualDao.java
  4. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TenantAssetsInfoDao.java
  5. 17 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysManual.java
  6. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TenantProductInfo.java
  7. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MessageTypeEnum.java
  8. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/service/AppRedemptionCodeService.java
  9. 3 1
      mec-biz/src/main/java/com/ym/mec/biz/service/SysManualService.java
  10. 31 9
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/AppRedemptionCodeServiceImpl.java
  11. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrderPayOpsServiceImpl.java
  12. 9 8
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysManualServiceImpl.java
  13. 22 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantAssetsInfoServiceImpl.java
  14. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantInfoServiceImpl.java
  15. 3 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantOrderRecordServiceImpl.java
  16. 4 0
      mec-biz/src/main/resources/config/mybatis/RedemptionCodeMapper.xml
  17. 10 3
      mec-biz/src/main/resources/config/mybatis/SysManualMapper.xml
  18. 9 0
      mec-biz/src/main/resources/config/mybatis/TenantAssetsInfoMapper.xml
  19. 1 1
      mec-biz/src/main/resources/config/mybatis/TenantCloudCourseRecordMapper.xml
  20. 7 1
      mec-web/src/main/java/com/ym/mec/web/controller/SysManualController.java
  21. 8 0
      mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

+ 0 - 11
cms/src/main/java/com/ym/mec/cms/controller/queryinfo/NewsInformationQueryInfo.java

@@ -25,9 +25,6 @@ public class NewsInformationQueryInfo extends QueryInfo {
 	@ApiModelProperty(value = "备注", required = false)
 	private String memo;
 	
-	@ApiModelProperty(value = "租客编号", required = false)
-	private Integer tenantId;
-	
 	@ApiModelProperty(value = "声部编号", required = false)
 	private Integer subjectId;
 	
@@ -93,14 +90,6 @@ public class NewsInformationQueryInfo extends QueryInfo {
 		this.memo = memo;
 	}
 
-	public Integer getTenantId() {
-		return tenantId;
-	}
-
-	public void setTenantId(Integer tenantId) {
-		this.tenantId = tenantId;
-	}
-
 	public String getClientName() {
 		return clientName;
 	}

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/RedemptionCodeDao.java

@@ -17,5 +17,7 @@ public interface RedemptionCodeDao extends BaseMapper<AppRedemptionCode> {
    int insertBatch(@Param("entities") List<AppRedemptionCode> entities);
 
     AppRedemptionCode findFirstNull();
+
+    Integer findNull();
 }
 

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysManualDao.java

@@ -20,5 +20,7 @@ public interface SysManualDao extends BaseMapper<SysManual> {
     int findRecordCount(Map<String, Object> params);
 
     List<SysManual> queryRecord(Map<String, Object> params);
+
+    List<String> listMenuIds();
 }
 

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TenantAssetsInfoDao.java

@@ -21,5 +21,7 @@ public interface TenantAssetsInfoDao extends BaseMapper<TenantAssetsInfo> {
     int deductAmount(BigDecimal deductAmount, Integer tenantId);
 
     int checkDeductAmount(BigDecimal deductAmount, Integer tenantId);
+
+    Integer queryPeopleNum(Integer courseId);
 }
 

+ 17 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysManual.java

@@ -55,6 +55,16 @@ public class SysManual implements Serializable {
     @ApiModelProperty(value = "操作人")
     private Integer operatorId;
 
+    @TableField(exist = false)
+    @ApiModelProperty(value = "操作人名称")
+    private String operatorName;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "菜单名")
+    private String menuName;
+
+    // -------------------------------------------------------------------------
+
     public String getOperatorName() {
         return operatorName;
     }
@@ -63,8 +73,13 @@ public class SysManual implements Serializable {
         this.operatorName = operatorName;
     }
 
-    @ApiModelProperty(value = "操作人名称")
-    private String operatorName;
+    public String getMenuName() {
+        return menuName;
+    }
+
+    public void setMenuName(String menuName) {
+        this.menuName = menuName;
+    }
 
     private static final long serialVersionUID = 1L;
 

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TenantProductInfo.java

@@ -18,6 +18,11 @@ import java.util.Date;
  */
 @ApiModel(value = "机构产品设置表")
 public class TenantProductInfo implements Serializable {
+
+    public static final String MONTH = "MONTH";
+
+    public static final String YEAR = "YEAR";
+
     @TableId(value = "id_", type = IdType.AUTO)
     @ApiModelProperty(value = "主键")
     private Integer id;

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MessageTypeEnum.java

@@ -195,6 +195,8 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
     NO_TRAIN_STUDENT_PUSH("NO_TRAIN_STUDENT_PUSH", "云教练训练提醒"),
 
     COUPON_STOCK_WARNING("COUPON_STOCK_WARNING", "优惠券库存预警"),
+
+    APP_REDEMPTION_CODE("APP_REDEMPTION_CODE", "兑换码分配量预警"),
     ;
 
     MessageTypeEnum(String code, String msg) {

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/AppRedemptionCodeService.java

@@ -17,5 +17,7 @@ public interface AppRedemptionCodeService extends IService<AppRedemptionCode> {
     List<AppRedemptionCode> importRedemptionCode(MultipartFile file) throws Exception;
 
     AppRedemptionCode allocation(Integer userId);
+
+    void checkLowVolume();
 }
 

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/SysManualService.java

@@ -17,6 +17,8 @@ public interface SysManualService extends IService<SysManual> {
 
     Boolean add(SysManual sysManual, Integer userId);
 
-    Boolean update(SysManual sysManual, Integer userId);
+    int update(SysManual sysManual, Integer userId);
+
+    String listMenuIds();
 }
 

+ 31 - 9
mec-biz/src/main/java/com/ym/mec/biz/service/impl/AppRedemptionCodeServiceImpl.java

@@ -2,15 +2,19 @@ package com.ym.mec.biz.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.mysql.cj.protocol.MessageSender;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.biz.dal.dao.RedemptionCodeDao;
 import com.ym.mec.biz.dal.entity.AppRedemptionCode;
 import com.ym.mec.biz.dal.enums.*;
 import com.ym.mec.biz.service.AppRedemptionCodeService;
+import com.ym.mec.biz.service.SysMessageService;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.WrapperUtil;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.excel.POIUtil;
 import com.ym.mec.util.ini.IniFileUtil;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.io.ClassPathResource;
@@ -32,7 +36,8 @@ import java.util.*;
  * @since 2021-12-27 14:27:57
  */
 @Service("redemptionCodeService")
-public class AppRedemptionCodeServiceImpl extends ServiceImpl<RedemptionCodeDao, AppRedemptionCode> implements AppRedemptionCodeService {
+public class AppRedemptionCodeServiceImpl extends ServiceImpl<RedemptionCodeDao, AppRedemptionCode>
+        implements AppRedemptionCodeService {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(AppRedemptionCodeServiceImpl.class);
 
@@ -42,14 +47,18 @@ public class AppRedemptionCodeServiceImpl extends ServiceImpl<RedemptionCodeDao,
     @Autowired
     private SysUserFeignService sysUserFeignService;
 
+    @Autowired
+    private SysMessageService sysMessageService;
+
     private final static Logger logger = LoggerFactory.getLogger(AppRedemptionCodeServiceImpl.class);
 
     @Override
     public List<AppRedemptionCode> importRedemptionCode(MultipartFile file) throws Exception {
-        Map<String, List<Map<String, Object>>> sheetsListMap = POIUtil.importExcel(new ByteArrayInputStream(file.getBytes()), 2, file.getOriginalFilename());
-        
+        Map<String, List<Map<String, Object>>> sheetsListMap = POIUtil.importExcel(
+                new ByteArrayInputStream(file.getBytes()), 2, file.getOriginalFilename());
+
         InputStream inputStream = new ClassPathResource("columnMapper.ini").getInputStream();
-        Map<String,String> columns = IniFileUtil.readIniFile(inputStream, TemplateTypeEnum.REDEMPTIONCODE.getMsg());
+        Map<String, String> columns = IniFileUtil.readIniFile(inputStream, TemplateTypeEnum.REDEMPTIONCODE.getMsg());
 
         List<AppRedemptionCode> redemptionCodesList = new ArrayList<>();
         for (String e : sheetsListMap.keySet()) {
@@ -61,18 +70,19 @@ public class AppRedemptionCodeServiceImpl extends ServiceImpl<RedemptionCodeDao,
 
                 JSONObject objectMap = new JSONObject();
                 for (String s : row.keySet()) {
-                    if(!columns.containsKey(s)){
+                    if (!columns.containsKey(s)) {
                         continue;
                     }
                     String columnValue = columns.get(s);
-                    if(null == row.get(s) || StringUtils.isBlank(row.get(s).toString())){
-                        LOGGER.error("导入异常:参数{}不可为空 param:{}",columnValue,objectMap);
-                        continue ;
+                    if (null == row.get(s) || StringUtils.isBlank(row.get(s).toString())) {
+                        LOGGER.error("导入异常:参数{}不可为空 param:{}", columnValue, objectMap);
+                        continue;
                     }
                     objectMap.put(columnValue, row.get(s));
                 }
                 try {
-                    AppRedemptionCode redemptionCode = JSONObject.parseObject(objectMap.toJSONString(),AppRedemptionCode.class);
+                    AppRedemptionCode redemptionCode = JSONObject.parseObject(objectMap.toJSONString(),
+                                                                              AppRedemptionCode.class);
                     redemptionCodesList.add(redemptionCode);
                     redemptionCodeDao.insert(redemptionCode);
                 } catch (Exception ex) {
@@ -96,5 +106,17 @@ public class AppRedemptionCodeServiceImpl extends ServiceImpl<RedemptionCodeDao,
         }
         return redemptionCode;
     }
+
+    @Override
+    public void checkLowVolume() {
+        Integer volume = redemptionCodeDao.findNull();
+        if (volume == null || volume < 10) {
+            Map<Integer, String> receivers = new HashMap<>(1);
+            receivers.put(0, "13512341234");
+            sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS,
+                                               MessageTypeEnum.APP_REDEMPTION_CODE, receivers, null, 0, null, null,
+                                               volume, null, null);
+        }
+    }
 }
 

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrderPayOpsServiceImpl.java

@@ -212,7 +212,7 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
 
     private void delayCheckTenant() {
         RBucket<Object> bucket = redissonClient.getBucket("delay_check_tenant");
-        if (!bucket.trySet(1, 35L, TimeUnit.SECONDS)) {
+        if (!bucket.trySet(1, 15L, TimeUnit.SECONDS)) {
             return;
         }
         //异步
@@ -222,6 +222,7 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
                 try {
                     Thread.sleep(3000);//每3秒触发一次
                     tenantOrderRecordService.checkTenantOrder();
+                    log.info("delayCheckTenant >>>>>  start {}", i);
                 } catch (InterruptedException e) {
                     return;
                 }

+ 9 - 8
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysManualServiceImpl.java

@@ -1,19 +1,14 @@
 package com.ym.mec.biz.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ym.mec.biz.dal.dao.SysManualDao;
-import com.ym.mec.biz.dal.entity.CloudTeacherStudent;
-import com.ym.mec.biz.dal.entity.SysConfig;
 import com.ym.mec.biz.dal.entity.SysManual;
 import com.ym.mec.biz.dal.page.SysManualQueryInfo;
 import com.ym.mec.biz.service.SysManualService;
-import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.page.PageInfo;
-import com.ym.mec.common.page.PageUtil;
 import com.ym.mec.common.page.WrapperUtil;
 import com.ym.mec.util.collection.MapUtil;
+import jodd.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -63,11 +58,17 @@ public class SysManualServiceImpl extends ServiceImpl<SysManualDao, SysManual> i
         return this.save(sysManual);
     }
 
-    public Boolean update(SysManual sysManual, Integer userId) {
+    public int update(SysManual sysManual, Integer userId) {
         logger.info("sysManual save");
         sysManual.setOperatorId(userId);
         sysManual.setUpdateTime(new Date());
-        return this.save(sysManual);
+        return sysManualDao.update(sysManual, new WrapperUtil<SysManual>().hasEq("id_", sysManual.getId()).queryWrapper());
+    }
+
+    @Override
+    public String listMenuIds() {
+        List<String> menuIds = sysManualDao.listMenuIds();
+        return StringUtil.join(menuIds, ",");
     }
 }
 

+ 22 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantAssetsInfoServiceImpl.java

@@ -24,6 +24,7 @@ import java.math.MathContext;
 import java.math.RoundingMode;
 import java.text.ParseException;
 import java.util.*;
+import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
 /**
@@ -42,6 +43,10 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
     @Autowired
     private TenantCloudCourseRecordService tenantCloudCourseRecordService;
 
+    private final Predicate<String> VipPredicate = (o) -> Objects.equals(o, CourseSchedule.CourseScheduleType.VIP.getCode());
+
+    private final Predicate<String> PracticePredicate = (o) -> Objects.equals(o, CourseSchedule.CourseScheduleType.PRACTICE.getCode());
+
     /**
      * 手动执行未扣费的流水
      *
@@ -60,8 +65,8 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
         }
         records.forEach(record -> {
             log.info("manualDeductAmount >>>>>> {}", record);
-            //获取总人数 ,+1是算上老师
-            Integer totalPeople = record.getStudentNum() + 1;
+            //获取总人数 (算上老师
+            String totalPeople = getTotalPeople(record.getType(), record.getCourseId());
             //获取云教室规则  String人数-BigDecimal每分钟扣费标准
             Map<String, BigDecimal> rule = getRule(record.getTenantId());
             if (Objects.isNull(rule)) {
@@ -107,8 +112,8 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
             if (Objects.isNull(course.getTenantId())) {
                 return;
             }
-            //获取总人数 ,+1算上老师
-            Integer totalPeople = course.getStudentNum() + 1;
+            //获取总人数 ,+1算上老师
+            String totalPeople = getTotalPeople(course.getType().getCode(), course.getId().intValue());
             //获取云教室规则  String人数-BigDecimal每分钟扣费标准
             Map<String, BigDecimal> rule = getRule(course.getTenantId());
             if (Objects.isNull(rule)) {
@@ -117,7 +122,7 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
                 return;
             }
             //获取每分钟扣费标准
-            BigDecimal minutePrice = rule.get(String.valueOf(totalPeople));
+            BigDecimal minutePrice = rule.get(totalPeople);
             if (Objects.isNull(minutePrice)) {
                 //没有这个扣费标准,写未扣费流水记录
                 insertRecord(course, BigDecimal.ZERO, 3);
@@ -159,9 +164,21 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
         }
         return dto.stream()
                 .filter(c -> c.getTeachMode().equals(TeachModeEnum.ONLINE))
+                .filter(c -> VipPredicate.or(PracticePredicate).test(c.getType().getCode()))
                 .collect(Collectors.toList());
     }
 
+    private String getTotalPeople(String type, Integer courseId) {
+        String result = "2";
+        if (VipPredicate.test(type)) {
+            result = Optional.ofNullable(courseId)
+                    .map(baseMapper::queryPeopleNum)
+                    .map(String::valueOf)
+                    .orElse(result);
+        }
+        return result;
+    }
+
     private Map<String, BigDecimal> getRule(Integer tenantId) {
         //查询云教室扣费标准
         TenantConfig tenantConfig = tenantConfigService.getOne(new WrapperUtil<TenantConfig>()

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantInfoServiceImpl.java

@@ -24,6 +24,7 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.PageUtil;
 import com.ym.mec.common.page.WrapperUtil;
 import com.ym.mec.common.service.IdGeneratorService;
+import com.ym.mec.thirdparty.yqpay.DateUtils;
 import com.ym.mec.thirdparty.yqpay.Msg;
 import org.apache.commons.collections.CollectionUtils;
 import org.joda.time.LocalDate;
@@ -317,6 +318,17 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
         assetsInfo.setFrozenAmount(BigDecimal.ZERO);
         assetsInfo.setCreatedTime(new Date());
         assetsInfoService.save(assetsInfo);
+        //修改有效期
+        Date expiryDate;
+        if (TenantProductInfo.MONTH.equals(productInfo.getExpiryUnit())) {
+            expiryDate = DateUtils.addMonths(new Date(), productInfo.getExpiryCount());
+        } else if (TenantProductInfo.YEAR.equals(productInfo.getExpiryUnit())) {
+            expiryDate = DateUtils.addYears(new Date(), productInfo.getExpiryCount());
+        } else {
+            throw new BizException("产品信息异常!开通失败!");
+        }
+        productInfo.setExpiryDate(expiryDate);
+        tenantProductInfoService.updateById(productInfo);
         //释放锁
         bucket.delete();
     }

+ 3 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantOrderRecordServiceImpl.java

@@ -107,6 +107,7 @@ public class TenantOrderRecordServiceImpl extends ServiceImpl<TenantOrderRecordD
         if (!bucket.trySet(1, 3L, TimeUnit.SECONDS)) {
             return;
         }
+        log.info("delayCheckTenant  checkTenantOrder>>>>>");
         List<TenantOrderRecord> list = this.list(new WrapperUtil<TenantOrderRecord>().queryWrapper()
                 .isNotNull("trans_no_")
                 .eq("order_state_", 0));
@@ -140,9 +141,6 @@ public class TenantOrderRecordServiceImpl extends ServiceImpl<TenantOrderRecordD
         bucket.delete();
     }
 
-    //丢弃5分钟之前的订单 300000 = 5 * 60秒 * 1000
-    long exTime = 300000L;
-
     //主动去第三方查询订单状态
     private void checkTransOrderState(TenantOrderRecord orderRecord) {
         if (StringUtils.equals(orderRecord.getPaymentChannel(), PaymentChannelEnum.ADAPAY.getCode())) {
@@ -162,7 +160,8 @@ public class TenantOrderRecordServiceImpl extends ServiceImpl<TenantOrderRecordD
                     } else {
                         long orderTime = orderRecord.getCreatedTime().getTime();//订单创建时间
                         long nowTime = new Date().getTime();
-                        //丢弃5分钟之前的订单
+                        //丢弃5分钟之前的订单 300000 = 5 * 60秒 * 1000
+                        long exTime = 300000L;
                         if (nowTime - orderTime > exTime) {
                             orderRecord.setOrderState(2);
                         }

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

@@ -29,5 +29,9 @@
         order by rc.import_time_ desc
         limit 1 for update;
     </select>
+    <select id="findNull" resultType="java.lang.Integer">
+        select count(1) from app_redemption_code rc where rc.user_id_ is null
+    </select>
+
 
 </mapper>

+ 10 - 3
mec-biz/src/main/resources/config/mybatis/SysManualMapper.xml

@@ -28,13 +28,14 @@
     <select id="findRecordCount" resultType="java.lang.Integer">
         select count(1) from sys_manual sm
         left join sys_user u on sm.operator_id_ = u.id_
+        left join sys_menu m on sm.menu_id_ = m.id_
         <where>
             1 = 1
             <if test="menuId != null and menuId != '' ">
                 AND menu_id_ = #{menuId}
             </if>
             <if test="search != null and search != '' ">
-                AND (name_ like concat('%', #{menuId} '%') )
+                AND (sm.name_ like concat('%', #{search} '%') )
             </if>
         </where>
         <include refid="global.limit"/>
@@ -42,18 +43,24 @@
 
     <select id="queryRecord" resultType="com.ym.mec.biz.dal.entity.SysManual">
         select sm.*
-             , u.username_ as operatorName from sys_manual sm
+             , u.username_ as operatorName
+             , m.name_ as menuName
+        from sys_manual sm
         left join sys_user u on sm.operator_id_ = u.id_
+        left join sys_menu m on sm.menu_id_ = m.id_
         <where>
             1 = 1
             <if test="menuId != null and menuId != '' ">
                 AND sm.menu_id_ = #{menuId}
             </if>
             <if test="search != null and search != '' ">
-                AND (name_ like concat('%', #{menuId} '%') )
+                AND (sm.name_ like concat('%', #{search} '%') )
             </if>
         </where>
         <include refid="global.limit"/>
     </select>
+    <select id="listMenuIds" resultType="java.lang.String">
+        select menu_id_ from sys_manual
+    </select>
 
 </mapper>

+ 9 - 0
mec-biz/src/main/resources/config/mybatis/TenantAssetsInfoMapper.xml

@@ -38,4 +38,13 @@
           and balance_  <![CDATA[ >= ]]> #{deductAmount}
     </update>
 
+    <select id="queryPeopleNum" parameterType="integer" resultType="integer">
+        select c.student_num_ +1
+        from course_schedule as a
+                 left join vip_group as b
+                           on a.music_group_id_ = b.id_
+                 left join vip_group_category as c on b.vip_group_category_id_ = c.id_
+        where a.id_ =#{courseId}
+    </select>
+
 </mapper>

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/TenantCloudCourseRecordMapper.xml

@@ -21,7 +21,7 @@
         select a.id_ as id,
         b.id_ as courseId,
         o.name_ as organName,
-        t.id_ as tenantId
+        t.id_ as tenantId,
         t.name_ as tenantName,
         b.type_ as type,
         s.real_name_ as teacherName,

+ 7 - 1
mec-web/src/main/java/com/ym/mec/web/controller/SysManualController.java

@@ -38,9 +38,15 @@ public class SysManualController extends BaseController {
     private SysUserFeignService sysUserFeignService;
 
     @ApiOperation(value = "查询操作手册")
+    @RequestMapping("/listMenuIds")
+    public Object listMenuIds() {
+        return succeed(sysManualService.listMenuIds());
+    }
+
+    @ApiOperation(value = "查询操作手册")
     @RequestMapping("/list")
     public Object list(SysManualQueryInfo queryInfo) {
-        return sysManualService.query(queryInfo);
+        return succeed(sysManualService.query(queryInfo));
     }
 
     @ApiOperation(value = "新增帮助手册")

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -108,6 +108,8 @@ public class TaskController extends BaseController {
 	private TenantInfoService tenantInfoService;
     @Autowired
     private TenantOrderRecordService tenantOrderRecordService;
+	@Autowired
+	private AppRedemptionCodeService appRedemptionCodeService;
 
 	@GetMapping(value = "/syncImHistoryMessageTask")
 	// 同步即时通讯聊天记录
@@ -512,6 +514,12 @@ public class TaskController extends BaseController {
 //		studentService.remarkCountFlag();
 	}
 
+	@ApiOperation("兑换码分配量检测")
+	@GetMapping(value = "/redemptionCodeWarn")
+	public void redemptionCodeWarn(){
+		appRedemptionCodeService.checkLowVolume();
+	}
+
     @ApiOperation("定时校验-机构订单状态")
     @GetMapping(value = "/checkTenantOrder")
     public void checkTenantOrder(){