diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/HealthController.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/HealthController.java index 5795ca8..c1798ca 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/HealthController.java +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/HealthController.java @@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.zhyc.common.utils.SecurityUtils; import com.zhyc.module.biosafety.service.IHealthService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; @@ -97,7 +98,7 @@ public class HealthController extends BaseController */ @PreAuthorize("@ss.hasPermi('biosafety:health:remove')") @Log(title = "保健", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") + @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(healthService.deleteHealthByIds(ids)); diff --git a/zhyc-module/src/main/java/com/zhyc/module/common/controller/UserController.java b/zhyc-module/src/main/java/com/zhyc/module/common/controller/UserController.java new file mode 100644 index 0000000..988f4a5 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/common/controller/UserController.java @@ -0,0 +1,27 @@ +package com.zhyc.module.common.controller; + +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.module.common.domain.UserPost; + +import com.zhyc.module.common.service.UserPostService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +//人员用户 +@RestController +@RequestMapping("/user") +public class UserController { + @Autowired + UserPostService userPostService; + + @GetMapping() + public AjaxResult getUserPost(String postCode){ + List list = userPostService.getUserPostListByCode(postCode); + return AjaxResult.success(list); + } + +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/common/domain/UserPost.java b/zhyc-module/src/main/java/com/zhyc/module/common/domain/UserPost.java new file mode 100644 index 0000000..9160779 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/common/domain/UserPost.java @@ -0,0 +1,14 @@ +package com.zhyc.module.common.domain; + +import lombok.Data; + +@Data +public class UserPost { +// 用户名 + private String nickName; +// 用户 + private String postName; +// 岗位编码 + private String postCode; + +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/common/mapper/UserPostMapper.java b/zhyc-module/src/main/java/com/zhyc/module/common/mapper/UserPostMapper.java new file mode 100644 index 0000000..69c9b9d --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/common/mapper/UserPostMapper.java @@ -0,0 +1,12 @@ +package com.zhyc.module.common.mapper; + +import com.zhyc.module.common.domain.UserPost; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface UserPostMapper { + + List getUserPostListByCode(String postCode); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/common/service/UserPostService.java b/zhyc-module/src/main/java/com/zhyc/module/common/service/UserPostService.java new file mode 100644 index 0000000..0f0204c --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/common/service/UserPostService.java @@ -0,0 +1,9 @@ +package com.zhyc.module.common.service; + +import com.zhyc.module.common.domain.UserPost; + +import java.util.List; + +public interface UserPostService { + List getUserPostListByCode(String postCode); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/common/service/impl/UserPostServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/common/service/impl/UserPostServiceImpl.java new file mode 100644 index 0000000..31dc447 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/common/service/impl/UserPostServiceImpl.java @@ -0,0 +1,19 @@ +package com.zhyc.module.common.service.impl; + +import com.zhyc.module.common.domain.UserPost; +import com.zhyc.module.common.mapper.UserPostMapper; +import com.zhyc.module.common.service.UserPostService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class UserPostServiceImpl implements UserPostService { + @Autowired + UserPostMapper userPostMapper; + @Override + public List getUserPostListByCode(String postCode) { + return userPostMapper.getUserPostListByCode(postCode); + } +} diff --git a/zhyc-module/src/main/resources/mapper/common/UserPostMapper.xml b/zhyc-module/src/main/resources/mapper/common/UserPostMapper.xml new file mode 100644 index 0000000..cec16d8 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/common/UserPostMapper.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/Sperm/RawSpermRecordMapper.xml b/zhyc-module/src/main/resources/mapper/produce/breed/RawSpermRecordMapper.xml similarity index 100% rename from zhyc-module/src/main/resources/mapper/Sperm/RawSpermRecordMapper.xml rename to zhyc-module/src/main/resources/mapper/produce/breed/RawSpermRecordMapper.xml diff --git a/zhyc-module/src/main/resources/mapper/Breeding_records/ScBreedRecordMapper.xml b/zhyc-module/src/main/resources/mapper/produce/breed/ScBreedRecordMapper.xml similarity index 100% rename from zhyc-module/src/main/resources/mapper/Breeding_records/ScBreedRecordMapper.xml rename to zhyc-module/src/main/resources/mapper/produce/breed/ScBreedRecordMapper.xml diff --git a/zhyc-module/src/main/resources/mapper/sheep_death/ScSheepDeathMapper.xml b/zhyc-module/src/main/resources/mapper/produce/breed/ScSheepDeathMapper.xml similarity index 100% rename from zhyc-module/src/main/resources/mapper/sheep_death/ScSheepDeathMapper.xml rename to zhyc-module/src/main/resources/mapper/produce/breed/ScSheepDeathMapper.xml