mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 03:46:50 +08:00
提交案例推荐表设计
This commit is contained in:
@@ -1,23 +1,27 @@
|
|||||||
package com.xboe.module.boecase.api;
|
package com.xboe.module.boecase.api;
|
||||||
|
|
||||||
|
import cn.hutool.poi.excel.ExcelReader;
|
||||||
|
import cn.hutool.poi.excel.ExcelUtil;
|
||||||
import com.xboe.common.PageList;
|
import com.xboe.common.PageList;
|
||||||
import com.xboe.common.Pagination;
|
import com.xboe.common.Pagination;
|
||||||
import com.xboe.core.JsonResponse;
|
import com.xboe.core.JsonResponse;
|
||||||
import com.xboe.core.api.ApiBaseController;
|
import com.xboe.core.api.ApiBaseController;
|
||||||
import com.xboe.module.boecase.entity.CasesRecommend;
|
import com.xboe.module.boecase.entity.CasesRecommend;
|
||||||
|
import com.xboe.module.boecase.service.ICasesRecommendLaunchImportService;
|
||||||
import com.xboe.module.boecase.service.ICasesRecommendService;
|
import com.xboe.module.boecase.service.ICasesRecommendService;
|
||||||
|
import com.xboe.module.boecase.vo.CasesRecommendLaunchVo;
|
||||||
import com.xboe.module.boecase.vo.CasesRecommendVo;
|
import com.xboe.module.boecase.vo.CasesRecommendVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案例推荐表
|
* 案例推荐表
|
||||||
* */
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "xboe/m/boe/cases/recommend")
|
@RequestMapping(value = "xboe/m/boe/cases/recommend")
|
||||||
@@ -26,8 +30,12 @@ public class CasesRecommendApi extends ApiBaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private ICasesRecommendService iCasesRecommendService;
|
private ICasesRecommendService iCasesRecommendService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ICasesRecommendLaunchImportService iCasesRecommendLaunchImportService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于后台管理分页
|
* 用于后台管理分页
|
||||||
|
*
|
||||||
* @param pager
|
* @param pager
|
||||||
* @param casesRecommendVo
|
* @param casesRecommendVo
|
||||||
* @return
|
* @return
|
||||||
@@ -53,4 +61,45 @@ public class CasesRecommendApi extends ApiBaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入
|
||||||
|
*
|
||||||
|
* @param file
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@PostMapping("/import")
|
||||||
|
public JsonResponse<String> excelImport(@RequestParam("file") MultipartFile file) throws Exception {
|
||||||
|
ExcelReader reader = ExcelUtil.getReader(file.getInputStream());
|
||||||
|
List<List<Object>> read = reader.read();
|
||||||
|
|
||||||
|
return success(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载错误数据
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@GetMapping("/download")
|
||||||
|
public void download(String importId) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发起推送
|
||||||
|
*
|
||||||
|
* @param casesRecommendLaunch
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/launch")
|
||||||
|
public JsonResponse<Boolean> excelImport(@RequestBody CasesRecommendLaunchVo casesRecommendLaunch) {
|
||||||
|
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
package com.xboe.module.boecase.api;
|
package com.xboe.module.boecase.api;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import cn.hutool.poi.excel.ExcelReader;
|
|
||||||
import cn.hutool.poi.excel.ExcelUtil;
|
|
||||||
import io.netty.util.internal.ObjectUtil;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.xboe.common.utils.StringUtil;
|
import com.xboe.common.utils.StringUtil;
|
||||||
import com.xboe.core.JsonResponse;
|
import com.xboe.core.JsonResponse;
|
||||||
import com.xboe.core.api.ApiBaseController;
|
import com.xboe.core.api.ApiBaseController;
|
||||||
@@ -18,9 +7,14 @@ import com.xboe.core.log.AutoLog;
|
|||||||
import com.xboe.module.boecase.dto.AcceptVo;
|
import com.xboe.module.boecase.dto.AcceptVo;
|
||||||
import com.xboe.module.boecase.entity.Recommend;
|
import com.xboe.module.boecase.entity.Recommend;
|
||||||
import com.xboe.module.boecase.service.IRecommendService;
|
import com.xboe.module.boecase.service.IRecommendService;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案例推荐表
|
* 案例推荐表
|
||||||
@@ -61,13 +55,4 @@ public class RecommendApi extends ApiBaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/import")
|
|
||||||
public JsonResponse<String> excelImport(@RequestParam("file") MultipartFile file) throws Exception {
|
|
||||||
ExcelReader reader = ExcelUtil.getReader(file.getInputStream());
|
|
||||||
List<List<Object>> read = reader.read();
|
|
||||||
|
|
||||||
return success(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.xboe.module.boecase.dao;
|
||||||
|
|
||||||
|
import com.xboe.core.orm.BaseDao;
|
||||||
|
import com.xboe.module.boecase.entity.CasesRecommendPushRecord;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class CasesRecommendPushRecordDao extends BaseDao<CasesRecommendPushRecord> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
package com.xboe.module.boecase.entity;
|
||||||
|
|
||||||
|
import com.xboe.core.SysConstant;
|
||||||
|
import com.xboe.core.orm.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案例推荐发起导入
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Table(name = SysConstant.TABLE_PRE + "cases_recommend_push_record")
|
||||||
|
public class CasesRecommendPushRecord extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送id
|
||||||
|
*/
|
||||||
|
@Column(name = "recommend_id")
|
||||||
|
private String recommendId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案例id
|
||||||
|
*/
|
||||||
|
@Column(name = "case_id")
|
||||||
|
private String caseId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案例标题
|
||||||
|
*/
|
||||||
|
@Column(name = "case_title")
|
||||||
|
private String caseTitle;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送用户id
|
||||||
|
*/
|
||||||
|
@Column(name = "push_user_id")
|
||||||
|
private String pushUserId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送用户名称
|
||||||
|
*/
|
||||||
|
@Column(name = "push_user_name")
|
||||||
|
private String pushUserName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送状态1未推送2推送中3已推送4推送失败5已撤回
|
||||||
|
*/
|
||||||
|
@Column(name = "push_status")
|
||||||
|
private Integer pushStatus;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送时间
|
||||||
|
*/
|
||||||
|
@Column(name = "push_time")
|
||||||
|
private Integer pushTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看标识
|
||||||
|
*/
|
||||||
|
@Column(name = "read_flag")
|
||||||
|
private Integer readFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首次查看时间
|
||||||
|
*/
|
||||||
|
@Column(name = "read_start_time")
|
||||||
|
private Date readStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后查看时间
|
||||||
|
*/
|
||||||
|
@Column(name = "read_end_time")
|
||||||
|
private Date readEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@Column(name = "remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.xboe.module.boecase.service;
|
||||||
|
|
||||||
|
public interface ICasesRecommendPushRecordService {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.xboe.module.boecase.service.impl;
|
||||||
|
|
||||||
|
import com.xboe.module.boecase.service.ICasesRecommendPushRecordService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class CasesRecommendPushRecordServiceImpl implements ICasesRecommendPushRecordService {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.xboe.module.boecase.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : civism
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2023/6/17 09:46
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CasesRecommendLaunchVo {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发起类型 1 正常选择 2 文件导入
|
||||||
|
*/
|
||||||
|
private Integer launchType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 如果launchType为2 必须传递 其他情况不用传递
|
||||||
|
*/
|
||||||
|
private String importId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送的文章标题id launchType 为1必须传递 其他情况不用传递
|
||||||
|
*/
|
||||||
|
private List<String> casesIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送的用户id
|
||||||
|
*/
|
||||||
|
private List<String> pushUserIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推荐机构
|
||||||
|
*/
|
||||||
|
private String recommendOrgName;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user