|
|
@@ -3,7 +3,9 @@ package com.cyksj.web.controller.manage.goods;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
+import com.cyksj.mapper.GoodsDonQaRelateMapper;
|
|
|
import com.cyksj.model.entity.GoodsDonQa;
|
|
|
+import com.cyksj.model.entity.GoodsDonQaRelate;
|
|
|
import com.cyksj.model.views.GoodsDonQaView;
|
|
|
import com.cyksj.service.mange.GoodsDonQaService;
|
|
|
import com.cyksj.service.mange.RefreshCacheService;
|
|
|
@@ -35,6 +37,8 @@ public class GoodsDonQuestionController {
|
|
|
|
|
|
private final RefreshCacheService refreshCacheService;
|
|
|
|
|
|
+ private final GoodsDonQaRelateMapper goodsDonQaRelateMapper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 新增问题
|
|
|
@@ -56,6 +60,10 @@ public class GoodsDonQuestionController {
|
|
|
if (byId != null && byId.getDeleted()) {
|
|
|
byId.setDeleted(false);
|
|
|
goodsDonQaService.updateById(byId);
|
|
|
+ goodsDonQaRelateMapper.update(null, Wrappers.lambdaUpdate(GoodsDonQaRelate.class)
|
|
|
+ .set(GoodsDonQaRelate::getDeleted, 0)
|
|
|
+ .eq(GoodsDonQaRelate::getGoodsId, id)
|
|
|
+ .eq(GoodsDonQaRelate::getDeleted, 1));
|
|
|
refreshCacheService.goodsQuestionCache();
|
|
|
}
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|