Changes
parent
951f4ea1ae
commit
e14683bc64
|
@ -28,7 +28,7 @@ public class RuleEdition {
|
||||||
/**
|
/**
|
||||||
* 版本主键
|
* 版本主键
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id",type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 版本类
|
* 版本类
|
||||||
|
@ -58,5 +58,8 @@ public class RuleEdition {
|
||||||
* 内容
|
* 内容
|
||||||
*/
|
*/
|
||||||
private String ruleContent;
|
private String ruleContent;
|
||||||
|
/**
|
||||||
|
* 规则Id
|
||||||
|
*/
|
||||||
|
private Long ruleId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,11 @@ public class RuleController {
|
||||||
util.exportExcel(response, list, "规则");
|
util.exportExcel(response, list, "规则");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping("/findById/{id}")
|
@GetMapping("/findById/{id}")
|
||||||
@Operation(summary = "规则详细", description = "规则详细")
|
@Operation(summary = "规则详细", description = "规则详细")
|
||||||
public Result findById(@PathVariable("id") Long id) {
|
public Result findById(@PathVariable("id") Long id) {
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package com.muyu.rule.controller;
|
package com.muyu.rule.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.rule.service.RuleEditionService;
|
import com.muyu.rule.service.RuleEditionService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import rule.domain.Rule;
|
||||||
import rule.domain.RuleEdition;
|
import rule.domain.RuleEdition;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -82,6 +84,7 @@ public class RuleEditionController {
|
||||||
this.ruleEditionService.disable(id);
|
this.ruleEditionService.disable(id);
|
||||||
return Result.success(null, "操作成功");
|
return Result.success(null, "操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ID启用规则版本
|
* 通过ID启用规则版本
|
||||||
*
|
*
|
||||||
|
@ -94,4 +97,19 @@ public class RuleEditionController {
|
||||||
this.ruleEditionService.enable(id);
|
this.ruleEditionService.enable(id);
|
||||||
return Result.success(null, "操作成功");
|
return Result.success(null, "操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/findById/{id}")
|
||||||
|
@Operation(summary = "规则详细", description = "规则详细")
|
||||||
|
public Result findById(@PathVariable("id") Long id) {
|
||||||
|
return Result.success(ruleEditionService.list(new LambdaQueryWrapper<>() {{
|
||||||
|
eq(RuleEdition::getRuleId, id);
|
||||||
|
}}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue