Authored by ken.hu

u

... ... @@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
... ... @@ -41,4 +42,19 @@ public class ResourcesController {
return new ApiResponse.ApiResponseBuilder().data(data).code(200).message("resources data").build();
}
@RequestMapping(params = "method=ufo.resource.get")
public ApiResponse payment(@RequestParam(name = "contentCode") String contentCode,
@RequestParam(name = "clientType") String clientType) {
ResourcesRequestBody request = new ResourcesRequestBody();
request.setClientType(clientType);
request.setContentCode(contentCode);
logger.info("Get resources by content code[{}] and client type [{}].", request.getContentCode(),
request.getClientType());
List<Object> data = resourcesService.get(request);
logger.info("Get resources by content code[{}] and client type [{}] success.", request.getContentCode(),
request.getClientType());
return new ApiResponse.ApiResponseBuilder().data(data).code(200).message("resources data").build();
}
}
... ...