提交 cde88765 作者: ZhangJingKun

人物信息操作业务

上级 1fa11960
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 134217728 bytes for Failed to commit area from 0x0000000081800000 to 0x0000000089800000 of length 134217728.
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (c:/BuildAgent/work/5ff2f6c26000d570/src/hotspot/os/windows/os_windows.cpp:3281), pid=19216, tid=21272
#
# JRE version: (11.0.4+10) (build )
# Java VM: OpenJDK 64-Bit Server VM (11.0.4+10-b304.69, mixed mode, aot, sharing, tiered, compressed oops, g1 gc, windows-amd64)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
--------------- S U M M A R Y ------------
Command Line: org.jetbrains.git4idea.http.GitAskPassApp Username for 'http://114.115.159.144:8090':
Host: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 4 cores, 7G, Windows 10 , 64 bit Build 19041 (10.0.19041.2364)
Time: Sat Mar 2 10:30:41 2024 й׼ʱ elapsed time: 0 seconds (0d 0h 0m 0s)
--------------- T H R E A D ---------------
Current thread (0x0000015fb05e7000): JavaThread "Unknown thread" [_thread_in_vm, id=21272, stack(0x0000000923700000,0x0000000923800000)]
Stack: [0x0000000923700000,0x0000000923800000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x5db31a]
V [jvm.dll+0x70c395]
V [jvm.dll+0x70d8b8]
V [jvm.dll+0x70df83]
V [jvm.dll+0x23dbb8]
V [jvm.dll+0x5d8a74]
V [jvm.dll+0x5cdb05]
V [jvm.dll+0x2fa5bb]
V [jvm.dll+0x2fa52a]
V [jvm.dll+0x2fa402]
V [jvm.dll+0x2ff2c6]
V [jvm.dll+0x347893]
V [jvm.dll+0x347f96]
V [jvm.dll+0x347993]
V [jvm.dll+0x2d4e28]
V [jvm.dll+0x2d5fd7]
V [jvm.dll+0x6eb717]
V [jvm.dll+0x6ecf0c]
V [jvm.dll+0x354fb9]
V [jvm.dll+0x6d35be]
V [jvm.dll+0x3bd673]
V [jvm.dll+0x3bf9f1]
C [java.exe+0x3763]
C [java.exe+0x17a0c]
C [KERNEL32.DLL+0x17614]
C [ntdll.dll+0x526a1]
--------------- P R O C E S S ---------------
Threads class SMR info:
_java_thread_list=0x0000015faec30380, length=0, elements={
}
Java Threads: ( => current thread )
Other Threads:
0x0000015fb05fa800 GCTaskThread "GC Thread#0" [stack: 0x0000000923800000,0x0000000923900000] [id=8412]
0x0000015fb062d800 ConcurrentGCThread "G1 Main Marker" [stack: 0x0000000923900000,0x0000000923a00000] [id=20532]
0x0000015fb0630000 ConcurrentGCThread "G1 Conc#0" [stack: 0x0000000923a00000,0x0000000923b00000] [id=13840]
[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffef6935727]
VM state:not at safepoint (not fully initialized)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x0000015fb05e1fe0] Heap_lock - owner thread: 0x0000015fb05e7000
Heap address: 0x0000000081800000, size: 2024 MB, Compressed Oops mode: Non-zero based: 0x0000000081800000
Narrow klass base: 0x0000000000000000, Narrow klass shift: 0
GC Heap History (0 events):
No events
Deoptimization events (0 events):
No events
Classes redefined (0 events):
No events
Internal exceptions (0 events):
No events
Events (0 events):
No events
Dynamic libraries:
0x00007ff6bd8b0000 - 0x00007ff6bd8f7000 D:\ruanjian\IntelliJIDEA\jbr\bin\java.exe
0x00007fff20410000 - 0x00007fff20608000 C:\WINDOWS\SYSTEM32\ntdll.dll
0x00007fff1f2d0000 - 0x00007fff1f38f000 C:\WINDOWS\System32\KERNEL32.DLL
0x00007fff1dd20000 - 0x00007fff1dff2000 C:\WINDOWS\System32\KERNELBASE.dll
0x00007fff20100000 - 0x00007fff202a1000 C:\WINDOWS\System32\USER32.dll
0x00007fff1e1f0000 - 0x00007fff1e212000 C:\WINDOWS\System32\win32u.dll
0x00007fff1ef30000 - 0x00007fff1ef5b000 C:\WINDOWS\System32\GDI32.dll
0x00007fff1dc10000 - 0x00007fff1dd1f000 C:\WINDOWS\System32\gdi32full.dll
0x00007fff1db00000 - 0x00007fff1db9d000 C:\WINDOWS\System32\msvcp_win.dll
0x00007fff1e350000 - 0x00007fff1e450000 C:\WINDOWS\System32\ucrtbase.dll
0x00007fff0dca0000 - 0x00007fff0df3a000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll
0x00007fff1e5e0000 - 0x00007fff1e67e000 C:\WINDOWS\System32\msvcrt.dll
0x00007fff1e530000 - 0x00007fff1e562000 C:\WINDOWS\System32\IMM32.DLL
0x00000000577b0000 - 0x00000000577bd000 D:\ruanjian\360\360Safe\safemon\SafeWrapper.dll
0x00007fff1e7b0000 - 0x00007fff1e85e000 C:\WINDOWS\System32\ADVAPI32.dll
0x00007fff1f880000 - 0x00007fff1f91c000 C:\WINDOWS\System32\sechost.dll
0x00007fff1e680000 - 0x00007fff1e7a5000 C:\WINDOWS\System32\RPCRT4.dll
0x00007fff0b240000 - 0x00007fff0b2ec000 D:\ruanjian\360\360Safe\safemon\libzdtp64.dll
0x00007fff1f920000 - 0x00007fff20064000 C:\WINDOWS\System32\SHELL32.dll
0x00007fff1f390000 - 0x00007fff1f3e5000 C:\WINDOWS\System32\SHLWAPI.dll
0x00007fff15450000 - 0x00007fff1545a000 C:\WINDOWS\SYSTEM32\VERSION.dll
0x00007fff18080000 - 0x00007fff18097000 D:\ruanjian\IntelliJIDEA\jbr\bin\vcruntime140.dll
0x00007ffefbf50000 - 0x00007ffefbfed000 D:\ruanjian\IntelliJIDEA\jbr\bin\msvcp140.dll
0x00007ffef6650000 - 0x00007ffef7108000 D:\ruanjian\IntelliJIDEA\jbr\bin\server\jvm.dll
0x00007fff1e5d0000 - 0x00007fff1e5d8000 C:\WINDOWS\System32\PSAPI.DLL
0x00007fff0bc90000 - 0x00007fff0bc99000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
0x00007fff08f10000 - 0x00007fff08f37000 C:\WINDOWS\SYSTEM32\WINMM.dll
0x00007fff1f660000 - 0x00007fff1f6cb000 C:\WINDOWS\System32\WS2_32.dll
0x00007fff1b9c0000 - 0x00007fff1b9d2000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
0x00007fff194c0000 - 0x00007fff194d1000 D:\ruanjian\IntelliJIDEA\jbr\bin\verify.dll
0x00007fff0a2b0000 - 0x00007fff0a494000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL
0x00007fff0a1a0000 - 0x00007fff0a1d5000 C:\WINDOWS\SYSTEM32\dbgcore.DLL
0x00007fff1e000000 - 0x00007fff1e082000 C:\WINDOWS\System32\bcryptPrimitives.dll
0x00007fff18d60000 - 0x00007fff18d89000 D:\ruanjian\IntelliJIDEA\jbr\bin\java.dll
0x00007fff18060000 - 0x00007fff18077000 D:\ruanjian\IntelliJIDEA\jbr\bin\zip.dll
0x00007fff1b340000 - 0x00007fff1b34b000 D:\ruanjian\IntelliJIDEA\jbr\bin\jimage.dll
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;D:\ruanjian\IntelliJIDEA\jbr\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;D:\ruanjian\360\360Safe\safemon;D:\ruanjian\IntelliJIDEA\jbr\bin\server
VM Arguments:
java_command: org.jetbrains.git4idea.http.GitAskPassApp Username for 'http://114.115.159.144:8090':
java_class_path (initial): D:/ruanjian/IntelliJIDEA/plugins/git4idea/lib/git4idea-rt.jar;D:/ruanjian/IntelliJIDEA/lib/xmlrpc-2.0.1.jar;D:/ruanjian/IntelliJIDEA/lib/commons-codec-1.13.jar;D:/ruanjian/IntelliJIDEA/lib/util.jar
Launcher Type: SUN_STANDARD
[Global flags]
intx CICompilerCount = 3 {product} {ergonomic}
uint ConcGCThreads = 1 {product} {ergonomic}
uint G1ConcRefinementThreads = 4 {product} {ergonomic}
size_t G1HeapRegionSize = 1048576 {product} {ergonomic}
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
size_t InitialHeapSize = 134217728 {product} {ergonomic}
size_t MarkStackSize = 4194304 {product} {ergonomic}
size_t MaxHeapSize = 2122317824 {product} {ergonomic}
size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic}
uintx NonNMethodCodeHeapSize = 5830092 {pd product} {ergonomic}
uintx NonProfiledCodeHeapSize = 122914074 {pd product} {ergonomic}
uintx ProfiledCodeHeapSize = 122914074 {pd product} {ergonomic}
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic}
bool SegmentedCodeCache = true {product} {ergonomic}
bool UseCompressedClassPointers = true {lp64_product} {ergonomic}
bool UseCompressedOops = true {lp64_product} {ergonomic}
bool UseG1GC = true {product} {ergonomic}
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic}
Logging:
Log output configuration:
#0: stdout all=warning uptime,level,tags
#1: stderr all=off uptime,level,tags
Environment Variables:
JAVA_HOME=D:\ruanjian\Java\jdk1.8.0_191
PATH=D:\ruanjian\Git\mingw64\libexec\git-core;D:\ruanjian\Git\mingw64\libexec\git-core;D:\ruanjian\Git\mingw64\bin;D:\ruanjian\Git\usr\bin;C:\Users\Administrator\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin;D:\ruanjian\Java\jdk1.8.0_191\bin;D:\software\node-v16.20.2-win-x64;D:\software\node-v16.20.2\node_global;D:\ruanjian\Git\cmd;D:\software\curl-8.4.0;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm
USERNAME=Administrator
DISPLAY=:0.0
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 10 , 64 bit Build 19041 (10.0.19041.2364)
CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 61 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, fma
Memory: 4k page, system-wide physical 8094M (799M free)
TotalPageFile size 11953M (AvailPageFile size 47M)
current process WorkingSet (physical memory assigned to process): 11M, peak: 11M
current process commit charge ("private bytes"): 51M, peak: 179M
vm_info: OpenJDK 64-Bit Server VM (11.0.4+10-b304.69) for windows-amd64 JRE (11.0.4+10-b304.69), built on Sep 9 2019 11:39:50 by "" with MS VC++ 14.0 (VS2015)
END.
...@@ -66,8 +66,8 @@ public class CharacterInfoContorller { ...@@ -66,8 +66,8 @@ public class CharacterInfoContorller {
* @return * @return
*/ */
@PostMapping("/list") @PostMapping("/list")
public Result<?> list(@RequestBody CharacterListVo characterListVo){ public Result<?> getList(@RequestBody CharacterListVo characterListVo){
return Result.OK(characterInfoService.list(characterListVo)); return characterInfoService.getList(characterListVo);
} }
//审核 //审核
......
...@@ -27,10 +27,14 @@ public class CharacterChangeInfo extends Model<CharacterChangeInfo> { ...@@ -27,10 +27,14 @@ public class CharacterChangeInfo extends Model<CharacterChangeInfo> {
private String uid; private String uid;
//人物名称 //人物名称
private String name; private String name;
//原单位
private String companyOriginal;
//原部门 原单位 原企业 //原部门 原单位 原企业
private String departmentOriginal; private String departmentOriginal;
//原职务 //原职务
private String dutyOriginal; private String dutyOriginal;
//单位(现)
private String company;
//部门 单位 企业(现) //部门 单位 企业(现)
private String department; private String department;
//职务(现) //职务(现)
......
...@@ -27,10 +27,14 @@ public class CharacterChangeInfoHistory extends Model<CharacterChangeInfoHistory ...@@ -27,10 +27,14 @@ public class CharacterChangeInfoHistory extends Model<CharacterChangeInfoHistory
private String uid; private String uid;
//人物名称 //人物名称
private String name; private String name;
//原单位
private String companyOriginal;
//原部门 原单位 原企业 //原部门 原单位 原企业
private String departmentOriginal; private String departmentOriginal;
//原职务 //原职务
private String dutyOriginal; private String dutyOriginal;
//单位(现)
private String company;
//部门 单位 企业(现) //部门 单位 企业(现)
private String department; private String department;
//职务(现) //职务(现)
......
...@@ -2,10 +2,13 @@ package com.zzsn.leaderbase.mapper; ...@@ -2,10 +2,13 @@ package com.zzsn.leaderbase.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzsn.leaderbase.entity.CharacterBasicInfo; import com.zzsn.leaderbase.entity.CharacterBasicInfo;
import com.zzsn.leaderbase.vo.CharacterListVo;
import com.zzsn.leaderbase.vo.CharacterVo; import com.zzsn.leaderbase.vo.CharacterVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* @Version 1.0 * @Version 1.0
* @Author: ZhangJingKun * @Author: ZhangJingKun
...@@ -30,4 +33,8 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo> ...@@ -30,4 +33,8 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo>
"on a.id = b.id " + "on a.id = b.id " +
"where a.id = #{id}") "where a.id = #{id}")
CharacterVo getById(String id); CharacterVo getById(String id);
List<CharacterVo> getList(CharacterListVo characterListVo);
Integer getCount();
} }
...@@ -2,8 +2,11 @@ package com.zzsn.leaderbase.service; ...@@ -2,8 +2,11 @@ package com.zzsn.leaderbase.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.zzsn.leaderbase.entity.CharacterBasicInfo; import com.zzsn.leaderbase.entity.CharacterBasicInfo;
import com.zzsn.leaderbase.vo.CharacterListVo;
import com.zzsn.leaderbase.vo.CharacterVo; import com.zzsn.leaderbase.vo.CharacterVo;
import java.util.List;
/** /**
* @Version 1.0 * @Version 1.0
* @Author: ZhangJingKun * @Author: ZhangJingKun
...@@ -15,4 +18,8 @@ public interface CharacterBasicInfoService extends IService<CharacterBasicInfo> ...@@ -15,4 +18,8 @@ public interface CharacterBasicInfoService extends IService<CharacterBasicInfo>
CharacterVo getByUid(String uid); CharacterVo getByUid(String uid);
CharacterVo getById(String id); CharacterVo getById(String id);
List<CharacterVo> getList(CharacterListVo characterListVo);
Integer getCount(CharacterListVo characterListVo);
} }
...@@ -5,6 +5,8 @@ import com.zzsn.leaderbase.vo.CharacterListVo; ...@@ -5,6 +5,8 @@ import com.zzsn.leaderbase.vo.CharacterListVo;
import com.zzsn.leaderbase.vo.CharacterVo; import com.zzsn.leaderbase.vo.CharacterVo;
import com.zzsn.leaderbase.vo.Result; import com.zzsn.leaderbase.vo.Result;
import java.util.List;
/** /**
* @Version 1.0 * @Version 1.0
* @Author: ZhangJingKun * @Author: ZhangJingKun
...@@ -15,12 +17,15 @@ public interface CharacterInfoService { ...@@ -15,12 +17,15 @@ public interface CharacterInfoService {
Result<?> add(CharacterVo characterVo); Result<?> add(CharacterVo characterVo);
Result<?> addBulk (List<CharacterVo> list);
CharacterVo getByUid(String uid); CharacterVo getByUid(String uid);
CharacterVo getById(String id); CharacterVo getById(String id);
Result<?> edit(CharacterVo characterVo); Result<?> edit(CharacterVo characterVo);
IPage<CharacterVo> list(CharacterListVo characterListVo); Result<?> getList(CharacterListVo characterListVo);
} }
...@@ -4,10 +4,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -4,10 +4,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzsn.leaderbase.entity.CharacterBasicInfo; import com.zzsn.leaderbase.entity.CharacterBasicInfo;
import com.zzsn.leaderbase.mapper.CharacterBasicInfoMapper; import com.zzsn.leaderbase.mapper.CharacterBasicInfoMapper;
import com.zzsn.leaderbase.service.CharacterBasicInfoService; import com.zzsn.leaderbase.service.CharacterBasicInfoService;
import com.zzsn.leaderbase.vo.CharacterListVo;
import com.zzsn.leaderbase.vo.CharacterVo; import com.zzsn.leaderbase.vo.CharacterVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @Version 1.0 * @Version 1.0
* @Author: ZhangJingKun * @Author: ZhangJingKun
...@@ -30,4 +33,15 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf ...@@ -30,4 +33,15 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
public CharacterVo getById(String id) { public CharacterVo getById(String id) {
return characterBasicInfoMapper.getById(id); return characterBasicInfoMapper.getById(id);
} }
@Override
public List<CharacterVo> getList(CharacterListVo characterListVo) {
List<CharacterVo> list = characterBasicInfoMapper.getList(characterListVo);
return list;
}
@Override
public Integer getCount(CharacterListVo characterListVo) {
return characterBasicInfoMapper.getCount();
}
} }
package com.zzsn.leaderbase.service.impl; package com.zzsn.leaderbase.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zzsn.leaderbase.entity.CharacterBasicInfo; import com.zzsn.leaderbase.entity.CharacterBasicInfo;
...@@ -14,6 +13,9 @@ import org.springframework.beans.BeanUtils; ...@@ -14,6 +13,9 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/** /**
* @Version 1.0 * @Version 1.0
* @Author: ZhangJingKun * @Author: ZhangJingKun
...@@ -66,6 +68,37 @@ public class CharacterInfoServiceImpl implements CharacterInfoService { ...@@ -66,6 +68,37 @@ public class CharacterInfoServiceImpl implements CharacterInfoService {
} }
@Override @Override
public Result<?> addBulk(List<CharacterVo> list) {
List<CharacterBasicInfo> characterBasicInfoList = new ArrayList<>();
List<CharacterChangeInfo> characterChangeInfoList = new ArrayList<>();
List<CharacterBasicInfoHistory> characterBasicInfoHistoryList = new ArrayList<>();
for (CharacterVo characterVo : list) {
String id = Long.toString(generatorIdService.getOrderId());
CharacterBasicInfo characterBasicInfo = new CharacterBasicInfo();
BeanUtils.copyProperties(characterVo, characterBasicInfo);
characterBasicInfo.setId(id);
characterBasicInfoList.add(characterBasicInfo);
CharacterChangeInfo characterChangeInfo = new CharacterChangeInfo();
BeanUtils.copyProperties(characterVo, characterChangeInfo);
characterChangeInfo.setId(id);
characterChangeInfoList.add(characterChangeInfo);
CharacterBasicInfoHistory characterBasicInfoHistory = new CharacterBasicInfoHistory();
BeanUtils.copyProperties(characterBasicInfo, characterBasicInfoHistory);
characterBasicInfoHistory.setId(null);
characterBasicInfoHistoryList.add(characterBasicInfoHistory);
}
characterBasicInfoService.saveBatch(characterBasicInfoList);
characterChangeInfoService.saveBatch(characterChangeInfoList);
characterBasicInfoHistoryService.saveBatch(characterBasicInfoHistoryList);
return Result.OK();
}
@Override
public CharacterVo getByUid(String uid) { public CharacterVo getByUid(String uid) {
return characterBasicInfoService.getByUid(uid); return characterBasicInfoService.getByUid(uid);
} }
...@@ -97,12 +130,30 @@ public class CharacterInfoServiceImpl implements CharacterInfoService { ...@@ -97,12 +130,30 @@ public class CharacterInfoServiceImpl implements CharacterInfoService {
} }
@Override @Override
public IPage<CharacterVo> list(CharacterListVo characterListVo) { public Result<?> getList(CharacterListVo characterListVo) {
QueryWrapper<CharacterVo> queryWrapper = new QueryWrapper<>();
//queryWrapper.eq("name","王强").leftJoin("") //参数校验
Integer pageNo = characterListVo.getPageNo();
Integer pageSize= characterListVo.getPageSize();
if(pageNo < 1)
return null; return Result.error("参数pageNo的值不能小于1!");
if(pageSize < 0)
return Result.error("参数pageSize的值不能小于0!");
Integer office = pageSize * (pageNo - 1);
characterListVo.setOffset(office);
//根据条件查询数据
List<CharacterVo> list = characterBasicInfoService.getList(characterListVo);
IPage page = new Page();
page.setRecords(list);
//查询总数
Integer total = characterBasicInfoService.getCount(characterListVo);
page.setTotal(total);
page.setCurrent(pageNo);
page.setSize(pageSize);
return Result.OK(page);
} }
} }
...@@ -14,9 +14,29 @@ public class CharacterListVo { ...@@ -14,9 +14,29 @@ public class CharacterListVo {
//当前页码,默认值为1 //当前页码,默认值为1
private Integer pageNo = 1; private Integer pageNo = 1;
//分页偏移量 根据 pageNo 和 pageSize 计算得到
private Integer offset;
//每页数量,默认值为10 //每页数量,默认值为10
private Integer pageSize = 10; private Integer pageSize = 10;
//排序字段,多个排序字段用逗号分隔
private String orders = "create_time";
//降序DESC 升序 ASC 默认为DESC
private String ordersBy = "DESC";
//人物名称 //人物名称
private String name; private String name;
//单位(现)
private String company;
//职务(现)
private String duty;
//是否审核 1是 0否
private Long checkStatus;
//是否审核通过 0未通过 1通过 2待定
private Long checkResult;
} }
...@@ -83,10 +83,14 @@ public class CharacterVo { ...@@ -83,10 +83,14 @@ public class CharacterVo {
/** /**
* 职务变更信息 * 职务变更信息
*/ */
//原单位
private String companyOriginal;
//原部门 原单位 原企业 //原部门 原单位 原企业
private String departmentOriginal; private String departmentOriginal;
//原职务 //原职务
private String dutyOriginal; private String dutyOriginal;
//单位(现)
private String company;
//部门 单位 企业(现) //部门 单位 企业(现)
private String department; private String department;
//职务(现) //职务(现)
......
...@@ -31,7 +31,7 @@ es1: ...@@ -31,7 +31,7 @@ es1:
password: zzsn9988 password: zzsn9988
mybatis-plus: mybatis-plus:
mapper-locations: classpath*:com/zzsn/leaderbase/mapper/xml/*Mapper.xml mapper-locations: mapper/*.xml
configuration: configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zzsn.leaderbase.mapper.CharacterBasicInfoMapper">
<select id="getList" resultType="com.zzsn.leaderbase.vo.CharacterVo">
select a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.create_by,a.create_time,a.update_by,a.update_time,a.status,department_original,duty_original,department,duty,b.take_office_time,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc
from character_basic_info a
LEFT JOIN character_change_info b
on a.id = b.id
where 1 = 1
<if test="name != null and name != ''">
AND a.name = #{name}
</if>
<if test="company != null and company != ''">
AND b.department like '%${company}%'
</if>
<if test="duty != null and duty != ''">
AND b.duty = #{duty}
</if>
<if test="checkStatus != null">
AND b.check_status = #{checkStatus}
</if>
<if test="checkResult != null">
AND b.check_result = #{checkResult}
</if>
<if test="orders != null and orders != ''">
ORDER BY ${orders} ${ordersBy}
</if>
limit #{offset}, #{pageSize}
</select>
<select id="getCount" resultType="int">
SELECT count(1)
from character_basic_info a
LEFT JOIN character_change_info b
on a.id = b.id
where 1 = 1
<if test="name != null and name != ''">
AND a.name = #{name}
</if>
<if test="company != null and company != ''">
AND b.department like '%${company}%'
</if>
<if test="duty != null and duty != ''">
AND b.duty = #{duty}
</if>
<if test="checkStatus != null">
AND b.check_status = #{checkStatus}
</if>
<if test="checkResult != null">
AND b.check_result = #{checkResult}
</if>
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论