From cbd10c575f1a7a33292d06076a9863edfb26ae03 Mon Sep 17 00:00:00 2001 From: HH Date: Tue, 7 Jun 2022 17:39:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E6=8A=80=E8=83=BD=E3=80=81?= =?UTF-8?q?=E5=B8=88=E5=82=85=E7=89=B9=E6=AE=8A=E6=8A=80=E8=83=BD=20?= =?UTF-8?q?=E8=A1=A8=E4=B8=8Emapper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ghy/worker/domain/SpecialSkill.java | 34 ++++++++++ .../ghy/worker/domain/WorkerSpecialSkill.java | 39 +++++++++++ .../ghy/worker/mapper/SpecialSkillMapper.java | 17 +++++ .../mapper/WorkerSpecialSkillMapper.java | 21 ++++++ .../mapper/worker/SpecialSkillMapper.xml | 53 +++++++++++++++ .../worker/WorkerSpecialSkillMapper.xml | 64 +++++++++++++++++++ 6 files changed, 228 insertions(+) create mode 100644 ghy-worker/src/main/java/com/ghy/worker/domain/SpecialSkill.java create mode 100644 ghy-worker/src/main/java/com/ghy/worker/domain/WorkerSpecialSkill.java create mode 100644 ghy-worker/src/main/java/com/ghy/worker/mapper/SpecialSkillMapper.java create mode 100644 ghy-worker/src/main/java/com/ghy/worker/mapper/WorkerSpecialSkillMapper.java create mode 100644 ghy-worker/src/main/resources/mapper/worker/SpecialSkillMapper.xml create mode 100644 ghy-worker/src/main/resources/mapper/worker/WorkerSpecialSkillMapper.xml diff --git a/ghy-worker/src/main/java/com/ghy/worker/domain/SpecialSkill.java b/ghy-worker/src/main/java/com/ghy/worker/domain/SpecialSkill.java new file mode 100644 index 00000000..51b3b5d8 --- /dev/null +++ b/ghy-worker/src/main/java/com/ghy/worker/domain/SpecialSkill.java @@ -0,0 +1,34 @@ +package com.ghy.worker.domain; + +import com.ghy.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * 特殊技能 + * + * @author HH 2022/6/7 + */ +@Data +public class SpecialSkill extends BaseEntity { + + /** + * 主键 + */ + private Long specialSkillId; + + /** + * 特殊技能名称 + */ + private String specialSkillName; + + /** + * 关联第三级商品类目主键 + */ + private Long goodsCategoryId; + + /** + * 是否危险 + */ + private Integer dangerous; + +} diff --git a/ghy-worker/src/main/java/com/ghy/worker/domain/WorkerSpecialSkill.java b/ghy-worker/src/main/java/com/ghy/worker/domain/WorkerSpecialSkill.java new file mode 100644 index 00000000..c803dd16 --- /dev/null +++ b/ghy-worker/src/main/java/com/ghy/worker/domain/WorkerSpecialSkill.java @@ -0,0 +1,39 @@ +package com.ghy.worker.domain; + +import com.ghy.common.core.domain.BaseEntity; +import lombok.Data; + +import java.time.LocalDate; + +@Data +public class WorkerSpecialSkill extends BaseEntity { + + /** + * 主键 + */ + private Long workerSpecialSkillId; + /** + * 师傅ID + */ + private Long workerId; + /** + * 特殊技能ID + */ + private Long specialSkillId; + /** + * 技能证书 + */ + private String credential; + /** + * 保险 + */ + private String insurance; + /** + * 保险生效日期 + */ + private LocalDate insuranceStart; + /** + * 保险截止日期 + */ + private LocalDate insuranceEnd; +} diff --git a/ghy-worker/src/main/java/com/ghy/worker/mapper/SpecialSkillMapper.java b/ghy-worker/src/main/java/com/ghy/worker/mapper/SpecialSkillMapper.java new file mode 100644 index 00000000..25260333 --- /dev/null +++ b/ghy-worker/src/main/java/com/ghy/worker/mapper/SpecialSkillMapper.java @@ -0,0 +1,17 @@ +package com.ghy.worker.mapper; + +import com.ghy.worker.domain.SpecialSkill; + +/** + * 特殊技能Mapper + * + * @author HH 2022/6/7 + */ +public interface SpecialSkillMapper { + + int insert(SpecialSkill specialSkill); + + int delete(Long[] ids); + + int update(SpecialSkill specialSkill); +} diff --git a/ghy-worker/src/main/java/com/ghy/worker/mapper/WorkerSpecialSkillMapper.java b/ghy-worker/src/main/java/com/ghy/worker/mapper/WorkerSpecialSkillMapper.java new file mode 100644 index 00000000..90ac3621 --- /dev/null +++ b/ghy-worker/src/main/java/com/ghy/worker/mapper/WorkerSpecialSkillMapper.java @@ -0,0 +1,21 @@ +package com.ghy.worker.mapper; + +import com.ghy.worker.domain.WorkerArea; + +import java.util.List; + +/** + * 师傅特殊技能Mapper + * + * @author HH 2022/6/7 + */ +public interface WorkerSpecialSkillMapper { + + int insert(WorkerArea workerArea); + + int delete(Long[] ids); + + int deleteByWorker(Long workerId); + + List getByWorker(Long workerId); +} diff --git a/ghy-worker/src/main/resources/mapper/worker/SpecialSkillMapper.xml b/ghy-worker/src/main/resources/mapper/worker/SpecialSkillMapper.xml new file mode 100644 index 00000000..6db4f5e8 --- /dev/null +++ b/ghy-worker/src/main/resources/mapper/worker/SpecialSkillMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + INSERT INTO special_skill( + special_skill_name, + goods_category_id, + dangerous, + create_by, + remark, + create_time + )VALUES( + #{specialSkillName}, + #{provinceId}, + #{dangerous}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + UPDATE special_skill + + special_skill_name = #{specialSkillName}, + goods_category_id = #{provinceId}, + dangerous = #{dangerous}, + remark = #{remark}, + create_time = sysdate() + + + + + DELETE FROM special_skill WHERE special_skill_id IN + + #{id} + + + + diff --git a/ghy-worker/src/main/resources/mapper/worker/WorkerSpecialSkillMapper.xml b/ghy-worker/src/main/resources/mapper/worker/WorkerSpecialSkillMapper.xml new file mode 100644 index 00000000..2fdfac2d --- /dev/null +++ b/ghy-worker/src/main/resources/mapper/worker/WorkerSpecialSkillMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + INSERT INTO worker_special_skill( + worker_id, + special_skill_id, + credential, + insurance, + insurance_start, + insurance_end, + create_by, + remark, + create_time + )VALUES( + #{workerId}, + #{specialSkillId}, + #{credential}, + #{insurance}, + #{insuranceStart}, + #{insuranceEnd}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + + + DELETE + FROM worker_special_skill + WHERE worker_id = #{workerId} + + + + DELETE FROM worker_special_skill WHERE worker_special_skill_id IN + + #{id} + + + +