支持礼物权重单独编辑
This commit is contained in:
parent
527a0b916d
commit
e3942ff651
@ -58,6 +58,13 @@ public class SysGiftConfigRestController extends BaseController {
|
||||
sysGiftConfigService.updateGift(param);
|
||||
}
|
||||
|
||||
@OpsOperationReqLog(value = "修改礼物排序权重")
|
||||
@PutMapping("/sort")
|
||||
public void updateGiftSort(@RequestBody SysGiftConfigCO param) {
|
||||
param.setUpdateUser(getReqUserId());
|
||||
sysGiftConfigService.updateGiftSort(param);
|
||||
}
|
||||
|
||||
@OpsOperationReqLog(value = "新增礼物信息")
|
||||
@PostMapping
|
||||
public void addGift(@RequestBody SysGiftConfigCO param) {
|
||||
|
||||
@ -103,6 +103,19 @@ public class SysGiftConfigServiceImpl implements SysGiftConfigService {
|
||||
removeRemainingInventory(orlGiftConfig, newGiftConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateGiftSort(SysGiftConfigCO param) {
|
||||
ResponseAssert.notNull(GiftErrorCode.BAD_REQUEST, param.getId());
|
||||
ResponseAssert.notNull(GiftErrorCode.BAD_REQUEST, param.getSort());
|
||||
GiftConfigDTO giftConfig = ResponseAssert.requiredSuccess(
|
||||
giftConfigClient.getById(param.getId()));
|
||||
ResponseAssert.notNull(GiftErrorCode.GIFT_NOT_FOUND, giftConfig);
|
||||
giftConfig.setSort(param.getSort());
|
||||
ResponseAssert.isTrue(CommonErrorCode.UPDATE_FAILURE,
|
||||
ResponseAssert.requiredSuccess(giftConfigClient.updateGift(giftConfig)));
|
||||
giftConfigClient.removeGiftCache();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addGift(SysGiftConfigCO param) {
|
||||
GiftConfigDTO giftConfig = getGiftConfig(param);
|
||||
|
||||
@ -30,6 +30,11 @@ public interface SysGiftConfigService {
|
||||
*/
|
||||
void updateGift(SysGiftConfigCO param);
|
||||
|
||||
/**
|
||||
* 修改礼物排序权重.
|
||||
*/
|
||||
void updateGiftSort(SysGiftConfigCO param);
|
||||
|
||||
/**
|
||||
* 新增礼物信息.
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user