Commit 85298f8d by 涂亚平

视频上传转码替换

1 parent 301a3dcd
......@@ -22,4 +22,6 @@ public class VODConfig {
private String api;
private String region;
private Integer classId;
}
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.model.ClassHourDictDO;
import com.subsidy.model.VodPlayHistoryDO;
import com.subsidy.service.ClassHourDictService;
import com.subsidy.util.ConstantUtils;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
/**
* <p>
* 课时 前端控制器
* </p>
*
* @author DengMin
* @since 2021-11-26
*/
@RestController
@Api(tags = "课时")
@RequestMapping("/classHour")
public class ClassHourDictController {
@Autowired
private ClassHourDictService classHourDictService;
@PostMapping("getSetting")
@ApiOperation("查看当天设置的最大学习时长")
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public ResponseVO getSetting(){
return ResponseData.generateCreatedResponse(0,classHourDictService.getSetting());
}
@PostMapping("updateSetting")
@ApiOperation("修改当天设置时长 id classHour status")
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public ResponseVO updateSetting(@RequestBody ClassHourDictDO classHourDictDO){
return ResponseData.generateCreatedResponse(0,classHourDictService.updateSetting(classHourDictDO));
}
@PostMapping("pollingGet")
@ApiOperation("轮询查询当前这个人当天有没有超过最长时长 memberId playLength")
public ResponseVO pollingGet(@RequestBody VodPlayHistoryDO vodPlayHistoryDO){
return ResponseData.generateCreatedResponse(0,classHourDictService.pollingGet(vodPlayHistoryDO));
}
}
......@@ -68,4 +68,5 @@ public class VodDictController {
}
}
package com.subsidy.mapper;
import com.subsidy.model.ClassHourDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 课时 Mapper 接口
* </p>
*
* @author DengMin
* @since 2021-11-26
*/
@Repository
public interface ClassHourDictMapper extends BaseMapper<ClassHourDictDO> {
}
package com.subsidy.model;
import com.subsidy.util.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 课时
* </p>
*
* @author DengMin
* @since 2021-11-26
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("class_hour_dict")
public class ClassHourDictDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 课时
*/
private Integer classHour;
/**
* 有效/无效
*/
private Integer status;
}
package com.subsidy.service;
import com.subsidy.model.ClassHourDictDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.model.VodPlayHistoryDO;
import com.subsidy.vo.hour.PollingGetVO;
/**
* <p>
* 课时 服务类
* </p>
*
* @author DengMin
* @since 2021-11-26
*/
public interface ClassHourDictService extends IService<ClassHourDictDO> {
ClassHourDictDO getSetting();
String updateSetting(ClassHourDictDO classHourDictDO);
PollingGetVO pollingGet(VodPlayHistoryDO vodPlayHistoryDO);
}
......@@ -119,13 +119,13 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
ClassDictDO classDictDO1 = this.baseMapper.selectById(classDictDO.getId());
CourseDictDO courseDictDO = courseDictMapper.selectById(classDictDO1.getCourseId());
CompanyDictDO companyDictDO = companyDictMapper.selectById(classDictDO.getCompanyId());
CompanyDictDO companyDictDO = companyDictMapper.selectById(classDictDO1.getCompanyId());
//查找这个班级里的学员的手机号
List<MemberDO> memberDOS = this.baseMapper.classMembers(classDictDO.getId());
StringBuilder telephone = new StringBuilder();
String param = "{\"company\":\""+companyDictDO.getCompanyName()+ "\",course\":\""+courseDictDO.getCourseName()+ "\",\"startDate\":\""+classDictDO1.getStartDate() +"\",\"endDate\":\""+classDictDO1.getEndDate() +"\"}";
String param = "{\"company\":\""+companyDictDO.getCompanyName()+ "\",\"course\":\""+courseDictDO.getCourseName()+ "\",\"startDate\":\""+classDictDO1.getStartDate() +"\",\"endDate\":\""+classDictDO1.getEndDate() +"\"}";
if (memberDOS.size()>0){
for (int i = 0 ;i< memberDOS.size();i++){
telephone.append(memberDOS.get(i).getTelephone());
......@@ -133,7 +133,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
telephone.append(",");
}
}
SMSUtils.sendNoticeSMS("SMS_228117919",telephone.toString(),param);
SMSUtils.sendNoticeSMS("SMS_228137810",telephone.toString(),param);
}
return ConstantUtils.SUCCESS_SEND_OUT;
}
......
package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.subsidy.mapper.VodPlayHistoryMapper;
import com.subsidy.model.ClassHourDictDO;
import com.subsidy.mapper.ClassHourDictMapper;
import com.subsidy.model.VodPlayHistoryDO;
import com.subsidy.service.ClassHourDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import com.subsidy.vo.hour.PollingGetVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.util.List;
/**
* <p>
* 课时 服务实现类
* </p>
*
* @author DengMin
* @since 2021-11-26
*/
@Service
public class ClassHourDictServiceImpl extends ServiceImpl<ClassHourDictMapper, ClassHourDictDO> implements ClassHourDictService {
@Autowired
private ClassHourDictMapper classHourDictMapper;
@Autowired
private VodPlayHistoryMapper vodPlayHistoryMapper;
public ClassHourDictDO getSetting() {
ClassHourDictDO classHourDictDO = this.baseMapper.selectOne(null);
return classHourDictDO;
}
public String updateSetting(ClassHourDictDO classHourDictDO){
this.baseMapper.updateById(classHourDictDO);
return ConstantUtils.ADD_SUCCESS;
}
public PollingGetVO pollingGet(VodPlayHistoryDO vodPlayHistoryDO){
PollingGetVO pollingGetVO = new PollingGetVO();
//查看系统设定的时长
ClassHourDictDO classHourDictDO = classHourDictMapper.selectOne(new QueryWrapper<ClassHourDictDO>()
.lambda()
.eq(ClassHourDictDO::getStatus,1));
if (null == classHourDictDO){
pollingGetVO.setBool(false);
return pollingGetVO;
}
//查看当天这个人看了多少时间
List<VodPlayHistoryDO> vodPlayHistoryDOS = vodPlayHistoryMapper.selectList(new QueryWrapper<VodPlayHistoryDO>()
.lambda()
.eq(VodPlayHistoryDO::getMemberId,vodPlayHistoryDO.getMemberId())
.eq(VodPlayHistoryDO::getCreateDate, LocalDate.now()));
int total = 0 ;
for (VodPlayHistoryDO vodPlayHistoryDO1 : vodPlayHistoryDOS){
total += vodPlayHistoryDO1.getPlayLength();
}
//是否超过时长 没超过 false 超过 true
if (total + vodPlayHistoryDO.getPlayLength() < classHourDictDO.getClassHour()*60*60){
pollingGetVO.setBool(false);
}else {
pollingGetVO.setBool(true);
}
return pollingGetVO;
}
}
......@@ -94,6 +94,15 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
public String deleteMember(MemberDO memberDO) {
this.baseMapper.deleteById(memberDO.getId());
classMemberMappingMapper.delete(new QueryWrapper<ClassMemberMappingDO>()
.lambda()
.eq(ClassMemberMappingDO::getMemberId,memberDO.getId()));
memberDepartmentMappingMapper.delete(new QueryWrapper<MemberDepartmentMappingDO>()
.lambda()
.eq(MemberDepartmentMappingDO::getMemberId,memberDO.getId()));
return ConstantUtils.DELETE_SUCCESS;
}
......@@ -109,8 +118,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
Integer count1 = this.baseMapper.selectCount(new QueryWrapper<MemberDO>()
.lambda()
.eq(MemberDO::getAccountName, addMemberDTO.getAccountName())
.eq(MemberDO::getDepartmentId, addMemberDTO.getDepartmentId()));
.eq(MemberDO::getAccountName, addMemberDTO.getAccountName()));
if (count1 > 0) {
throw new HttpException(20002);
......@@ -140,7 +148,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
Integer count = this.baseMapper.selectCount(new QueryWrapper<MemberDO>()
.lambda()
.eq(MemberDO::getTelephone, addMemberDTO.getTelephone())
.eq(MemberDO::getDepartmentId, addMemberDTO.getDepartmentId())
.ne(MemberDO::getId, addMemberDTO.getId()));
if (count > 0) {
......@@ -149,7 +156,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
Integer count1 = this.baseMapper.selectCount(new QueryWrapper<MemberDO>()
.lambda()
.eq(MemberDO::getAccountName, addMemberDTO.getAccountName())
.eq(MemberDO::getDepartmentId, addMemberDTO.getDepartmentId())
.ne(MemberDO::getId, addMemberDTO.getId()));
if (count1 > 0) {
......@@ -336,7 +342,12 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
memberVodVO.setStatus(false);
if (vodPlayHistoryDOS.size() > 0) {
memberVodVO.setPercent(MathUtil.intDivCeil(100 * vodPlayHistoryDOS.get(0).getPlayRecord(), vodDictDO.getVodLength()));
int length = MathUtil.intDivCeil(100 * vodPlayHistoryDOS.get(0).getPlayRecord(), vodDictDO.getVodLength());
if (length>=100){
memberVodVO.setPercent(100);
}else {
memberVodVO.setPercent(length);
}
if (memberVodVO.getPercent() >= 80) {
memberVodVO.setStatus(true);
}
......
......@@ -3,6 +3,7 @@ package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.subsidy.common.configure.VODConfig;
import com.subsidy.common.exception.HttpException;
import com.subsidy.dto.content.GetContendVodsDTO;
import com.subsidy.model.VodDictDO;
import com.subsidy.mapper.VodDictMapper;
......@@ -12,6 +13,12 @@ import com.subsidy.util.ConstantUtils;
import com.subsidy.util.Signature;
import com.subsidy.vo.vod.GetContendVodsVO;
import com.subsidy.vo.vod.SignatureVO;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.vod.v20180717.VodClient;
import com.tencentcloudapi.vod.v20180717.models.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -43,7 +50,7 @@ public class VodDictServiceImpl extends ServiceImpl<VodDictMapper, VodDictDO> im
signature.setCurrentTime(System.currentTimeMillis());
signature.setRandom(new Random().nextInt(Integer.MAX_VALUE));
signature.setSignValidDuration(3600 * 24 * 2);
signature.setClassId(vodConfig.getClassId());
String sign = "";
try {
sign = signature.getUploadSignature();
......@@ -61,12 +68,64 @@ public class VodDictServiceImpl extends ServiceImpl<VodDictMapper, VodDictDO> im
}
public String deleteVod(VodDictDO vodDictDO) {
VodDictDO vodDictDO1 = this.baseMapper.selectById(vodDictDO.getId());
this.baseMapper.deleteById(vodDictDO.getId());
try{
//删除原视频
Credential cred = new Credential(vodConfig.getSecretId(), vodConfig.getSecretKey());
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("vod.tencentcloudapi.com");
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
VodClient client = new VodClient(cred, "", clientProfile);
// 实例化一个请求对象,每个接口都会对应一个request对象
DeleteMediaRequest req = new DeleteMediaRequest();
req.setFileId(vodDictDO1.getVodCode());
// 返回的resp是一个DeleteMediaResponse的实例,与请求对象对应
client.DeleteMedia(req);
} catch (TencentCloudSDKException e) {
System.out.println(e.toString());
}
return ConstantUtils.DELETE_SUCCESS;
}
public String addVod(VodDictDO vodDictDO) {
this.baseMapper.insert(vodDictDO);
//上传后直接转码
Credential cred = new Credential(vodConfig.getSecretId(), vodConfig.getSecretKey());
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("vod.tencentcloudapi.com");
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
VodClient client = new VodClient(cred, "", clientProfile);
ProcessMediaRequest processMediaRequest = new ProcessMediaRequest();
MediaProcessTaskInput mediaProcessTaskInput1 = new MediaProcessTaskInput();
TranscodeTaskInput[] transcodeTaskInputs1 = new TranscodeTaskInput[1];
TranscodeTaskInput transcodeTaskInput1 = new TranscodeTaskInput();
transcodeTaskInput1.setDefinition(ConstantUtils.TEMPLATE_VOD);
transcodeTaskInputs1[0] = transcodeTaskInput1;
mediaProcessTaskInput1.setTranscodeTaskSet(transcodeTaskInputs1);
processMediaRequest.setMediaProcessTask(mediaProcessTaskInput1);
processMediaRequest.setFileId(vodDictDO.getVodCode());
ProcessMediaResponse processMediaResponse = null;
try {
processMediaResponse = client.ProcessMedia(processMediaRequest);
System.out.println(processMediaResponse);
} catch (Exception ex) {
throw new HttpException(50001);
}
return ConstantUtils.ADD_SUCCESS;
}
......
......@@ -44,7 +44,7 @@ public class ConstantUtils {
public static final String NOTICE_NAME = "有课进度通知";
public static final String TECH_NAME = "有课互联科技";
public static final String TECH_NAME = "有课互联学习平台";
public static final String PUBLISH_SUCCESS = "发布成功";
......
......@@ -61,10 +61,7 @@ public class DateFormatUtil {
* @return
*/
public static boolean compare(Date d1, Date d2 ) {
if(d1.after(d2)) {
return false;
}
return true;
return !d1.after(d2);
}
/**
......
......@@ -6,12 +6,12 @@ import java.util.List;
public class ExcelFormatUtils {
public static final List<String> memberList = Arrays.asList(new String[]{"序号", "成员名称", "身份证号码", "账号", "联系方式", "签到次数", "课程进度", "培训时长", "答疑数", "测试成绩", "总评价"});
public static final List<String> memberList = Arrays.asList("序号", "成员名称", "身份证号码", "账号", "联系方式", "签到次数", "课程进度", "培训时长", "答疑数", "测试成绩", "总评价");
public static final List<String> signList = Arrays.asList(new String[]{"序号", "成员名称", "身份证号码", "手机号码", "培训时长", "课程进度", "完成率", "签到次数", "签到日期"});
public static final List<String> signList = Arrays.asList("序号", "成员名称", "身份证号码", "手机号码", "培训时长", "课程进度", "完成率", "签到次数", "签到日期");
public static final List<String> scoreList = Arrays.asList(new String[]{"序号", "成员名称", "身份证号码", "手机号码", "测试最高成绩", "测试次数", "总评价"});
public static final List<String> scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "手机号码", "测试最高成绩", "测试次数", "总评价");
public static final List<String> answersList = Arrays.asList(new String[]{"序号", "提问", "答疑", "提问时间", "提问成员", "答疑时间"});
public static final List<String> answersList = Arrays.asList("序号", "提问", "答疑", "提问时间", "提问成员", "答疑时间");
}
......@@ -161,7 +161,7 @@ public class MathUtil {
public static String unitFormat(int i) {
String retStr = null;
if (i >= 0 && i < 10) {
retStr = "0" + Integer.toString(i);
retStr = "0" + i;
} else {
retStr = "" + i;
}
......
......@@ -16,6 +16,7 @@ public class Signature {
private long currentTime;
private int random;
private int signValidDuration;
private int classId;
private static final String HMAC_ALGORITHM = "HmacSHA1";
private static final String CONTENT_CHARSET = "UTF-8";
......@@ -36,6 +37,7 @@ public class Signature {
contextStr += "&currentTimeStamp=" + currentTime;
contextStr += "&expireTime=" + endTime;
contextStr += "&random=" + random;
contextStr += "&classId=" + classId;
try {
Mac mac = Mac.getInstance(HMAC_ALGORITHM);
......@@ -76,4 +78,6 @@ public class Signature {
public void setSignValidDuration(int signValidDuration) {
this.signValidDuration = signValidDuration;
}
public void setClassId(int classId){this.classId = classId;}
}
......@@ -13,6 +13,7 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.zip.ZipEntry;
......@@ -217,7 +218,7 @@ public class ZipTestUtils {
s.setBirthday(new Date());
s.setHeight(i);
s.setWeight(i);
s.setSex(i / 2 == 0 ? false : true);
s.setSex(i / 2 != 0);
list.add(s);
}
//Map<String, String> headMap = new LinkedHashMap<String, String>();
......@@ -228,7 +229,7 @@ public class ZipTestUtils {
//headMap.put("weight", "体重");
//headMap.put("sex", "性别");
List<String> memberList = Arrays.asList(new String[]{"成员名称","账号","联系方式","签到次数","课程进度","培训时长","评级测试","答疑"});
List<String> memberList = Arrays.asList("成员名称","账号","联系方式","签到次数","课程进度","培训时长","评级测试","答疑");
//导出zip
......@@ -255,28 +256,28 @@ public class ZipTestUtils {
String zipname = "test.zip";
response.reset();
response.setContentType("application/x-download");
response.setHeader("Content-Disposition", "attachment;filename=" + new String((zipname).getBytes(), "iso-8859-1"));
response.setHeader("Content-Disposition", "attachment;filename=" + new String((zipname).getBytes(), StandardCharsets.ISO_8859_1));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
/**
* 班级成员
*/
List<String> memberList = Arrays.asList(new String[]{"成员名称","账号","联系方式","签到次数","课程进度","培训时长","评级测试","答疑"});
List<String> memberList = Arrays.asList("成员名称","账号","联系方式","签到次数","课程进度","培训时长","评级测试","答疑");
/**
* 注册签到
*/
List<String> signList = Arrays.asList(new String[]{"成员名称","培训时长","课程进度","完成率"});
List<String> signList = Arrays.asList("成员名称","培训时长","课程进度","完成率");
/**
* 测试成绩
*/
List<String> scoreList = Arrays.asList(new String[]{"成员名称","测试结果","最高分"});
List<String> scoreList = Arrays.asList("成员名称","测试结果","最高分");
/**
* 答疑记录
*/
List<String> answerList = Arrays.asList(new String[]{"提问","答疑","提问时间","提问成员","答疑时间"});
List<String> answerList = Arrays.asList("提问","答疑","提问时间","提问成员","答疑时间");
//Map<String, String> headMap = new LinkedHashMap<String, String>();
//headMap.put("name", "成员名称");
......
......@@ -15,6 +15,7 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
......@@ -203,7 +204,7 @@ public class ZipUtils {
s.setBirthday(new Date());
s.setHeight(i);
s.setWeight(i);
s.setSex(i / 2 == 0 ? false : true);
s.setSex(i / 2 != 0);
ja.add(s);
}
Map<String, String> headMap = new LinkedHashMap<String, String>();
......@@ -243,7 +244,7 @@ public class ZipUtils {
String((zipname).
getBytes(), "iso-8859-1"));
getBytes(), StandardCharsets.ISO_8859_1));
for (int i = 1; i < 6; i++) {
String dir = i % 2 == 0 ? "dirA" : "dirB";
ByteArrayOutputStream baos = new ByteArrayOutputStream();
......
......@@ -313,13 +313,13 @@ public class ExcelUtil {
int[] secondWidth = new int[2];
// 产生表格标题行,以及设置列宽
String[] secondHead = new String[2];
List<String> secondList = Arrays.asList(new String[]{"培训实施单位:" + companyName, "培训时间:" + studyDate});
List<String> secondList = Arrays.asList("培训实施单位:" + companyName, "培训时间:" + studyDate);
//第三行
int[] thirdWidth = new int[2];
// 产生表格标题行,以及设置列宽
String[] thirdHead = new String[2];
List<String> thirdList = Arrays.asList(new String[]{"培训项目:" + courseName, "培训平台:有课互联系统"});
List<String> thirdList = Arrays.asList("培训项目:" + courseName, "培训平台:有课互联系统");
ii = 0;
......@@ -541,13 +541,13 @@ public class ExcelUtil {
int[] secondWidth = new int[2];
// 产生表格标题行,以及设置列宽
String[] secondHead = new String[2];
List<String> secondList = Arrays.asList(new String[]{"培训实施单位:" + companyName, "培训时间:" + studyDate});
List<String> secondList = Arrays.asList("培训实施单位:" + companyName, "培训时间:" + studyDate);
//第三行
int[] thirdWidth = new int[2];
// 产生表格标题行,以及设置列宽
String[] thirdHead = new String[2];
List<String> thirdList = Arrays.asList(new String[]{"培训项目:" + courseName, "培训平台:有课互联系统"});
List<String> thirdList = Arrays.asList("培训项目:" + courseName, "培训平台:有课互联系统");
ii = 0;
......@@ -758,13 +758,13 @@ public class ExcelUtil {
int[] secondWidth = new int[2];
// 产生表格标题行,以及设置列宽
String[] secondHead = new String[2];
List<String> secondList = Arrays.asList(new String[]{"培训实施单位:" + companyName, "培训时间:" + studyDate});
List<String> secondList = Arrays.asList("培训实施单位:" + companyName, "培训时间:" + studyDate);
//第三行
int[] thirdWidth = new int[2];
// 产生表格标题行,以及设置列宽
String[] thirdHead = new String[2];
List<String> thirdList = Arrays.asList(new String[]{"培训项目:" + courseName, "培训平台:有课互联系统"});
List<String> thirdList = Arrays.asList("培训项目:" + courseName, "培训平台:有课互联系统");
ii = 0;
......@@ -976,13 +976,13 @@ public class ExcelUtil {
int[] secondWidth = new int[2];
// 产生表格标题行,以及设置列宽
String[] secondHead = new String[2];
List<String> secondList = Arrays.asList(new String[]{"培训实施单位:" + companyName, "培训时间:" + studyDate});
List<String> secondList = Arrays.asList("培训实施单位:" + companyName, "培训时间:" + studyDate);
//第三行
int[] thirdWidth = new int[2];
// 产生表格标题行,以及设置列宽
String[] thirdHead = new String[2];
List<String> thirdList = Arrays.asList(new String[]{"培训项目:" + courseName, "培训平台:有课互联系统"});
List<String> thirdList = Arrays.asList("培训项目:" + courseName, "培训平台:有课互联系统");
ii = 0;
......
package com.subsidy.vo.hour;
import lombok.Data;
@Data
public class PollingGetVO {
private Boolean bool;
}
......@@ -30,7 +30,7 @@ mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
spring.servlet.multipart.max-file-size=2048KB
spring.servlet.multipart.max-request-size=4098KB
wechat.appId: wx7785293ff5e31f14
wechat.appSecret: 25d57cad61fc1b45b3afa46d4c35e8f6
wechat.msgUrl: https://teachai.youkehulian.com/login
wechat.templateId: Z1HNPLOrKiHEjfR1KMP-cC-uH3BWqDJIHv365Ev20yQ
wechat.appId= wx7785293ff5e31f14
wechat.appSecret= 25d57cad61fc1b45b3afa46d4c35e8f6
wechat.msgUrl= https://teachai.youkehulian.com/login
wechat.templateId= Z1HNPLOrKiHEjfR1KMP-cC-uH3BWqDJIHv365Ev20yQ
# 环境配置
spring.profiles.active=prod
spring.profiles.active=dev
# 文件编码 UTF8
spring.mandatory-file-encoding=UTF-8
......@@ -14,7 +14,7 @@ spring.resources.add-mappings=false
mybatis-plus.global-config.banner=false
# mybatis-plus相关配置
mybatis-plus.m/classSubjectTask/queryTaskDetailapper-locations=classpath:mapper/*.xml
mybatis-plus.mapper-locations=classpath:mapper/*.xml
# 是否开启自动驼峰命名规则映射
mybatis-plus.configuration.map-underscore-to-camel-case=true
# 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段
......@@ -42,6 +42,7 @@ vod.secretId= AKIDOcePHvZ2C5VeYHQGSO5aqtlNxJQLqfz2
vod.secretKey= vjHYRmrfDbw0rWxA7oFcj7F8lDPKCm8E
vod.api= vod.tencentcloudapi.com
vod.region= ap-shanghai
vod.classId= 848920
# quartz
# 数据持久化方式
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.ClassHourDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.ClassHourDictDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="class_hour" property="classHour" />
<result column="status" property="status" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, class_hour, status
</sql>
</mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!