店铺激活后激活码状态未同步修复

This commit is contained in:
张松 2025-02-27 18:38:14 +08:00
parent 9b35c78661
commit bf40ecc6d2
2 changed files with 6 additions and 2 deletions

View File

@ -41,7 +41,7 @@ public class MerchantRegister implements Serializable {
/**
* 店铺id
*/
private String shopId;
private Long shopId;
/**
* 激活码金额

View File

@ -81,6 +81,9 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
throw new CzgException("激活码已使用");
}
shopInfo.setExpireTime(DateUtil.offsetMonth(DateUtil.date(), merchantRegister.getPeriodMonth()).toLocalDateTime());
merchantRegister.setStatus(1);
merchantRegister.setShopId(shopInfo.getId());
merchantRegisterService.updateById(merchantRegister);
}
@Override
@ -100,8 +103,9 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
//设置激活码
shopInfo.setStatus(1);
shopInfo.setProfiles("release");
save(shopInfo);
activateShop(shopInfo, shopInfoAddDTO.getActivateCode());
return save(shopInfo);
return updateById(shopInfo);
}
@Override