添加教育经历和培训经历表
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUserEducation;
|
||||
import com.ruoyi.cms.service.IAppUserEducationService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.SiteSecurityUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/app/appUserEducation")
|
||||
@Api(tags = "移动端:APP用户教育经历")
|
||||
public class AppUserEducationController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IAppUserEducationService appUserEducationService;
|
||||
|
||||
/**
|
||||
* APP端:根据用户ID查询全部学历经历
|
||||
*/
|
||||
@ApiOperation("用户学历经历-根据用户ID查询全部学历经历")
|
||||
@GetMapping("/getByUserId")
|
||||
public AjaxResult getByUserId()
|
||||
{
|
||||
List<AppUserEducation> dataList = appUserEducationService.selectEducationByUserId(SiteSecurityUtils.getUserId());
|
||||
return AjaxResult.success(dataList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单条详情
|
||||
*/
|
||||
@ApiOperation("用户学历经历-单条详情")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id)
|
||||
{
|
||||
return AjaxResult.success(appUserEducationService.selectAppUserEducationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学历
|
||||
*/
|
||||
@ApiOperation("用户学历经历-新增学历")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppUserEducation appUserEducation)
|
||||
{
|
||||
appUserEducation.setUserId(SiteSecurityUtils.getUserId());
|
||||
return toAjax(appUserEducationService.insertAppUserEducation(appUserEducation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学历
|
||||
*/
|
||||
@ApiOperation("用户学历经历-修改学历")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppUserEducation appUserEducation)
|
||||
{
|
||||
return toAjax(appUserEducationService.updateAppUserEducation(appUserEducation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量移出(逻辑删除)
|
||||
*/
|
||||
@ApiOperation("用户学历经历-批量移出")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appUserEducationService.deleteAppUserEducationByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUserTrain;
|
||||
import com.ruoyi.cms.service.IAppUserTrainService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.SiteSecurityUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/app/appUserTrain")
|
||||
@Api(tags = "移动端:APP用户培训经历")
|
||||
public class AppUserTrainController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IAppUserTrainService appUserTrainService;
|
||||
|
||||
/**
|
||||
* 根据用户ID查询全部培训经历(APP简历使用)
|
||||
*/
|
||||
@ApiOperation("用户培训经历-根据用户ID查询全部培训经历")
|
||||
@GetMapping("/getByUserId")
|
||||
public AjaxResult getByUserId()
|
||||
{
|
||||
List<AppUserTrain> list = appUserTrainService.selectTrainByUserId(SiteSecurityUtils.getUserId());
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单条详情
|
||||
*/
|
||||
@ApiOperation("用户培训经历-单条详情")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id)
|
||||
{
|
||||
return AjaxResult.success(appUserTrainService.selectAppUserTrainById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@ApiOperation("用户培训经历-新增")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppUserTrain appUserTrain)
|
||||
{
|
||||
return toAjax(appUserTrainService.insertAppUserTrain(appUserTrain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@ApiOperation("用户培训经历-修改")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppUserTrain appUserTrain)
|
||||
{
|
||||
return toAjax(appUserTrainService.updateAppUserTrain(appUserTrain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation("用户培训经历-删除")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appUserTrainService.deleteAppUserTrainByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUserEducation;
|
||||
import com.ruoyi.cms.service.IAppUserEducationService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cms/appUserEducation")
|
||||
@Api(tags = "后台:APP用户教育经历")
|
||||
public class CmsAppUserEducationController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IAppUserEducationService appUserEducationService;
|
||||
|
||||
/**
|
||||
* 后台分页列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserEducation:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppUserEducation appUserEducation)
|
||||
{
|
||||
startPage();
|
||||
List<AppUserEducation> list=appUserEducationService.selectAppUserEducationList(appUserEducation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* APP端:根据用户ID查询全部学历经历
|
||||
*/
|
||||
@GetMapping("/getByUserId/{userId}")
|
||||
public AjaxResult getByUserId(@PathVariable Long userId)
|
||||
{
|
||||
List<AppUserEducation> dataList = appUserEducationService.selectEducationByUserId(userId);
|
||||
return AjaxResult.success(dataList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单条详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserEducation:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id)
|
||||
{
|
||||
return AjaxResult.success(appUserEducationService.selectAppUserEducationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学历
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserEducation:add')")
|
||||
@Log(title = "用户学历经历", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppUserEducation appUserEducation)
|
||||
{
|
||||
return toAjax(appUserEducationService.insertAppUserEducation(appUserEducation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学历
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserEducation:edit')")
|
||||
@Log(title = "用户学历经历", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppUserEducation appUserEducation)
|
||||
{
|
||||
return toAjax(appUserEducationService.updateAppUserEducation(appUserEducation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量移出(逻辑删除)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserEducation:remove')")
|
||||
@Log(title = "用户学历经历", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appUserEducationService.deleteAppUserEducationByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUserTrain;
|
||||
import com.ruoyi.cms.service.IAppUserTrainService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cms/appUserTrain")
|
||||
@Api(tags = "后台:APP用户培训经历")
|
||||
public class CmsAppUserTrainController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IAppUserTrainService appUserTrainService;
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserTrain:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppUserTrain appUserTrain)
|
||||
{
|
||||
startPage();
|
||||
List<AppUserTrain> list=appUserTrainService.selectAppUserTrainList(appUserTrain);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID查询全部培训经历(APP简历使用)
|
||||
*/
|
||||
@GetMapping("/getByUserId/{userId}")
|
||||
public AjaxResult getByUserId(@PathVariable Long userId)
|
||||
{
|
||||
List<AppUserTrain> list = appUserTrainService.selectTrainByUserId(userId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单条详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserTrain:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id)
|
||||
{
|
||||
return AjaxResult.success(appUserTrainService.selectAppUserTrainById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserTrain:add')")
|
||||
@Log(title = "用户培训经历", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppUserTrain appUserTrain)
|
||||
{
|
||||
return toAjax(appUserTrainService.insertAppUserTrain(appUserTrain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserTrain:edit')")
|
||||
@Log(title = "用户培训经历", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppUserTrain appUserTrain)
|
||||
{
|
||||
return toAjax(appUserTrainService.updateAppUserTrain(appUserTrain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cms:appUserTrain:remove')")
|
||||
@Log(title = "用户培训经历", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appUserTrainService.deleteAppUserTrainByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.ruoyi.cms.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("APP求职者教育经历表")
|
||||
@TableName("app_user_education")
|
||||
public class AppUserEducation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 求职者用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
@ApiModelProperty("用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 学校名称 */
|
||||
@Excel(name = "学校名称")
|
||||
@ApiModelProperty("学校名称")
|
||||
private String schoolName;
|
||||
|
||||
/** 学历 */
|
||||
@Excel(name = "学历")
|
||||
@ApiModelProperty("学历")
|
||||
private Integer educationLevel;
|
||||
|
||||
/** 专业 */
|
||||
@Excel(name = "专业")
|
||||
@ApiModelProperty("专业")
|
||||
private String major;
|
||||
|
||||
/** 学位 */
|
||||
@Excel(name = "学位 1学士 2硕士 3博士")
|
||||
@ApiModelProperty("学位")
|
||||
private String degree;
|
||||
|
||||
/** 学习形式 1全日制 2自考 3函授 4成人 */
|
||||
@Excel(name = "学习形式")
|
||||
@ApiModelProperty("学习形式")
|
||||
private String studyType;
|
||||
|
||||
/** 入学时间(字符串模糊填写) */
|
||||
@Excel(name = "入学时间")
|
||||
@ApiModelProperty("入学时间")
|
||||
private String startTime;
|
||||
|
||||
/** 毕业时间 */
|
||||
@Excel(name = "毕业时间")
|
||||
@ApiModelProperty("毕业时间")
|
||||
private String endTime;
|
||||
|
||||
/** 在校经历描述 在校经历、获奖、主修课程 */
|
||||
@Excel(name = "在校经历")
|
||||
@ApiModelProperty("在校经历")
|
||||
private String content;
|
||||
|
||||
/** 排序 */
|
||||
@Excel(name = "排序")
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.cms.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
@Data
|
||||
@ApiModel("APP求职者培训经历表")
|
||||
@TableName("app_user_train")
|
||||
public class AppUserTrain extends BaseEntity
|
||||
{
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 求职者用户ID */
|
||||
@Excel(name = "求职者用户ID")
|
||||
@ApiModelProperty("求职者用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 培训机构 */
|
||||
@Excel(name = "培训机构")
|
||||
@ApiModelProperty("培训机构")
|
||||
private String trainOrg;
|
||||
|
||||
/** 培训课程 */
|
||||
@Excel(name = "培训课程")
|
||||
@ApiModelProperty("培训课程")
|
||||
private String trainCourse;
|
||||
|
||||
/** 培训开始时间(字符串自由填写) */
|
||||
@Excel(name = "开始时间")
|
||||
@ApiModelProperty("开始时间")
|
||||
private String startTime;
|
||||
|
||||
/** 培训结束时间 */
|
||||
@Excel(name = "结束时间")
|
||||
@ApiModelProperty("结束时间")
|
||||
private String endTime;
|
||||
|
||||
/** 培训证书 */
|
||||
@Excel(name = "培训证书")
|
||||
@ApiModelProperty("培训证书")
|
||||
private String trainCert;
|
||||
|
||||
/** 培训内容 */
|
||||
@Excel(name = "培训内容")
|
||||
@ApiModelProperty("培训内容")
|
||||
private String trainContent;
|
||||
|
||||
/** 排序 */
|
||||
@Excel(name = "排序")
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.cms.domain.AppUserEducation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* APP用户学历经历Mapper
|
||||
*/
|
||||
public interface AppUserEducationMapper extends BaseMapper<AppUserEducation>
|
||||
{
|
||||
/**
|
||||
* 分页查询学历列表
|
||||
*/
|
||||
List<AppUserEducation> selectAppUserEducationList(AppUserEducation appUserEducation);
|
||||
/**
|
||||
* 根据用户ID查询全部学历(APP简历使用)
|
||||
*/
|
||||
List<AppUserEducation> selectEducationListByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.cms.domain.AppUserTrain;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* APP用户培训经历Mapper
|
||||
*/
|
||||
public interface AppUserTrainMapper extends BaseMapper<AppUserTrain>
|
||||
{
|
||||
/**
|
||||
* 查询培训经历列表
|
||||
*/
|
||||
List<AppUserTrain> selectAppUserTrainList(AppUserTrain appUserTrain);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询全部培训记录
|
||||
*/
|
||||
List<AppUserTrain> selectTrainListByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.cms.service;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUserEducation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IAppUserEducationService
|
||||
{
|
||||
/**
|
||||
* 分页查询学历列表
|
||||
*/
|
||||
List<AppUserEducation> selectAppUserEducationList(AppUserEducation appUserEducation);
|
||||
|
||||
/**
|
||||
* 根据ID查询单条学历
|
||||
*/
|
||||
AppUserEducation selectAppUserEducationById(Long id);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询全部学历经历(APP简历接口)
|
||||
*/
|
||||
List<AppUserEducation> selectEducationByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 新增学历经历
|
||||
*/
|
||||
int insertAppUserEducation(AppUserEducation appUserEducation);
|
||||
|
||||
/**
|
||||
* 修改学历经历
|
||||
*/
|
||||
int updateAppUserEducation(AppUserEducation appUserEducation);
|
||||
|
||||
/**
|
||||
* 批量删除学历
|
||||
*/
|
||||
int deleteAppUserEducationByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.cms.service;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUserTrain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IAppUserTrainService
|
||||
{
|
||||
/**
|
||||
* 分页查询培训经历列表
|
||||
*/
|
||||
List<AppUserTrain> selectAppUserTrainList(AppUserTrain appUserTrain);
|
||||
|
||||
/**
|
||||
* 根据id获取详情
|
||||
*/
|
||||
AppUserTrain selectAppUserTrainById(Long id);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询所有培训记录
|
||||
*/
|
||||
List<AppUserTrain> selectTrainByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 新增培训经历
|
||||
*/
|
||||
int insertAppUserTrain(AppUserTrain appUserTrain);
|
||||
|
||||
/**
|
||||
* 修改培训经历
|
||||
*/
|
||||
int updateAppUserTrain(AppUserTrain appUserTrain);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
int deleteAppUserTrainByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.cms.domain.AppUserEducation;
|
||||
import com.ruoyi.cms.mapper.AppUserEducationMapper;
|
||||
import com.ruoyi.cms.service.IAppUserEducationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class AppUserEducationServiceImpl extends ServiceImpl<AppUserEducationMapper, AppUserEducation> implements IAppUserEducationService
|
||||
{
|
||||
@Resource
|
||||
private AppUserEducationMapper appUserEducationMapper;
|
||||
|
||||
@Override
|
||||
public List<AppUserEducation> selectAppUserEducationList(AppUserEducation appUserEducation)
|
||||
{
|
||||
List<AppUserEducation> list = appUserEducationMapper.selectAppUserEducationList(appUserEducation);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppUserEducation selectAppUserEducationById(Long id)
|
||||
{
|
||||
return appUserEducationMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppUserEducation> selectEducationByUserId(Long userId)
|
||||
{
|
||||
return appUserEducationMapper.selectEducationListByUserId(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertAppUserEducation(AppUserEducation appUserEducation)
|
||||
{
|
||||
return appUserEducationMapper.insert(appUserEducation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateAppUserEducation(AppUserEducation appUserEducation)
|
||||
{
|
||||
return appUserEducationMapper.updateById(appUserEducation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteAppUserEducationByIds(Long[] ids)
|
||||
{
|
||||
return appUserEducationMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.cms.domain.AppUserTrain;
|
||||
import com.ruoyi.cms.mapper.AppUserTrainMapper;
|
||||
import com.ruoyi.cms.service.IAppUserTrainService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class AppUserTrainServiceImpl extends ServiceImpl<AppUserTrainMapper, AppUserTrain> implements IAppUserTrainService
|
||||
{
|
||||
@Resource
|
||||
private AppUserTrainMapper appUserTrainMapper;
|
||||
|
||||
@Override
|
||||
public List<AppUserTrain> selectAppUserTrainList(AppUserTrain appUserTrain)
|
||||
{
|
||||
List<AppUserTrain> list = appUserTrainMapper.selectAppUserTrainList(appUserTrain);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppUserTrain selectAppUserTrainById(Long id)
|
||||
{
|
||||
return appUserTrainMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppUserTrain> selectTrainByUserId(Long userId)
|
||||
{
|
||||
return appUserTrainMapper.selectTrainListByUserId(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertAppUserTrain(AppUserTrain appUserTrain)
|
||||
{
|
||||
return appUserTrainMapper.insert(appUserTrain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateAppUserTrain(AppUserTrain appUserTrain)
|
||||
{
|
||||
return appUserTrainMapper.updateById(appUserTrain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteAppUserTrainByIds(Long[] ids)
|
||||
{
|
||||
return appUserTrainMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ruoyi.cms.mapper.AppUserEducationMapper">
|
||||
|
||||
<resultMap type="AppUserEducation" id="AppUserEducationResult">
|
||||
<id column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="school_name" property="schoolName"/>
|
||||
<result column="education_level" property="educationLevel"/>
|
||||
<result column="major" property="major"/>
|
||||
<result column="degree" property="degree"/>
|
||||
<result column="study_type" property="studyType"/>
|
||||
<result column="start_time" property="startTime"/>
|
||||
<result column="end_time" property="endTime"/>
|
||||
<result column="content" property="content"/>
|
||||
<result column="sort" property="sort"/>
|
||||
<result column="del_flag" property="delFlag"/>
|
||||
<result column="create_by" property="createBy"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_by" property="updateBy"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppUserEducationVo">
|
||||
select id, user_id, school_name, education_level, major, degree, study_type,
|
||||
start_time, end_time, content, sort, del_flag, create_by, create_time, update_by, update_time
|
||||
from app_user_education
|
||||
</sql>
|
||||
|
||||
<select id="selectAppUserEducationList" resultMap="AppUserEducationResult">
|
||||
<include refid="selectAppUserEducationVo"/>
|
||||
<where>
|
||||
del_flag = '0'
|
||||
<if test="userId != null">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="schoolName != null and schoolName != ''">
|
||||
and school_name like concat('%',#{schoolName},'%')
|
||||
</if>
|
||||
<if test="educationLevel != null">
|
||||
and education_level = #{educationLevel}
|
||||
</if>
|
||||
</where>
|
||||
order by sort asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectEducationListByUserId" resultMap="AppUserEducationResult">
|
||||
<include refid="selectAppUserEducationVo"/>
|
||||
where user_id = #{userId} and del_flag = '0'
|
||||
order by sort asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ruoyi.cms.mapper.AppUserTrainMapper">
|
||||
<resultMap type="AppUserTrain" id="AppUserTrainResult">
|
||||
<id column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="train_org" property="trainOrg"/>
|
||||
<result column="train_course" property="trainCourse"/>
|
||||
<result column="start_time" property="startTime"/>
|
||||
<result column="end_time" property="endTime"/>
|
||||
<result column="train_cert" property="trainCert"/>
|
||||
<result column="train_content" property="trainContent"/>
|
||||
<result column="sort" property="sort"/>
|
||||
<result column="del_flag" property="delFlag"/>
|
||||
<result column="create_by" property="createBy"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_by" property="updateBy"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppUserTrainVo">
|
||||
select id, user_id, train_org, train_course, start_time, end_time, train_cert,
|
||||
train_content, sort, del_flag, create_by, create_time, update_by, update_time
|
||||
from app_user_train
|
||||
</sql>
|
||||
|
||||
<select id="selectAppUserTrainList" resultMap="AppUserTrainResult">
|
||||
<include refid="selectAppUserTrainVo"/>
|
||||
<where>
|
||||
del_flag = '0'
|
||||
<if test="userId != null">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="trainOrg != null and trainOrg != ''">
|
||||
and train_org like concat('%',#{trainOrg},'%')
|
||||
</if>
|
||||
<if test="trainCourse != null and trainCourse != ''">
|
||||
and train_course like concat('%',#{trainCourse},'%')
|
||||
</if>
|
||||
</where>
|
||||
order by sort asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectTrainListByUserId" resultMap="AppUserTrainResult">
|
||||
<include refid="selectAppUserTrainVo"/>
|
||||
where user_id = #{userId} and del_flag = '0'
|
||||
order by sort asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user