dev798
wxy 2024-05-14 15:32:20 +08:00
parent f707761ef3
commit 9eb681ad67
2 changed files with 6 additions and 1 deletions

View File

@ -93,6 +93,7 @@ public class MallProductInfoController extends BaseController
@PutMapping @PutMapping
public Result edit(@RequestBody MallProductInfoForm mallProductInfo) public Result edit(@RequestBody MallProductInfoForm mallProductInfo)
{ {
mallProductInfo.setStep("1");
return toAjax(mallProductInfoService.updateMallProductInfo(mallProductInfo)); return toAjax(mallProductInfoService.updateMallProductInfo(mallProductInfo));
} }

View File

@ -101,7 +101,11 @@ public class MallProductInfoServiceImpl implements MallProductInfoService
public int updateMallProductInfo(MallProductInfoForm mallProductInfo) public int updateMallProductInfo(MallProductInfoForm mallProductInfo)
{ {
String step = mallProductInfo.getStep(); String step = mallProductInfo.getStep();
log.info("参数{}",step); if (step == null) {
// 在这里处理 step 为 null 的情况,可以抛出异常或者采取其他措施
log.error("Step 参数为空");
return 0; // 或者抛出异常
}
switch (step) { switch (step) {
case ProductConstant.STEP_ONE: case ProductConstant.STEP_ONE:
Long productInfoId = mallProductInfo.getId(); Long productInfoId = mallProductInfo.getId();