mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 03:55:17 +08:00
新增 微信第三方平台 提交代码生成体验版小程序接口
This commit is contained in:
@@ -5,10 +5,10 @@ import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.domain.AuthorizationEventResult;
|
||||
import com.jsowell.pile.dto.GetComponentTokenDTO;
|
||||
import com.jsowell.pile.dto.agentDev.CommitCodeDTO;
|
||||
import com.jsowell.pile.dto.agentDev.GetComponentTokenDTO;
|
||||
import com.jsowell.pile.vo.agentDev.AuthInfo;
|
||||
import com.jsowell.service.AgentDevService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -86,6 +86,7 @@ public class AgentDevController extends BaseController {
|
||||
|
||||
/**
|
||||
* 使用授权码获取授权信息
|
||||
*
|
||||
* @param authorizationCode
|
||||
* @return
|
||||
*/
|
||||
@@ -103,4 +104,26 @@ public class AgentDevController extends BaseController {
|
||||
logger.info("使用授权码获取授权信息 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交代码并生成体验版小程序
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/commitCode")
|
||||
public RestApiResponse<?> commitCode(@RequestBody CommitCodeDTO dto) {
|
||||
logger.info("提交代码并生成体验版小程序 params:{}", JSONObject.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String commitResult = agentDevService.commitCode(dto);
|
||||
response = new RestApiResponse<>(commitResult);
|
||||
} catch (Exception e) {
|
||||
logger.error("提交代码并生成体验版小程序 error,", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("提交代码并生成体验版小程序 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user