master
parent
15434fbe69
commit
5ca728e6a3
|
@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import com.muyu.common.core.text.Convert;
|
import com.muyu.common.core.text.Convert;
|
||||||
import com.muyu.product.domain.model.RuleInfoAddModel;
|
import com.muyu.product.domain.model.RuleInfoAddModel;
|
||||||
import com.muyu.product.domain.resp.RuleInfoResp;
|
import com.muyu.product.domain.resp.RuleInfoResp;
|
||||||
|
import com.muyu.product.domain.resp.RuleInfoUpdResp;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
@ -77,8 +78,8 @@ public class RuleInfoController extends BaseController {
|
||||||
@RequiresPermissions("product:rule:query")
|
@RequiresPermissions("product:rule:query")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||||
public Result<RuleInfo> getInfo(@PathVariable("id") Long id) {
|
public Result<RuleInfoUpdResp> getInfo(@PathVariable("id") Long id) {
|
||||||
return Result.success(ruleInfoService.getById(id));
|
return Result.success(ruleInfoService.getUpdById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,8 +100,9 @@ public class RuleInfoController extends BaseController {
|
||||||
@Log(title = "商品规格", businessType = BusinessType.UPDATE)
|
@Log(title = "商品规格", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/{id}")
|
@PutMapping("/{id}")
|
||||||
@ApiOperation("修改商品规格")
|
@ApiOperation("修改商品规格")
|
||||||
public Result<String> edit(@PathVariable Long id, @RequestBody RuleInfoEditReq ruleInfoEditReq) {
|
public Result<String> edit(@PathVariable Long id, @RequestBody RuleInfoUpdResp ruleInfoUpdResp) {
|
||||||
return toAjax(ruleInfoService.updateById(RuleInfo.editBuild(id,ruleInfoEditReq)));
|
ruleInfoService.updateRuleInfo(id,ruleInfoUpdResp);
|
||||||
|
return toAjax(ruleInfoService.updateById(RuleInfo.editBuild(id,ruleInfoUpdResp)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue