|
@@ -7,7 +7,10 @@ import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
import com.zhongzheng.common.enums.BusinessType;
|
|
import com.zhongzheng.common.enums.BusinessType;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsAddBo;
|
|
import com.zhongzheng.modules.goods.bo.GoodsAddBo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsBankAddBo;
|
|
import com.zhongzheng.modules.goods.bo.GoodsBankAddBo;
|
|
|
|
|
+import com.zhongzheng.modules.goods.bo.GoodsEditBo;
|
|
|
|
|
+import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
|
|
+import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
import com.zhongzheng.modules.goods.vo.TopGoodsVo;
|
|
import com.zhongzheng.modules.goods.vo.TopGoodsVo;
|
|
|
import com.zhongzheng.modules.top.goods.bo.TopGoodsQueryBo;
|
|
import com.zhongzheng.modules.top.goods.bo.TopGoodsQueryBo;
|
|
|
import com.zhongzheng.modules.top.goods.service.ITopGoodsService;
|
|
import com.zhongzheng.modules.top.goods.service.ITopGoodsService;
|
|
@@ -75,4 +78,24 @@ public class TopGoodsController extends BaseController {
|
|
|
public AjaxResult<Void> addPoints(@RequestBody GoodsAddBo bo) {
|
|
public AjaxResult<Void> addPoints(@RequestBody GoodsAddBo bo) {
|
|
|
return toAjax(iGoodsService.insertPointsByAddBo(bo)>0 ? 1 : 0);
|
|
return toAjax(iGoodsService.insertPointsByAddBo(bo)>0 ? 1 : 0);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 新增题库商品
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation("编辑积分商品")
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:goods:add')")
|
|
|
|
|
+ @Log(title = "编辑积分商品", businessType = BusinessType.INSERT)
|
|
|
|
|
+ @PostMapping("/updatePoints")
|
|
|
|
|
+ public AjaxResult<Void> updatePoints(@RequestBody GoodsEditBo bo) {
|
|
|
|
|
+ return toAjax(iGoodsService.updatePointsByEditBo(bo) ? 1 : 0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation("查询积分商品列表")
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:goods:list')")
|
|
|
|
|
+ @GetMapping("/listPoints")
|
|
|
|
|
+ public TableDataInfo<GoodsVo> listPoints(GoodsQueryBo bo) {
|
|
|
|
|
+ startPage();
|
|
|
|
|
+ List<GoodsVo> list = iGoodsService.queryPointsList(bo);
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|