diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/controller/EducationArticleController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/controller/EducationArticleController.java new file mode 100644 index 0000000..80afbbb --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/controller/EducationArticleController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.educationArticle.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationArticle.entity.EducationArticle; +import org.jeecg.modules.educationArticle.service.IEducationArticleService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 案例文章表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Api(tags="案例文章表") +@RestController +@RequestMapping("/educationArticle/educationArticle") +@Slf4j +public class EducationArticleController extends JeecgController { + @Autowired + private IEducationArticleService educationArticleService; + + /** + * 分页列表查询 + * + * @param educationArticle + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "案例文章表-分页列表查询") + @ApiOperation(value="案例文章表-分页列表查询", notes="案例文章表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(EducationArticle educationArticle, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationArticle, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationArticleService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param educationArticle + * @return + */ + @AutoLog(value = "案例文章表-添加") + @ApiOperation(value="案例文章表-添加", notes="案例文章表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationArticle educationArticle) { + educationArticleService.save(educationArticle); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationArticle + * @return + */ + @AutoLog(value = "案例文章表-编辑") + @ApiOperation(value="案例文章表-编辑", notes="案例文章表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationArticle educationArticle) { + educationArticleService.updateById(educationArticle); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "案例文章表-通过id删除") + @ApiOperation(value="案例文章表-通过id删除", notes="案例文章表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationArticleService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "案例文章表-批量删除") + @ApiOperation(value="案例文章表-批量删除", notes="案例文章表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationArticleService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "案例文章表-通过id查询") + @ApiOperation(value="案例文章表-通过id查询", notes="案例文章表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + EducationArticle educationArticle = educationArticleService.getById(id); + if(educationArticle==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationArticle); + } + + /** + * 导出excel + * + * @param request + * @param educationArticle + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationArticle educationArticle) { + return super.exportXls(request, educationArticle, EducationArticle.class, "案例文章表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EducationArticle.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/entity/EducationArticle.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/entity/EducationArticle.java new file mode 100644 index 0000000..c18dee0 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/entity/EducationArticle.java @@ -0,0 +1,93 @@ +package org.jeecg.modules.educationArticle.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 案例文章表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Data +@TableName("education_article") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="education_article对象", description="案例文章表") +public class EducationArticle implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**封面*/ + @Excel(name = "封面", width = 15) + @ApiModelProperty(value = "封面") + private java.lang.String image; + /**学生情况*/ + @Excel(name = "学生情况", width = 15) + @ApiModelProperty(value = "学生情况") + private java.lang.String studentCondition; + /**服务项目*/ + @Excel(name = "服务项目", width = 15) + @ApiModelProperty(value = "服务项目") + private java.lang.String serviceItem; + /**服务过程*/ + @Excel(name = "服务过程", width = 15) + @ApiModelProperty(value = "服务过程") + private java.lang.String serviceProcess; + /**服务结果*/ + @Excel(name = "服务结果", width = 15) + @ApiModelProperty(value = "服务结果") + private java.lang.String serviceResult; + /**服务感受*/ + @Excel(name = "服务感受", width = 15) + @ApiModelProperty(value = "服务感受") + private java.lang.String serviceFeeling; + /**服务分类*/ + @Excel(name = "服务分类", width = 15, dictTable = "education_category_service", dicText = "title", dicCode = "id") + @Dict(dictTable = "education_category_service", dicText = "title", dicCode = "id") + @ApiModelProperty(value = "服务分类") + private java.lang.String categoryServiceId; + /**专业分类*/ + @Excel(name = "专业分类", width = 15, dictTable = "education_category_major", dicText = "title", dicCode = "id") + @Dict(dictTable = "education_category_major", dicText = "title", dicCode = "id") + @ApiModelProperty(value = "专业分类") + private java.lang.String categoryMajorId; + /**阶段分类*/ + @Excel(name = "阶段分类", width = 15, dictTable = "education_category_period", dicText = "title", dicCode = "id") + @Dict(dictTable = "education_category_period", dicText = "title", dicCode = "id") + @ApiModelProperty(value = "阶段分类") + private java.lang.String categoryPeriodId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/EducationArticleMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/EducationArticleMapper.java new file mode 100644 index 0000000..ac79db1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/EducationArticleMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.educationArticle.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationArticle.entity.EducationArticle; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 案例文章表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationArticleMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/xml/EducationArticleMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/xml/EducationArticleMapper.xml new file mode 100644 index 0000000..9ec000a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/xml/EducationArticleMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/IEducationArticleService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/IEducationArticleService.java new file mode 100644 index 0000000..b6fd90b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/IEducationArticleService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.educationArticle.service; + +import org.jeecg.modules.educationArticle.entity.EducationArticle; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 案例文章表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationArticleService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/impl/EducationArticleServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/impl/EducationArticleServiceImpl.java new file mode 100644 index 0000000..d65d70c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/impl/EducationArticleServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationArticle.service.impl; + +import org.jeecg.modules.educationArticle.entity.EducationArticle; +import org.jeecg.modules.educationArticle.mapper.EducationArticleMapper; +import org.jeecg.modules.educationArticle.service.IEducationArticleService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 案例文章表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationArticleServiceImpl extends ServiceImpl implements IEducationArticleService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/EducationArticleList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/EducationArticleList.vue new file mode 100644 index 0000000..5c624d9 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/EducationArticleList.vue @@ -0,0 +1,232 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleForm.vue new file mode 100644 index 0000000..dae7972 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleForm.vue @@ -0,0 +1,149 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleModal.Style#Drawer.vue new file mode 100644 index 0000000..66c15ab --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleModal.vue new file mode 100644 index 0000000..e83254b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.api.ts new file mode 100644 index 0000000..96cf260 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/educationArticle/educationArticle/list', + save='/educationArticle/educationArticle/add', + edit='/educationArticle/educationArticle/edit', + deleteOne = '/educationArticle/educationArticle/delete', + deleteBatch = '/educationArticle/educationArticle/deleteBatch', + importExcel = '/educationArticle/educationArticle/importExcel', + exportXls = '/educationArticle/educationArticle/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.data.ts new file mode 100644 index 0000000..80cc22f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.data.ts @@ -0,0 +1,130 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '标题', + align:"center", + dataIndex: 'title' + }, + { + title: '封面', + align:"center", + dataIndex: 'image', + customRender:render.renderAvatar, + }, + { + title: '学生情况', + align:"center", + dataIndex: 'studentCondition', + slots: { customRender: 'htmlSlot' }, + }, + { + title: '服务项目', + align:"center", + dataIndex: 'serviceItem', + slots: { customRender: 'htmlSlot' }, + }, + { + title: '服务过程', + align:"center", + dataIndex: 'serviceProcess', + slots: { customRender: 'htmlSlot' }, + }, + { + title: '服务结果', + align:"center", + dataIndex: 'serviceResult', + slots: { customRender: 'htmlSlot' }, + }, + { + title: '服务感受', + align:"center", + dataIndex: 'serviceFeeling', + slots: { customRender: 'htmlSlot' }, + }, + { + title: '服务分类', + align:"center", + dataIndex: 'categoryServiceId_dictText' + }, + { + title: '专业分类', + align:"center", + dataIndex: 'categoryMajorId_dictText' + }, + { + title: '阶段分类', + align:"center", + dataIndex: 'categoryPeriodId_dictText' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '标题', + field: 'title', + component: 'Input', + }, + { + label: '封面', + field: 'image', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '学生情况', + field: 'studentCondition', + component: 'JCodeEditor', //TODO String后缀暂未添加 + }, + { + label: '服务项目', + field: 'serviceItem', + component: 'JCodeEditor', //TODO String后缀暂未添加 + }, + { + label: '服务过程', + field: 'serviceProcess', + component: 'JCodeEditor', //TODO String后缀暂未添加 + }, + { + label: '服务结果', + field: 'serviceResult', + component: 'JCodeEditor', //TODO String后缀暂未添加 + }, + { + label: '服务感受', + field: 'serviceFeeling', + component: 'JCodeEditor', //TODO String后缀暂未添加 + }, + { + label: '服务分类', + field: 'categoryServiceId', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"education_category_service,title,id" + }, + }, + { + label: '专业分类', + field: 'categoryMajorId', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"education_category_major,title,id" + }, + }, + { + label: '阶段分类', + field: 'categoryPeriodId', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"education_category_period,title,id" + }, + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticleList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticleList.vue new file mode 100644 index 0000000..b5bd012 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticleList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/components/EducationArticleModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/components/EducationArticleModal.vue new file mode 100644 index 0000000..b94009e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/components/EducationArticleModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/controller/EducationBannerController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/controller/EducationBannerController.java new file mode 100644 index 0000000..a75f811 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/controller/EducationBannerController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.educationBanner.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationBanner.entity.EducationBanner; +import org.jeecg.modules.educationBanner.service.IEducationBannerService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Api(tags="轮播图表") +@RestController +@RequestMapping("/educationBanner/educationBanner") +@Slf4j +public class EducationBannerController extends JeecgController { + @Autowired + private IEducationBannerService educationBannerService; + + /** + * 分页列表查询 + * + * @param educationBanner + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "轮播图表-分页列表查询") + @ApiOperation(value="轮播图表-分页列表查询", notes="轮播图表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(EducationBanner educationBanner, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationBanner, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationBannerService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param educationBanner + * @return + */ + @AutoLog(value = "轮播图表-添加") + @ApiOperation(value="轮播图表-添加", notes="轮播图表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationBanner educationBanner) { + educationBannerService.save(educationBanner); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationBanner + * @return + */ + @AutoLog(value = "轮播图表-编辑") + @ApiOperation(value="轮播图表-编辑", notes="轮播图表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationBanner educationBanner) { + educationBannerService.updateById(educationBanner); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "轮播图表-通过id删除") + @ApiOperation(value="轮播图表-通过id删除", notes="轮播图表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationBannerService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "轮播图表-批量删除") + @ApiOperation(value="轮播图表-批量删除", notes="轮播图表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationBannerService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "轮播图表-通过id查询") + @ApiOperation(value="轮播图表-通过id查询", notes="轮播图表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + EducationBanner educationBanner = educationBannerService.getById(id); + if(educationBanner==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationBanner); + } + + /** + * 导出excel + * + * @param request + * @param educationBanner + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationBanner educationBanner) { + return super.exportXls(request, educationBanner, EducationBanner.class, "轮播图表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EducationBanner.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/entity/EducationBanner.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/entity/EducationBanner.java new file mode 100644 index 0000000..47af004 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/entity/EducationBanner.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.educationBanner.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Data +@TableName("education_banner") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="education_banner对象", description="轮播图表") +public class EducationBanner implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**图片*/ + @Excel(name = "图片", width = 15) + @ApiModelProperty(value = "图片") + private java.lang.String image; + /**分类*/ + @Excel(name = "分类", width = 15, dicCode = "education_type_banner") + @Dict(dicCode = "education_type_banner") + @ApiModelProperty(value = "分类") + private java.lang.String type; + /**排序编号*/ + @Excel(name = "排序编号", width = 15) + @ApiModelProperty(value = "排序编号") + private java.lang.Integer orderNo; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/mapper/EducationBannerMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/mapper/EducationBannerMapper.java new file mode 100644 index 0000000..ee0b375 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/mapper/EducationBannerMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.educationBanner.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationBanner.entity.EducationBanner; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationBannerMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/mapper/xml/EducationBannerMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/mapper/xml/EducationBannerMapper.xml new file mode 100644 index 0000000..bf77862 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/mapper/xml/EducationBannerMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/service/IEducationBannerService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/service/IEducationBannerService.java new file mode 100644 index 0000000..dc493d2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/service/IEducationBannerService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.educationBanner.service; + +import org.jeecg.modules.educationBanner.entity.EducationBanner; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationBannerService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/service/impl/EducationBannerServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/service/impl/EducationBannerServiceImpl.java new file mode 100644 index 0000000..e6e1c25 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/service/impl/EducationBannerServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationBanner.service.impl; + +import org.jeecg.modules.educationBanner.entity.EducationBanner; +import org.jeecg.modules.educationBanner.mapper.EducationBannerMapper; +import org.jeecg.modules.educationBanner.service.IEducationBannerService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationBannerServiceImpl extends ServiceImpl implements IEducationBannerService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/EducationBannerList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/EducationBannerList.vue new file mode 100644 index 0000000..1085eec --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/EducationBannerList.vue @@ -0,0 +1,191 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/modules/EducationBannerForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/modules/EducationBannerForm.vue new file mode 100644 index 0000000..f116f3b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/modules/EducationBannerForm.vue @@ -0,0 +1,119 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/modules/EducationBannerModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/modules/EducationBannerModal.Style#Drawer.vue new file mode 100644 index 0000000..5f43ad2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/modules/EducationBannerModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/modules/EducationBannerModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/modules/EducationBannerModal.vue new file mode 100644 index 0000000..f07ef15 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue/modules/EducationBannerModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/EducationBanner.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/EducationBanner.api.ts new file mode 100644 index 0000000..1032f64 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/EducationBanner.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/educationBanner/educationBanner/list', + save='/educationBanner/educationBanner/add', + edit='/educationBanner/educationBanner/edit', + deleteOne = '/educationBanner/educationBanner/delete', + deleteBatch = '/educationBanner/educationBanner/deleteBatch', + importExcel = '/educationBanner/educationBanner/importExcel', + exportXls = '/educationBanner/educationBanner/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/EducationBanner.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/EducationBanner.data.ts new file mode 100644 index 0000000..a3ef47f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/EducationBanner.data.ts @@ -0,0 +1,59 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '标题', + align:"center", + dataIndex: 'title' + }, + { + title: '图片', + align:"center", + dataIndex: 'image', + customRender:render.renderAvatar, + }, + { + title: '分类', + align:"center", + dataIndex: 'type_dictText' + }, + { + title: '排序编号', + align:"center", + dataIndex: 'orderNo' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '标题', + field: 'title', + component: 'Input', + }, + { + label: '图片', + field: 'image', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '分类', + field: 'type', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"education_type_banner" + }, + }, + { + label: '排序编号', + field: 'orderNo', + component: 'InputNumber', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/EducationBannerList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/EducationBannerList.vue new file mode 100644 index 0000000..2e75a71 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/EducationBannerList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/components/EducationBannerModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/components/EducationBannerModal.vue new file mode 100644 index 0000000..9e5dac9 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationBanner/vue3/components/EducationBannerModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/controller/EducationCategoryMajorController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/controller/EducationCategoryMajorController.java new file mode 100644 index 0000000..ec80b45 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/controller/EducationCategoryMajorController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.educationCategoryMajor.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationCategoryMajor.entity.EducationCategoryMajor; +import org.jeecg.modules.educationCategoryMajor.service.IEducationCategoryMajorService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 专业分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Api(tags="专业分类表") +@RestController +@RequestMapping("/educationCategoryMajor/educationCategoryMajor") +@Slf4j +public class EducationCategoryMajorController extends JeecgController { + @Autowired + private IEducationCategoryMajorService educationCategoryMajorService; + + /** + * 分页列表查询 + * + * @param educationCategoryMajor + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "专业分类表-分页列表查询") + @ApiOperation(value="专业分类表-分页列表查询", notes="专业分类表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(EducationCategoryMajor educationCategoryMajor, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationCategoryMajor, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationCategoryMajorService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param educationCategoryMajor + * @return + */ + @AutoLog(value = "专业分类表-添加") + @ApiOperation(value="专业分类表-添加", notes="专业分类表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationCategoryMajor educationCategoryMajor) { + educationCategoryMajorService.save(educationCategoryMajor); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationCategoryMajor + * @return + */ + @AutoLog(value = "专业分类表-编辑") + @ApiOperation(value="专业分类表-编辑", notes="专业分类表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationCategoryMajor educationCategoryMajor) { + educationCategoryMajorService.updateById(educationCategoryMajor); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "专业分类表-通过id删除") + @ApiOperation(value="专业分类表-通过id删除", notes="专业分类表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationCategoryMajorService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "专业分类表-批量删除") + @ApiOperation(value="专业分类表-批量删除", notes="专业分类表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationCategoryMajorService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "专业分类表-通过id查询") + @ApiOperation(value="专业分类表-通过id查询", notes="专业分类表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + EducationCategoryMajor educationCategoryMajor = educationCategoryMajorService.getById(id); + if(educationCategoryMajor==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationCategoryMajor); + } + + /** + * 导出excel + * + * @param request + * @param educationCategoryMajor + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationCategoryMajor educationCategoryMajor) { + return super.exportXls(request, educationCategoryMajor, EducationCategoryMajor.class, "专业分类表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EducationCategoryMajor.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/entity/EducationCategoryMajor.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/entity/EducationCategoryMajor.java new file mode 100644 index 0000000..d82e84a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/entity/EducationCategoryMajor.java @@ -0,0 +1,54 @@ +package org.jeecg.modules.educationCategoryMajor.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 专业分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Data +@TableName("education_category_major") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="education_category_major对象", description="专业分类表") +public class EducationCategoryMajor implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**分类名称*/ + @Excel(name = "分类名称", width = 15) + @ApiModelProperty(value = "分类名称") + private java.lang.String title; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/mapper/EducationCategoryMajorMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/mapper/EducationCategoryMajorMapper.java new file mode 100644 index 0000000..a82d449 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/mapper/EducationCategoryMajorMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.educationCategoryMajor.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationCategoryMajor.entity.EducationCategoryMajor; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 专业分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationCategoryMajorMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/mapper/xml/EducationCategoryMajorMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/mapper/xml/EducationCategoryMajorMapper.xml new file mode 100644 index 0000000..2616a68 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/mapper/xml/EducationCategoryMajorMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/service/IEducationCategoryMajorService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/service/IEducationCategoryMajorService.java new file mode 100644 index 0000000..a891a7c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/service/IEducationCategoryMajorService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.educationCategoryMajor.service; + +import org.jeecg.modules.educationCategoryMajor.entity.EducationCategoryMajor; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 专业分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationCategoryMajorService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/service/impl/EducationCategoryMajorServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/service/impl/EducationCategoryMajorServiceImpl.java new file mode 100644 index 0000000..505b7c6 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/service/impl/EducationCategoryMajorServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationCategoryMajor.service.impl; + +import org.jeecg.modules.educationCategoryMajor.entity.EducationCategoryMajor; +import org.jeecg.modules.educationCategoryMajor.mapper.EducationCategoryMajorMapper; +import org.jeecg.modules.educationCategoryMajor.service.IEducationCategoryMajorService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 专业分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationCategoryMajorServiceImpl extends ServiceImpl implements IEducationCategoryMajorService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue/EducationCategoryMajorList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue/EducationCategoryMajorList.vue new file mode 100644 index 0000000..5ff6206 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue/EducationCategoryMajorList.vue @@ -0,0 +1,171 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue/modules/EducationCategoryMajorModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue/modules/EducationCategoryMajorModal.vue new file mode 100644 index 0000000..7f024d4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue/modules/EducationCategoryMajorModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/EducationCategoryMajor.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/EducationCategoryMajor.api.ts new file mode 100644 index 0000000..1f9efea --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/EducationCategoryMajor.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/educationCategoryMajor/educationCategoryMajor/list', + save='/educationCategoryMajor/educationCategoryMajor/add', + edit='/educationCategoryMajor/educationCategoryMajor/edit', + deleteOne = '/educationCategoryMajor/educationCategoryMajor/delete', + deleteBatch = '/educationCategoryMajor/educationCategoryMajor/deleteBatch', + importExcel = '/educationCategoryMajor/educationCategoryMajor/importExcel', + exportXls = '/educationCategoryMajor/educationCategoryMajor/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/EducationCategoryMajor.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/EducationCategoryMajor.data.ts new file mode 100644 index 0000000..e9cc56d --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/EducationCategoryMajor.data.ts @@ -0,0 +1,23 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '分类名称', + align:"center", + dataIndex: 'title' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '分类名称', + field: 'title', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/EducationCategoryMajorList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/EducationCategoryMajorList.vue new file mode 100644 index 0000000..a1a79a0 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/EducationCategoryMajorList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/components/EducationCategoryMajorModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/components/EducationCategoryMajorModal.vue new file mode 100644 index 0000000..3ae0ec6 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryMajor/vue3/components/EducationCategoryMajorModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/controller/EducationCategoryPeriodController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/controller/EducationCategoryPeriodController.java new file mode 100644 index 0000000..56ed49e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/controller/EducationCategoryPeriodController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.educationCategoryPeriod.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationCategoryPeriod.entity.EducationCategoryPeriod; +import org.jeecg.modules.educationCategoryPeriod.service.IEducationCategoryPeriodService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 阶段分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Api(tags="阶段分类表") +@RestController +@RequestMapping("/educationCategoryPeriod/educationCategoryPeriod") +@Slf4j +public class EducationCategoryPeriodController extends JeecgController { + @Autowired + private IEducationCategoryPeriodService educationCategoryPeriodService; + + /** + * 分页列表查询 + * + * @param educationCategoryPeriod + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "阶段分类表-分页列表查询") + @ApiOperation(value="阶段分类表-分页列表查询", notes="阶段分类表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(EducationCategoryPeriod educationCategoryPeriod, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationCategoryPeriod, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationCategoryPeriodService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param educationCategoryPeriod + * @return + */ + @AutoLog(value = "阶段分类表-添加") + @ApiOperation(value="阶段分类表-添加", notes="阶段分类表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationCategoryPeriod educationCategoryPeriod) { + educationCategoryPeriodService.save(educationCategoryPeriod); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationCategoryPeriod + * @return + */ + @AutoLog(value = "阶段分类表-编辑") + @ApiOperation(value="阶段分类表-编辑", notes="阶段分类表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationCategoryPeriod educationCategoryPeriod) { + educationCategoryPeriodService.updateById(educationCategoryPeriod); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "阶段分类表-通过id删除") + @ApiOperation(value="阶段分类表-通过id删除", notes="阶段分类表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationCategoryPeriodService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "阶段分类表-批量删除") + @ApiOperation(value="阶段分类表-批量删除", notes="阶段分类表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationCategoryPeriodService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "阶段分类表-通过id查询") + @ApiOperation(value="阶段分类表-通过id查询", notes="阶段分类表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + EducationCategoryPeriod educationCategoryPeriod = educationCategoryPeriodService.getById(id); + if(educationCategoryPeriod==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationCategoryPeriod); + } + + /** + * 导出excel + * + * @param request + * @param educationCategoryPeriod + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationCategoryPeriod educationCategoryPeriod) { + return super.exportXls(request, educationCategoryPeriod, EducationCategoryPeriod.class, "阶段分类表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EducationCategoryPeriod.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/entity/EducationCategoryPeriod.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/entity/EducationCategoryPeriod.java new file mode 100644 index 0000000..d417895 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/entity/EducationCategoryPeriod.java @@ -0,0 +1,54 @@ +package org.jeecg.modules.educationCategoryPeriod.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 阶段分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Data +@TableName("education_category_period") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="education_category_period对象", description="阶段分类表") +public class EducationCategoryPeriod implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**分类名称*/ + @Excel(name = "分类名称", width = 15) + @ApiModelProperty(value = "分类名称") + private java.lang.String title; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/mapper/EducationCategoryPeriodMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/mapper/EducationCategoryPeriodMapper.java new file mode 100644 index 0000000..118392f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/mapper/EducationCategoryPeriodMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.educationCategoryPeriod.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationCategoryPeriod.entity.EducationCategoryPeriod; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 阶段分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationCategoryPeriodMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/mapper/xml/EducationCategoryPeriodMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/mapper/xml/EducationCategoryPeriodMapper.xml new file mode 100644 index 0000000..d8934f4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/mapper/xml/EducationCategoryPeriodMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/service/IEducationCategoryPeriodService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/service/IEducationCategoryPeriodService.java new file mode 100644 index 0000000..4ba64ea --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/service/IEducationCategoryPeriodService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.educationCategoryPeriod.service; + +import org.jeecg.modules.educationCategoryPeriod.entity.EducationCategoryPeriod; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 阶段分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationCategoryPeriodService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/service/impl/EducationCategoryPeriodServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/service/impl/EducationCategoryPeriodServiceImpl.java new file mode 100644 index 0000000..b99a2d7 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/service/impl/EducationCategoryPeriodServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationCategoryPeriod.service.impl; + +import org.jeecg.modules.educationCategoryPeriod.entity.EducationCategoryPeriod; +import org.jeecg.modules.educationCategoryPeriod.mapper.EducationCategoryPeriodMapper; +import org.jeecg.modules.educationCategoryPeriod.service.IEducationCategoryPeriodService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 阶段分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationCategoryPeriodServiceImpl extends ServiceImpl implements IEducationCategoryPeriodService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue/EducationCategoryPeriodList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue/EducationCategoryPeriodList.vue new file mode 100644 index 0000000..7933b2b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue/EducationCategoryPeriodList.vue @@ -0,0 +1,171 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue/modules/EducationCategoryPeriodModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue/modules/EducationCategoryPeriodModal.vue new file mode 100644 index 0000000..b662481 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue/modules/EducationCategoryPeriodModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/EducationCategoryPeriod.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/EducationCategoryPeriod.api.ts new file mode 100644 index 0000000..19a0e71 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/EducationCategoryPeriod.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/educationCategoryPeriod/educationCategoryPeriod/list', + save='/educationCategoryPeriod/educationCategoryPeriod/add', + edit='/educationCategoryPeriod/educationCategoryPeriod/edit', + deleteOne = '/educationCategoryPeriod/educationCategoryPeriod/delete', + deleteBatch = '/educationCategoryPeriod/educationCategoryPeriod/deleteBatch', + importExcel = '/educationCategoryPeriod/educationCategoryPeriod/importExcel', + exportXls = '/educationCategoryPeriod/educationCategoryPeriod/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/EducationCategoryPeriod.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/EducationCategoryPeriod.data.ts new file mode 100644 index 0000000..e9cc56d --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/EducationCategoryPeriod.data.ts @@ -0,0 +1,23 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '分类名称', + align:"center", + dataIndex: 'title' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '分类名称', + field: 'title', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/EducationCategoryPeriodList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/EducationCategoryPeriodList.vue new file mode 100644 index 0000000..c8b06de --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/EducationCategoryPeriodList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/components/EducationCategoryPeriodModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/components/EducationCategoryPeriodModal.vue new file mode 100644 index 0000000..b9926c3 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryPeriod/vue3/components/EducationCategoryPeriodModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/controller/EducationCategoryServiceController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/controller/EducationCategoryServiceController.java new file mode 100644 index 0000000..acf681e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/controller/EducationCategoryServiceController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.educationCategoryService.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationCategoryService.entity.EducationCategoryService; +import org.jeecg.modules.educationCategoryService.service.IEducationCategoryServiceService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 服务分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Api(tags="服务分类表") +@RestController +@RequestMapping("/educationCategoryService/educationCategoryService") +@Slf4j +public class EducationCategoryServiceController extends JeecgController { + @Autowired + private IEducationCategoryServiceService educationCategoryServiceService; + + /** + * 分页列表查询 + * + * @param educationCategoryService + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "服务分类表-分页列表查询") + @ApiOperation(value="服务分类表-分页列表查询", notes="服务分类表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(EducationCategoryService educationCategoryService, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationCategoryService, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationCategoryServiceService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param educationCategoryService + * @return + */ + @AutoLog(value = "服务分类表-添加") + @ApiOperation(value="服务分类表-添加", notes="服务分类表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationCategoryService educationCategoryService) { + educationCategoryServiceService.save(educationCategoryService); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationCategoryService + * @return + */ + @AutoLog(value = "服务分类表-编辑") + @ApiOperation(value="服务分类表-编辑", notes="服务分类表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationCategoryService educationCategoryService) { + educationCategoryServiceService.updateById(educationCategoryService); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "服务分类表-通过id删除") + @ApiOperation(value="服务分类表-通过id删除", notes="服务分类表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationCategoryServiceService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "服务分类表-批量删除") + @ApiOperation(value="服务分类表-批量删除", notes="服务分类表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationCategoryServiceService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "服务分类表-通过id查询") + @ApiOperation(value="服务分类表-通过id查询", notes="服务分类表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + EducationCategoryService educationCategoryService = educationCategoryServiceService.getById(id); + if(educationCategoryService==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationCategoryService); + } + + /** + * 导出excel + * + * @param request + * @param educationCategoryService + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationCategoryService educationCategoryService) { + return super.exportXls(request, educationCategoryService, EducationCategoryService.class, "服务分类表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EducationCategoryService.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/entity/EducationCategoryService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/entity/EducationCategoryService.java new file mode 100644 index 0000000..f9fc8b1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/entity/EducationCategoryService.java @@ -0,0 +1,54 @@ +package org.jeecg.modules.educationCategoryService.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 服务分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Data +@TableName("education_category_service") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="education_category_service对象", description="服务分类表") +public class EducationCategoryService implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**分类名称*/ + @Excel(name = "分类名称", width = 15) + @ApiModelProperty(value = "分类名称") + private java.lang.String title; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/mapper/EducationCategoryServiceMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/mapper/EducationCategoryServiceMapper.java new file mode 100644 index 0000000..996fec8 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/mapper/EducationCategoryServiceMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.educationCategoryService.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationCategoryService.entity.EducationCategoryService; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 服务分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationCategoryServiceMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/mapper/xml/EducationCategoryServiceMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/mapper/xml/EducationCategoryServiceMapper.xml new file mode 100644 index 0000000..f585b6c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/mapper/xml/EducationCategoryServiceMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/service/IEducationCategoryServiceService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/service/IEducationCategoryServiceService.java new file mode 100644 index 0000000..4876db5 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/service/IEducationCategoryServiceService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.educationCategoryService.service; + +import org.jeecg.modules.educationCategoryService.entity.EducationCategoryService; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 服务分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationCategoryServiceService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/service/impl/EducationCategoryServiceServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/service/impl/EducationCategoryServiceServiceImpl.java new file mode 100644 index 0000000..530fd03 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/service/impl/EducationCategoryServiceServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationCategoryService.service.impl; + +import org.jeecg.modules.educationCategoryService.entity.EducationCategoryService; +import org.jeecg.modules.educationCategoryService.mapper.EducationCategoryServiceMapper; +import org.jeecg.modules.educationCategoryService.service.IEducationCategoryServiceService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 服务分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationCategoryServiceServiceImpl extends ServiceImpl implements IEducationCategoryServiceService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue/EducationCategoryServiceList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue/EducationCategoryServiceList.vue new file mode 100644 index 0000000..597e581 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue/EducationCategoryServiceList.vue @@ -0,0 +1,171 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue/modules/EducationCategoryServiceModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue/modules/EducationCategoryServiceModal.vue new file mode 100644 index 0000000..a0b415d --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue/modules/EducationCategoryServiceModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/EducationCategoryService.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/EducationCategoryService.api.ts new file mode 100644 index 0000000..045ad6f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/EducationCategoryService.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/educationCategoryService/educationCategoryService/list', + save='/educationCategoryService/educationCategoryService/add', + edit='/educationCategoryService/educationCategoryService/edit', + deleteOne = '/educationCategoryService/educationCategoryService/delete', + deleteBatch = '/educationCategoryService/educationCategoryService/deleteBatch', + importExcel = '/educationCategoryService/educationCategoryService/importExcel', + exportXls = '/educationCategoryService/educationCategoryService/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/EducationCategoryService.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/EducationCategoryService.data.ts new file mode 100644 index 0000000..e9cc56d --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/EducationCategoryService.data.ts @@ -0,0 +1,23 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '分类名称', + align:"center", + dataIndex: 'title' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '分类名称', + field: 'title', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/EducationCategoryServiceList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/EducationCategoryServiceList.vue new file mode 100644 index 0000000..aeb3669 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/EducationCategoryServiceList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/components/EducationCategoryServiceModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/components/EducationCategoryServiceModal.vue new file mode 100644 index 0000000..e2da063 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryService/vue3/components/EducationCategoryServiceModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/controller/EducationCategoryThesisController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/controller/EducationCategoryThesisController.java new file mode 100644 index 0000000..ec098e9 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/controller/EducationCategoryThesisController.java @@ -0,0 +1,229 @@ +package org.jeecg.modules.educationCategoryThesis.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationCategoryThesis.entity.EducationCategoryThesis; +import org.jeecg.modules.educationCategoryThesis.service.IEducationCategoryThesisService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 论文分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Api(tags="论文分类表") +@RestController +@RequestMapping("/educationCategoryThesis/educationCategoryThesis") +@Slf4j +public class EducationCategoryThesisController extends JeecgController{ + @Autowired + private IEducationCategoryThesisService educationCategoryThesisService; + + /** + * 分页列表查询 + * + * @param educationCategoryThesis + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "论文分类表-分页列表查询") + @ApiOperation(value="论文分类表-分页列表查询", notes="论文分类表-分页列表查询") + @GetMapping(value = "/rootList") + public Result> queryPageList(EducationCategoryThesis educationCategoryThesis, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + String hasQuery = req.getParameter("hasQuery"); + if(hasQuery != null && "true".equals(hasQuery)){ + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationCategoryThesis, req.getParameterMap()); + List list = educationCategoryThesisService.queryTreeListNoPage(queryWrapper); + IPage pageList = new Page<>(1, 10, list.size()); + pageList.setRecords(list); + return Result.OK(pageList); + }else{ + String parentId = educationCategoryThesis.getPid(); + if (oConvertUtils.isEmpty(parentId)) { + parentId = "0"; + } + educationCategoryThesis.setPid(null); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationCategoryThesis, req.getParameterMap()); + // 使用 eq 防止模糊查询 + queryWrapper.eq("pid", parentId); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationCategoryThesisService.page(page, queryWrapper); + return Result.OK(pageList); + } + } + + /** + * 获取子数据 + * @param educationCategoryThesis + * @param req + * @return + */ + //@AutoLog(value = "论文分类表-获取子数据") + @ApiOperation(value="论文分类表-获取子数据", notes="论文分类表-获取子数据") + @GetMapping(value = "/childList") + public Result> queryPageList(EducationCategoryThesis educationCategoryThesis,HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationCategoryThesis, req.getParameterMap()); + List list = educationCategoryThesisService.list(queryWrapper); + IPage pageList = new Page<>(1, 10, list.size()); + pageList.setRecords(list); + return Result.OK(pageList); + } + + /** + * 批量查询子节点 + * @param parentIds 父ID(多个采用半角逗号分割) + * @return 返回 IPage + * @param parentIds + * @return + */ + //@AutoLog(value = "论文分类表-批量获取子数据") + @ApiOperation(value="论文分类表-批量获取子数据", notes="论文分类表-批量获取子数据") + @GetMapping("/getChildListBatch") + public Result getChildListBatch(@RequestParam("parentIds") String parentIds) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List parentIdList = Arrays.asList(parentIds.split(",")); + queryWrapper.in("pid", parentIdList); + List list = educationCategoryThesisService.list(queryWrapper); + IPage pageList = new Page<>(1, 10, list.size()); + pageList.setRecords(list); + return Result.OK(pageList); + } catch (Exception e) { + log.error(e.getMessage(), e); + return Result.error("批量查询子节点失败:" + e.getMessage()); + } + } + + /** + * 添加 + * + * @param educationCategoryThesis + * @return + */ + @AutoLog(value = "论文分类表-添加") + @ApiOperation(value="论文分类表-添加", notes="论文分类表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationCategoryThesis educationCategoryThesis) { + educationCategoryThesisService.addEducationCategoryThesis(educationCategoryThesis); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationCategoryThesis + * @return + */ + @AutoLog(value = "论文分类表-编辑") + @ApiOperation(value="论文分类表-编辑", notes="论文分类表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationCategoryThesis educationCategoryThesis) { + educationCategoryThesisService.updateEducationCategoryThesis(educationCategoryThesis); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "论文分类表-通过id删除") + @ApiOperation(value="论文分类表-通过id删除", notes="论文分类表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationCategoryThesisService.deleteEducationCategoryThesis(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "论文分类表-批量删除") + @ApiOperation(value="论文分类表-批量删除", notes="论文分类表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationCategoryThesisService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "论文分类表-通过id查询") + @ApiOperation(value="论文分类表-通过id查询", notes="论文分类表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + EducationCategoryThesis educationCategoryThesis = educationCategoryThesisService.getById(id); + if(educationCategoryThesis==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationCategoryThesis); + } + + /** + * 导出excel + * + * @param request + * @param educationCategoryThesis + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationCategoryThesis educationCategoryThesis) { + return super.exportXls(request, educationCategoryThesis, EducationCategoryThesis.class, "论文分类表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EducationCategoryThesis.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/entity/EducationCategoryThesis.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/entity/EducationCategoryThesis.java new file mode 100644 index 0000000..beca067 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/entity/EducationCategoryThesis.java @@ -0,0 +1,59 @@ +package org.jeecg.modules.educationCategoryThesis.entity; + +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 论文分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Data +@TableName("education_category_thesis") +@ApiModel(value="education_category_thesis对象", description="论文分类表") +public class EducationCategoryThesis implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**分类名称*/ + @Excel(name = "分类名称", width = 15) + @ApiModelProperty(value = "分类名称") + private java.lang.String title; + /**父级节点*/ + @Excel(name = "父级节点", width = 15) + @ApiModelProperty(value = "父级节点") + private java.lang.String pid; + /**是否有子节点*/ + @Excel(name = "是否有子节点", width = 15, dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "是否有子节点") + private java.lang.String hasChild; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/mapper/EducationCategoryThesisMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/mapper/EducationCategoryThesisMapper.java new file mode 100644 index 0000000..7282ed1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/mapper/EducationCategoryThesisMapper.java @@ -0,0 +1,22 @@ +package org.jeecg.modules.educationCategoryThesis.mapper; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationCategoryThesis.entity.EducationCategoryThesis; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 论文分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationCategoryThesisMapper extends BaseMapper { + + /** + * 编辑节点状态 + * @param id + * @param status + */ + void updateTreeNodeStatus(@Param("id") String id,@Param("status") String status); + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/mapper/xml/EducationCategoryThesisMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/mapper/xml/EducationCategoryThesisMapper.xml new file mode 100644 index 0000000..3722c75 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/mapper/xml/EducationCategoryThesisMapper.xml @@ -0,0 +1,9 @@ + + + + + + update education_category_thesis set has_child = #{status} where id = #{id} + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/service/IEducationCategoryThesisService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/service/IEducationCategoryThesisService.java new file mode 100644 index 0000000..795fa76 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/service/IEducationCategoryThesisService.java @@ -0,0 +1,38 @@ +package org.jeecg.modules.educationCategoryThesis.service; + +import org.jeecg.modules.educationCategoryThesis.entity.EducationCategoryThesis; +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.common.exception.JeecgBootException; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import java.util.List; + +/** + * @Description: 论文分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationCategoryThesisService extends IService { + + /**根节点父ID的值*/ + public static final String ROOT_PID_VALUE = "0"; + + /**树节点有子节点状态值*/ + public static final String HASCHILD = "1"; + + /**树节点无子节点状态值*/ + public static final String NOCHILD = "0"; + + /**新增节点*/ + void addEducationCategoryThesis(EducationCategoryThesis educationCategoryThesis); + + /**修改节点*/ + void updateEducationCategoryThesis(EducationCategoryThesis educationCategoryThesis) throws JeecgBootException; + + /**删除节点*/ + void deleteEducationCategoryThesis(String id) throws JeecgBootException; + + /**查询所有数据,无分页*/ + List queryTreeListNoPage(QueryWrapper queryWrapper); + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/service/impl/EducationCategoryThesisServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/service/impl/EducationCategoryThesisServiceImpl.java new file mode 100644 index 0000000..dcb0b45 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/service/impl/EducationCategoryThesisServiceImpl.java @@ -0,0 +1,191 @@ +package org.jeecg.modules.educationCategoryThesis.service.impl; + +import org.jeecg.common.exception.JeecgBootException; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationCategoryThesis.entity.EducationCategoryThesis; +import org.jeecg.modules.educationCategoryThesis.mapper.EducationCategoryThesisMapper; +import org.jeecg.modules.educationCategoryThesis.service.IEducationCategoryThesisService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 论文分类表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationCategoryThesisServiceImpl extends ServiceImpl implements IEducationCategoryThesisService { + + @Override + public void addEducationCategoryThesis(EducationCategoryThesis educationCategoryThesis) { + //新增时设置hasChild为0 + educationCategoryThesis.setHasChild(IEducationCategoryThesisService.NOCHILD); + if(oConvertUtils.isEmpty(educationCategoryThesis.getPid())){ + educationCategoryThesis.setPid(IEducationCategoryThesisService.ROOT_PID_VALUE); + }else{ + //如果当前节点父ID不为空 则设置父节点的hasChildren 为1 + EducationCategoryThesis parent = baseMapper.selectById(educationCategoryThesis.getPid()); + if(parent!=null && !"1".equals(parent.getHasChild())){ + parent.setHasChild("1"); + baseMapper.updateById(parent); + } + } + baseMapper.insert(educationCategoryThesis); + } + + @Override + public void updateEducationCategoryThesis(EducationCategoryThesis educationCategoryThesis) { + EducationCategoryThesis entity = this.getById(educationCategoryThesis.getId()); + if(entity==null) { + throw new JeecgBootException("未找到对应实体"); + } + String old_pid = entity.getPid(); + String new_pid = educationCategoryThesis.getPid(); + if(!old_pid.equals(new_pid)) { + updateOldParentNode(old_pid); + if(oConvertUtils.isEmpty(new_pid)){ + educationCategoryThesis.setPid(IEducationCategoryThesisService.ROOT_PID_VALUE); + } + if(!IEducationCategoryThesisService.ROOT_PID_VALUE.equals(educationCategoryThesis.getPid())) { + baseMapper.updateTreeNodeStatus(educationCategoryThesis.getPid(), IEducationCategoryThesisService.HASCHILD); + } + } + baseMapper.updateById(educationCategoryThesis); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteEducationCategoryThesis(String id) throws JeecgBootException { + //查询选中节点下所有子节点一并删除 + id = this.queryTreeChildIds(id); + if(id.indexOf(",")>0) { + StringBuffer sb = new StringBuffer(); + String[] idArr = id.split(","); + for (String idVal : idArr) { + if(idVal != null){ + EducationCategoryThesis educationCategoryThesis = this.getById(idVal); + String pidVal = educationCategoryThesis.getPid(); + //查询此节点上一级是否还有其他子节点 + List dataList = baseMapper.selectList(new QueryWrapper().eq("pid", pidVal).notIn("id",Arrays.asList(idArr))); + if((dataList == null || dataList.size()==0) && !Arrays.asList(idArr).contains(pidVal) + && !sb.toString().contains(pidVal)){ + //如果当前节点原本有子节点 现在木有了,更新状态 + sb.append(pidVal).append(","); + } + } + } + //批量删除节点 + baseMapper.deleteBatchIds(Arrays.asList(idArr)); + //修改已无子节点的标识 + String[] pidArr = sb.toString().split(","); + for(String pid : pidArr){ + this.updateOldParentNode(pid); + } + }else{ + EducationCategoryThesis educationCategoryThesis = this.getById(id); + if(educationCategoryThesis==null) { + throw new JeecgBootException("未找到对应实体"); + } + updateOldParentNode(educationCategoryThesis.getPid()); + baseMapper.deleteById(id); + } + } + + @Override + public List queryTreeListNoPage(QueryWrapper queryWrapper) { + List dataList = baseMapper.selectList(queryWrapper); + List mapList = new ArrayList<>(); + for(EducationCategoryThesis data : dataList){ + String pidVal = data.getPid(); + //递归查询子节点的根节点 + if(pidVal != null && !"0".equals(pidVal)){ + EducationCategoryThesis rootVal = this.getTreeRoot(pidVal); + if(rootVal != null && !mapList.contains(rootVal)){ + mapList.add(rootVal); + } + }else{ + if(!mapList.contains(data)){ + mapList.add(data); + } + } + } + return mapList; + } + + /** + * 根据所传pid查询旧的父级节点的子节点并修改相应状态值 + * @param pid + */ + private void updateOldParentNode(String pid) { + if(!IEducationCategoryThesisService.ROOT_PID_VALUE.equals(pid)) { + Integer count = Math.toIntExact(baseMapper.selectCount(new QueryWrapper().eq("pid", pid))); + if(count==null || count<=1) { + baseMapper.updateTreeNodeStatus(pid, IEducationCategoryThesisService.NOCHILD); + } + } + } + + /** + * 递归查询节点的根节点 + * @param pidVal + * @return + */ + private EducationCategoryThesis getTreeRoot(String pidVal){ + EducationCategoryThesis data = baseMapper.selectById(pidVal); + if(data != null && !"0".equals(data.getPid())){ + return this.getTreeRoot(data.getPid()); + }else{ + return data; + } + } + + /** + * 根据id查询所有子节点id + * @param ids + * @return + */ + private String queryTreeChildIds(String ids) { + //获取id数组 + String[] idArr = ids.split(","); + StringBuffer sb = new StringBuffer(); + for (String pidVal : idArr) { + if(pidVal != null){ + if(!sb.toString().contains(pidVal)){ + if(sb.toString().length() > 0){ + sb.append(","); + } + sb.append(pidVal); + this.getTreeChildIds(pidVal,sb); + } + } + } + return sb.toString(); + } + + /** + * 递归查询所有子节点 + * @param pidVal + * @param sb + * @return + */ + private StringBuffer getTreeChildIds(String pidVal,StringBuffer sb){ + List dataList = baseMapper.selectList(new QueryWrapper().eq("pid", pidVal)); + if(dataList != null && dataList.size()>0){ + for(EducationCategoryThesis tree : dataList) { + if(!sb.toString().contains(tree.getId())){ + sb.append(",").append(tree.getId()); + } + this.getTreeChildIds(tree.getId(),sb); + } + } + return sb; + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue/EducationCategoryThesisList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue/EducationCategoryThesisList.vue new file mode 100644 index 0000000..5b29218 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue/EducationCategoryThesisList.vue @@ -0,0 +1,347 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue/modules/EducationCategoryThesisModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue/modules/EducationCategoryThesisModal.vue new file mode 100644 index 0000000..77cb23a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue/modules/EducationCategoryThesisModal.vue @@ -0,0 +1,153 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/EducationCategoryThesis.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/EducationCategoryThesis.api.ts new file mode 100644 index 0000000..2e15394 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/EducationCategoryThesis.api.ts @@ -0,0 +1,82 @@ +import {defHttp} from "/@/utils/http/axios"; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/educationCategoryThesis/educationCategoryThesis/rootList', + save='/educationCategoryThesis/educationCategoryThesis/add', + edit='/educationCategoryThesis/educationCategoryThesis/edit', + deleteEducationCategoryThesis = '/sys/educationCategoryThesis/delete', + deleteBatch = '/educationCategoryThesis/educationCategoryThesis/deleteBatch', + importExcel = '/educationCategoryThesis/educationCategoryThesis/importExcel', + exportXls = '/educationCategoryThesis/educationCategoryThesis/exportXls', + loadTreeData = '/educationCategoryThesis/educationCategoryThesis/loadTreeRoot', + getChildList = '/educationCategoryThesis/educationCategoryThesis/childList', + getChildListBatch = '/educationCategoryThesis/educationCategoryThesis/getChildListBatch', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + * @param params + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); +/** + * 删除 + */ +export const deleteEducationCategoryThesis = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteEducationCategoryThesis, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDeleteEducationCategoryThesis = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdateDict = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} +/** + * 查询全部树形节点数据 + * @param params + */ +export const loadTreeData = (params) => + defHttp.get({url: Api.loadTreeData,params}); +/** + * 查询子节点数据 + * @param params + */ +export const getChildList = (params) => + defHttp.get({url: Api.getChildList, params}); +/** + * 批量查询子节点数据 + * @param params + */ +export const getChildListBatch = (params) => + defHttp.get({url: Api.getChildListBatch, params},{isTransformResponse:false}); diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/EducationCategoryThesis.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/EducationCategoryThesis.data.ts new file mode 100644 index 0000000..d23bb13 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/EducationCategoryThesis.data.ts @@ -0,0 +1,28 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '分类名称', + align:"center", + dataIndex: 'title' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '分类名称', + field: 'title', + component: 'Input', + }, + { + label: '父级节点', + field: 'pid', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/EducationCategoryThesisList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/EducationCategoryThesisList.vue new file mode 100644 index 0000000..cc7c1e9 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/EducationCategoryThesisList.vue @@ -0,0 +1,272 @@ + + + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/components/EducationCategoryThesisModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/components/EducationCategoryThesisModal.vue new file mode 100644 index 0000000..172e0ad --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesis/vue3/components/EducationCategoryThesisModal.vue @@ -0,0 +1,87 @@ + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/controller/EducationConfigController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/controller/EducationConfigController.java new file mode 100644 index 0000000..e3df597 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/controller/EducationConfigController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.educationConfig.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationConfig.entity.EducationConfig; +import org.jeecg.modules.educationConfig.service.IEducationConfigService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 配置信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Api(tags="配置信息表") +@RestController +@RequestMapping("/educationConfig/educationConfig") +@Slf4j +public class EducationConfigController extends JeecgController { + @Autowired + private IEducationConfigService educationConfigService; + + /** + * 分页列表查询 + * + * @param educationConfig + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "配置信息表-分页列表查询") + @ApiOperation(value="配置信息表-分页列表查询", notes="配置信息表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(EducationConfig educationConfig, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationConfig, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationConfigService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param educationConfig + * @return + */ + @AutoLog(value = "配置信息表-添加") + @ApiOperation(value="配置信息表-添加", notes="配置信息表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationConfig educationConfig) { + educationConfigService.save(educationConfig); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationConfig + * @return + */ + @AutoLog(value = "配置信息表-编辑") + @ApiOperation(value="配置信息表-编辑", notes="配置信息表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationConfig educationConfig) { + educationConfigService.updateById(educationConfig); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "配置信息表-通过id删除") + @ApiOperation(value="配置信息表-通过id删除", notes="配置信息表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationConfigService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "配置信息表-批量删除") + @ApiOperation(value="配置信息表-批量删除", notes="配置信息表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationConfigService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "配置信息表-通过id查询") + @ApiOperation(value="配置信息表-通过id查询", notes="配置信息表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + EducationConfig educationConfig = educationConfigService.getById(id); + if(educationConfig==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationConfig); + } + + /** + * 导出excel + * + * @param request + * @param educationConfig + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationConfig educationConfig) { + return super.exportXls(request, educationConfig, EducationConfig.class, "配置信息表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EducationConfig.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/entity/EducationConfig.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/entity/EducationConfig.java new file mode 100644 index 0000000..158b5ef --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/entity/EducationConfig.java @@ -0,0 +1,70 @@ +package org.jeecg.modules.educationConfig.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 配置信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Data +@TableName("education_config") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="education_config对象", description="配置信息表") +public class EducationConfig implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**参数编码*/ + @Excel(name = "参数编码", width = 15) + @ApiModelProperty(value = "参数编码") + private java.lang.String paramCode; + /**参数值_普通文本*/ + @Excel(name = "参数值_普通文本", width = 15) + @ApiModelProperty(value = "参数值_普通文本") + private java.lang.String paramText; + /**参数值_图片*/ + @Excel(name = "参数值_图片", width = 15) + @ApiModelProperty(value = "参数值_图片") + private java.lang.String paramImage; + /**参数值_富文本*/ + @Excel(name = "参数值_富文本", width = 15) + @ApiModelProperty(value = "参数值_富文本") + private java.lang.String paramTextarea; + /**参数描述*/ + @Excel(name = "参数描述", width = 15) + @ApiModelProperty(value = "参数描述") + private java.lang.String paramDesc; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/mapper/EducationConfigMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/mapper/EducationConfigMapper.java new file mode 100644 index 0000000..0127b2c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/mapper/EducationConfigMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.educationConfig.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationConfig.entity.EducationConfig; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 配置信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationConfigMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/mapper/xml/EducationConfigMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/mapper/xml/EducationConfigMapper.xml new file mode 100644 index 0000000..eb25a98 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/mapper/xml/EducationConfigMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/service/IEducationConfigService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/service/IEducationConfigService.java new file mode 100644 index 0000000..0f5086e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/service/IEducationConfigService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.educationConfig.service; + +import org.jeecg.modules.educationConfig.entity.EducationConfig; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 配置信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationConfigService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/service/impl/EducationConfigServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/service/impl/EducationConfigServiceImpl.java new file mode 100644 index 0000000..2d2aebd --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/service/impl/EducationConfigServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationConfig.service.impl; + +import org.jeecg.modules.educationConfig.entity.EducationConfig; +import org.jeecg.modules.educationConfig.mapper.EducationConfigMapper; +import org.jeecg.modules.educationConfig.service.IEducationConfigService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 配置信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationConfigServiceImpl extends ServiceImpl implements IEducationConfigService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/EducationConfigList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/EducationConfigList.vue new file mode 100644 index 0000000..4956287 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/EducationConfigList.vue @@ -0,0 +1,197 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/modules/EducationConfigForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/modules/EducationConfigForm.vue new file mode 100644 index 0000000..57aa8b3 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/modules/EducationConfigForm.vue @@ -0,0 +1,124 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/modules/EducationConfigModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/modules/EducationConfigModal.Style#Drawer.vue new file mode 100644 index 0000000..98fdedb --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/modules/EducationConfigModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/modules/EducationConfigModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/modules/EducationConfigModal.vue new file mode 100644 index 0000000..8005432 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue/modules/EducationConfigModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/EducationConfig.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/EducationConfig.api.ts new file mode 100644 index 0000000..fc7b289 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/EducationConfig.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/educationConfig/educationConfig/list', + save='/educationConfig/educationConfig/add', + edit='/educationConfig/educationConfig/edit', + deleteOne = '/educationConfig/educationConfig/delete', + deleteBatch = '/educationConfig/educationConfig/deleteBatch', + importExcel = '/educationConfig/educationConfig/importExcel', + exportXls = '/educationConfig/educationConfig/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/EducationConfig.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/EducationConfig.data.ts new file mode 100644 index 0000000..732219b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/EducationConfig.data.ts @@ -0,0 +1,67 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '参数编码', + align:"center", + dataIndex: 'paramCode' + }, + { + title: '参数值_普通文本', + align:"center", + dataIndex: 'paramText' + }, + { + title: '参数值_图片', + align:"center", + dataIndex: 'paramImage', + customRender:render.renderAvatar, + }, + { + title: '参数值_富文本', + align:"center", + dataIndex: 'paramTextarea', + slots: { customRender: 'htmlSlot' }, + }, + { + title: '参数描述', + align:"center", + dataIndex: 'paramDesc' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '参数编码', + field: 'paramCode', + component: 'Input', + }, + { + label: '参数值_普通文本', + field: 'paramText', + component: 'Input', + }, + { + label: '参数值_图片', + field: 'paramImage', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '参数值_富文本', + field: 'paramTextarea', + component: 'JCodeEditor', //TODO String后缀暂未添加 + }, + { + label: '参数描述', + field: 'paramDesc', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/EducationConfigList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/EducationConfigList.vue new file mode 100644 index 0000000..acec187 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/EducationConfigList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/components/EducationConfigModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/components/EducationConfigModal.vue new file mode 100644 index 0000000..d0369f9 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationConfig/vue3/components/EducationConfigModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/controller/EducationSummaryController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/controller/EducationSummaryController.java new file mode 100644 index 0000000..018a2ec --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/controller/EducationSummaryController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.educationSummary.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationSummary.entity.EducationSummary; +import org.jeecg.modules.educationSummary.service.IEducationSummaryService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 概述信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Api(tags="概述信息表") +@RestController +@RequestMapping("/educationSummary/educationSummary") +@Slf4j +public class EducationSummaryController extends JeecgController { + @Autowired + private IEducationSummaryService educationSummaryService; + + /** + * 分页列表查询 + * + * @param educationSummary + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "概述信息表-分页列表查询") + @ApiOperation(value="概述信息表-分页列表查询", notes="概述信息表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(EducationSummary educationSummary, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationSummary, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationSummaryService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param educationSummary + * @return + */ + @AutoLog(value = "概述信息表-添加") + @ApiOperation(value="概述信息表-添加", notes="概述信息表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationSummary educationSummary) { + educationSummaryService.save(educationSummary); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationSummary + * @return + */ + @AutoLog(value = "概述信息表-编辑") + @ApiOperation(value="概述信息表-编辑", notes="概述信息表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationSummary educationSummary) { + educationSummaryService.updateById(educationSummary); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "概述信息表-通过id删除") + @ApiOperation(value="概述信息表-通过id删除", notes="概述信息表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationSummaryService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "概述信息表-批量删除") + @ApiOperation(value="概述信息表-批量删除", notes="概述信息表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationSummaryService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "概述信息表-通过id查询") + @ApiOperation(value="概述信息表-通过id查询", notes="概述信息表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + EducationSummary educationSummary = educationSummaryService.getById(id); + if(educationSummary==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationSummary); + } + + /** + * 导出excel + * + * @param request + * @param educationSummary + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationSummary educationSummary) { + return super.exportXls(request, educationSummary, EducationSummary.class, "概述信息表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EducationSummary.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/entity/EducationSummary.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/entity/EducationSummary.java new file mode 100644 index 0000000..762a427 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/entity/EducationSummary.java @@ -0,0 +1,66 @@ +package org.jeecg.modules.educationSummary.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 概述信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Data +@TableName("education_summary") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="education_summary对象", description="概述信息表") +public class EducationSummary implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**参数编码*/ + @Excel(name = "参数编码", width = 15) + @ApiModelProperty(value = "参数编码") + private java.lang.String paramCode; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**详情*/ + @Excel(name = "详情", width = 15) + @ApiModelProperty(value = "详情") + private java.lang.String details; + /**参数描述*/ + @Excel(name = "参数描述", width = 15) + @ApiModelProperty(value = "参数描述") + private java.lang.String paramDesc; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/mapper/EducationSummaryMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/mapper/EducationSummaryMapper.java new file mode 100644 index 0000000..25f9bc5 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/mapper/EducationSummaryMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.educationSummary.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationSummary.entity.EducationSummary; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 概述信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationSummaryMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/mapper/xml/EducationSummaryMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/mapper/xml/EducationSummaryMapper.xml new file mode 100644 index 0000000..1a54725 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/mapper/xml/EducationSummaryMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/service/IEducationSummaryService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/service/IEducationSummaryService.java new file mode 100644 index 0000000..af803c5 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/service/IEducationSummaryService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.educationSummary.service; + +import org.jeecg.modules.educationSummary.entity.EducationSummary; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 概述信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationSummaryService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/service/impl/EducationSummaryServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/service/impl/EducationSummaryServiceImpl.java new file mode 100644 index 0000000..38f8cbf --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/service/impl/EducationSummaryServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationSummary.service.impl; + +import org.jeecg.modules.educationSummary.entity.EducationSummary; +import org.jeecg.modules.educationSummary.mapper.EducationSummaryMapper; +import org.jeecg.modules.educationSummary.service.IEducationSummaryService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 概述信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationSummaryServiceImpl extends ServiceImpl implements IEducationSummaryService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/EducationSummaryList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/EducationSummaryList.vue new file mode 100644 index 0000000..1949fab --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/EducationSummaryList.vue @@ -0,0 +1,190 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/modules/EducationSummaryForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/modules/EducationSummaryForm.vue new file mode 100644 index 0000000..6a50a71 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/modules/EducationSummaryForm.vue @@ -0,0 +1,119 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/modules/EducationSummaryModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/modules/EducationSummaryModal.Style#Drawer.vue new file mode 100644 index 0000000..f77d81e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/modules/EducationSummaryModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/modules/EducationSummaryModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/modules/EducationSummaryModal.vue new file mode 100644 index 0000000..2644f32 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue/modules/EducationSummaryModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/EducationSummary.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/EducationSummary.api.ts new file mode 100644 index 0000000..540917c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/EducationSummary.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/educationSummary/educationSummary/list', + save='/educationSummary/educationSummary/add', + edit='/educationSummary/educationSummary/edit', + deleteOne = '/educationSummary/educationSummary/delete', + deleteBatch = '/educationSummary/educationSummary/deleteBatch', + importExcel = '/educationSummary/educationSummary/importExcel', + exportXls = '/educationSummary/educationSummary/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/EducationSummary.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/EducationSummary.data.ts new file mode 100644 index 0000000..f95507c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/EducationSummary.data.ts @@ -0,0 +1,54 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '参数编码', + align:"center", + dataIndex: 'paramCode' + }, + { + title: '标题', + align:"center", + dataIndex: 'title' + }, + { + title: '详情', + align:"center", + dataIndex: 'details', + slots: { customRender: 'htmlSlot' }, + }, + { + title: '参数描述', + align:"center", + dataIndex: 'paramDesc' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '参数编码', + field: 'paramCode', + component: 'Input', + }, + { + label: '标题', + field: 'title', + component: 'Input', + }, + { + label: '详情', + field: 'details', + component: 'JCodeEditor', //TODO String后缀暂未添加 + }, + { + label: '参数描述', + field: 'paramDesc', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/EducationSummaryList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/EducationSummaryList.vue new file mode 100644 index 0000000..6c48ab3 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/EducationSummaryList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/components/EducationSummaryModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/components/EducationSummaryModal.vue new file mode 100644 index 0000000..26bc3ab --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationSummary/vue3/components/EducationSummaryModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/controller/EducationThesisController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/controller/EducationThesisController.java new file mode 100644 index 0000000..0e84c16 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/controller/EducationThesisController.java @@ -0,0 +1,337 @@ +package org.jeecg.modules.educationThesis.controller; + +import java.io.UnsupportedEncodingException; +import java.io.IOException; +import java.net.URLDecoder; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.vo.LoginUser; +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationThesis.entity.EducationTarget; +import org.jeecg.modules.educationThesis.entity.EducationTeacher; +import org.jeecg.modules.educationThesis.entity.EducationCourse; +import org.jeecg.modules.educationThesis.entity.EducationPeriodical; +import org.jeecg.modules.educationThesis.entity.EducationDocument; +import org.jeecg.modules.educationThesis.entity.EducationThesis; +import org.jeecg.modules.educationThesis.vo.EducationThesisPage; +import org.jeecg.modules.educationThesis.service.IEducationThesisService; +import org.jeecg.modules.educationThesis.service.IEducationTargetService; +import org.jeecg.modules.educationThesis.service.IEducationTeacherService; +import org.jeecg.modules.educationThesis.service.IEducationCourseService; +import org.jeecg.modules.educationThesis.service.IEducationPeriodicalService; +import org.jeecg.modules.educationThesis.service.IEducationDocumentService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 论文信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Api(tags="论文信息表") +@RestController +@RequestMapping("/educationThesis/educationThesis") +@Slf4j +public class EducationThesisController { + @Autowired + private IEducationThesisService educationThesisService; + @Autowired + private IEducationTargetService educationTargetService; + @Autowired + private IEducationTeacherService educationTeacherService; + @Autowired + private IEducationCourseService educationCourseService; + @Autowired + private IEducationPeriodicalService educationPeriodicalService; + @Autowired + private IEducationDocumentService educationDocumentService; + + /** + * 分页列表查询 + * + * @param educationThesis + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "论文信息表-分页列表查询") + @ApiOperation(value="论文信息表-分页列表查询", notes="论文信息表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(EducationThesis educationThesis, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationThesis, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationThesisService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param educationThesisPage + * @return + */ + @AutoLog(value = "论文信息表-添加") + @ApiOperation(value="论文信息表-添加", notes="论文信息表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationThesisPage educationThesisPage) { + EducationThesis educationThesis = new EducationThesis(); + BeanUtils.copyProperties(educationThesisPage, educationThesis); + educationThesisService.saveMain(educationThesis, educationThesisPage.getEducationTargetList(),educationThesisPage.getEducationTeacherList(),educationThesisPage.getEducationCourseList(),educationThesisPage.getEducationPeriodicalList(),educationThesisPage.getEducationDocumentList()); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationThesisPage + * @return + */ + @AutoLog(value = "论文信息表-编辑") + @ApiOperation(value="论文信息表-编辑", notes="论文信息表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationThesisPage educationThesisPage) { + EducationThesis educationThesis = new EducationThesis(); + BeanUtils.copyProperties(educationThesisPage, educationThesis); + EducationThesis educationThesisEntity = educationThesisService.getById(educationThesis.getId()); + if(educationThesisEntity==null) { + return Result.error("未找到对应数据"); + } + educationThesisService.updateMain(educationThesis, educationThesisPage.getEducationTargetList(),educationThesisPage.getEducationTeacherList(),educationThesisPage.getEducationCourseList(),educationThesisPage.getEducationPeriodicalList(),educationThesisPage.getEducationDocumentList()); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "论文信息表-通过id删除") + @ApiOperation(value="论文信息表-通过id删除", notes="论文信息表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationThesisService.delMain(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "论文信息表-批量删除") + @ApiOperation(value="论文信息表-批量删除", notes="论文信息表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationThesisService.delBatchMain(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "论文信息表-通过id查询") + @ApiOperation(value="论文信息表-通过id查询", notes="论文信息表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + EducationThesis educationThesis = educationThesisService.getById(id); + if(educationThesis==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationThesis); + + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "发表方向表通过主表ID查询") + @ApiOperation(value="发表方向表主表ID查询", notes="发表方向表-通主表ID查询") + @GetMapping(value = "/queryEducationTargetByMainId") + public Result> queryEducationTargetListByMainId(@RequestParam(name="id",required=true) String id) { + List educationTargetList = educationTargetService.selectByMainId(id); + return Result.OK(educationTargetList); + } + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "师资力量表通过主表ID查询") + @ApiOperation(value="师资力量表主表ID查询", notes="师资力量表-通主表ID查询") + @GetMapping(value = "/queryEducationTeacherByMainId") + public Result> queryEducationTeacherListByMainId(@RequestParam(name="id",required=true) String id) { + List educationTeacherList = educationTeacherService.selectByMainId(id); + return Result.OK(educationTeacherList); + } + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "课程安排表通过主表ID查询") + @ApiOperation(value="课程安排表主表ID查询", notes="课程安排表-通主表ID查询") + @GetMapping(value = "/queryEducationCourseByMainId") + public Result> queryEducationCourseListByMainId(@RequestParam(name="id",required=true) String id) { + List educationCourseList = educationCourseService.selectByMainId(id); + return Result.OK(educationCourseList); + } + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "期刊推荐表通过主表ID查询") + @ApiOperation(value="期刊推荐表主表ID查询", notes="期刊推荐表-通主表ID查询") + @GetMapping(value = "/queryEducationPeriodicalByMainId") + public Result> queryEducationPeriodicalListByMainId(@RequestParam(name="id",required=true) String id) { + List educationPeriodicalList = educationPeriodicalService.selectByMainId(id); + return Result.OK(educationPeriodicalList); + } + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "附加材料表通过主表ID查询") + @ApiOperation(value="附加材料表主表ID查询", notes="附加材料表-通主表ID查询") + @GetMapping(value = "/queryEducationDocumentByMainId") + public Result> queryEducationDocumentListByMainId(@RequestParam(name="id",required=true) String id) { + List educationDocumentList = educationDocumentService.selectByMainId(id); + return Result.OK(educationDocumentList); + } + + /** + * 导出excel + * + * @param request + * @param educationThesis + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationThesis educationThesis) { + // Step.1 组装查询条件查询数据 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationThesis, request.getParameterMap()); + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + //Step.2 获取导出数据 + List queryList = educationThesisService.list(queryWrapper); + // 过滤选中数据 + String selections = request.getParameter("selections"); + List educationThesisList = new ArrayList(); + if(oConvertUtils.isEmpty(selections)) { + educationThesisList = queryList; + }else { + List selectionList = Arrays.asList(selections.split(",")); + educationThesisList = queryList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList()); + } + + // Step.3 组装pageList + List pageList = new ArrayList(); + for (EducationThesis main : educationThesisList) { + EducationThesisPage vo = new EducationThesisPage(); + BeanUtils.copyProperties(main, vo); + List educationTargetList = educationTargetService.selectByMainId(main.getId()); + vo.setEducationTargetList(educationTargetList); + List educationTeacherList = educationTeacherService.selectByMainId(main.getId()); + vo.setEducationTeacherList(educationTeacherList); + List educationCourseList = educationCourseService.selectByMainId(main.getId()); + vo.setEducationCourseList(educationCourseList); + List educationPeriodicalList = educationPeriodicalService.selectByMainId(main.getId()); + vo.setEducationPeriodicalList(educationPeriodicalList); + List educationDocumentList = educationDocumentService.selectByMainId(main.getId()); + vo.setEducationDocumentList(educationDocumentList); + pageList.add(vo); + } + + // Step.4 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + mv.addObject(NormalExcelConstants.FILE_NAME, "论文信息表列表"); + mv.addObject(NormalExcelConstants.CLASS, EducationThesisPage.class); + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("论文信息表数据", "导出人:"+sysUser.getRealname(), "论文信息表")); + mv.addObject(NormalExcelConstants.DATA_LIST, pageList); + return mv; + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + MultipartFile file = entity.getValue();// 获取上传文件对象 + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(1); + params.setNeedSave(true); + try { + List list = ExcelImportUtil.importExcel(file.getInputStream(), EducationThesisPage.class, params); + for (EducationThesisPage page : list) { + EducationThesis po = new EducationThesis(); + BeanUtils.copyProperties(page, po); + educationThesisService.saveMain(po, page.getEducationTargetList(),page.getEducationTeacherList(),page.getEducationCourseList(),page.getEducationPeriodicalList(),page.getEducationDocumentList()); + } + return Result.OK("文件导入成功!数据行数:" + list.size()); + } catch (Exception e) { + log.error(e.getMessage(),e); + return Result.error("文件导入失败:"+e.getMessage()); + } finally { + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return Result.OK("文件导入失败!"); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationCourse.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationCourse.java new file mode 100644 index 0000000..8beab77 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationCourse.java @@ -0,0 +1,55 @@ +package org.jeecg.modules.educationThesis.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 课程安排表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@ApiModel(value="education_course对象", description="课程安排表") +@Data +@TableName("education_course") +public class EducationCourse implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**描述*/ + @Excel(name = "描述", width = 15) + @ApiModelProperty(value = "描述") + private java.lang.String description; + /**关联论文*/ + @ApiModelProperty(value = "关联论文") + private java.lang.String thesisId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationDocument.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationDocument.java new file mode 100644 index 0000000..8f1fcf8 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationDocument.java @@ -0,0 +1,55 @@ +package org.jeecg.modules.educationThesis.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 附加材料表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@ApiModel(value="education_document对象", description="附加材料表") +@Data +@TableName("education_document") +public class EducationDocument implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**文件*/ + @Excel(name = "文件", width = 15) + @ApiModelProperty(value = "文件") + private java.lang.String document; + /**关联论文*/ + @ApiModelProperty(value = "关联论文") + private java.lang.String thesisId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationPeriodical.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationPeriodical.java new file mode 100644 index 0000000..57c2a4f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationPeriodical.java @@ -0,0 +1,63 @@ +package org.jeecg.modules.educationThesis.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 期刊推荐表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@ApiModel(value="education_periodical对象", description="期刊推荐表") +@Data +@TableName("education_periodical") +public class EducationPeriodical implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**副标题*/ + @Excel(name = "副标题", width = 15) + @ApiModelProperty(value = "副标题") + private java.lang.String shortTitle; + /**封面*/ + @Excel(name = "封面", width = 15) + @ApiModelProperty(value = "封面") + private java.lang.String image; + /**描述*/ + @Excel(name = "描述", width = 15) + @ApiModelProperty(value = "描述") + private java.lang.String description; + /**关联论文*/ + @ApiModelProperty(value = "关联论文") + private java.lang.String thesisId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTarget.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTarget.java new file mode 100644 index 0000000..da2503b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTarget.java @@ -0,0 +1,55 @@ +package org.jeecg.modules.educationThesis.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 发表方向表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@ApiModel(value="education_target对象", description="发表方向表") +@Data +@TableName("education_target") +public class EducationTarget implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**描述*/ + @Excel(name = "描述", width = 15) + @ApiModelProperty(value = "描述") + private java.lang.String description; + /**关联论文*/ + @ApiModelProperty(value = "关联论文") + private java.lang.String thesisId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTeacher.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTeacher.java new file mode 100644 index 0000000..e61adc2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTeacher.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.educationThesis.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 师资力量表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@ApiModel(value="education_teacher对象", description="师资力量表") +@Data +@TableName("education_teacher") +public class EducationTeacher implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**姓名*/ + @Excel(name = "姓名", width = 15) + @ApiModelProperty(value = "姓名") + private java.lang.String title; + /**头像*/ + @Excel(name = "头像", width = 15) + @ApiModelProperty(value = "头像") + private java.lang.String image; + /**职位*/ + @Excel(name = "职位", width = 15) + @ApiModelProperty(value = "职位") + private java.lang.String career; + /**学历*/ + @Excel(name = "学历", width = 15) + @ApiModelProperty(value = "学历") + private java.lang.String qualification; + /**专业经历*/ + @Excel(name = "专业经历", width = 15) + @ApiModelProperty(value = "专业经历") + private java.lang.String experience; + /**关联论文*/ + @ApiModelProperty(value = "关联论文") + private java.lang.String thesisId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationThesis.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationThesis.java new file mode 100644 index 0000000..1cddd32 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationThesis.java @@ -0,0 +1,73 @@ +package org.jeecg.modules.educationThesis.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 论文信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@ApiModel(value="education_thesis对象", description="论文信息表") +@Data +@TableName("education_thesis") +public class EducationThesis implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**一级分类*/ + @Excel(name = "一级分类", width = 15) + @ApiModelProperty(value = "一级分类") + private java.lang.String categoryOne; + /**二级分类*/ + @Excel(name = "二级分类", width = 15) + @ApiModelProperty(value = "二级分类") + private java.lang.String categoryTwo; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**副标题*/ + @Excel(name = "副标题", width = 15) + @ApiModelProperty(value = "副标题") + private java.lang.String shortTitle; + /**封面*/ + @Excel(name = "封面", width = 15) + @ApiModelProperty(value = "封面") + private java.lang.String image; + /**发表全流程辅导*/ + @Excel(name = "发表全流程辅导", width = 15) + @ApiModelProperty(value = "发表全流程辅导") + private java.lang.String process; + /**适用人群*/ + @Excel(name = "适用人群", width = 15) + @ApiModelProperty(value = "适用人群") + private java.lang.String suit; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationCourseMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationCourseMapper.java new file mode 100644 index 0000000..6cfeef9 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationCourseMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationThesis.mapper; + +import java.util.List; +import org.jeecg.modules.educationThesis.entity.EducationCourse; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 课程安排表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationCourseMapper extends BaseMapper { + + public boolean deleteByMainId(@Param("mainId") String mainId); + + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationDocumentMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationDocumentMapper.java new file mode 100644 index 0000000..c38a748 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationDocumentMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationThesis.mapper; + +import java.util.List; +import org.jeecg.modules.educationThesis.entity.EducationDocument; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 附加材料表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationDocumentMapper extends BaseMapper { + + public boolean deleteByMainId(@Param("mainId") String mainId); + + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationPeriodicalMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationPeriodicalMapper.java new file mode 100644 index 0000000..5e72b94 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationPeriodicalMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationThesis.mapper; + +import java.util.List; +import org.jeecg.modules.educationThesis.entity.EducationPeriodical; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 期刊推荐表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationPeriodicalMapper extends BaseMapper { + + public boolean deleteByMainId(@Param("mainId") String mainId); + + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTargetMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTargetMapper.java new file mode 100644 index 0000000..0c437e7 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTargetMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationThesis.mapper; + +import java.util.List; +import org.jeecg.modules.educationThesis.entity.EducationTarget; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 发表方向表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationTargetMapper extends BaseMapper { + + public boolean deleteByMainId(@Param("mainId") String mainId); + + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTeacherMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTeacherMapper.java new file mode 100644 index 0000000..7488dff --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTeacherMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationThesis.mapper; + +import java.util.List; +import org.jeecg.modules.educationThesis.entity.EducationTeacher; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 师资力量表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationTeacherMapper extends BaseMapper { + + public boolean deleteByMainId(@Param("mainId") String mainId); + + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationThesisMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationThesisMapper.java new file mode 100644 index 0000000..2342589 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationThesisMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.educationThesis.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationThesis.entity.EducationThesis; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 论文信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface EducationThesisMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationCourseMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationCourseMapper.xml new file mode 100644 index 0000000..cfe8635 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationCourseMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM education_course + WHERE + thesis_id = #{mainId} + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationDocumentMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationDocumentMapper.xml new file mode 100644 index 0000000..dfe4956 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationDocumentMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM education_document + WHERE + thesis_id = #{mainId} + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationPeriodicalMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationPeriodicalMapper.xml new file mode 100644 index 0000000..b8f8504 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationPeriodicalMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM education_periodical + WHERE + thesis_id = #{mainId} + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationTargetMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationTargetMapper.xml new file mode 100644 index 0000000..361c7b1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationTargetMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM education_target + WHERE + thesis_id = #{mainId} + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationTeacherMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationTeacherMapper.xml new file mode 100644 index 0000000..b8356c8 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationTeacherMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM education_teacher + WHERE + thesis_id = #{mainId} + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationThesisMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationThesisMapper.xml new file mode 100644 index 0000000..9e25853 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationThesisMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationCourseService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationCourseService.java new file mode 100644 index 0000000..e3ffba4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationCourseService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.educationThesis.service; + +import org.jeecg.modules.educationThesis.entity.EducationCourse; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 课程安排表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationCourseService extends IService { + + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationDocumentService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationDocumentService.java new file mode 100644 index 0000000..7b29276 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationDocumentService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.educationThesis.service; + +import org.jeecg.modules.educationThesis.entity.EducationDocument; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 附加材料表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationDocumentService extends IService { + + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationPeriodicalService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationPeriodicalService.java new file mode 100644 index 0000000..da2ce47 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationPeriodicalService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.educationThesis.service; + +import org.jeecg.modules.educationThesis.entity.EducationPeriodical; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 期刊推荐表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationPeriodicalService extends IService { + + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTargetService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTargetService.java new file mode 100644 index 0000000..259bc4e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTargetService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.educationThesis.service; + +import org.jeecg.modules.educationThesis.entity.EducationTarget; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 发表方向表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationTargetService extends IService { + + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTeacherService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTeacherService.java new file mode 100644 index 0000000..2aa2f34 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTeacherService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.educationThesis.service; + +import org.jeecg.modules.educationThesis.entity.EducationTeacher; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 师资力量表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationTeacherService extends IService { + + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationThesisService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationThesisService.java new file mode 100644 index 0000000..b0475f3 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationThesisService.java @@ -0,0 +1,44 @@ +package org.jeecg.modules.educationThesis.service; + +import org.jeecg.modules.educationThesis.entity.EducationTarget; +import org.jeecg.modules.educationThesis.entity.EducationTeacher; +import org.jeecg.modules.educationThesis.entity.EducationCourse; +import org.jeecg.modules.educationThesis.entity.EducationPeriodical; +import org.jeecg.modules.educationThesis.entity.EducationDocument; +import org.jeecg.modules.educationThesis.entity.EducationThesis; +import com.baomidou.mybatisplus.extension.service.IService; +import java.io.Serializable; +import java.util.Collection; +import java.util.List; + +/** + * @Description: 论文信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +public interface IEducationThesisService extends IService { + + /** + * 添加一对多 + * + */ + public void saveMain(EducationThesis educationThesis,List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList) ; + + /** + * 修改一对多 + * + */ + public void updateMain(EducationThesis educationThesis,List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList); + + /** + * 删除一对多 + */ + public void delMain (String id); + + /** + * 批量删除一对多 + */ + public void delBatchMain (Collection idList); + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationCourseServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationCourseServiceImpl.java new file mode 100644 index 0000000..73a6e97 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationCourseServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.educationThesis.service.impl; + +import org.jeecg.modules.educationThesis.entity.EducationCourse; +import org.jeecg.modules.educationThesis.mapper.EducationCourseMapper; +import org.jeecg.modules.educationThesis.service.IEducationCourseService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 课程安排表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationCourseServiceImpl extends ServiceImpl implements IEducationCourseService { + + @Autowired + private EducationCourseMapper educationCourseMapper; + + @Override + public List selectByMainId(String mainId) { + return educationCourseMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationDocumentServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationDocumentServiceImpl.java new file mode 100644 index 0000000..8a955a7 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationDocumentServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.educationThesis.service.impl; + +import org.jeecg.modules.educationThesis.entity.EducationDocument; +import org.jeecg.modules.educationThesis.mapper.EducationDocumentMapper; +import org.jeecg.modules.educationThesis.service.IEducationDocumentService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 附加材料表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationDocumentServiceImpl extends ServiceImpl implements IEducationDocumentService { + + @Autowired + private EducationDocumentMapper educationDocumentMapper; + + @Override + public List selectByMainId(String mainId) { + return educationDocumentMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationPeriodicalServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationPeriodicalServiceImpl.java new file mode 100644 index 0000000..46e4b35 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationPeriodicalServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.educationThesis.service.impl; + +import org.jeecg.modules.educationThesis.entity.EducationPeriodical; +import org.jeecg.modules.educationThesis.mapper.EducationPeriodicalMapper; +import org.jeecg.modules.educationThesis.service.IEducationPeriodicalService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 期刊推荐表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationPeriodicalServiceImpl extends ServiceImpl implements IEducationPeriodicalService { + + @Autowired + private EducationPeriodicalMapper educationPeriodicalMapper; + + @Override + public List selectByMainId(String mainId) { + return educationPeriodicalMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTargetServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTargetServiceImpl.java new file mode 100644 index 0000000..f9a74ab --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTargetServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.educationThesis.service.impl; + +import org.jeecg.modules.educationThesis.entity.EducationTarget; +import org.jeecg.modules.educationThesis.mapper.EducationTargetMapper; +import org.jeecg.modules.educationThesis.service.IEducationTargetService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 发表方向表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationTargetServiceImpl extends ServiceImpl implements IEducationTargetService { + + @Autowired + private EducationTargetMapper educationTargetMapper; + + @Override + public List selectByMainId(String mainId) { + return educationTargetMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTeacherServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTeacherServiceImpl.java new file mode 100644 index 0000000..00606de --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTeacherServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.educationThesis.service.impl; + +import org.jeecg.modules.educationThesis.entity.EducationTeacher; +import org.jeecg.modules.educationThesis.mapper.EducationTeacherMapper; +import org.jeecg.modules.educationThesis.service.IEducationTeacherService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 师资力量表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationTeacherServiceImpl extends ServiceImpl implements IEducationTeacherService { + + @Autowired + private EducationTeacherMapper educationTeacherMapper; + + @Override + public List selectByMainId(String mainId) { + return educationTeacherMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationThesisServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationThesisServiceImpl.java new file mode 100644 index 0000000..7b07744 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationThesisServiceImpl.java @@ -0,0 +1,161 @@ +package org.jeecg.modules.educationThesis.service.impl; + +import org.jeecg.modules.educationThesis.entity.EducationThesis; +import org.jeecg.modules.educationThesis.entity.EducationTarget; +import org.jeecg.modules.educationThesis.entity.EducationTeacher; +import org.jeecg.modules.educationThesis.entity.EducationCourse; +import org.jeecg.modules.educationThesis.entity.EducationPeriodical; +import org.jeecg.modules.educationThesis.entity.EducationDocument; +import org.jeecg.modules.educationThesis.mapper.EducationTargetMapper; +import org.jeecg.modules.educationThesis.mapper.EducationTeacherMapper; +import org.jeecg.modules.educationThesis.mapper.EducationCourseMapper; +import org.jeecg.modules.educationThesis.mapper.EducationPeriodicalMapper; +import org.jeecg.modules.educationThesis.mapper.EducationDocumentMapper; +import org.jeecg.modules.educationThesis.mapper.EducationThesisMapper; +import org.jeecg.modules.educationThesis.service.IEducationThesisService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import java.io.Serializable; +import java.util.List; +import java.util.Collection; + +/** + * @Description: 论文信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Service +public class EducationThesisServiceImpl extends ServiceImpl implements IEducationThesisService { + + @Autowired + private EducationThesisMapper educationThesisMapper; + @Autowired + private EducationTargetMapper educationTargetMapper; + @Autowired + private EducationTeacherMapper educationTeacherMapper; + @Autowired + private EducationCourseMapper educationCourseMapper; + @Autowired + private EducationPeriodicalMapper educationPeriodicalMapper; + @Autowired + private EducationDocumentMapper educationDocumentMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveMain(EducationThesis educationThesis, List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList) { + educationThesisMapper.insert(educationThesis); + if(educationTargetList!=null && educationTargetList.size()>0) { + for(EducationTarget entity:educationTargetList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationTargetMapper.insert(entity); + } + } + if(educationTeacherList!=null && educationTeacherList.size()>0) { + for(EducationTeacher entity:educationTeacherList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationTeacherMapper.insert(entity); + } + } + if(educationCourseList!=null && educationCourseList.size()>0) { + for(EducationCourse entity:educationCourseList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationCourseMapper.insert(entity); + } + } + if(educationPeriodicalList!=null && educationPeriodicalList.size()>0) { + for(EducationPeriodical entity:educationPeriodicalList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationPeriodicalMapper.insert(entity); + } + } + if(educationDocumentList!=null && educationDocumentList.size()>0) { + for(EducationDocument entity:educationDocumentList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationDocumentMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateMain(EducationThesis educationThesis,List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList) { + educationThesisMapper.updateById(educationThesis); + + //1.先删除子表数据 + educationTargetMapper.deleteByMainId(educationThesis.getId()); + educationTeacherMapper.deleteByMainId(educationThesis.getId()); + educationCourseMapper.deleteByMainId(educationThesis.getId()); + educationPeriodicalMapper.deleteByMainId(educationThesis.getId()); + educationDocumentMapper.deleteByMainId(educationThesis.getId()); + + //2.子表数据重新插入 + if(educationTargetList!=null && educationTargetList.size()>0) { + for(EducationTarget entity:educationTargetList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationTargetMapper.insert(entity); + } + } + if(educationTeacherList!=null && educationTeacherList.size()>0) { + for(EducationTeacher entity:educationTeacherList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationTeacherMapper.insert(entity); + } + } + if(educationCourseList!=null && educationCourseList.size()>0) { + for(EducationCourse entity:educationCourseList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationCourseMapper.insert(entity); + } + } + if(educationPeriodicalList!=null && educationPeriodicalList.size()>0) { + for(EducationPeriodical entity:educationPeriodicalList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationPeriodicalMapper.insert(entity); + } + } + if(educationDocumentList!=null && educationDocumentList.size()>0) { + for(EducationDocument entity:educationDocumentList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationDocumentMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delMain(String id) { + educationTargetMapper.deleteByMainId(id); + educationTeacherMapper.deleteByMainId(id); + educationCourseMapper.deleteByMainId(id); + educationPeriodicalMapper.deleteByMainId(id); + educationDocumentMapper.deleteByMainId(id); + educationThesisMapper.deleteById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delBatchMain(Collection idList) { + for(Serializable id:idList) { + educationTargetMapper.deleteByMainId(id.toString()); + educationTeacherMapper.deleteByMainId(id.toString()); + educationCourseMapper.deleteByMainId(id.toString()); + educationPeriodicalMapper.deleteByMainId(id.toString()); + educationDocumentMapper.deleteByMainId(id.toString()); + educationThesisMapper.deleteById(id); + } + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vo/EducationThesisPage.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vo/EducationThesisPage.java new file mode 100644 index 0000000..aae5984 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vo/EducationThesisPage.java @@ -0,0 +1,91 @@ +package org.jeecg.modules.educationThesis.vo; + +import java.util.List; +import org.jeecg.modules.educationThesis.entity.EducationThesis; +import org.jeecg.modules.educationThesis.entity.EducationTarget; +import org.jeecg.modules.educationThesis.entity.EducationTeacher; +import org.jeecg.modules.educationThesis.entity.EducationCourse; +import org.jeecg.modules.educationThesis.entity.EducationPeriodical; +import org.jeecg.modules.educationThesis.entity.EducationDocument; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecgframework.poi.excel.annotation.ExcelEntity; +import org.jeecgframework.poi.excel.annotation.ExcelCollection; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 论文信息表 + * @Author: jeecg-boot + * @Date: 2025-07-24 + * @Version: V1.0 + */ +@Data +@ApiModel(value="education_thesisPage对象", description="论文信息表") +public class EducationThesisPage { + + /**主键*/ + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**一级分类*/ + @Excel(name = "一级分类", width = 15) + @ApiModelProperty(value = "一级分类") + private java.lang.String categoryOne; + /**二级分类*/ + @Excel(name = "二级分类", width = 15) + @ApiModelProperty(value = "二级分类") + private java.lang.String categoryTwo; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**副标题*/ + @Excel(name = "副标题", width = 15) + @ApiModelProperty(value = "副标题") + private java.lang.String shortTitle; + /**封面*/ + @Excel(name = "封面", width = 15) + @ApiModelProperty(value = "封面") + private java.lang.String image; + /**发表全流程辅导*/ + @Excel(name = "发表全流程辅导", width = 15) + @ApiModelProperty(value = "发表全流程辅导") + private java.lang.String process; + /**适用人群*/ + @Excel(name = "适用人群", width = 15) + @ApiModelProperty(value = "适用人群") + private java.lang.String suit; + + @ExcelCollection(name="发表方向表") + @ApiModelProperty(value = "发表方向表") + private List educationTargetList; + @ExcelCollection(name="师资力量表") + @ApiModelProperty(value = "师资力量表") + private List educationTeacherList; + @ExcelCollection(name="课程安排表") + @ApiModelProperty(value = "课程安排表") + private List educationCourseList; + @ExcelCollection(name="期刊推荐表") + @ApiModelProperty(value = "期刊推荐表") + private List educationPeriodicalList; + @ExcelCollection(name="附加材料表") + @ApiModelProperty(value = "附加材料表") + private List educationDocumentList; + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/EducationThesisList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/EducationThesisList.vue new file mode 100644 index 0000000..8c71ebf --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/EducationThesisList.vue @@ -0,0 +1,209 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisForm.vue new file mode 100644 index 0000000..2a36431 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisForm.vue @@ -0,0 +1,403 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisModal.vue new file mode 100644 index 0000000..734ecbc --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisModal.vue @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file