mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
新增 微信第三方平台 提交代码审核接口
This commit is contained in:
@@ -5,15 +5,19 @@ 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.domain.agentDev.CategoryInfo;
|
||||
import com.jsowell.pile.dto.agentDev.CommitCodeDTO;
|
||||
import com.jsowell.pile.dto.agentDev.GetComponentTokenDTO;
|
||||
import com.jsowell.pile.vo.agentDev.AuthInfo;
|
||||
import com.jsowell.pile.dto.agentDev.SubmitAuditDTO;
|
||||
import com.jsowell.pile.vo.agentDev.AuthInfoVO;
|
||||
import com.jsowell.service.AgentDevService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 代开发小程序Controller
|
||||
*
|
||||
@@ -95,8 +99,8 @@ public class AgentDevController extends BaseController {
|
||||
logger.info("使用授权码获取授权信息 params:{}", authorizationCode);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
AuthInfo authInfo = agentDevService.getAuthInfoByAuthCode(authorizationCode);
|
||||
response = new RestApiResponse<>(authInfo);
|
||||
AuthInfoVO authInfoVO = agentDevService.getAuthInfoByAuthCode(authorizationCode);
|
||||
response = new RestApiResponse<>(authInfoVO);
|
||||
} catch (Exception e) {
|
||||
logger.error("使用授权码获取授权信息 error,", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
@@ -126,4 +130,46 @@ public class AgentDevController extends BaseController {
|
||||
logger.info("提交代码并生成体验版小程序 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取类目列表
|
||||
*
|
||||
* @param authorizerAppid 用户授权的appid
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getAllCategoryName/{authorizerAppid}")
|
||||
public RestApiResponse<?> getAllCategoryName(@PathVariable("authorizerAppid") String authorizerAppid) {
|
||||
logger.info("获取类目列表 params:{}", authorizerAppid);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
List<CategoryInfo> categoryInfos = agentDevService.getAllCategoryName(authorizerAppid);
|
||||
response = new RestApiResponse<>(categoryInfos);
|
||||
} catch (Exception e) {
|
||||
logger.error("获取类目列表 error,", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("获取类目列表 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交代码审核
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/submitAudit")
|
||||
public RestApiResponse<?> submitAudit(@RequestBody SubmitAuditDTO dto) {
|
||||
logger.info("提交代码审核 params:{}", JSONObject.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = agentDevService.submitAudit(dto);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (Exception e) {
|
||||
logger.error("提交代码审核 error,", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("提交代码审核 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user