updates
This commit is contained in:
parent
bc2dd7ac1b
commit
1b08f94f5e
|
|
@ -12,13 +12,12 @@ import org.jeecg.modules.yx.entity.YxUserScore;
|
||||||
import org.jeecg.modules.yx.service.IYxMajorService;
|
import org.jeecg.modules.yx.service.IYxMajorService;
|
||||||
import org.jeecg.modules.yx.service.IYxSchoolMajorService;
|
import org.jeecg.modules.yx.service.IYxSchoolMajorService;
|
||||||
import org.jeecg.modules.yx.service.IYxUserScoreService;
|
import org.jeecg.modules.yx.service.IYxUserScoreService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description
|
* @Description
|
||||||
* @Author ZhouWenTao
|
* @Author ZhouWenTao
|
||||||
|
|
@ -29,11 +28,11 @@ import java.util.List;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequestMapping("/art/major")
|
@RequestMapping("/art/major")
|
||||||
public class ArtMajorController {
|
public class ArtMajorController {
|
||||||
@Autowired
|
@Resource
|
||||||
private IYxMajorService yxMajorService;
|
private IYxMajorService yxMajorService;
|
||||||
@Autowired
|
@Resource
|
||||||
private IYxUserScoreService yxUserScoreService;
|
private IYxUserScoreService yxUserScoreService;
|
||||||
@Autowired
|
@Resource
|
||||||
private IYxSchoolMajorService yxSchoolMajorService;
|
private IYxSchoolMajorService yxSchoolMajorService;
|
||||||
|
|
||||||
@ApiOperation(value = "专业介绍")
|
@ApiOperation(value = "专业介绍")
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package org.jeecg.modules.web.controller;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -10,18 +11,24 @@ import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.util.AssertUtils;
|
import org.jeecg.common.util.AssertUtils;
|
||||||
import org.jeecg.common.util.RedisUtil;
|
import org.jeecg.common.util.RedisUtil;
|
||||||
import org.jeecg.modules.mini.service.MiniSchoolService;
|
import org.jeecg.modules.mini.service.MiniSchoolService;
|
||||||
|
import org.jeecg.modules.web.dto.CardImportTest;
|
||||||
import org.jeecg.modules.web.vo.QueryRecommendMajorVO;
|
import org.jeecg.modules.web.vo.QueryRecommendMajorVO;
|
||||||
import org.jeecg.modules.yx.entity.YxSchoolDoubleFirstPlan;
|
import org.jeecg.modules.yx.entity.YxSchoolDoubleFirstPlan;
|
||||||
import org.jeecg.modules.yx.entity.YxSubjectEvaluation;
|
import org.jeecg.modules.yx.entity.YxSubjectEvaluation;
|
||||||
|
import org.jeecg.modules.yx.entity.YxVipCard;
|
||||||
import org.jeecg.modules.yx.service.IYxSchoolDoubleFirstPlanService;
|
import org.jeecg.modules.yx.service.IYxSchoolDoubleFirstPlanService;
|
||||||
import org.jeecg.modules.yx.service.IYxSchoolService;
|
import org.jeecg.modules.yx.service.IYxSchoolService;
|
||||||
import org.jeecg.modules.yx.service.IYxSubjectEvaluationService;
|
import org.jeecg.modules.yx.service.IYxSubjectEvaluationService;
|
||||||
|
import org.jeecg.modules.yx.service.IYxVipCardService;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -43,12 +50,44 @@ public class WebSchoolController {
|
||||||
private IYxSchoolDoubleFirstPlanService yxSchoolDoubleFirstPlanService;
|
private IYxSchoolDoubleFirstPlanService yxSchoolDoubleFirstPlanService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IYxSubjectEvaluationService yxSubjectEvaluationService;
|
private IYxSubjectEvaluationService yxSubjectEvaluationService;
|
||||||
|
@Autowired
|
||||||
|
private IYxVipCardService vipCardService;
|
||||||
@Resource
|
@Resource
|
||||||
private RedisUtil redisUtil;
|
private RedisUtil redisUtil;
|
||||||
@ApiOperation(value = "学校详情")
|
@ApiOperation(value = "学校详情")
|
||||||
@GetMapping("/schoolInfo")
|
@GetMapping("/schoolInfo")
|
||||||
public Result<?> schoolInfo(QueryRecommendMajorVO queryRecommendMajorVO){
|
public Result<?> schoolInfo(QueryRecommendMajorVO queryRecommendMajorVO){
|
||||||
String schoolCode = queryRecommendMajorVO.getSchoolCode();
|
String schoolCode = queryRecommendMajorVO.getSchoolCode();
|
||||||
|
// 获取上传文件对象
|
||||||
|
// File file =new File("C:\\Users\\LiLin\\Desktop\\副本会员Id.xlsx");
|
||||||
|
// ImportParams params = new ImportParams();
|
||||||
|
// params.setTitleRows(0);
|
||||||
|
// params.setNeedSave(true);
|
||||||
|
// long start = System.currentTimeMillis();
|
||||||
|
// int index = 3;
|
||||||
|
// try {
|
||||||
|
// //加载省控线
|
||||||
|
// List<CardImportTest> list = ExcelImportUtil.importExcel(file, CardImportTest.class, params);
|
||||||
|
// String a="_";
|
||||||
|
// LambdaUpdateWrapper<YxVipCard> lambdaQueryWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
// for (CardImportTest cardImportTest : list) {
|
||||||
|
// lambdaQueryWrapper.clear();
|
||||||
|
// lambdaQueryWrapper.eq(YxVipCard::getCardNum,cardImportTest.getCardNum());
|
||||||
|
// lambdaQueryWrapper.set(YxVipCard::getId,cardImportTest.getId());
|
||||||
|
// vipCardService.update(lambdaQueryWrapper);
|
||||||
|
// }
|
||||||
|
// log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// System.out.println("索引:"+index);
|
||||||
|
// String msg = e.getMessage();
|
||||||
|
// log.error(msg, e);
|
||||||
|
// if (msg != null && msg.indexOf("Duplicate entry") >= 0) {
|
||||||
|
// return Result.error("文件导入失败:有重复数据!");
|
||||||
|
// } else {
|
||||||
|
// return Result.error("文件导入失败:" + e.getMessage() + ",行:" + index);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
return Result.OK(miniSchoolService.getMiniSchoolInfoBySchoolCode(schoolCode));
|
return Result.OK(miniSchoolService.getMiniSchoolInfoBySchoolCode(schoolCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package org.jeecg.modules.web.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ZhouWenTao
|
||||||
|
* @create 2024-06-02-16:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CardImportTest {
|
||||||
|
@Excel(name = "会员ID", width = 15)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Excel(name = "激活N码", width = 15)
|
||||||
|
private String cardNum;
|
||||||
|
}
|
||||||
|
|
@ -35,7 +35,7 @@ public class YxVipCard implements Serializable {
|
||||||
/**主键*/
|
/**主键*/
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
@ApiModelProperty(value = "主键")
|
@ApiModelProperty(value = "主键")
|
||||||
private java.lang.Integer id;
|
private java.lang.String id;
|
||||||
/**卡号*/
|
/**卡号*/
|
||||||
@Excel(name = "卡号", width = 15)
|
@Excel(name = "卡号", width = 15)
|
||||||
@ApiModelProperty(value = "卡号")
|
@ApiModelProperty(value = "卡号")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue