...
|
...
|
@@ -95,8 +95,20 @@ public class ProductLimitUserHelpServiceImpl implements IProductLimitUserHelpSer |
|
|
|
|
|
@Override
|
|
|
public void addHelpUserInfo(LimitProductHelpUserRequestBO limitProductHelpUserRequestBO) {
|
|
|
//判断传入的信息表中是否已经存在
|
|
|
List<LimitProductHelpUser> list = productLimitUserHelpMapper.selectHelpInfo(limitProductHelpUserRequestBO.getUserId(), limitProductHelpUserRequestBO.getLimitProductCode());
|
|
|
Boolean flag = true;
|
|
|
if (CollectionUtils.isNotEmpty(list)){
|
|
|
for (LimitProductHelpUser limitProductHelpUser : list){
|
|
|
if (null != limitProductHelpUser.getIsShare() && "Y".equals(limitProductHelpUser.getIsShare())){
|
|
|
flag = false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (flag){
|
|
|
LimitProductHelpUser limitProductHelpUser = converToModel(limitProductHelpUserRequestBO);
|
|
|
productLimitUserHelpMapper.addHelpUserInfo(limitProductHelpUser);
|
|
|
}
|
|
|
//清除缓存
|
|
|
String redisKeySuffix = limitProductHelpUserRequestBO.getUserId() + ":" + limitProductHelpUserRequestBO.getLimitProductCode();
|
|
|
redisValueCache.delete(CacheKeyEnum.LIMIT_USER_HELP_INFO, redisKeySuffix);
|
...
|
...
|
|