展示,更新soc,version,phone接口命名优化
This commit is contained in:
parent
96d3fb752f
commit
207b26010b
@ -13,21 +13,21 @@ import static com.xhpc.general.service.XhpcSmsServiceImpl.REDIS;
|
|||||||
* Date:2021-08-12 13
|
* Date:2021-08-12 13
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/SDataUpdate")
|
@RequestMapping("/wwdata")
|
||||||
public class XhpcServiceDataUpdateController {
|
public class XhpcServiceDataUpdateController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IXhpcServiceDataUpdateService xhpcServiceDataUpdateService;
|
IXhpcServiceDataUpdateService xhpcServiceDataUpdateService;
|
||||||
|
|
||||||
@GetMapping("/show")
|
@GetMapping("/list")
|
||||||
public AjaxResult showList(){
|
public AjaxResult list(){
|
||||||
|
|
||||||
return AjaxResult.success(xhpcServiceDataUpdateService.getServiceData());
|
return AjaxResult.success(xhpcServiceDataUpdateService.list());
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public AjaxResult updateDate(@RequestParam(required = false) String SOC, @RequestParam(required = false) String version, @RequestParam(required = false) String phone){
|
public AjaxResult update(@RequestParam(required = false) String SOC, @RequestParam(required = false) String version, @RequestParam(required = false) String phone){
|
||||||
|
|
||||||
return xhpcServiceDataUpdateService.updateServiceData(SOC, version, phone);
|
return xhpcServiceDataUpdateService.update(SOC, version, phone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,9 +11,9 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public interface IXhpcServiceDataUpdateService {
|
public interface IXhpcServiceDataUpdateService {
|
||||||
|
|
||||||
Map<String,Object> getServiceData();
|
Map<String,Object> list();
|
||||||
|
|
||||||
AjaxResult updateServiceData(String SOC, String version, String phone);
|
AjaxResult update(String SOC, String version, String phone);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ public class XhpcServiceDataUpdateServiceImpl implements IXhpcServiceDataUpdateS
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getServiceData() {
|
public Map<String, Object> list() {
|
||||||
|
|
||||||
Map<String,Object> list=new HashMap<>();
|
Map<String,Object> list=new HashMap<>();
|
||||||
String cacheSOC = redisService.getCacheObject("global:SOC");
|
String cacheSOC = redisService.getCacheObject("global:SOC");
|
||||||
@ -33,7 +33,7 @@ public class XhpcServiceDataUpdateServiceImpl implements IXhpcServiceDataUpdateS
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult updateServiceData(String SOC, String version, String phone) {
|
public AjaxResult update(String SOC, String version, String phone) {
|
||||||
|
|
||||||
if(SOC!=null) {
|
if(SOC!=null) {
|
||||||
int soc = Integer.parseInt(SOC);
|
int soc = Integer.parseInt(SOC);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user