소스 검색

商品查看进入审核详情页参数调整

wxd 1 일 전
부모
커밋
c30846cdf0

+ 3 - 3
alien-second/src/main/java/shop/alien/second/controller/SecondGoodsController.java

@@ -132,9 +132,9 @@ public class SecondGoodsController {
      */
     @GetMapping("/getGoodsAuditStatus")
     @ApiOperation("商品审核状态查询-消息跳转用(商品状态 0:草稿 1:审核中 2:审核失败 3:已上架 4:已下架 5:已售出)")
-    public R<SecondGoods> getGoodsAuditStatus(@ApiParam("商品审核id") @RequestParam Integer auditId) {
-        log.info("SecondGoodsController.getGoodsAuditStatus?auditId={}", auditId);
-        Integer goodsId = secondGoodsAuditMapper.selectById(auditId).getGoodsId();
+    public R<SecondGoods> getGoodsAuditStatus(@ApiParam("商品审核id") @RequestParam Integer goodsId) {
+        log.info("SecondGoodsController.getGoodsAuditStatus?goodsId={}", goodsId);
+//        Integer goodsId = secondGoodsAuditMapper.selectById(auditId).getGoodsId();
         if (goodsId != null){
             // 获取商品审核状态
             QueryWrapper<SecondGoods> queryWrapper = new QueryWrapper<>();

+ 2 - 0
alien-second/src/main/java/shop/alien/second/service/impl/SecondGoodsServiceImpl.java

@@ -306,6 +306,7 @@ public class SecondGoodsServiceImpl extends ServiceImpl<SecondGoodsMapper, Secon
         lifeNotice.setBusinessId(goods.getAuditRecordId());
         lifeNotice.setTitle("商品审核通知");
         JSONObject jsonObject = new JSONObject();
+        jsonObject.put("goodsId", goods.getId());
         jsonObject.put("status", "true");
         jsonObject.put("message", "恭喜您的商品已发布成功。");
         lifeNotice.setContext(jsonObject.toJSONString());
@@ -343,6 +344,7 @@ public class SecondGoodsServiceImpl extends ServiceImpl<SecondGoodsMapper, Secon
         // TODO: 失败原因本期为固定文案,实际原因暂不保存
 
         JSONObject jsonObject = new JSONObject();
+        jsonObject.put("goodsId", goods.getId());
         jsonObject.put("status", "false");
         jsonObject.put("message", "抱歉您的商品发布失败,图片或文字存在违规行为,请您修改后重新发布。");
         lifeNotice.setContext(jsonObject.toJSONString());