feat():优化接口
parent
9514ea221c
commit
a3677a1b24
|
@ -158,6 +158,7 @@ public class RuleVersionController {
|
||||||
public Result<String> compileLoad(
|
public Result<String> compileLoad(
|
||||||
@Validated @RequestBody ValueData valueData
|
@Validated @RequestBody ValueData valueData
|
||||||
) throws IOException {
|
) throws IOException {
|
||||||
|
ruleVersionService.selectAll(valueData.getRuleVersionType());
|
||||||
ruleVersionService.valueTest(valueData);
|
ruleVersionService.valueTest(valueData);
|
||||||
return Result.success(null,"测试成功");
|
return Result.success(null,"测试成功");
|
||||||
}
|
}
|
||||||
|
@ -166,6 +167,7 @@ public class RuleVersionController {
|
||||||
@Operation(summary = "行数据测试",description = "行数据测试")
|
@Operation(summary = "行数据测试",description = "行数据测试")
|
||||||
public Result<String> row(
|
public Result<String> row(
|
||||||
@Validated @RequestBody DataRecord dataRecord){
|
@Validated @RequestBody DataRecord dataRecord){
|
||||||
|
ruleVersionService.selectAll(dataRecord.getRuleVersionType());
|
||||||
ruleVersionService.rowTest(dataRecord);
|
ruleVersionService.rowTest(dataRecord);
|
||||||
return Result.success(null,"测试成功");
|
return Result.success(null,"测试成功");
|
||||||
}
|
}
|
||||||
|
@ -174,6 +176,7 @@ public class RuleVersionController {
|
||||||
@Operation(summary = "集数据测试",description = "数据测试")
|
@Operation(summary = "集数据测试",description = "数据测试")
|
||||||
public Result<String> set(
|
public Result<String> set(
|
||||||
@Validated @RequestBody DataSet dataSet){
|
@Validated @RequestBody DataSet dataSet){
|
||||||
|
ruleVersionService.selectAll(dataSet.getRuleVersionType());
|
||||||
ruleVersionService.setTest(dataSet);
|
ruleVersionService.setTest(dataSet);
|
||||||
return Result.success(null,"测试成功");
|
return Result.success(null,"测试成功");
|
||||||
}
|
}
|
||||||
|
@ -194,4 +197,10 @@ public class RuleVersionController {
|
||||||
return Result.success(selectTableShow,"查询成功");
|
return Result.success(selectTableShow,"查询成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/selectVersion")
|
||||||
|
@Operation(summary = "查询所有版本")
|
||||||
|
public Result<List<RuleVersion>> selectVersion(){
|
||||||
|
return Result.success(ruleVersionService.list());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.muyu.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.common.domain.RuleVersion;
|
import com.muyu.common.domain.RuleVersion;
|
||||||
|
import com.muyu.common.domain.ValueData;
|
||||||
import com.muyu.common.domain.req.RuleVersionUpdReq;
|
import com.muyu.common.domain.req.RuleVersionUpdReq;
|
||||||
import com.muyu.common.domain.resp.RuleVersionResp;
|
import com.muyu.common.domain.resp.RuleVersionResp;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
@ -21,4 +22,6 @@ public interface RuleVersionMapper extends BaseMapper<RuleVersion> {
|
||||||
List<RuleVersionResp> selectByIdList(@Param("ruleId") Long ruleId);
|
List<RuleVersionResp> selectByIdList(@Param("ruleId") Long ruleId);
|
||||||
|
|
||||||
void updateStatus(@Param("ruleVersionId") Long ruleVersionId, @Param("ruleVersionUpdReq") RuleVersionUpdReq ruleVersionUpdReq);
|
void updateStatus(@Param("ruleVersionId") Long ruleVersionId, @Param("ruleVersionUpdReq") RuleVersionUpdReq ruleVersionUpdReq);
|
||||||
|
|
||||||
|
RuleVersion selectAll(@Param("RuleVersionType") String RuleVersionType);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,4 +42,6 @@ public interface RuleVersionService extends IService<RuleVersion> {
|
||||||
List<TableNames> selectTableShow(String dataTableName);
|
List<TableNames> selectTableShow(String dataTableName);
|
||||||
|
|
||||||
void uploadOSSJava(String ruleVersionType, String ruleVersionText);
|
void uploadOSSJava(String ruleVersionType, String ruleVersionText);
|
||||||
|
|
||||||
|
RuleVersion selectAll(String RuleVersionType);
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,6 +168,11 @@ public class RuleVersionServiceImpl
|
||||||
log.info(objectResult.getData());
|
log.info(objectResult.getData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RuleVersion selectAll(String RuleVersionType) {
|
||||||
|
return ruleVersionMapper.selectAll(RuleVersionType);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rowTest(DataRecord dataRecord) {
|
public void rowTest(DataRecord dataRecord) {
|
||||||
|
|
||||||
|
|
|
@ -34,4 +34,7 @@
|
||||||
WHERE
|
WHERE
|
||||||
rule_id = #{ruleId}
|
rule_id = #{ruleId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectAll" resultType="com.muyu.common.domain.RuleVersion">
|
||||||
|
select * from rule_version where rule_version_type = #{ruleVersionType}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue