From e374a9dc5606b8a1fcba1ca3265de261d963194f Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Sat, 15 May 2021 18:53:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/com/tenlion/pojo/pos/apply/ApplyPO.java | 2 -- .../com/tenlion/service/apply/IApplyService.java | 2 +- .../service/apply/impl/ApplyServiceImpl.java | 5 ++--- .../impl/ApplyStudentsServiceImpl.java | 12 +++++++----- .../mybatis/mapper/apply/apply-mapper.xml | 16 ++++++++++++++++ 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/main/java/cn/com/tenlion/pojo/pos/apply/ApplyPO.java b/src/main/java/cn/com/tenlion/pojo/pos/apply/ApplyPO.java index f131644..05dc993 100644 --- a/src/main/java/cn/com/tenlion/pojo/pos/apply/ApplyPO.java +++ b/src/main/java/cn/com/tenlion/pojo/pos/apply/ApplyPO.java @@ -29,11 +29,9 @@ public class ApplyPO { private String applyUnitPhone; private String applyUnitAddress; private String applyUserCardPhoto; - private String applyPosition; private String applyMajorYear; private String applyTechnicalTitles; - private Integer applyAuditState; private String creator; private String gmtCreate; diff --git a/src/main/java/cn/com/tenlion/service/apply/IApplyService.java b/src/main/java/cn/com/tenlion/service/apply/IApplyService.java index 0cd0766..7ea6e10 100644 --- a/src/main/java/cn/com/tenlion/service/apply/IApplyService.java +++ b/src/main/java/cn/com/tenlion/service/apply/IApplyService.java @@ -35,7 +35,7 @@ public interface IApplyService { * @param workTypeId * @return */ - List listByInstitutionIdAndWorkTypeId(String institutionId,String workTypeId); + List listByInstitutionIdAndWorkTypeId(String institutionId,String workTypeId); /** * 工种培训机构分页列表 diff --git a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java index 08fa4cd..9e9d7a0 100644 --- a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java @@ -123,14 +123,14 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic - public List listByInstitutionIdAndWorkTypeId(String institutionId,String workTypeId){ + public List listByInstitutionIdAndWorkTypeId(String institutionId,String workTypeId){ Map params = new HashMap<>(); params.put("applyInstitutionId",institutionId); params.put("applyWorkTypeId",workTypeId); List applyAuditStates = new ArrayList<>(); applyAuditStates.add(2); params.put("applyAuditStates",applyAuditStates); - return this.list(params); + return this.listPO(params); } @@ -311,7 +311,6 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic auditLogVO.setApplyAuditState(0); auditLogVO.setApplyAuditExplain("用户申请报名"); applyAuditLogService.save(token,auditLogVO); - return applyId; } diff --git a/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java b/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java index 869273f..80439cb 100644 --- a/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java @@ -1,6 +1,7 @@ package cn.com.tenlion.service.applystudents.impl; import cn.com.tenlion.pojo.dtos.apply.ApplyDTO; +import cn.com.tenlion.pojo.pos.apply.ApplyPO; import cn.com.tenlion.service.apply.IApplyService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.ParamsException; @@ -58,13 +59,14 @@ public class ApplyStudentsServiceImpl extends DefaultBaseService implements IApp throw new ParamsException("参数错误"); } List deleteIdList = new ArrayList<>(); - List applyDTOList = applyService.listByInstitutionIdAndWorkTypeId(institutionId,workTypeId); - for (ApplyDTO applyDTO : applyDTOList) { + List applyPOList = applyService.listByInstitutionIdAndWorkTypeId(institutionId,workTypeId); + for (ApplyPO applyPO : applyPOList) { ApplyStudentsVO vo = new ApplyStudentsVO(); - BeanUtils.copyProperties(vo,applyDTO); + BeanUtils.copyProperties(vo,applyPO); vo.setApplyClassId(classId); - this.save(vo); - deleteIdList.add(applyDTO.getApplyId()); + Map params = HashMapUtil.beanToMap(vo); + applyStudentsDao.save(params);; + deleteIdList.add(applyPO.getApplyId()); } applyService.delete(deleteIdList); } diff --git a/src/main/resources/mybatis/mapper/apply/apply-mapper.xml b/src/main/resources/mybatis/mapper/apply/apply-mapper.xml index 0cff122..deba6a8 100644 --- a/src/main/resources/mybatis/mapper/apply/apply-mapper.xml +++ b/src/main/resources/mybatis/mapper/apply/apply-mapper.xml @@ -618,6 +618,22 @@ #{applyIds[${index}]} + + AND + t1.apply_institution_id = #{applyInstitutionId} + + + AND + t1.apply_work_type_id = #{applyWorkTypeId} + + + AND + t1.apply_audit_state IN + + #{applyAuditStates[${index}]} + + + ORDER BY t1.gmt_create DESC