Commit 0250208f by huluobin

update

parent 3fc2bb83
...@@ -31,4 +31,7 @@ public interface StoreTechnicianService extends IService<StoreTechnician> { ...@@ -31,4 +31,7 @@ public interface StoreTechnicianService extends IService<StoreTechnician> {
* @return * @return
*/ */
StoreTechnician getTechnician(); StoreTechnician getTechnician();
List<StoreTechnician> list(StoreTechnician storeTechnician);
} }
...@@ -106,4 +106,13 @@ public class StoreTechnicianServiceImpl extends ServiceImpl<StoreTechnicianMappe ...@@ -106,4 +106,13 @@ public class StoreTechnicianServiceImpl extends ServiceImpl<StoreTechnicianMappe
storeTechnician.setDepartmentName(gogirlToken.getDepartmentName()); storeTechnician.setDepartmentName(gogirlToken.getDepartmentName());
return storeTechnician; return storeTechnician;
} }
@Override
public List<StoreTechnician> list(StoreTechnician storeTechnician) {
LambdaQueryWrapper<StoreTechnician> wrapper = new LambdaQueryWrapper<>();
if (storeTechnician.getDepartmentId() != null) {
wrapper.eq(StoreTechnician::getDepartmentId, storeTechnician.getDepartmentId());
}
return this.list(wrapper);
}
} }
...@@ -16,11 +16,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -16,11 +16,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.TreeSet;
import java.util.stream.Collectors;
@Api("美甲师接口") @Api("美甲师接口")
@RestController @RestController
...@@ -61,16 +57,11 @@ public class StoreTechnicianController { ...@@ -61,16 +57,11 @@ public class StoreTechnicianController {
@ApiOperation(value = "根据店铺查询美甲师") @ApiOperation(value = "根据店铺查询美甲师")
@GetMapping("/customer/user/queryStoreUser") @GetMapping("/customer/user/queryStoreTechnician")
public JsonResult<List<StoreUser>> queryStoreUser(@RequestParam(required = false) Integer departmentId) { public JsonResult<List<StoreTechnician>> queryStoreTechnician(StoreTechnician storeTechnician) {
StoreUser storeUser = new StoreUser(); List<StoreTechnician> storeTechnicianList = storeTechnicianService.list(storeTechnician);
if (departmentId != null) { return JsonResult.success(storeTechnicianList);
storeUser.setDepartmentId(departmentId);
}
List<StoreUser> lists = new ArrayList<>(storeUserService.listUserForAllNotQuit(storeUser)
.stream().collect(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingInt(StoreUser::getId)))));
return JsonResult.success(lists);
} }
@ApiOperation(value = "美甲师根据code获取token") @ApiOperation(value = "美甲师根据code获取token")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment