支持礼物权重单独编辑
This commit is contained in:
parent
527a0b916d
commit
e3942ff651
@ -53,11 +53,18 @@ public class SysGiftConfigRestController extends BaseController {
|
||||
|
||||
@OpsOperationReqLog(value = "修改礼物信息")
|
||||
@PutMapping
|
||||
public void updateGift(@RequestBody SysGiftConfigCO param) {
|
||||
param.setUpdateUser(getReqUserId());
|
||||
sysGiftConfigService.updateGift(param);
|
||||
}
|
||||
|
||||
public void updateGift(@RequestBody SysGiftConfigCO param) {
|
||||
param.setUpdateUser(getReqUserId());
|
||||
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) {
|
||||
|
||||
@ -83,10 +83,10 @@ public class SysGiftConfigServiceImpl implements SysGiftConfigService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateGift(SysGiftConfigCO param) {
|
||||
ResponseAssert.notNull(GiftErrorCode.BAD_REQUEST, param.getId());
|
||||
GiftConfigDTO orlGiftConfig = ResponseAssert.requiredSuccess(
|
||||
giftConfigClient.getById(param.getId()));
|
||||
public void updateGift(SysGiftConfigCO param) {
|
||||
ResponseAssert.notNull(GiftErrorCode.BAD_REQUEST, param.getId());
|
||||
GiftConfigDTO orlGiftConfig = ResponseAssert.requiredSuccess(
|
||||
giftConfigClient.getById(param.getId()));
|
||||
ResponseAssert.notNull(GiftErrorCode.GIFT_NOT_FOUND, orlGiftConfig);
|
||||
GiftConfigDTO newGiftConfig = getGiftConfig(param);
|
||||
if (StringUtils.isNotBlank(param.getAccount())){
|
||||
@ -99,12 +99,25 @@ public class SysGiftConfigServiceImpl implements SysGiftConfigService {
|
||||
ResponseAssert.isTrue(CommonErrorCode.UPDATE_FAILURE,
|
||||
ResponseAssert.requiredSuccess(giftConfigClient.updateGift(newGiftConfig)));
|
||||
giftConfigClient.removeGiftCache();
|
||||
|
||||
removeRemainingInventory(orlGiftConfig, newGiftConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addGift(SysGiftConfigCO param) {
|
||||
|
||||
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);
|
||||
if (GiftTabEnum.EXCLUSIVE.equals(param.getGiftTab())) {
|
||||
UserProfileDTO userProfile = userProfileClient.getByAccount(param.getSysOrigin(),
|
||||
|
||||
@ -25,13 +25,18 @@ public interface SysGiftConfigService {
|
||||
*/
|
||||
PageResult<SysGiftConfigCO> pageGiftInfo(GiftConsoleQryCmd query);
|
||||
|
||||
/**
|
||||
* 修改礼物信息.
|
||||
*/
|
||||
void updateGift(SysGiftConfigCO param);
|
||||
|
||||
/**
|
||||
* 新增礼物信息.
|
||||
/**
|
||||
* 修改礼物信息.
|
||||
*/
|
||||
void updateGift(SysGiftConfigCO param);
|
||||
|
||||
/**
|
||||
* 修改礼物排序权重.
|
||||
*/
|
||||
void updateGiftSort(SysGiftConfigCO param);
|
||||
|
||||
/**
|
||||
* 新增礼物信息.
|
||||
*/
|
||||
void addGift(SysGiftConfigCO param);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user