feat(REQ-2899):新增导入接口,暂没实现。。

This commit is contained in:
李昆鹏 2024-08-29 16:57:35 +08:00
parent d643dae9c4
commit 07b8226692
6 changed files with 107 additions and 2 deletions

View File

@ -71,4 +71,8 @@ public interface PageElementApi {
/** 查询页面元素关联关系 **/
@PostMapping("/api/pageElement/getFeatureResourceRelations")
ApiResult<FeatureResourcePageElementRelationViewResp> getFeatureResourceRelations(@RequestBody @Valid IdReq req);
/** 查询页面元素关联关系 **/
@PostMapping("/api/pageElement/importData")
ApiResult<Void> importData(@RequestBody @Valid PageElementImportDataReq req);
}

View File

@ -0,0 +1,86 @@
package cn.axzo.tyr.client.model.req;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author likunpeng
* @version 1.0
* @date 2024/8/29
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PageElementImportDataReq implements Serializable {
/**
*
*/
@NotBlank(message = "端信息不能为空")
private String terminal;
/**
* 元素分类
*/
@NotBlank(message = "元素分类不能为空")
private String itemCode;
/**
* 元素组编码
*/
@NotBlank(message = "元素组编码不能为空")
private String groupCode;
/**
* 元素编码
*/
@NotBlank(message = "元素编码不能为空")
private String code;
/**
* 元素名称
*/
@NotBlank(message = "元素名称不能为空")
private String name;
/**
* 元素类型PAGE:页面COMPONENT:页面里的组件
*/
@NotBlank(message = "元素类型不能为空")
private String type;
/**
* 元素资源类型APPH5PC
*/
@NotBlank(message = "元素资源类型不能为空")
private String appType;
/**
* H5的appId
*/
private String appId;
/**
* 元素支持的最低版本号
*/
private Integer version;
/**
* 路由地址
*/
private String linkUrl;
/** ios跳转地址 **/
private String iosRouterUrl;
/** android跳转地址 **/
private String androidRouterUrl;
private Long operatorId;
}

View File

@ -49,10 +49,10 @@ public class SaveOrUpdatePageElementReq {
/** pc/h5路由地址 **/
private String linkUrl;
/** ios挑战地址 **/
/** ios跳转地址 **/
private String iosRouterUrl;
/** android挑战地址 **/
/** android跳转地址 **/
private String androidRouterUrl;
/** 版本号 **/

View File

@ -95,4 +95,10 @@ public class PageElementController implements PageElementApi {
public ApiResult<FeatureResourcePageElementRelationViewResp> getFeatureResourceRelations(IdReq req) {
return ApiResult.ok(saasPageElementService.getFeatureResourceRelations(req.getId()));
}
@Override
public ApiResult<Void> importData(PageElementImportDataReq req) {
saasPageElementService.importData(req);
return ApiResult.ok();
}
}

View File

@ -83,4 +83,6 @@ public interface SaasPageElementService extends IService<SaasPageElement> {
void delete(DeletePageElementReq req);
FeatureResourcePageElementRelationViewResp getFeatureResourceRelations(Long pageElementId);
void importData(PageElementImportDataReq req);
}

View File

@ -649,6 +649,13 @@ public class SaasPageElementServiceImpl extends ServiceImpl<SaasPageElementMappe
return FeatureResourcePageElementRelationViewResp.builder().featureResources(featureResourceBasics).build();
}
@Override
public void importData(PageElementImportDataReq req) {
saasPageElementDao.lambdaQuery()
.eq(BaseEntity::getIsDelete, DeleteEnum.NORMAL.getValue())
.count();
}
private PageElementResp from(SaasPageElement saasPageElement,
Map<String, List<SaasFeatureResourceResp>> featureResources) {
PageElementResp pageElementResp = PageElementResp.builder().build();