|
@@ -0,0 +1,64 @@
|
|
|
+package com.fjhx.oa.service.education.impl;
|
|
|
+
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fjhx.oa.entity.education.dto.EducationConfigDto;
|
|
|
+import com.fjhx.oa.entity.education.dto.EducationConfigSelectDto;
|
|
|
+import com.fjhx.oa.entity.education.po.EducationConfig;
|
|
|
+import com.fjhx.oa.entity.education.vo.EducationConfigVo;
|
|
|
+import com.fjhx.oa.mapper.education.EducationConfigMapper;
|
|
|
+import com.fjhx.oa.service.education.EducationConfigService;
|
|
|
+import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
+import com.ruoyi.common.utils.wrapper.SqlField;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ * <p>
|
|
|
+ * 学历补贴配置 服务实现类
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author
|
|
|
+ * @since 2024-04-08
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class EducationConfigServiceImpl extends ServiceImpl<EducationConfigMapper, EducationConfig> implements EducationConfigService {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<EducationConfigVo> getPage(EducationConfigSelectDto dto) {
|
|
|
+ IWrapper<EducationConfig> wrapper = getWrapper();
|
|
|
+
|
|
|
+ wrapper.keyword(dto.getKeyword(),
|
|
|
+ new SqlField("ec", EducationConfig::getName),
|
|
|
+ new SqlField("ec", EducationConfig::getAmount)
|
|
|
+ );
|
|
|
+
|
|
|
+ wrapper.orderByDesc("ec", EducationConfig::getId);
|
|
|
+ Page<EducationConfigVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public EducationConfigVo detail(Long id) {
|
|
|
+ EducationConfig EducationConfig = this.getById(id);
|
|
|
+ EducationConfigVo result = BeanUtil.toBean(EducationConfig, EducationConfigVo.class);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void add(EducationConfigDto educationConfigDto) {
|
|
|
+ this.save(educationConfigDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void edit(EducationConfigDto educationConfigDto) {
|
|
|
+ this.updateById(educationConfigDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void delete(Long id) {
|
|
|
+ this.removeById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|