You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
package com.mh.user.controller; |
|
|
|
import com.mh.common.http.HttpResult; |
|
import com.mh.user.model.DeviceTypeModel; |
|
import com.mh.user.service.CodeTableService; |
|
import org.springframework.beans.factory.annotation.Autowired; |
|
import org.springframework.web.bind.annotation.PostMapping; |
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import java.util.ArrayList; |
|
import java.util.List; |
|
|
|
@RestController |
|
public class CodeTableController { |
|
|
|
@Autowired |
|
CodeTableService codeTableService; |
|
|
|
@PostMapping("/deviceType") |
|
public HttpResult queryDeviceType(){ |
|
List<DeviceTypeModel> list; |
|
list=codeTableService.queryDeviceType(); |
|
return HttpResult.ok(list); |
|
} |
|
|
|
@PostMapping("/brand") |
|
public HttpResult queryBrand(){ |
|
List<DeviceTypeModel> list; |
|
list=codeTableService.queryBrand(); |
|
return HttpResult.ok(list); |
|
} |
|
|
|
@PostMapping("/paramType") |
|
public HttpResult queryParamType(){ |
|
List<DeviceTypeModel> list; |
|
list=codeTableService.queryDataByName("paramType"); |
|
return HttpResult.ok(list); |
|
} |
|
}
|
|
|