package com.zhujizheng.IHome.aoperation.controller; import com.zhujizheng.IHome.aoperation.service.PYAOperationService; import com.zhujizheng.IHome.util.response.ResponseResult; import com.zhujizheng.IHome.util.response.RestResultGenerator; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; /** * Created with IntelliJ IDEA *

* Author: yons * Date: 2019/09/18 * Time: 00:20 * Description: * Copyright © 2019年 com.zhujizheng. All rights reserved. */ @Api("执行一个操作") @RestController @RequestMapping("/aoperation") public class PYAOperationController { @Autowired private PYAOperationService service; @GetMapping("/refresh") public ResponseResult refresh() { int result = service.syncUserAlbumData(); if (result == 0) { return RestResultGenerator.genErrorResult("操作失败"); } else { return RestResultGenerator.genResult("操作成功"); } } }