From 66b5d4d3f2f7e98152503b712f6d3da4ad13a6df Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Thu, 24 Sep 2020 19:09:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5=E5=8A=A0=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=91=98=E5=B7=A5=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.name | 1 - .idea/compiler.xml | 2 + .idea/encodings.xml | 1 + .idea/misc.xml | 1 + .../hrms/controller/EmployeeController.java | 4 +- .../financial/hrms/dao/EmployeeDao.java | 5 + .../hrms/service/EmployeeService.java | 2 + .../service/impl/EmployeeServiceImpl.java | 17 ++ .../resources/mapper/hrms/EmployeeDao.xml | 19 ++ .../hrms/controller/EmployeeController.class | Bin 3947 -> 4184 bytes .../financial/hrms/dao/EmployeeDao.class | Bin 1148 -> 1606 bytes .../hrms/service/EmployeeService.class | Bin 809 -> 1003 bytes .../service/impl/EmployeeServiceImpl.class | Bin 1743 -> 2861 bytes .../classes/mapper/hrms/EmployeeDao.xml | 18 ++ dq-govern-gateway/dq-govern-gateway.iml | 162 ------------------ .../src/main/resources/application.yml | 8 +- 16 files changed, 72 insertions(+), 168 deletions(-) delete mode 100644 .idea/.name delete mode 100644 dq-govern-gateway/dq-govern-gateway.iml diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index e434cb1a..00000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -financial \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml index f7443930..e24ccc08 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -11,6 +11,7 @@ + @@ -27,6 +28,7 @@ + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml index 7dfdfa3a..30d52777 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -7,6 +7,7 @@ + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 4b661a5f..43126308 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,6 +5,7 @@ diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java index e3e1e317..7e7d20d0 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java @@ -6,6 +6,7 @@ import com.daqing.framework.domain.hrms.EmployeeEntity; import com.daqing.framework.domain.hrms.ext.EmployeeTO; import com.daqing.framework.domain.hrms.ext.EmployeeVO; import com.daqing.framework.model.response.ResponseResult; +import com.daqing.framework.utils.PageUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -33,7 +34,8 @@ public class EmployeeController implements EmployeeControllerApi { public ResponseResult list(@RequestParam("page") Integer page, @RequestParam("size") Integer size, EmployeeEntity employee) { - return ResponseResult.SUCCESS(); + PageUtils data = employeeService.queryPage(page, size, employee); + return new ResponseResult().SUCCESS(data); } /** diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java index 0ad091ae..be862b2b 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java @@ -1,9 +1,12 @@ package com.daqing.financial.hrms.dao; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.daqing.framework.domain.hrms.EmployeeEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.daqing.framework.domain.hrms.ext.EmployeeTO; import com.daqing.framework.domain.hrms.ext.EmployeeVO; +import com.daqing.framework.domain.hrms.ext.PositionVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -26,4 +29,6 @@ public interface EmployeeDao extends BaseMapper { List listEmployeeByDeptId(Long id); List listEmployeeName(); + + IPage pageByCondition(Page page, @Param("employee") EmployeeEntity employee); } diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java index 0facb246..d716be3e 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java @@ -23,5 +23,7 @@ public interface EmployeeService extends IService { EmployeeEntity getEmployeeById(Long id); List listEmployeeName(); + + PageUtils queryPage(Integer page, Integer size, EmployeeEntity employee); } diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java index 4d458102..eaedcf4e 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java @@ -1,7 +1,11 @@ package com.daqing.financial.hrms.service.impl; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.daqing.framework.domain.hrms.ext.EmployeeTO; import com.daqing.framework.domain.hrms.ext.EmployeeVO; +import com.daqing.framework.domain.hrms.ext.PositionVO; +import com.daqing.framework.utils.PageUtils; import org.springframework.stereotype.Service; import java.util.List; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -23,6 +27,19 @@ public class EmployeeServiceImpl extends ServiceImpl employeeVO = this.getBaseMapper().pageByCondition(new Page(page, size), employee); + + return new PageUtils(employeeVO); + } /** * 根据id查询员工的id * @param id diff --git a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml index 319113ee..2a7a70fe 100644 --- a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml +++ b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml @@ -63,4 +63,23 @@ SELECT id,name FROM hrms_employee + + \ No newline at end of file diff --git a/dq-financial-hrms/target/classes/com/daqing/financial/hrms/controller/EmployeeController.class b/dq-financial-hrms/target/classes/com/daqing/financial/hrms/controller/EmployeeController.class index b955b96ce791ff96eb99c639472271efd7986e8d..3ae3e99b67092a1089b5e9ee3bb6f3390da08b1c 100644 GIT binary patch literal 4184 zcmcguTUXmg5T3OS4n{!Y22w~bxfjS~b0Jr!v|uhFF@XRfP12;5?Zs?jOGc8RPESvN zLH|p7PEQlsb9(yRAJx-uC0Uk1rj&<1NV{6?%zQKR&Fud5_iuj?(HL!|C{0UUbcB|> zX@wpqX*ER&T2ikkYUQgWJyjpi)W>u6`Z`4~=%t!{qh8;tm#$vZ)}LmDN%CJo&vNWIM0t%}WUZxf$x70NIgT&fw4tcX=<%Y0c( z7>4QSjx-IM(XE_mmAGBCpmEL8D`LyEUh}-r4V$m&1;@1NTn_~JM9nd`q$P?_+j&rHtW4BWICO!hMYEzy!;4@ea?^;GQ_qaF zU<)KFaI?%UVOJ4A!I%6A##-4?u&R0qUVjh)0Y7c|20srqGRx>nw3R(@K}%70bVlc* zMQe^M+k6oy9;+E39iA7?x>;P*l@pGz5csjkyl;s-&r72iPWh~G=Jje7{D7v8O}$)$ z10CE8{;5`K1r}O3c4ObRmc&L)*p914g;E-8CZm~fhI1x>956L8Swt{GiE))NN^xa~ ze=mzaFxo%bMcr9%&|0Cj^-YAPG#s6lJu-SgcdqX{u8XD}P9pb^?qA-|%cNPX!_m%K z6$FH<`zO(2Eo48*8wxs6N+2Yo+2Q9q({jL|#AOlmKC(+4qnrB<*OZH@$@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w~B9RFqIX{kAv^kbEvBi>eya z_U;jN9Jc(Y(@Ae67)o;r)24Ln`# zDK+J~MiT|0*YIQ}YIL@v(zG<}NJ1>s=kl7f&80$!4~NStoke-csK^VETKaVSn@abP zJj!XPn@{3SPW7%q09D1fs&2<&*E>NT`Q0{?!lsXK5gj1h!0=1S=tnz<+iEY`A+(3l zB0KOL#v4Pcq3xM?McPYrQZ$06oJ{Dwi>Dq;p!eu~ylM0SeMlK4T*6xhW0}{K`W0S7q%nc;iRcV|lKUv8e~jNJ8>D$OM&lS8 zPGev~4tkg$b)}d_=jc4N%gwDpe;RFm;x|g4dqbHN{Y^cK9ke;cZ~@C)RK%wOiHJB) z7w|>H_Y9CmFXc$i7V~S6gM*S2&@LfQ2i7tmob5I~R-5(F0l^BQl)RDiwkN*#OJqSb&T~EF&SyQ6$QjGzHDmkd;Xjj1)1Fz}XJznRdv8 zAzgs*Y!t-{0Ffax7~+MIb2LREXFTnyF?$V0jDukicMaV;yEtU%&e1$pm)SIlR%Y&r q7{?px*OD+Cg%MPa6CuX#WL|*AyU>`TuT-k%(JSG75$gnjeD6Q2|Ln>D diff --git a/dq-financial-hrms/target/classes/com/daqing/financial/hrms/dao/EmployeeDao.class b/dq-financial-hrms/target/classes/com/daqing/financial/hrms/dao/EmployeeDao.class index 7324c23ab8fef435323c301cff73ad0443603cd1..454674a6f6d60d3167a4ab43eb952ae6fbd729b3 100644 GIT binary patch delta 300 zcmeyvag0a!)W2Q(7#J8#7?jx=6xbOQ*%_2J3b!(e@E0Ver#e+S=jWwlmSpDVF*3~6 zn7o=vN-4FXBsH%XD577GQ<|QcSF8_InVFXeQluXM)MPzztTn*Z0gTNli~Jvc@7bajnv1O-6nPO`qiaT>X^9!c3t0w4%h^)bjkIZ2i)b%$#C< zkddJvmNg>-O99w?mg3ARpfwz+xdl1-m8q$l*D`7|GO|p*$z-R?!pI=NAjrVTzy@?B ZFEfJ>kP-%B5g=w_-~f}N3}Rqf8~{#THJ<uPgP-M&uYn-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sG~8Hor96b^_p65=&n z5j8UwJ|GU$Ro&{YuAck!Gb-M{UtR&6;v_&5y8$Fd5_t$0V;%N%*q1nvC?pQ2mv`dv z);)K^0HMMWjs-?#;`PdpMjR_7m{;gwMPUtt^2YzVLPp6Z1X^6vAaamVF)N6I=;hB4 zQxXReqi>3Bw8@oiK#VzNLhI9yDwEb=QulUDZ_0U)* + + \ No newline at end of file diff --git a/dq-govern-gateway/dq-govern-gateway.iml b/dq-govern-gateway/dq-govern-gateway.iml deleted file mode 100644 index 99f60a52..00000000 --- a/dq-govern-gateway/dq-govern-gateway.iml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/dq-govern-gateway/src/main/resources/application.yml b/dq-govern-gateway/src/main/resources/application.yml index 1c28ccc3..93356590 100644 --- a/dq-govern-gateway/src/main/resources/application.yml +++ b/dq-govern-gateway/src/main/resources/application.yml @@ -14,7 +14,7 @@ spring: # - id: hrms_route uri: lb://dq-financial-hrms - predicates: - - Path=/api/hrms/** - filters: - - RewritePath=/api/(?.*),/ $\{segment} \ No newline at end of file + predicates: + - Path=/api/hrms/** + filters: + - RewritePath=/api/(?.*),/ $\{segment} \ No newline at end of file