|
@@ -34,6 +34,7 @@ import java.util.Map;
|
|
|
public class WorkerMiniController {
|
|
|
private final SRepairService service;
|
|
|
private final SDictService dictService;
|
|
|
+ private final SWorkerService sWorkerService;
|
|
|
|
|
|
|
|
|
@PostMapping("/addOrder")
|
|
@@ -92,7 +93,7 @@ public class WorkerMiniController {
|
|
|
List<String> codeList = new ArrayList<>();
|
|
|
if(StrUtil.isNotEmpty(types)) {
|
|
|
String[] typeArray = types.split(",");
|
|
|
- Collections.addAll(codeList, typeArray);
|
|
|
+ Collections.addAll(typeList, typeArray);
|
|
|
}
|
|
|
if(StrUtil.isNotEmpty(codes)) {
|
|
|
String[] codeArray = codes.split(",");
|
|
@@ -107,12 +108,10 @@ public class WorkerMiniController {
|
|
|
|
|
|
@GetMapping("/getUserType")
|
|
|
public Map<String, Object> getUserType(String userId) {
|
|
|
- try {
|
|
|
- //普通用户 1 维修人员 2
|
|
|
- return SendUtil.send(true, ConstStr.RESULT_SUCCESS, 1);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ if (StrUtil.isEmpty(userId)){
|
|
|
+ return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
|
|
|
}
|
|
|
- return SendUtil.send(false, ConstStr.ADD_FAILED);
|
|
|
+ return SendUtil.send(true,"",sWorkerService.getUserType(userId));
|
|
|
+
|
|
|
}
|
|
|
}
|