mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
5.0
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
# 服务示例
|
||||
|
||||
- sop-story:微服务示例
|
||||
- sop-auth:应用授权示例
|
||||
- sop-springmvc:springmvc工程实例
|
||||
|
@@ -12,6 +12,9 @@ public interface StoryService {
|
||||
@Open("story.save")
|
||||
Integer save(StorySaveDTO storySaveDTO);
|
||||
|
||||
@Open("story.update")
|
||||
Integer update(Integer id, StorySaveDTO storySaveDTO);
|
||||
|
||||
@Open("story.get")
|
||||
StoryResponse getById(Integer id);
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
package com.gitee.sop.storyweb.open.impl;
|
||||
|
||||
import com.gitee.sop.support.annotation.Open;
|
||||
import com.gitee.sop.storyweb.open.StoryService;
|
||||
import com.gitee.sop.storyweb.open.req.StorySaveDTO;
|
||||
import com.gitee.sop.storyweb.open.resp.StoryResponse;
|
||||
import com.gitee.sop.support.context.OpenContext;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -20,6 +20,18 @@ public class StoreyServiceImpl implements StoryService {
|
||||
@Override
|
||||
public Integer save(StorySaveDTO storySaveDTO) {
|
||||
System.out.println("save storySaveDTO:" + storySaveDTO);
|
||||
System.out.println("appId:" + OpenContext.getAppId());
|
||||
System.out.println("apiName:" + OpenContext.getApiName());
|
||||
System.out.println("version:" + OpenContext.getVersion());
|
||||
System.out.println("token:" + OpenContext.getAppAuthToken());
|
||||
System.out.println("ip:" + OpenContext.getClientIp());
|
||||
System.out.println("traceId:" + OpenContext.getTraceId());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer update(Integer id, StorySaveDTO storySaveDTO) {
|
||||
System.out.println("update, id:" + id + ", storySaveDTO=" + storySaveDTO);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user