展示,更新soc,version,phone接口命名优化

This commit is contained in:
little-cat-sweet 2021-08-13 16:15:29 +08:00
parent 96d3fb752f
commit 207b26010b
3 changed files with 10 additions and 10 deletions

View File

@ -13,21 +13,21 @@ import static com.xhpc.general.service.XhpcSmsServiceImpl.REDIS;
* Date:2021-08-12 13
*/
@RestController
@RequestMapping("/SDataUpdate")
@RequestMapping("/wwdata")
public class XhpcServiceDataUpdateController {
@Autowired
IXhpcServiceDataUpdateService xhpcServiceDataUpdateService;
@GetMapping("/show")
public AjaxResult showList(){
@GetMapping("/list")
public AjaxResult list(){
return AjaxResult.success(xhpcServiceDataUpdateService.getServiceData());
return AjaxResult.success(xhpcServiceDataUpdateService.list());
}
@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);
}
}

View File

@ -11,9 +11,9 @@ import java.util.Map;
*/
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);
}

View File

@ -19,7 +19,7 @@ public class XhpcServiceDataUpdateServiceImpl implements IXhpcServiceDataUpdateS
@Autowired
private RedisService redisService;
@Override
public Map<String, Object> getServiceData() {
public Map<String, Object> list() {
Map<String,Object> list=new HashMap<>();
String cacheSOC = redisService.getCacheObject("global:SOC");
@ -33,7 +33,7 @@ public class XhpcServiceDataUpdateServiceImpl implements IXhpcServiceDataUpdateS
@Override
public AjaxResult updateServiceData(String SOC, String version, String phone) {
public AjaxResult update(String SOC, String version, String phone) {
if(SOC!=null) {
int soc = Integer.parseInt(SOC);