wuxw лет назад: 6
Родитель
Сommit
5088f71ed5

+ 5 - 5
WebService/src/main/java/com/java110/web/smo/impl/StaffServiceSMOImpl.java

@@ -84,7 +84,7 @@ public class StaffServiceSMOImpl extends BaseComponentSMO implements IStaffServi
         if (rows > 50) {
         if (rows > 50) {
             return new ResponseEntity<String>("rows 数量不能大于50", HttpStatus.BAD_REQUEST);
             return new ResponseEntity<String>("rows 数量不能大于50", HttpStatus.BAD_REQUEST);
         }
         }
-        page = (page - 1) * rows;
+       // page = (page - 1) * rows;
         ResponseEntity responseEntity = super.getStoreInfo(pd, restTemplate);
         ResponseEntity responseEntity = super.getStoreInfo(pd, restTemplate);
         if (responseEntity.getStatusCode() != HttpStatus.OK) {
         if (responseEntity.getStatusCode() != HttpStatus.OK) {
             return responseEntity;
             return responseEntity;
@@ -92,15 +92,15 @@ public class StaffServiceSMOImpl extends BaseComponentSMO implements IStaffServi
         Assert.jsonObjectHaveKey(responseEntity.getBody().toString(), "storeId", "根据用户ID查询商户ID失败,未包含storeId节点");
         Assert.jsonObjectHaveKey(responseEntity.getBody().toString(), "storeId", "根据用户ID查询商户ID失败,未包含storeId节点");
 
 
         String storeId = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeId");
         String storeId = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeId");
-        paramIn.put("page", page);
+        //paramIn.put("page", page);
         paramIn.put("storeId", storeId);
         paramIn.put("storeId", storeId);
-        if (StringUtil.isEmpty(staffName)) {
+        //if (StringUtil.isEmpty(staffName)) {
             responseEntity = this.callCenterService(restTemplate, pd, "",
             responseEntity = this.callCenterService(restTemplate, pd, "",
                     ServiceConstant.SERVICE_API_URL + "/api/query.staff.infos" + super.mapToUrlParam(paramIn), HttpMethod.GET);
                     ServiceConstant.SERVICE_API_URL + "/api/query.staff.infos" + super.mapToUrlParam(paramIn), HttpMethod.GET);
-        } else {
+       /* } else {
             responseEntity = this.callCenterService(restTemplate, pd, "",
             responseEntity = this.callCenterService(restTemplate, pd, "",
                     ServiceConstant.SERVICE_API_URL + "/api/query.staff.byName?rows=" + rows + "&page=" + page + "&storeId=" + storeId + "&name=" + staffName, HttpMethod.GET);
                     ServiceConstant.SERVICE_API_URL + "/api/query.staff.byName?rows=" + rows + "&page=" + page + "&storeId=" + storeId + "&name=" + staffName, HttpMethod.GET);
-        }
+        }*/
         if (responseEntity.getStatusCode() != HttpStatus.OK) {
         if (responseEntity.getStatusCode() != HttpStatus.OK) {
             return responseEntity;
             return responseEntity;
         }
         }

+ 11 - 0
java110-bean/src/main/java/com/java110/dto/UserDto.java

@@ -40,6 +40,9 @@ public class UserDto extends PageDto implements Serializable {
 
 
     private String orgId;
     private String orgId;
 
 
+    private String staffName;
+
+
 
 
     public String getUserId() {
     public String getUserId() {
         return userId;
         return userId;
@@ -152,4 +155,12 @@ public class UserDto extends PageDto implements Serializable {
     public void setOrgId(String orgId) {
     public void setOrgId(String orgId) {
         this.orgId = orgId;
         this.orgId = orgId;
     }
     }
+
+    public String getStaffName() {
+        return staffName;
+    }
+
+    public void setStaffName(String staffName) {
+        this.staffName = staffName;
+    }
 }
 }

+ 8 - 1
java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml

@@ -455,6 +455,9 @@
         <if test="name !=null and name != ''">
         <if test="name !=null and name != ''">
             and a.name like contact('%',#{name},'%')
             and a.name like contact('%',#{name},'%')
         </if>
         </if>
+        <if test="staffName !=null and staffName != ''">
+            and a.name like contact('%',#{staffName},'%')
+        </if>
         <if test="staffId != null and staffId !=''">
         <if test="staffId != null and staffId !=''">
             and uosr.staff_id = #{staffId}
             and uosr.staff_id = #{staffId}
         </if>
         </if>
@@ -484,13 +487,17 @@
         <if test="name !=null and name != ''">
         <if test="name !=null and name != ''">
             and a.name like contact('%',#{name},'%')
             and a.name like contact('%',#{name},'%')
         </if>
         </if>
+        <if test="staffName !=null and staffName != ''">
+            and a.name like contact('%',#{staffName},'%')
+        </if>
         <if test="staffId != null and staffId !=''">
         <if test="staffId != null and staffId !=''">
             and uosr.staff_id = #{staffId}
             and uosr.staff_id = #{staffId}
         </if>
         </if>
-        order by desc
+
         <if test="page != -1 and page != null ">
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
             limit #{page}, #{row}
         </if>
         </if>
+        order by desc
     </select>
     </select>
 
 
 </mapper>
 </mapper>