优化
This commit is contained in:
@ -0,0 +1,70 @@
|
||||
package com.ruoyi.common.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 企业认证分页查询对象 common_company
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("企业认证分页查询对象")
|
||||
public class CompanyQueryBo extends BaseEntity {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
/** 排序列 */
|
||||
@ApiModelProperty("排序列")
|
||||
private String orderByColumn;
|
||||
/** 排序的方向desc或者asc */
|
||||
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||
private String isAsc;
|
||||
|
||||
|
||||
/** 企业名称 */
|
||||
@ApiModelProperty("企业名称")
|
||||
private String companyName;
|
||||
/** 统一社会信用代码 */
|
||||
@ApiModelProperty("统一社会信用代码")
|
||||
private String creditCode;
|
||||
/** 营业执照 */
|
||||
@ApiModelProperty("营业执照")
|
||||
private String licenseImg;
|
||||
/** 法人 */
|
||||
@ApiModelProperty("法人")
|
||||
private String corporation;
|
||||
/** 成立日期 */
|
||||
@ApiModelProperty("成立日期")
|
||||
private LocalDate establishmentDate;
|
||||
/** 注册资本 */
|
||||
@ApiModelProperty("注册资本")
|
||||
private BigDecimal registrationAmount;
|
||||
/** 企业简介 */
|
||||
@ApiModelProperty("企业简介")
|
||||
private String introduce;
|
||||
/** 项目经验 */
|
||||
@ApiModelProperty("项目经验")
|
||||
private String experience;
|
||||
/** 员工数量 */
|
||||
@ApiModelProperty("员工数量")
|
||||
private Integer employeeNum;
|
||||
/** 资质与荣誉 */
|
||||
@ApiModelProperty("资质与荣誉")
|
||||
private String url;
|
||||
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
package com.ruoyi.common.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ruoyi.common.domain.Company;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.bo.CompanyQueryBo;
|
||||
import com.ruoyi.common.service.ICompanyService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* 企业认证Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Api(value = "企业认证控制器", tags = {"企业认证管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/common/company")
|
||||
public class CompanyController extends BaseController {
|
||||
|
||||
private final ICompanyService iCommonCompanyService;
|
||||
|
||||
/**
|
||||
* 查询企业认证列表
|
||||
*/
|
||||
@ApiOperation("查询企业认证列表")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<Company> list(@Validated CompanyQueryBo bo) {
|
||||
return iCommonCompanyService.queryPageList(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出企业认证列表
|
||||
*/
|
||||
@ApiOperation("导出企业认证列表")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:export')")
|
||||
@Log(title = "企业认证", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult<Company> export(@Validated CompanyQueryBo bo) {
|
||||
List<Company> list = iCommonCompanyService.queryList(bo);
|
||||
ExcelUtil<Company> util = new ExcelUtil<Company>(Company.class);
|
||||
return util.exportExcel(list, "企业认证");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取企业认证详细信息
|
||||
*/
|
||||
@ApiOperation("获取企业认证详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<Company> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iCommonCompanyService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增企业认证
|
||||
*/
|
||||
@ApiOperation("新增企业认证")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:add')")
|
||||
@Log(title = "企业认证", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping()
|
||||
public AjaxResult<Void> add(@Validated @RequestBody Company bo) {
|
||||
return toAjax(iCommonCompanyService.insert(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业认证
|
||||
*/
|
||||
@ApiOperation("修改企业认证")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:edit')")
|
||||
@Log(title = "企业认证", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping()
|
||||
public AjaxResult<Void> edit(@Validated @RequestBody Company bo) {
|
||||
return toAjax(iCommonCompanyService.update(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除企业认证
|
||||
*/
|
||||
@ApiOperation("删除企业认证")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:remove')")
|
||||
@Log(title = "企业认证" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iCommonCompanyService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@ -44,6 +44,9 @@ public class Annex implements Serializable {
|
||||
@ApiModelProperty("招工任务ID")
|
||||
private Long recruitId;
|
||||
|
||||
@ApiModelProperty("招工任务申请Id")
|
||||
private Long recruitApplyId;
|
||||
|
||||
/** 附件类型 */
|
||||
@Excel(name = "附件类型")
|
||||
@ApiModelProperty("附件类型")
|
||||
|
||||
@ -49,6 +49,9 @@ public class AnnexRecord implements Serializable {
|
||||
@ApiModelProperty("招工任务ID")
|
||||
private Long recruitId;
|
||||
|
||||
@ApiModelProperty("招工任务申请Id")
|
||||
private Long recruitApplyId;
|
||||
|
||||
/** 附件类型 */
|
||||
@Excel(name = "附件类型")
|
||||
@ApiModelProperty("附件类型")
|
||||
|
||||
123
ruoyi-system/src/main/java/com/ruoyi/common/domain/Company.java
Normal file
123
ruoyi-system/src/main/java/com/ruoyi/common/domain/Company.java
Normal file
@ -0,0 +1,123 @@
|
||||
package com.ruoyi.common.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 企业认证对象 common_company
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("common_company")
|
||||
@ApiModel("企业认证视图对象")
|
||||
public class Company implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 企业名称 */
|
||||
@Excel(name = "企业名称")
|
||||
@ApiModelProperty("企业名称")
|
||||
private String companyName;
|
||||
|
||||
/** 统一社会信用代码 */
|
||||
@Excel(name = "统一社会信用代码")
|
||||
@ApiModelProperty("统一社会信用代码")
|
||||
private String creditCode;
|
||||
|
||||
/** 营业执照 */
|
||||
@Excel(name = "营业执照")
|
||||
@ApiModelProperty("营业执照")
|
||||
private String licenseImg;
|
||||
|
||||
/** 法人 */
|
||||
@Excel(name = "法人")
|
||||
@ApiModelProperty("法人")
|
||||
private String corporation;
|
||||
|
||||
/** 成立日期 */
|
||||
@Excel(name = "成立日期")
|
||||
@ApiModelProperty("成立日期")
|
||||
private LocalDate establishmentDate;
|
||||
|
||||
/** 注册资本 */
|
||||
@Excel(name = "注册资本")
|
||||
@ApiModelProperty("注册资本")
|
||||
private BigDecimal registrationAmount;
|
||||
|
||||
/** 企业简介 */
|
||||
@Excel(name = "企业简介")
|
||||
@ApiModelProperty("企业简介")
|
||||
private String introduce;
|
||||
|
||||
/** 项目经验 */
|
||||
@Excel(name = "项目经验")
|
||||
@ApiModelProperty("项目经验")
|
||||
private String experience;
|
||||
|
||||
/** 员工数量 */
|
||||
@Excel(name = "员工数量")
|
||||
@ApiModelProperty("员工数量")
|
||||
private Integer employeeNum;
|
||||
|
||||
/** 资质与荣誉 */
|
||||
@Excel(name = "资质与荣誉")
|
||||
@ApiModelProperty("资质与荣誉")
|
||||
private String url;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
/** 创建者 */
|
||||
@Excel(name = "创建者")
|
||||
@ApiModelProperty("创建者")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/** 更新者 */
|
||||
@Excel(name = "更新者")
|
||||
@ApiModelProperty("更新者")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@Excel(name = "更新时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package com.ruoyi.common.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 企业认证
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel("企业认证")
|
||||
public class CompanyAuthenticateDTO {
|
||||
|
||||
@ApiModelProperty("企业名称")
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty("统一社会信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@ApiModelProperty("营业执照")
|
||||
private String licenseImg;
|
||||
|
||||
@ApiModelProperty("法人")
|
||||
private String corporation;
|
||||
|
||||
@ApiModelProperty("成立日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate establishmentDate;
|
||||
|
||||
@ApiModelProperty("注册资本")
|
||||
private BigDecimal registrationAmount;
|
||||
|
||||
@ApiModelProperty("企业简介")
|
||||
private String introduce;
|
||||
|
||||
@ApiModelProperty("项目经验")
|
||||
private String experience;
|
||||
|
||||
@ApiModelProperty("员工数量")
|
||||
private Integer employeeNum;
|
||||
|
||||
@ApiModelProperty("资质与荣誉")
|
||||
private String url;
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.common.mapper;
|
||||
|
||||
import com.ruoyi.common.domain.Company;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import org.apache.ibatis.annotations.CacheNamespace;
|
||||
|
||||
/**
|
||||
* 企业认证Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
|
||||
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||
public interface CommonCompanyMapper extends BaseMapperPlus<Company> {
|
||||
|
||||
}
|
||||
@ -82,9 +82,9 @@ public interface IAnnexService extends IServicePlus<Annex> {
|
||||
List<Annex> findByUserIdAndRecruitId(Long userId,Long recruitId,String[] types);
|
||||
|
||||
/**
|
||||
* 根据务工者唯一标识+招工标识+附件类型 删除文件
|
||||
* 根据务工者唯一标识+招工标识+附件类型+招工ID 删除文件
|
||||
*/
|
||||
void deleteByUserIdAndRecruitIdAndType(List<Long> userIds,Long recruitId,String type);
|
||||
void deleteByUserIdAndRecruitIdAndType(List<Long> userIds,Long recruitId,String type,List<Long> recruitApplyIds);
|
||||
|
||||
/**
|
||||
* 检查入场材料
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
package com.ruoyi.common.service;
|
||||
|
||||
import com.ruoyi.common.domain.Company;
|
||||
import com.ruoyi.common.bo.CompanyQueryBo;
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业认证Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
public interface ICompanyService extends IServicePlus<Company> {
|
||||
/**
|
||||
* 查询单个
|
||||
* @return
|
||||
*/
|
||||
Company queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
TableDataInfo<Company> queryPageList(CompanyQueryBo bo);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<Company> queryList(CompanyQueryBo bo);
|
||||
|
||||
/**
|
||||
* 根据新增业务对象插入企业认证
|
||||
* @param bo 企业认证新增业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean insert(Company bo);
|
||||
|
||||
/**
|
||||
* 根据编辑业务对象修改企业认证
|
||||
* @param bo 企业认证编辑业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean update(Company bo);
|
||||
|
||||
/**
|
||||
* 校验并删除数据
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -158,9 +158,10 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByUserIdAndRecruitIdAndType(List<Long> userIds, Long recruitId, String type) {
|
||||
public void deleteByUserIdAndRecruitIdAndType(List<Long> userIds, Long recruitId, String type,List<Long> recruitApplyIds) {
|
||||
baseMapper.delete(Wrappers.<Annex>lambdaUpdate().in(Annex::getUserId,userIds)
|
||||
.eq(Annex::getRecruitId,recruitId).eq(Annex::getAnnexType,type).eq(Annex::getUserType,WGZ));
|
||||
.eq(Annex::getRecruitId,recruitId).eq(Annex::getAnnexType,type).eq(Annex::getUserType,WGZ)
|
||||
.in(Annex::getRecruitApplyId,recruitApplyIds));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -0,0 +1,92 @@
|
||||
package com.ruoyi.common.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.common.bo.CompanyQueryBo;
|
||||
import com.ruoyi.common.domain.Company;
|
||||
import com.ruoyi.common.mapper.CommonCompanyMapper;
|
||||
import com.ruoyi.common.service.ICompanyService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 企业认证Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Service
|
||||
public class CompanyServiceImpl extends ServicePlusImpl<CommonCompanyMapper, Company> implements ICompanyService {
|
||||
|
||||
@Override
|
||||
public Company queryById(Long id){
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<Company> queryPageList(CompanyQueryBo bo) {
|
||||
Page<Company> result = page(PageUtils.buildPage(), buildQueryWrapper(bo));
|
||||
return PageUtils.buildDataInfo(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Company> queryList(CompanyQueryBo bo) {
|
||||
return list(buildQueryWrapper(bo));
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<Company> buildQueryWrapper(CompanyQueryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<Company> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StrUtil.isNotBlank(bo.getCompanyName()), Company::getCompanyName, bo.getCompanyName());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getCreditCode()), Company::getCreditCode, bo.getCreditCode());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getLicenseImg()), Company::getLicenseImg, bo.getLicenseImg());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getCorporation()), Company::getCorporation, bo.getCorporation());
|
||||
lqw.eq(bo.getEstablishmentDate() != null, Company::getEstablishmentDate, bo.getEstablishmentDate());
|
||||
lqw.eq(bo.getRegistrationAmount() != null, Company::getRegistrationAmount, bo.getRegistrationAmount());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getIntroduce()), Company::getIntroduce, bo.getIntroduce());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getExperience()), Company::getExperience, bo.getExperience());
|
||||
lqw.eq(bo.getEmployeeNum() != null, Company::getEmployeeNum, bo.getEmployeeNum());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getUrl()), Company::getUrl, bo.getUrl());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insert(Company bo) {
|
||||
Company add = BeanUtil.toBean(bo, Company.class);
|
||||
validEntityBeforeSave(add);
|
||||
return save(add);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean update(Company bo) {
|
||||
Company update = BeanUtil.toBean(bo, Company.class);
|
||||
validEntityBeforeSave(update);
|
||||
return updateById(update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*
|
||||
* @param entity 实体类数据
|
||||
*/
|
||||
private void validEntityBeforeSave(Company entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user