Search in sources :

Example 1 with Banner

use of com.whoiszxl.entity.Banner in project shopzz by whoiszxl.

the class BannerAdminController method update.

@SaCheckLogin
@PutMapping
@ApiOperation(value = "更新轮播图", notes = "更新轮播图", response = ResponseResult.class)
public ResponseResult<Boolean> update(@RequestBody BannerUpdateCommand bannerSaveCommand) {
    Banner banner = dozerUtils.map(bannerSaveCommand, Banner.class);
    boolean updateFlag = bannerService.updateById(banner);
    return ResponseResult.buildByFlag(updateFlag);
}
Also used : Banner(com.whoiszxl.entity.Banner) SaCheckLogin(cn.dev33.satoken.annotation.SaCheckLogin) ApiOperation(io.swagger.annotations.ApiOperation)

Example 2 with Banner

use of com.whoiszxl.entity.Banner in project shopzz by whoiszxl.

the class BannerAdminController method save.

@SaCheckLogin
@PostMapping
@ApiOperation(value = "新增轮播图", notes = "新增轮播图", response = ResponseResult.class)
public ResponseResult<Boolean> save(@RequestBody BannerSaveCommand bannerSaveCommand) {
    Banner banner = dozerUtils.map(bannerSaveCommand, Banner.class);
    boolean saveFlag = bannerService.save(banner);
    return ResponseResult.buildByFlag(saveFlag);
}
Also used : Banner(com.whoiszxl.entity.Banner) SaCheckLogin(cn.dev33.satoken.annotation.SaCheckLogin) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

SaCheckLogin (cn.dev33.satoken.annotation.SaCheckLogin)2 Banner (com.whoiszxl.entity.Banner)2 ApiOperation (io.swagger.annotations.ApiOperation)2