1、去除非必要事务
2、对分布式多节点并发时可能存在生成相同的雪花算法id问题进行处理 3、其他问题优化
This commit is contained in:
parent
65e7f9750a
commit
575458afb3
@ -26,7 +26,6 @@ import javax.validation.constraints.Min;
|
||||
@RestController
|
||||
@Api(tags = "买家端,预存款充值记录接口")
|
||||
@RequestMapping("/buyer/trade/recharge")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RechargeTradeBuyerController {
|
||||
|
||||
@Autowired
|
||||
|
@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@Api(tags = "买家端,余额提现记录接口")
|
||||
@RequestMapping("/buyer/member/withdrawApply")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MemberWithdrawApplyBuyerController {
|
||||
@Autowired
|
||||
private MemberWithdrawApplyService memberWithdrawApplyService;
|
||||
|
@ -25,7 +25,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@Api(tags = "买家端,预存款充值记录接口")
|
||||
@RequestMapping("/buyer/member/recharge")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RechargeBuyerController {
|
||||
|
||||
@Autowired
|
||||
|
@ -3,12 +3,19 @@ server:
|
||||
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
threads:
|
||||
min-spare: 50
|
||||
max: 1000
|
||||
#
|
||||
# tomcat:
|
||||
# #最大链接数,默认不设置,默认是10000
|
||||
# max-connections: 6500
|
||||
# #最大等待队列长度,允许HTTP请求缓存到请求队列的最大个数,默认不限制
|
||||
# accept-count: 1000
|
||||
# threads:
|
||||
# #最少闲置
|
||||
# min-spare: 50
|
||||
# #最大线程数 ,默认是200
|
||||
# max: 800
|
||||
netty:
|
||||
connection-timeout:
|
||||
|
||||
# 与Spring Boot 2一样,默认情况下,大多数端点都不通过http公开,我们公开了所有端点。对于生产,您应该仔细选择要公开的端点。
|
||||
management:
|
||||
|
@ -211,6 +211,14 @@ public interface Cache<T> {
|
||||
* @return 计数器结果
|
||||
*/
|
||||
Long incr(String key, long liveTime);
|
||||
/**
|
||||
* redis 计数器 累加
|
||||
* 注:到达liveTime之后,该次增加取消,即自动-1,而不是redis值为空
|
||||
*
|
||||
* @param key 为累计的key,同一key每次调用则值 +1
|
||||
* @return 计数器结果
|
||||
*/
|
||||
Long incr(String key);
|
||||
//-----------------------------------------------redis计数---------------------------------------------
|
||||
|
||||
/**
|
||||
|
@ -80,7 +80,7 @@ public class RedisCache implements Cache {
|
||||
@Override
|
||||
public Boolean remove(Object key) {
|
||||
|
||||
return redisTemplate.delete(key);
|
||||
return redisTemplate.delete(key);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,13 +207,19 @@ public class RedisCache implements Cache {
|
||||
RedisAtomicLong entityIdCounter = new RedisAtomicLong(key, redisTemplate.getConnectionFactory());
|
||||
Long increment = entityIdCounter.getAndIncrement();
|
||||
//初始设置过期时间
|
||||
if ((null == increment || increment == 0) && liveTime > 0) {
|
||||
if (increment == 0 && liveTime > 0) {
|
||||
entityIdCounter.expire(liveTime, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
return increment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long incr(String key) {
|
||||
RedisAtomicLong entityIdCounter = new RedisAtomicLong(key, redisTemplate.getConnectionFactory());
|
||||
return entityIdCounter.getAndIncrement();
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用Sorted Set记录keyword
|
||||
* zincrby命令,对于一个Sorted Set,存在的就把分数加x(x可自行设定),不存在就创建一个分数为1的成员
|
||||
|
@ -2,6 +2,7 @@ package cn.lili.common.utils;
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ -10,18 +11,30 @@ import java.util.Date;
|
||||
*
|
||||
* @author Chopper
|
||||
*/
|
||||
@Slf4j
|
||||
public class SnowFlake {
|
||||
|
||||
/**
|
||||
* 机器id
|
||||
*/
|
||||
private static long workerId = 0L;
|
||||
/**
|
||||
* 机房id
|
||||
*/
|
||||
private static long datacenterId = 0L;
|
||||
// /**
|
||||
// * 机器id
|
||||
// */
|
||||
// private static long workerId = 0L;
|
||||
// /**
|
||||
// * 机房id
|
||||
// */
|
||||
// public static long datacenterId = 0L;
|
||||
|
||||
private static Snowflake snowflake = IdUtil.createSnowflake(workerId, datacenterId);
|
||||
private static Snowflake snowflake;
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*
|
||||
* @param workerId
|
||||
* @param datacenterId
|
||||
*/
|
||||
public static void initialize(long workerId, long datacenterId) {
|
||||
snowflake = IdUtil.getSnowflake(workerId, datacenterId);
|
||||
log.error(workerId+""+datacenterId);
|
||||
}
|
||||
|
||||
public static long getId() {
|
||||
return snowflake.nextId();
|
||||
@ -29,12 +42,14 @@ public class SnowFlake {
|
||||
|
||||
/**
|
||||
* 生成字符,带有前缀
|
||||
*
|
||||
* @param prefix
|
||||
* @return
|
||||
*/
|
||||
public static String createStr(String prefix) {
|
||||
return prefix + DateUtil.toString(new Date(), "yyyyMMdd") + SnowFlake.getId();
|
||||
}
|
||||
|
||||
public static String getIdStr() {
|
||||
return snowflake.nextId() + "";
|
||||
}
|
||||
|
@ -0,0 +1,58 @@
|
||||
package cn.lili.common.utils;
|
||||
|
||||
import cn.lili.cache.Cache;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* SnowflakeInitiator
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v1.0
|
||||
* 2022-01-14 14:04
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class SnowflakeInitiator {
|
||||
|
||||
/**
|
||||
* 缓存前缀
|
||||
*/
|
||||
private static String KEY = "{Snowflake}";
|
||||
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
/**
|
||||
* 尝试初始化
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
Long num = cache.incr(KEY);
|
||||
long dataCenter = num / 32;
|
||||
long workedId = num % 32;
|
||||
//如果数据中心大于32,则抹除缓存,从头开始
|
||||
if (dataCenter >= 32) {
|
||||
cache.remove(KEY);
|
||||
num = cache.incr(KEY);
|
||||
dataCenter = num / 32;
|
||||
workedId = num % 32;
|
||||
}
|
||||
SnowFlake.initialize(workedId, dataCenter);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SnowFlake.initialize(0, 8);
|
||||
|
||||
System.out.println(SnowFlake.getId());
|
||||
}
|
||||
}
|
@ -40,7 +40,6 @@ import java.util.Date;
|
||||
* @since 2020-03-126 18:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DistributionCashServiceImpl extends ServiceImpl<DistributionCashMapper, DistributionCash> implements DistributionCashService {
|
||||
/**
|
||||
* 分销员
|
||||
|
@ -34,7 +34,6 @@ import java.util.Objects;
|
||||
* @since 2020-03-24 23:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DistributionGoodsServiceImpl extends ServiceImpl<DistributionGoodsMapper, DistributionGoods> implements DistributionGoodsService {
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,6 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DistributionOrderServiceImpl extends ServiceImpl<DistributionOrderMapper, DistributionOrder> implements DistributionOrderService {
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020-03-24 23:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DistributionSelectedGoodsServiceImpl extends ServiceImpl<DistributionSelectedGoodsMapper, DistributionSelectedGoods> implements DistributionSelectedGoodsService {
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,6 @@ import java.util.concurrent.TimeUnit;
|
||||
* @since 2020-03-14 23:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DistributionServiceImpl extends ServiceImpl<DistributionMapper, Distribution> implements DistributionService {
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,6 @@ import java.util.List;
|
||||
* @since 2020/11/26 17:50
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class FileServiceImpl extends ServiceImpl<FileMapper, File> implements FileService {
|
||||
|
||||
@Autowired
|
||||
|
@ -34,7 +34,6 @@ import java.util.stream.Collectors;
|
||||
* @since 2020-02-18 16:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements BrandService {
|
||||
|
||||
/**
|
||||
|
@ -20,7 +20,6 @@ import java.util.List;
|
||||
* @since 2020-02-18 16:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class CategoryBrandServiceImpl extends ServiceImpl<CategoryBrandMapper, CategoryBrand> implements CategoryBrandService {
|
||||
|
||||
@Override
|
||||
|
@ -37,7 +37,6 @@ import java.util.stream.Collectors;
|
||||
* 2020-03-02 16:45:03
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class CategoryParameterGroupServiceImpl extends ServiceImpl<CategoryParameterGroupMapper, CategoryParameterGroup> implements CategoryParameterGroupService {
|
||||
/**
|
||||
* 商品参数
|
||||
|
@ -36,7 +36,6 @@ import java.util.stream.Collectors;
|
||||
* @since 2020-02-23 15:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {
|
||||
|
||||
private static final String DELETE_FLAG_COLUMN = "delete_flag";
|
||||
|
@ -18,7 +18,6 @@ import java.util.List;
|
||||
* @since 2020-02-23 15:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class CategorySpecificationServiceImpl extends ServiceImpl<CategorySpecificationMapper, CategorySpecification> implements CategorySpecificationService {
|
||||
|
||||
@Override
|
||||
|
@ -33,7 +33,6 @@ import java.util.*;
|
||||
* @since 2020/12/19
|
||||
**/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DraftGoodsServiceImpl extends ServiceImpl<DraftGoodsMapper, DraftGoods> implements DraftGoodsService {
|
||||
/**
|
||||
* 分类
|
||||
|
@ -27,7 +27,6 @@ import java.util.List;
|
||||
* 2020-02-23 15:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class GoodsGalleryServiceImpl extends ServiceImpl<GoodsGalleryMapper, GoodsGallery> implements GoodsGalleryService {
|
||||
/**
|
||||
* 设置
|
||||
|
@ -63,7 +63,6 @@ import java.util.*;
|
||||
* @since 2020-02-23 15:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {
|
||||
|
||||
|
||||
|
@ -63,7 +63,6 @@ import java.util.stream.Collectors;
|
||||
* @since 2020-02-23 15:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> implements GoodsSkuService {
|
||||
|
||||
/**
|
||||
|
@ -14,6 +14,5 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020/10/15
|
||||
**/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class GoodsWordsServiceImpl extends ServiceImpl<GoodsWordsMapper, GoodsWords> implements GoodsWordsService {
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ import java.util.List;
|
||||
* @since 2020-03-07 16:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class StoreGoodsLabelServiceImpl extends ServiceImpl<StoreGoodsLabelMapper, StoreGoodsLabel> implements StoreGoodsLabelService {
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,6 @@ import java.util.Optional;
|
||||
* @since 2020/11/18 2:25 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class GoodsCollectionServiceImpl extends ServiceImpl<GoodsCollectionMapper, GoodsCollection> implements GoodsCollectionService {
|
||||
|
||||
|
||||
|
@ -23,7 +23,6 @@ import java.util.Objects;
|
||||
* @since 2020/11/18 9:44 上午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MemberAddressServiceImpl extends ServiceImpl<MemberAddressMapper, MemberAddress> implements MemberAddressService {
|
||||
|
||||
@Override
|
||||
|
@ -51,7 +51,6 @@ import java.util.Map;
|
||||
* @since 2020-02-25 14:10:16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MemberEvaluationServiceImpl extends ServiceImpl<MemberEvaluationMapper, MemberEvaluation> implements MemberEvaluationService {
|
||||
|
||||
/**
|
||||
|
@ -63,7 +63,6 @@ import java.util.Objects;
|
||||
* @since 2021-03-29 14:10:16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements MemberService {
|
||||
|
||||
/**
|
||||
@ -433,11 +432,11 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
|
||||
* @param mobilePhone 手机号
|
||||
* @return 会员
|
||||
*/
|
||||
private List<Member> findMember(String mobilePhone, String userName) {
|
||||
private Long findMember(String mobilePhone, String userName) {
|
||||
QueryWrapper<Member> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("mobile", mobilePhone)
|
||||
.or().eq("username", userName);
|
||||
return this.baseMapper.selectList(queryWrapper);
|
||||
return this.baseMapper.selectCount(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -593,9 +592,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
|
||||
* @param mobilePhone 手机号
|
||||
*/
|
||||
private void checkMember(String userName, String mobilePhone) {
|
||||
List<Member> members = findMember(userName, mobilePhone);
|
||||
//判断手机号是否存在
|
||||
if (members != null && !members.isEmpty()) {
|
||||
if (findMember(userName, mobilePhone) > 0) {
|
||||
throw new ServiceException(ResultCode.USER_EXIST);
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020/11/17 3:48 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {
|
||||
|
||||
@Autowired
|
||||
|
@ -16,7 +16,6 @@ import java.util.List;
|
||||
* @author Chopper
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ShortLinkServiceImpl extends ServiceImpl<ShortLinkMapper, ShortLink> implements ShortLinkService {
|
||||
|
||||
@Override
|
||||
|
@ -18,7 +18,6 @@ import java.util.List;
|
||||
* @since 2020/11/17 7:37 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class AfterSaleLogServiceImpl extends ServiceImpl<AfterSaleLogMapper, AfterSaleLog> implements AfterSaleLogService {
|
||||
|
||||
@Override
|
||||
|
@ -19,7 +19,6 @@ import java.util.List;
|
||||
* @since 2020/11/17 7:38 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class AfterSaleReasonServiceImpl extends ServiceImpl<AfterSaleReasonMapper, AfterSaleReason> implements AfterSaleReasonService {
|
||||
|
||||
|
||||
|
@ -65,7 +65,6 @@ import java.util.stream.Collectors;
|
||||
* @since 2020/11/17 7:38 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class AfterSaleServiceImpl extends ServiceImpl<AfterSaleMapper, AfterSale> implements AfterSaleService {
|
||||
|
||||
/**
|
||||
|
@ -24,7 +24,6 @@ import java.util.List;
|
||||
* @since 2020/11/17 7:38 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem> implements OrderItemService {
|
||||
|
||||
@Override
|
||||
|
@ -30,7 +30,6 @@ import java.util.List;
|
||||
* @since 2020/11/17 7:36 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class OrderPriceServiceImpl implements OrderPriceService {
|
||||
|
||||
/**
|
||||
|
@ -85,7 +85,6 @@ import java.util.stream.Collectors;
|
||||
* @since 2020/11/17 7:38 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
|
||||
|
||||
private static final String ORDER_SN_COLUMN = "order_sn";
|
||||
@ -145,6 +144,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
||||
private TradeService tradeService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void intoDB(TradeDTO tradeDTO) {
|
||||
//检查TradeDTO信息
|
||||
checkTradeDTO(tradeDTO);
|
||||
|
@ -44,7 +44,6 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class StoreFlowServiceImpl extends ServiceImpl<StoreFlowMapper, StoreFlow> implements StoreFlowService {
|
||||
|
||||
/**
|
||||
|
File diff suppressed because one or more lines are too long
@ -29,7 +29,6 @@ import java.util.List;
|
||||
* @since 2020-05-5 15:10:16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ArticleCategoryServiceImpl extends ServiceImpl<ArticleCategoryMapper, ArticleCategory> implements ArticleCategoryService {
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,6 @@ import java.util.List;
|
||||
* @since 2020/11/18 11:40 上午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService {
|
||||
|
||||
@Override
|
||||
|
@ -17,7 +17,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020/11/18 11:40 上午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, Feedback> implements FeedbackService {
|
||||
|
||||
}
|
@ -19,7 +19,6 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PaymentServiceImpl implements PaymentService {
|
||||
|
||||
@Autowired
|
||||
|
@ -15,7 +15,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020-12-19 09:25
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RefundLogServiceImpl extends ServiceImpl<RefundLogMapper, RefundLog> implements RefundLogService {
|
||||
|
||||
@Override
|
||||
|
@ -42,7 +42,6 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser> implements AdminUserService {
|
||||
@Autowired
|
||||
private UserRoleService userRoleService;
|
||||
|
@ -17,7 +17,6 @@ import java.util.List;
|
||||
* @since 2020/11/22 12:08
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DepartmentRoleServiceImpl extends ServiceImpl<DepartmentRoleMapper, DepartmentRole> implements DepartmentRoleService {
|
||||
|
||||
|
||||
|
@ -27,7 +27,6 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements DepartmentService {
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,6 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RoleMenuServiceImpl extends ServiceImpl<RoleMenuMapper, RoleMenu> implements RoleMenuService {
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,6 @@ import java.util.List;
|
||||
* @since 2020/11/17 3:50 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,6 @@ import java.util.stream.Collectors;
|
||||
* @since 2020/11/17 3:45 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SystemLogServiceImpl implements SystemLogService {
|
||||
|
||||
@Autowired
|
||||
|
@ -20,7 +20,6 @@ import java.util.List;
|
||||
* @since 2020/11/17 3:52 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {
|
||||
|
||||
@Override
|
||||
|
@ -31,7 +31,6 @@ import java.util.*;
|
||||
* @author paulG
|
||||
* @since 2021/11/30
|
||||
**/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public abstract class AbstractPromotionsServiceImpl<M extends BaseMapper<T>, T extends BasePromotions> extends ServiceImpl<M, T> implements AbstractPromotionsService<T> {
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,6 @@ import java.util.stream.Collectors;
|
||||
* @since 2020/8/21
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class CouponServiceImpl extends AbstractPromotionsServiceImpl<CouponMapper, Coupon> implements CouponService {
|
||||
|
||||
/**
|
||||
|
@ -33,7 +33,6 @@ import java.util.List;
|
||||
* @since 2020/8/21
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class FullDiscountServiceImpl extends AbstractPromotionsServiceImpl<FullDiscountMapper, FullDiscount> implements FullDiscountService {
|
||||
|
||||
/**
|
||||
|
@ -43,7 +43,6 @@ import java.util.List;
|
||||
* @since 2021/7/1
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class KanjiaActivityGoodsServiceImpl extends AbstractPromotionsServiceImpl<KanJiaActivityGoodsMapper, KanjiaActivityGoods> implements KanjiaActivityGoodsService {
|
||||
|
||||
/**
|
||||
|
@ -33,7 +33,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @date 2021/7/1
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class KanjiaActivityLogServiceImpl extends ServiceImpl<KanJiaActivityLogMapper, KanjiaActivityLog> implements KanjiaActivityLogService {
|
||||
|
||||
@Autowired
|
||||
|
@ -48,7 +48,6 @@ import java.util.Objects;
|
||||
* @since 2021/7/1
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class KanjiaActivityServiceImpl extends ServiceImpl<KanJiaActivityMapper, KanjiaActivity> implements KanjiaActivityService {
|
||||
|
||||
@Autowired
|
||||
|
@ -40,7 +40,6 @@ import java.util.*;
|
||||
* @since 2020/8/21
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@CacheConfig(cacheNames = "{MemberCoupon}")
|
||||
public class MemberCouponServiceImpl extends ServiceImpl<MemberCouponMapper, MemberCoupon> implements MemberCouponService {
|
||||
|
||||
|
@ -47,7 +47,6 @@ import java.util.List;
|
||||
* @since 2020/8/21
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PintuanServiceImpl extends AbstractPromotionsServiceImpl<PintuanMapper, Pintuan> implements PintuanService {
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020/8/21
|
||||
**/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PointsGoodsCategoryServiceImpl extends ServiceImpl<PointsGoodsCategoryMapper, PointsGoodsCategory> implements PointsGoodsCategoryService {
|
||||
|
||||
/**
|
||||
|
@ -37,7 +37,6 @@ import java.util.*;
|
||||
* @since 2020/8/21
|
||||
**/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Slf4j
|
||||
public class PointsGoodsServiceImpl extends AbstractPromotionsServiceImpl<PointsGoodsMapper, PointsGoods> implements PointsGoodsService {
|
||||
|
||||
|
@ -41,7 +41,6 @@ import java.util.List;
|
||||
* @since 2021/3/18 9:22 上午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PromotionGoodsServiceImpl extends ServiceImpl<PromotionGoodsMapper, PromotionGoods> implements PromotionGoodsService {
|
||||
|
||||
private static final String SKU_ID_COLUMN = "sku_id";
|
||||
|
@ -27,7 +27,6 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PromotionServiceImpl implements PromotionService {
|
||||
/**
|
||||
* 秒杀
|
||||
|
@ -48,7 +48,6 @@ import java.util.stream.Collectors;
|
||||
* @since 2020/8/21
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Slf4j
|
||||
public class SeckillApplyServiceImpl extends ServiceImpl<SeckillApplyMapper, SeckillApply> implements SeckillApplyService {
|
||||
|
||||
|
@ -50,7 +50,6 @@ import java.util.Map;
|
||||
* @since 2020/8/21
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Slf4j
|
||||
public class SeckillServiceImpl extends AbstractPromotionsServiceImpl<SeckillMapper, Seckill> implements SeckillService {
|
||||
|
||||
|
@ -37,8 +37,6 @@ public class PageViewInterceptor {
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
|
||||
|
||||
@AfterReturning(returning = "rvt", pointcut = "@annotation(cn.lili.modules.statistics.aop.PageViewPoint)")
|
||||
|
@ -22,7 +22,6 @@ import java.util.Objects;
|
||||
* @since 2020/11/17 4:28 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BillStatisticsServiceImpl extends ServiceImpl<BillStatisticsMapper, Bill> implements BillStatisticsService {
|
||||
|
||||
|
||||
|
@ -18,7 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020-03-126 18:04:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DistributionCashStatisticsServiceImpl extends ServiceImpl<DistributionCashStatisticsMapper, DistributionCash>
|
||||
implements DistributionCashStatisticsService {
|
||||
|
||||
|
@ -24,7 +24,6 @@ import java.util.Objects;
|
||||
* @since 2020-02-25 14:10:16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MemberEvaluationStatisticsServiceImpl extends ServiceImpl<MemberEvaluationStatisticsMapper, MemberEvaluation> implements MemberEvaluationStatisticsService {
|
||||
|
||||
|
||||
|
@ -18,7 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020/8/21
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SeckillStatisticsServiceImpl extends ServiceImpl<SeckillStatisticsMapper, Seckill> implements SeckillStatisticsService {
|
||||
|
||||
|
||||
|
@ -48,7 +48,6 @@ import java.util.List;
|
||||
* @since 2020/11/17 4:28 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements BillService {
|
||||
|
||||
/**
|
||||
|
@ -18,7 +18,6 @@ import java.util.List;
|
||||
* @since 2020-03-07 09:24:33
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class FreightTemplateServiceChildImpl extends ServiceImpl<FreightTemplateChildMapper, FreightTemplateChild> implements FreightTemplateChildService {
|
||||
|
||||
@Override
|
||||
|
@ -34,7 +34,6 @@ import java.util.List;
|
||||
* @since 2020/11/22 16:00
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class FreightTemplateServiceImpl extends ServiceImpl<FreightTemplateMapper, FreightTemplate> implements FreightTemplateService {
|
||||
/**
|
||||
* 配送子模板
|
||||
|
@ -19,7 +19,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020/11/22 16:00
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class StoreAddressServiceImpl extends ServiceImpl<StoreAddressMapper, StoreAddress> implements StoreAddressService {
|
||||
|
||||
@Override
|
||||
|
@ -43,7 +43,6 @@ import java.util.*;
|
||||
* @since 2020-03-07 16:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class StoreDetailServiceImpl extends ServiceImpl<StoreDetailMapper, StoreDetail> implements StoreDetailService {
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,6 @@ import java.util.Optional;
|
||||
* @since 2020-03-07 16:18:56
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements StoreService {
|
||||
|
||||
/**
|
||||
|
@ -19,7 +19,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* @since 2020/11/17 8:02 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class AppVersionServiceImpl extends ServiceImpl<AppVersionMapper, AppVersion> implements AppVersionService {
|
||||
|
||||
@Override
|
||||
|
@ -27,7 +27,6 @@ import java.util.*;
|
||||
* @since 2020/12/2 11:11
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,6 @@ import java.util.List;
|
||||
* @since 2020/11/17 3:48 下午
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class VerificationSourceServiceImpl extends ServiceImpl<VerificationSourceMapper, VerificationSource> implements VerificationSourceService {
|
||||
|
||||
@Autowired
|
||||
|
@ -49,7 +49,6 @@ import java.util.Date;
|
||||
* @since 2020-02-25 14:10:16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MemberWalletServiceImpl extends ServiceImpl<MemberWalletMapper, MemberWallet> implements MemberWalletService {
|
||||
|
||||
@Autowired
|
||||
|
@ -38,7 +38,6 @@ import java.util.Date;
|
||||
* @since 2020-02-25 14:10:16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MemberWithdrawApplyServiceImpl extends ServiceImpl<MemberWithdrawApplyMapper, MemberWithdrawApply> implements MemberWithdrawApplyService {
|
||||
|
||||
@Autowired
|
||||
|
@ -33,7 +33,6 @@ import java.util.Date;
|
||||
* @since 2020-02-25 14:10:16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> implements RechargeService {
|
||||
|
||||
/**
|
||||
|
@ -22,7 +22,6 @@ import java.util.Date;
|
||||
* @since 2020-02-25 14:10:16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class WalletLogServiceImpl extends ServiceImpl<WalletLogMapper, WalletLog> implements WalletLogService {
|
||||
|
||||
@Override
|
||||
|
@ -36,7 +36,6 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class WechatMPMessageServiceImpl extends ServiceImpl<WechatMPMessageMapper, WechatMPMessage> implements WechatMPMessageService {
|
||||
@Autowired
|
||||
private WechatAccessTokenUtil wechatAccessTokenUtil;
|
||||
|
@ -35,7 +35,6 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class WechatMessageServiceImpl extends ServiceImpl<WechatMessageMapper, WechatMessage> implements WechatMessageService {
|
||||
|
||||
@Autowired
|
||||
|
@ -29,7 +29,6 @@ import java.util.List;
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@SpringBootTest
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Rollback()
|
||||
@ContextConfiguration
|
||||
@Configuration
|
||||
|
@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @since 2020/12/6 16:09
|
||||
*/
|
||||
@RestController
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Api(tags = "管理端,会员消息消息管理接口")
|
||||
@RequestMapping("/manager/message/member")
|
||||
public class MemberMessageManagerController {
|
||||
|
@ -24,7 +24,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @since 2020/11/17 4:34 下午
|
||||
*/
|
||||
@RestController
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Api(tags = "管理端,订单日志管理接口")
|
||||
@RequestMapping("/manager/orderLog")
|
||||
public class OrderLogManagerController {
|
||||
|
@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@Api(tags = "管理端,收款日志接口")
|
||||
@RequestMapping("/manager/paymentLog")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PaymentLogManagerController {
|
||||
|
||||
@Autowired
|
||||
|
@ -26,7 +26,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@Api(tags = "管理端,退款日志接口")
|
||||
@RequestMapping("/manager/refundLog")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RefundLogManagerController {
|
||||
@Autowired
|
||||
private RefundLogService refundLogService;
|
||||
|
@ -27,7 +27,6 @@ import java.util.List;
|
||||
@RestController
|
||||
@Api(tags = "管理端,验证码资源维护接口")
|
||||
@RequestMapping("/manager/verificationSource")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class VerificationSourceController {
|
||||
|
||||
@Autowired
|
||||
|
@ -46,7 +46,6 @@ import java.util.List;
|
||||
@RestController
|
||||
@Api(tags = "管理员")
|
||||
@RequestMapping("/manager/user")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Validated
|
||||
public class AdminUserManagerController {
|
||||
@Autowired
|
||||
|
@ -23,7 +23,6 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Api(tags = "日志管理接口")
|
||||
@RequestMapping("/manager/log")
|
||||
public class LogManagerController {
|
||||
|
@ -25,7 +25,6 @@ import java.util.List;
|
||||
@RestController
|
||||
@Api(tags = "管理端,行政地区管理接口")
|
||||
@RequestMapping("/manager/region")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RegionManagerController {
|
||||
@Autowired
|
||||
private RegionService regionService;
|
||||
|
@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @since 2020/12/6 16:09
|
||||
*/
|
||||
@RestController
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Api(tags = "管理端,店铺消息消息管理接口")
|
||||
@RequestMapping("/manager/message/store")
|
||||
public class StoreMessageManagerController {
|
||||
|
@ -29,7 +29,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@Api(tags = "管理端,余额提现记录接口")
|
||||
@RequestMapping("/manager/members/withdraw-apply")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MemberWithdrawApplyManagerController {
|
||||
@Autowired
|
||||
private MemberWithdrawApplyService memberWithdrawApplyService;
|
||||
|
@ -25,7 +25,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@Api(tags = "管理端,预存款充值记录接口")
|
||||
@RequestMapping("/manager/recharge")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RechargeManagerController {
|
||||
@Autowired
|
||||
private RechargeService rechargeService;
|
||||
|
@ -24,7 +24,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@Api(tags = "管理端,预存款充值记录接口")
|
||||
@RequestMapping("/manager/wallet/log")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class WalletLogManagerController {
|
||||
@Autowired
|
||||
private WalletLogService walletLogService;
|
||||
|
@ -23,7 +23,6 @@ import java.util.List;
|
||||
@RestController
|
||||
@Api(tags = "微信小程序消息订阅接口")
|
||||
@RequestMapping("/manager/message/wechatMPMessage")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class WechatMPMessageManagerController {
|
||||
@Autowired
|
||||
private WechatMPMessageService wechatMPMessageService;
|
||||
|
@ -23,7 +23,6 @@ import java.util.List;
|
||||
@RestController
|
||||
@Api(tags = "店铺端,分类绑定参数组管理接口")
|
||||
@RequestMapping("/store/goods/category/parameters")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class CategoryParameterGroupStoreController {
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user