user
This commit is contained in:
116
.gitignore
vendored
Normal file
116
.gitignore
vendored
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
# ---> Java
|
||||||
|
# Compiled class file
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# Log file
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# BlueJ files
|
||||||
|
*.ctxt
|
||||||
|
|
||||||
|
# Mobile Tools for Java (J2ME)
|
||||||
|
.mtj.tmp/
|
||||||
|
|
||||||
|
# Package Files #
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.nar
|
||||||
|
*.ear
|
||||||
|
*.zip
|
||||||
|
*.tar.gz
|
||||||
|
*.rar
|
||||||
|
|
||||||
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
|
hs_err_pid*
|
||||||
|
|
||||||
|
# ---> Maven
|
||||||
|
target/
|
||||||
|
pom.xml.tag
|
||||||
|
pom.xml.releaseBackup
|
||||||
|
pom.xml.versionsBackup
|
||||||
|
pom.xml.next
|
||||||
|
release.properties
|
||||||
|
dependency-reduced-pom.xml
|
||||||
|
buildNumber.properties
|
||||||
|
.mvn/timing.properties
|
||||||
|
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
|
|
||||||
|
# ---> JetBrains
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# AWS User-specific
|
||||||
|
.idea/**/aws.xml
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
|
# auto-import.
|
||||||
|
# .idea/artifacts
|
||||||
|
# .idea/compiler.xml
|
||||||
|
# .idea/jarRepositories.xml
|
||||||
|
# .idea/modules.xml
|
||||||
|
# .idea/*.iml
|
||||||
|
# .idea/modules
|
||||||
|
# *.iml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file
|
||||||
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
|
**/.idea/
|
||||||
|
**/logs/
|
||||||
132
src/main/java/com/yxt/user/apiadmin/SysPostRest.java
Normal file
132
src/main/java/com/yxt/user/apiadmin/SysPostRest.java
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
package com.yxt.user.apiadmin;
|
||||||
|
|
||||||
|
import com.yxt.user.biz.syspost.*;
|
||||||
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
|
import com.yxt.user.biz.syspost.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: anrui_portal(门户建设) <br/>
|
||||||
|
* File: SysPostFeignFallback.java <br/>
|
||||||
|
* Class: com.yxt.anrui.portal.biz.syspost.SysPostRest <br/>
|
||||||
|
* Description: 岗位. <br/>
|
||||||
|
* Copyright: Copyright (c) 2011 <br/>
|
||||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||||
|
* Makedate: 2021-08-03 00:24:28 <br/>
|
||||||
|
*
|
||||||
|
* @author liupopo
|
||||||
|
* @version 1.0
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Api(tags = "岗位")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("v1/syspost")
|
||||||
|
public class SysPostRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysPostService sysPostService;
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean<PagerVo<SysPostVo>> listPage(@RequestBody PagerQuery<SysPostQuery> pq) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
PagerVo<SysPostVo> pv = sysPostService.listPageVo(pq);
|
||||||
|
return rb.success().setData(pv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean<List<SysPostVo>> listAll(@RequestBody SysPostQuery query) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
List<SysPostVo> list = sysPostService.listAllVo(query);
|
||||||
|
return rb.success().setData(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean<List<SysPostVo>> list() {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
List<SysPostVo> list = sysPostService.listVo();
|
||||||
|
return rb.success().setData(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean save(SysPostDto dto) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
sysPostService.saveOrUpdateDto(dto);
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean update(SysPostDto dto, String sid) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
sysPostService.updateBySid(dto.toMap(), sid);
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean del(String ids) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
sysPostService.delByIds(ids);
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean delBySids(String sids) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
String[] sidArr = sids.split(",");
|
||||||
|
sysPostService.delBySids(sidArr);
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean<SysPostVo> fetch(String id) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
SysPostVo vo = sysPostService.fetchByIdVo(id);
|
||||||
|
return rb.success().setData(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean<SysPostVo> fetchBySid(String sid) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
SysPostVo vo = sysPostService.fetchBySidVo(sid);
|
||||||
|
return rb.success().setData(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean<List<SysPostVo>> fetchByOrgSid(String orgSid) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
List<SysPostVo> list = sysPostService.fetchByOrgSid(orgSid);
|
||||||
|
return rb.success().setData(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean<String> fetchByOrgSidPostCode() {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
String s = sysPostService.fetchByOrgSidPostCode();
|
||||||
|
return rb.success().setData(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有岗位
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
public ResultBean<List<SysPostListVo>> selectList() {
|
||||||
|
ResultBean<List<SysPostListVo>> rb = ResultBean.fireFail();
|
||||||
|
List<SysPostListVo> sysPostVoList = sysPostService.selectList();
|
||||||
|
if (sysPostVoList.size() == 0) {
|
||||||
|
List<SysPostListVo> list = new ArrayList<>();
|
||||||
|
list.add(new SysPostListVo());
|
||||||
|
return rb.setData(list);
|
||||||
|
}
|
||||||
|
return rb.success().setData(sysPostVoList);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user