xiaoyong931011
2023-09-19 e2e8e9de828dc83db2fb254f29e544d6e7ff4d57
src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
@@ -5,6 +5,7 @@
import cc.mrbird.febs.common.enumerates.DataDictionaryEnum;
import cc.mrbird.febs.mall.dto.AdminAgentAmountDto;
import cc.mrbird.febs.mall.dto.AdminAgentDetailDto;
import cc.mrbird.febs.mall.dto.AdminIndexVideoDto;
import cc.mrbird.febs.mall.dto.CashOutSettingDto;
import cc.mrbird.febs.mall.entity.DataDictionaryCustom;
import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper;
@@ -135,6 +136,20 @@
        return new FebsResponse().success();
    }
    @PostMapping(value = "/indexVideoSet")
    public FebsResponse indexVideoSet(AdminIndexVideoDto adminIndexVideoDto) {
        DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                DataDictionaryEnum.VIDEO_URL_INDEX.getType(),
                DataDictionaryEnum.VIDEO_URL_INDEX.getCode()
        );
        if(ObjectUtil.isEmpty(dic)){
            return new FebsResponse().fail().message("请刷新页面重试");
        }
        dic.setValue(adminIndexVideoDto.getVideoUrl());
        dataDictionaryCustomMapper.updateById(dic);
        return new FebsResponse().success();
    }
//    public static void main(String[] args) {
//        List<Integer> lines = Arrays.asList(new Integer[]{1, 1, 0,  1, 1, 0, 0, 1, 0,  1, 1, 0, 1, 0, 1, 0});
//        //数字连续出现的计数