去除final使用@Autowired
This commit is contained in:
@@ -10,7 +10,6 @@ import cn.lili.common.utils.ThreadPoolUtil;
|
||||
import cn.lili.modules.base.entity.systemlog.SystemLogVO;
|
||||
import cn.lili.modules.connect.util.IpUtils;
|
||||
import cn.lili.modules.permission.service.SystemLogService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
@@ -35,7 +34,6 @@ import java.util.Map;
|
||||
@Aspect
|
||||
@Component
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SystemLogAspect {
|
||||
|
||||
/**
|
||||
@@ -43,12 +41,12 @@ public class SystemLogAspect {
|
||||
*/
|
||||
private static final ThreadLocal<Date> beginTimeThreadLocal = new NamedThreadLocal<>("SYSTEM-LOG");
|
||||
|
||||
|
||||
private final SystemLogService systemLogService;
|
||||
|
||||
private final HttpServletRequest request;
|
||||
|
||||
private final IpHelper ipHelper;
|
||||
@Autowired
|
||||
private SystemLogService systemLogService;
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
@Autowired
|
||||
private IpHelper ipHelper;
|
||||
|
||||
/**
|
||||
* Controller层切点,注解方式
|
||||
@@ -129,9 +127,10 @@ public class SystemLogAspect {
|
||||
* 保存日志
|
||||
*/
|
||||
private static class SaveSystemLogThread implements Runnable {
|
||||
|
||||
private final SystemLogVO systemLogVO;
|
||||
private final SystemLogService systemLogService;
|
||||
@Autowired
|
||||
private SystemLogVO systemLogVO;
|
||||
@Autowired
|
||||
private SystemLogService systemLogService;
|
||||
|
||||
public SaveSystemLogThread(SystemLogVO systemLogVO, SystemLogService systemLogService) {
|
||||
this.systemLogVO = systemLogVO;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package cn.lili.common.security.context;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
@@ -15,13 +14,13 @@ import org.springframework.stereotype.Component;
|
||||
* @since 2020/11/14 20:30
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class UserContextInit implements ApplicationRunner {
|
||||
|
||||
/**
|
||||
* 用户信息holder,认证信息的获取者
|
||||
*/
|
||||
private final AuthenticationHandler authenticationHandler;
|
||||
@Autowired
|
||||
private AuthenticationHandler authenticationHandler;
|
||||
|
||||
/**
|
||||
* 在项目加载时指定认证信息获取者
|
||||
|
||||
@@ -10,11 +10,11 @@ import cn.lili.common.sms.AliSmsUtil;
|
||||
import cn.lili.common.sms.SmsUtil;
|
||||
import cn.lili.common.utils.CommonUtil;
|
||||
import cn.lili.common.verification.enums.VerificationEnums;
|
||||
import cn.lili.modules.message.entity.dos.SmsSign;
|
||||
import cn.lili.modules.message.entity.dos.SmsTemplate;
|
||||
import cn.lili.modules.connect.util.Base64Utils;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.message.entity.dos.SmsSign;
|
||||
import cn.lili.modules.message.entity.dos.SmsTemplate;
|
||||
import cn.lili.modules.system.entity.dos.Setting;
|
||||
import cn.lili.modules.system.entity.dto.SmsSetting;
|
||||
import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
@@ -23,7 +23,6 @@ import com.aliyun.dysmsapi20170525.models.*;
|
||||
import com.aliyun.teaopenapi.models.Config;
|
||||
import com.google.gson.Gson;
|
||||
import com.xkcoding.http.util.StringUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -43,14 +42,14 @@ import java.util.Map;
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
|
||||
|
||||
private final Cache cache;
|
||||
|
||||
private final SettingService settingService;
|
||||
|
||||
private final MemberService memberService;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@Override
|
||||
public void sendSmsCode(String mobile, VerificationEnums verificationEnums, String uuid) {
|
||||
|
||||
@@ -11,7 +11,6 @@ import cn.lili.config.properties.JWTTokenProperties;
|
||||
import com.google.gson.Gson;
|
||||
import io.jsonwebtoken.*;
|
||||
import io.jsonwebtoken.security.SignatureException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -26,12 +25,11 @@ import java.util.concurrent.TimeUnit;
|
||||
* 2020-11-12 18:44
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class TokenUtil {
|
||||
|
||||
private final JWTTokenProperties tokenProperties;
|
||||
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private JWTTokenProperties tokenProperties;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
/**
|
||||
* 构建token
|
||||
|
||||
@@ -12,7 +12,6 @@ import cn.lili.modules.permission.entity.dos.AdminUser;
|
||||
import cn.lili.modules.permission.entity.vo.UserMenuVO;
|
||||
import cn.lili.modules.permission.service.AdminUserService;
|
||||
import cn.lili.modules.permission.service.RoleMenuService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -30,21 +29,17 @@ import java.util.Map;
|
||||
* @since 2020/11/16 10:51
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class ManagerTokenGenerate extends AbstractTokenGenerate {
|
||||
|
||||
private AdminUserService adminUserService;
|
||||
|
||||
private final TokenUtil tokenUtil;
|
||||
|
||||
private final RoleMenuService roleMenuService;
|
||||
|
||||
private final Cache cache;
|
||||
|
||||
@Autowired
|
||||
public void setAdminUserService(AdminUserService adminUserService) {
|
||||
this.adminUserService = adminUserService;
|
||||
}
|
||||
private AdminUserService adminUserService;
|
||||
@Autowired
|
||||
private TokenUtil tokenUtil;
|
||||
@Autowired
|
||||
private RoleMenuService roleMenuService;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
|
||||
@Override
|
||||
public Token createToken(String username, Boolean longTerm) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import cn.lili.config.context.ThreadContextHolder;
|
||||
import cn.lili.modules.base.entity.enums.ClientTypeEnum;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -23,15 +22,13 @@ import java.util.Date;
|
||||
* @Description:
|
||||
* @since 2020/11/16 10:50
|
||||
*/
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberTokenGenerate extends AbstractTokenGenerate {
|
||||
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
private final TokenUtil tokenUtil;
|
||||
@Autowired
|
||||
private TokenUtil tokenUtil;
|
||||
|
||||
@Override
|
||||
public Token createToken(String username, Boolean longTerm) {
|
||||
@@ -66,9 +63,4 @@ public class MemberTokenGenerate extends AbstractTokenGenerate {
|
||||
return tokenUtil.refreshToken(refreshToken, UserEnums.MEMBER);
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
public void setMemberService(MemberService memberService) {
|
||||
this.memberService = memberService;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,24 +25,13 @@ import org.springframework.stereotype.Component;
|
||||
* @since 2020/11/16 10:51
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class StoreTokenGenerate extends AbstractTokenGenerate {
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
|
||||
private final TokenUtil tokenUtil;
|
||||
|
||||
@Autowired
|
||||
public void setMemberService(MemberService memberService) {
|
||||
this.memberService = memberService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setStoreService(StoreService storeService) {
|
||||
this.storeService = storeService;
|
||||
}
|
||||
private TokenUtil tokenUtil;
|
||||
|
||||
@Override
|
||||
public Token createToken(String username, Boolean longTerm) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import cn.lili.common.trigger.model.TimeTriggerMsg;
|
||||
import cn.lili.common.trigger.util.TimeTriggerUtil;
|
||||
import cn.lili.common.utils.DateUtil;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -23,19 +22,14 @@ import org.springframework.stereotype.Component;
|
||||
**/
|
||||
@Component
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class RocketmqTimerTrigger implements TimeTrigger {
|
||||
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
|
||||
private final Cache<Integer> cache;
|
||||
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private Cache<Integer> cache;
|
||||
@Autowired
|
||||
private PromotionDelayQueue promotionDelayQueue;
|
||||
|
||||
@Autowired
|
||||
public void setPromotionDelayQueue(PromotionDelayQueue promotionDelayQueue) {
|
||||
this.promotionDelayQueue = promotionDelayQueue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(String executorName, Object param, Long triggerTime, String uniqueKey, String topic) {
|
||||
|
||||
@@ -4,8 +4,6 @@ import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.common.delayqueue.AbstractDelayQueueMachineFactory;
|
||||
import cn.lili.common.trigger.interfaces.TimeTrigger;
|
||||
import cn.lili.common.trigger.model.TimeTriggerMsg;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -18,10 +16,9 @@ import org.springframework.stereotype.Component;
|
||||
* @since 1
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class PromotionDelayQueue extends AbstractDelayQueueMachineFactory {
|
||||
|
||||
private final TimeTrigger timeTrigger;
|
||||
private TimeTrigger timeTrigger;
|
||||
|
||||
@Override
|
||||
public void invoke(String jobId) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package cn.lili.common.utils;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.DefaultTypedTuple;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
@@ -19,10 +18,9 @@ import java.util.concurrent.TimeUnit;
|
||||
* @since 2020/11/7
|
||||
**/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class RedisUtil {
|
||||
|
||||
private final RedisTemplate redisTemplate;
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
|
||||
//=============================common============================
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package cn.lili.common.verification;
|
||||
|
||||
import cn.lili.common.cache.Cache;
|
||||
import cn.lili.common.cache.CachePrefix;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -15,10 +14,10 @@ import org.springframework.stereotype.Component;
|
||||
* @since 2020/11/17 15:43
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class VerificationSDK {
|
||||
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
/**
|
||||
* 生成一个token 用于获取校验中心的验证码逻辑
|
||||
|
||||
@@ -24,11 +24,10 @@ import java.lang.reflect.Method;
|
||||
@Aspect
|
||||
@Configuration
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class VerificationInterceptor {
|
||||
|
||||
|
||||
private final VerificationService verificationService;
|
||||
@Autowired
|
||||
private VerificationService verificationService;
|
||||
|
||||
@Before("@annotation(cn.lili.common.verification.aop.annotation.Verification)")
|
||||
public void interceptor(JoinPoint pjp) {
|
||||
|
||||
@@ -11,7 +11,6 @@ import cn.lili.common.vo.SerializableStream;
|
||||
import cn.lili.modules.base.entity.dos.VerificationSource;
|
||||
import cn.lili.modules.base.entity.vo.VerificationVO;
|
||||
import cn.lili.modules.base.service.VerificationSourceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -32,13 +31,12 @@ import java.util.Random;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class VerificationServiceImpl implements VerificationService {
|
||||
|
||||
|
||||
private final VerificationSourceService verificationSourceService;
|
||||
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private VerificationSourceService verificationSourceService;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
/**
|
||||
* 创建校验
|
||||
|
||||
@@ -15,12 +15,11 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
* @author Chopper
|
||||
*/
|
||||
@Configuration
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class UrlConfiguration implements WebMvcConfigurer {
|
||||
|
||||
private final IgnoredUrlsProperties ignoredUrlsProperties;
|
||||
|
||||
private final RequestInterceptorAdapter requestInterceptorAdapter;
|
||||
@Autowired
|
||||
private IgnoredUrlsProperties ignoredUrlsProperties;
|
||||
@Autowired
|
||||
private RequestInterceptorAdapter requestInterceptorAdapter;
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
|
||||
@@ -27,13 +27,12 @@ import java.util.*;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {
|
||||
|
||||
/**
|
||||
* 同步请求地址
|
||||
*/
|
||||
private final String syncUrl = "https://restapi.amap.com/v3/config/district?subdistrict=4&key=e456d77800e2084a326f7b777278f89d";
|
||||
private String syncUrl = "https://restapi.amap.com/v3/config/district?subdistrict=4&key=e456d77800e2084a326f7b777278f89d";
|
||||
|
||||
@Override
|
||||
public void synchronizationData(String url) {
|
||||
|
||||
@@ -23,10 +23,10 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class VerificationSourceServiceImpl extends ServiceImpl<VerificationSourceMapper, VerificationSource> implements VerificationSourceService {
|
||||
|
||||
private final Cache<VerificationVO> cache;
|
||||
@Autowired
|
||||
private Cache<VerificationVO> cache;
|
||||
|
||||
@Override
|
||||
public VerificationVO initCache() {
|
||||
|
||||
@@ -22,10 +22,9 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class ConnectConfigServiceImpl extends ServiceImpl<ConnectConfigMapper, ConnectConfig> implements ConnectConfigService {
|
||||
|
||||
private final ConnectConfigMapper connectConfigMapper;
|
||||
@Autowired
|
||||
private ConnectConfigMapper connectConfigMapper;
|
||||
|
||||
@Override
|
||||
public List<ConnectConfigForm> listForms() {
|
||||
|
||||
@@ -30,7 +30,6 @@ import cn.lili.modules.system.service.SettingService;
|
||||
import cn.lili.modules.system.utils.HttpUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -53,26 +52,20 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class ConnectServiceImpl extends ServiceImpl<ConnectMapper, Connect> implements ConnectService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@Autowired
|
||||
private MemberTokenGenerate memberTokenGenerate;
|
||||
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
static boolean AUTO_REGION = true;
|
||||
|
||||
@Autowired
|
||||
public void setMemberTokenGenerate(MemberTokenGenerate memberTokenGenerate) {
|
||||
this.memberTokenGenerate = memberTokenGenerate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Token unionLoginCallback(String type, String unionid, String uuid, boolean longTerm) throws NoPermissionException {
|
||||
|
||||
@@ -42,19 +42,18 @@ import java.io.IOException;
|
||||
* 2020-11-25 21:16
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class ConnectUtil {
|
||||
|
||||
|
||||
private final Cache cache;
|
||||
|
||||
private final ConnectService connectService;
|
||||
|
||||
private final SettingService settingService;
|
||||
|
||||
private final ApiProperties apiProperties;
|
||||
|
||||
private final DomainProperties domainProperties;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
@Autowired
|
||||
private ConnectService connectService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
@Autowired
|
||||
private ApiProperties apiProperties;
|
||||
@Autowired
|
||||
private DomainProperties domainProperties;
|
||||
|
||||
|
||||
static String prefix = "/buyer/connect/callback/";
|
||||
|
||||
@@ -43,16 +43,17 @@ import java.util.Date;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DistributionCashServiceImpl extends ServiceImpl<DistributionCashMapper, DistributionCash> implements DistributionCashService {
|
||||
//分销员
|
||||
private final DistributionService distributionService;
|
||||
@Autowired
|
||||
private DistributionService distributionService;
|
||||
//会员余额
|
||||
private final MemberWalletService memberWalletService;
|
||||
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private MemberWalletService memberWalletService;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
|
||||
@Override
|
||||
public Boolean cash(Double applyMoney) {
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -33,11 +32,11 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DistributionGoodsServiceImpl extends ServiceImpl<DistributionGoodsMapper, DistributionGoods> implements DistributionGoodsService {
|
||||
|
||||
//分销商品
|
||||
private final DistributionGoodsMapper distributionGoodsMapper;
|
||||
@Autowired
|
||||
private DistributionGoodsMapper distributionGoodsMapper;
|
||||
//分销员
|
||||
@Autowired
|
||||
private DistributionService distributionService;
|
||||
|
||||
@@ -40,17 +40,20 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DistributionOrderServiceImpl extends ServiceImpl<DistributionOrderMapper, DistributionOrder> implements DistributionOrderService {
|
||||
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//店铺流水
|
||||
private final StoreFlowService storeFlowService;
|
||||
@Autowired
|
||||
private StoreFlowService storeFlowService;
|
||||
//分销员
|
||||
private final DistributionService distributionService;
|
||||
@Autowired
|
||||
private DistributionService distributionService;
|
||||
//系统设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
@Override
|
||||
public IPage<DistributionOrder> getDistributionOrderPage(DistributionOrderSearchParams distributionOrderSearchParams) {
|
||||
|
||||
@@ -18,11 +18,11 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DistributionSelectedGoodsServiceImpl extends ServiceImpl<DistributionSelectedGoodsMapper, DistributionSelectedGoods> implements DistributionSelectedGoodsService {
|
||||
|
||||
//分销员
|
||||
private final DistributionService distributionService;
|
||||
@Autowired
|
||||
private DistributionService distributionService;
|
||||
@Override
|
||||
public boolean add(String distributionGoodsId) {
|
||||
//检查分销功能开关
|
||||
|
||||
@@ -22,7 +22,6 @@ import cn.lili.modules.system.service.SettingService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -38,18 +37,23 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DistributionServiceImpl extends ServiceImpl<DistributionMapper, Distribution> implements DistributionService {
|
||||
|
||||
//会员
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
//分销员
|
||||
private final DistributionMapper distributionMapper;
|
||||
@Autowired
|
||||
private DistributionMapper distributionMapper;
|
||||
|
||||
//缓存
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
@Override
|
||||
public IPage<Distribution> distributionPage(DistributionSearchParams distributionSearchParams, PageVO page) {
|
||||
|
||||
@@ -15,7 +15,6 @@ import cn.lili.modules.file.service.FileService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -31,10 +30,10 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class FileServiceImpl extends ServiceImpl<FileMapper, File> implements FileService {
|
||||
|
||||
private final FileManagerPlugin fileManagerPlugin;
|
||||
@Autowired
|
||||
private FileManagerPlugin fileManagerPlugin;
|
||||
|
||||
@Override
|
||||
public void batchDelete(List<String> ids) {
|
||||
|
||||
@@ -31,10 +31,11 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements BrandService {
|
||||
|
||||
//分类品牌绑定
|
||||
private final CategoryBrandService categoryBrandService;
|
||||
@Autowired
|
||||
private CategoryBrandService categoryBrandService;
|
||||
|
||||
@Override
|
||||
public IPage<Brand> getBrandsByPage(BrandPageDTO page) {
|
||||
|
||||
@@ -22,10 +22,11 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class CategoryBrandServiceImpl extends ServiceImpl<CategoryBrandMapper, CategoryBrand> implements CategoryBrandService {
|
||||
|
||||
//分类品牌绑定
|
||||
private final CategoryBrandMapper categoryBrandMapper;
|
||||
@Autowired
|
||||
private CategoryBrandMapper categoryBrandMapper;
|
||||
|
||||
@Override
|
||||
public List<CategoryBrandVO> getCategoryBrandList(String categoryId) {
|
||||
|
||||
@@ -28,10 +28,10 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class CategoryParameterGroupServiceImpl extends ServiceImpl<CategoryParameterGroupMapper, CategoryParameterGroup> implements CategoryParameterGroupService {
|
||||
//商品参数
|
||||
private final ParametersService parametersService;
|
||||
@Autowired
|
||||
private ParametersService parametersService;
|
||||
|
||||
@Override
|
||||
public List<ParameterGroupVO> getCategoryParams(String categoryId) {
|
||||
|
||||
@@ -34,14 +34,15 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {
|
||||
|
||||
private static final String DELETE_FLAG_COLUMN = "delete_flag";
|
||||
//缓存
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
//分类
|
||||
private final CategoryMapper categoryMapper;
|
||||
@Autowired
|
||||
private CategoryMapper categoryMapper;
|
||||
|
||||
@Override
|
||||
public List<Category> dbList(String parentId) {
|
||||
|
||||
@@ -22,10 +22,9 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class CategorySpecificationServiceImpl extends ServiceImpl<CategorySpecificationMapper, CategorySpecification> implements CategorySpecificationService {
|
||||
|
||||
private final CategorySpecificationMapper categorySpecificationMapper;
|
||||
@Autowired
|
||||
private CategorySpecificationMapper categorySpecificationMapper;
|
||||
|
||||
@Override
|
||||
public List<CategorySpecificationVO> getCategorySpecList(String categoryId) {
|
||||
|
||||
@@ -31,14 +31,16 @@ import java.util.*;
|
||||
**/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DraftGoodsServiceImpl extends ServiceImpl<DraftGoodsMapper, DraftGoods> implements DraftGoodsService {
|
||||
//分类
|
||||
private final CategoryService categoryService;
|
||||
@Autowired
|
||||
private CategoryService categoryService;
|
||||
//商品相册
|
||||
private final GoodsGalleryService goodsGalleryService;
|
||||
@Autowired
|
||||
private GoodsGalleryService goodsGalleryService;
|
||||
//规格商品
|
||||
private final GoodsSkuService goodsSkuService;
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
|
||||
@Override
|
||||
public boolean addGoodsDraft(DraftGoodsDTO draftGoods) {
|
||||
|
||||
@@ -29,14 +29,16 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class GoodsGalleryServiceImpl extends ServiceImpl<GoodsGalleryMapper, GoodsGallery> implements GoodsGalleryService {
|
||||
//文件
|
||||
private final FileManagerPlugin fileManagerPlugin;
|
||||
@Autowired
|
||||
private FileManagerPlugin fileManagerPlugin;
|
||||
//商品相册数据层
|
||||
private final GoodsGalleryMapper goodsGalleryMapper;
|
||||
@Autowired
|
||||
private GoodsGalleryMapper goodsGalleryMapper;
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,10 +31,10 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class GoodsParamsServiceImpl extends ServiceImpl<GoodsParamsMapper, GoodsParams> implements GoodsParamsService {
|
||||
//分类-参数绑定
|
||||
private final CategoryParameterGroupService categoryParameterGroupService;
|
||||
@Autowired
|
||||
private CategoryParameterGroupService categoryParameterGroupService;
|
||||
|
||||
@Override
|
||||
public void addParams(List<GoodsParams> paramList, String goodsId) {
|
||||
|
||||
@@ -54,27 +54,35 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {
|
||||
|
||||
//商品
|
||||
private final GoodsMapper goodsMapper;
|
||||
@Autowired
|
||||
private GoodsMapper goodsMapper;
|
||||
//商品属性
|
||||
private final GoodsParamsService goodsParamsService;
|
||||
@Autowired
|
||||
private GoodsParamsService goodsParamsService;
|
||||
//分类
|
||||
private final CategoryService categoryService;
|
||||
@Autowired
|
||||
private CategoryService categoryService;
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
//商品相册
|
||||
private final GoodsGalleryService goodsGalleryService;
|
||||
@Autowired
|
||||
private GoodsGalleryService goodsGalleryService;
|
||||
//商品规格
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
//店铺详情
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
//rocketMq
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
//rocketMq配置
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
|
||||
@Override
|
||||
public void underStoreGoods(String storeId) {
|
||||
@@ -351,13 +359,4 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
||||
return goods;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setGoodsSkuService(GoodsSkuService goodsSkuService) {
|
||||
this.goodsSkuService = goodsSkuService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setStoreService(StoreService storeService) {
|
||||
this.storeService = storeService;
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
@@ -51,25 +50,32 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> implements GoodsSkuService {
|
||||
|
||||
//缓存
|
||||
private final Cache<GoodsSku> cache;
|
||||
@Autowired
|
||||
private Cache<GoodsSku> cache;
|
||||
//分类
|
||||
private final CategoryService categoryService;
|
||||
@Autowired
|
||||
private CategoryService categoryService;
|
||||
//商品相册
|
||||
private final GoodsGalleryService goodsGalleryService;
|
||||
@Autowired
|
||||
private GoodsGalleryService goodsGalleryService;
|
||||
//规格
|
||||
private final SpecificationService specificationService;
|
||||
@Autowired
|
||||
private SpecificationService specificationService;
|
||||
//规格项
|
||||
private final SpecValuesService specValuesService;
|
||||
@Autowired
|
||||
private SpecValuesService specValuesService;
|
||||
//缓存
|
||||
private final StringRedisTemplate stringRedisTemplate;
|
||||
@Autowired
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
//rocketMq
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
//rocketMq配置
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
//会员评价
|
||||
@Autowired
|
||||
private MemberEvaluationService memberEvaluationService;
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class GoodsUnitServiceImpl extends ServiceImpl<GoodsUnitMapper, GoodsUnit> implements GoodsUnitService {
|
||||
|
||||
}
|
||||
@@ -17,6 +17,5 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class ParametersServiceImpl extends ServiceImpl<ParametersMapper, Parameters> implements ParametersService {
|
||||
}
|
||||
@@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -29,10 +28,10 @@ import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SpecValuesServiceImpl extends ServiceImpl<SpecValuesMapper, SpecValues> implements SpecValuesService {
|
||||
|
||||
//规格
|
||||
@Autowired
|
||||
private SpecificationService specificationService;
|
||||
|
||||
@Override
|
||||
@@ -111,8 +110,4 @@ public class SpecValuesServiceImpl extends ServiceImpl<SpecValuesMapper, SpecVal
|
||||
return this.page(PageUtil.initPage(pageVo), queryWrapper);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setSpecificationService(SpecificationService specificationService) {
|
||||
this.specificationService = specificationService;
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -40,11 +39,13 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SpecificationServiceImpl extends ServiceImpl<SpecificationMapper, Specification> implements SpecificationService {
|
||||
|
||||
//分类-规格绑定
|
||||
private final CategorySpecificationService categorySpecificationService;
|
||||
@Autowired
|
||||
private CategorySpecificationService categorySpecificationService;
|
||||
//规格值
|
||||
@Autowired
|
||||
private SpecValuesService specValuesService;
|
||||
|
||||
@Override
|
||||
@@ -162,8 +163,4 @@ public class SpecificationServiceImpl extends ServiceImpl<SpecificationMapper, S
|
||||
return true;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setSpecValuesService(SpecValuesService specValuesService) {
|
||||
this.specValuesService = specValuesService;
|
||||
}
|
||||
}
|
||||
@@ -28,13 +28,14 @@ import java.util.Objects;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class FootprintServiceImpl extends ServiceImpl<FootprintMapper, FootPrint> implements FootprintService {
|
||||
|
||||
//足迹数据层
|
||||
private final FootprintMapper footprintMapper;
|
||||
@Autowired
|
||||
private FootprintMapper footprintMapper;
|
||||
//es商品业务层
|
||||
private final EsGoodsSearchService esGoodsSearchService;
|
||||
@Autowired
|
||||
private EsGoodsSearchService esGoodsSearchService;
|
||||
|
||||
@Override
|
||||
public FootPrint saveFootprint(FootPrint footPrint) {
|
||||
|
||||
@@ -34,15 +34,18 @@ import java.util.Optional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
|
||||
public class GoodsCollectionServiceImpl extends ServiceImpl<GoodsCollectionMapper, GoodsCollection> implements GoodsCollectionService {
|
||||
|
||||
//商品收藏
|
||||
private final GoodsCollectionMapper goodsCollectionMapper;
|
||||
@Autowired
|
||||
private GoodsCollectionMapper goodsCollectionMapper;
|
||||
//rocketMq
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
//rocketMq配置
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
|
||||
@Override
|
||||
public IPage<GoodsCollectionVO> goodsCollection(PageVO pageVo) {
|
||||
|
||||
@@ -59,23 +59,29 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberEvaluationServiceImpl extends ServiceImpl<MemberEvaluationMapper, MemberEvaluation> implements MemberEvaluationService {
|
||||
|
||||
//会员评价数据层
|
||||
private final MemberEvaluationMapper memberEvaluationMapper;
|
||||
@Autowired
|
||||
private MemberEvaluationMapper memberEvaluationMapper;
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//子订单
|
||||
private final OrderItemService orderItemService;
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
//会员
|
||||
private final MemberService memberService;
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
//商品
|
||||
private final GoodsSkuService goodsSkuService;
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
//rocketMq
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
//rocketMq配置
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
|
||||
@Override
|
||||
public IPage<MemberEvaluation> queryByParams(EvaluationQueryParams queryParams) {
|
||||
|
||||
@@ -28,13 +28,14 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = java.lang.Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberNoticeSenterServiceImpl extends ServiceImpl<MemberNoticeSenterMapper, MemberNoticeSenter> implements MemberNoticeSenterService {
|
||||
|
||||
//会员
|
||||
private final MemberService memberService;
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
//会员站内信
|
||||
private final MemberNoticeService memberNoticeService;
|
||||
@Autowired
|
||||
private MemberNoticeService memberNoticeService;
|
||||
|
||||
@Override
|
||||
public boolean customSave(MemberNoticeSenter memberNoticeSenter) {
|
||||
|
||||
@@ -20,10 +20,10 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberPointsHistoryServiceImpl extends ServiceImpl<MemberPointsHistoryMapper, MemberPointsHistory> implements MemberPointsHistoryService {
|
||||
|
||||
private final MemberPointsHistoryMapper memberPointsHistoryMapper;
|
||||
@Autowired
|
||||
private MemberPointsHistoryMapper memberPointsHistoryMapper;
|
||||
|
||||
@Override
|
||||
public MemberPointsHistoryVO getMemberPointsHistoryVO(String memberId) {
|
||||
|
||||
@@ -33,10 +33,9 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberReceiptServiceImpl extends ServiceImpl<MemberReceiptMapper, MemberReceipt> implements MemberReceiptService {
|
||||
|
||||
private final MemberService memberService;
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@Override
|
||||
public IPage<MemberReceipt> getPage(MemberReceiptVO memberReceiptVO, PageVO pageVO) {
|
||||
|
||||
@@ -44,7 +44,6 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
@@ -61,25 +60,31 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements MemberService {
|
||||
|
||||
//会员数据处理层
|
||||
private final MemberMapper memberMapper;
|
||||
@Autowired
|
||||
private MemberMapper memberMapper;
|
||||
//会员token
|
||||
@Autowired
|
||||
private MemberTokenGenerate memberTokenGenerate;
|
||||
//商家token
|
||||
@Autowired
|
||||
private StoreTokenGenerate storeTokenGenerate;
|
||||
//联合登录
|
||||
@Autowired
|
||||
private ConnectService connectService;
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
//RocketMQ 配置
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
//RocketMQ
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
//缓存
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
@Override
|
||||
public Member findByUsername(String userName) {
|
||||
@@ -550,19 +555,4 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
|
||||
throw new ServiceException(ResultCode.USER_PHONE_EXIST);
|
||||
}
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setConnectService(ConnectService connectService) {
|
||||
this.connectService = connectService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setMemberTokenGenerate(MemberTokenGenerate memberTokenGenerate) {
|
||||
this.memberTokenGenerate = memberTokenGenerate;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setStoreTokenGenerate(StoreTokenGenerate storeTokenGenerate) {
|
||||
this.storeTokenGenerate = storeTokenGenerate;
|
||||
}
|
||||
}
|
||||
@@ -39,19 +39,23 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberSignServiceImpl extends ServiceImpl<MemberSignMapper, MemberSign> implements MemberSignService {
|
||||
|
||||
//会员签到
|
||||
private final MemberSignMapper memberSignMapper;
|
||||
@Autowired
|
||||
private MemberSignMapper memberSignMapper;
|
||||
//RocketMQ
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
//RocketMQ 配置
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
//配置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
//会员
|
||||
private final MemberService memberService;
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,6 @@ import cn.lili.modules.system.service.SettingService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.gson.Gson;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -44,18 +43,22 @@ import java.util.Date;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberWalletServiceImpl extends ServiceImpl<MemberWalletMapper, MemberWallet> implements MemberWalletService {
|
||||
|
||||
//预存款数据层
|
||||
private final MemberWalletMapper walletMapper;
|
||||
@Autowired
|
||||
private MemberWalletMapper walletMapper;
|
||||
//预存款日志
|
||||
private final WalletLogService walletLogService;
|
||||
@Autowired
|
||||
private WalletLogService walletLogService;
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
//会员
|
||||
private final MemberService memberService;
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
//会员提现申请
|
||||
@Autowired
|
||||
private MemberWithdrawApplyService memberWithdrawApplyService;
|
||||
|
||||
@Override
|
||||
@@ -270,8 +273,4 @@ public class MemberWalletServiceImpl extends ServiceImpl<MemberWalletMapper, Mem
|
||||
return result;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setMemberWithdrawApplyService(MemberWithdrawApplyService memberWithdrawApplyService) {
|
||||
this.memberWithdrawApplyService = memberWithdrawApplyService;
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,6 @@ import cn.lili.modules.order.trade.entity.enums.DepositServiceTypeEnum;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -33,12 +32,13 @@ import java.util.Date;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MemberWithdrawApplyServiceImpl extends ServiceImpl<MemberWithdrawApplyMapper, MemberWithdrawApply> implements MemberWithdrawApplyService {
|
||||
//提现申请数据层
|
||||
private final MemberWithdrawApplyMapper memberWithdrawApplyMapper;
|
||||
@Autowired
|
||||
private MemberWithdrawApplyMapper memberWithdrawApplyMapper;
|
||||
//会员余额
|
||||
private final MemberWalletService memberWalletService;
|
||||
@Autowired
|
||||
private MemberWalletService memberWalletService;
|
||||
|
||||
@Override
|
||||
public Boolean audit(String applyId, Boolean result, String remark) {
|
||||
|
||||
@@ -28,10 +28,9 @@ import java.util.Optional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class StoreCollectionServiceImpl extends ServiceImpl<StoreCollectionMapper, StoreCollection> implements StoreCollectionService {
|
||||
|
||||
private final StoreCollectionMapper storeCollectionMapper;
|
||||
@Autowired
|
||||
private StoreCollectionMapper storeCollectionMapper;
|
||||
|
||||
@Override
|
||||
public IPage<StoreCollectionVO> storeCollection(PageVO pageVo) {
|
||||
|
||||
@@ -12,7 +12,6 @@ import cn.lili.modules.message.mapper.StoreMessageMapper;
|
||||
import cn.lili.modules.message.service.MessageService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.messaging.simp.SimpMessagingTemplate;
|
||||
@@ -27,15 +26,17 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {
|
||||
|
||||
private final MessageMapper messageMapper;
|
||||
|
||||
private final StoreMessageMapper storeMessageMapper;
|
||||
private final SimpMessagingTemplate messagingTemplate;
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private MessageMapper messageMapper;
|
||||
@Autowired
|
||||
private StoreMessageMapper storeMessageMapper;
|
||||
@Autowired
|
||||
private SimpMessagingTemplate messagingTemplate;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,7 +15,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -30,11 +29,10 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class NoticeMessageServiceImpl extends ServiceImpl<NoticeMessageTemplateMapper, NoticeMessage> implements NoticeMessageService {
|
||||
|
||||
|
||||
private final MemberNoticeService memberNoticeService;
|
||||
@Autowired
|
||||
private MemberNoticeService memberNoticeService;
|
||||
|
||||
@Override
|
||||
public IPage<NoticeMessage> getMessageTemplate(PageVO pageVO, String type) {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package cn.lili.modules.message.serviceimpl;
|
||||
|
||||
import cn.lili.modules.message.mapper.ShortLinkMapper;
|
||||
import cn.lili.modules.message.entity.dos.ShortLink;
|
||||
import cn.lili.modules.message.mapper.ShortLinkMapper;
|
||||
import cn.lili.modules.message.service.ShortLinkService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -15,8 +13,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class ShortLinkServiceImpl extends ServiceImpl<ShortLinkMapper, ShortLink> implements ShortLinkService {
|
||||
|
||||
private final ShortLinkMapper shortLinkMapper;
|
||||
}
|
||||
@@ -26,11 +26,11 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SmsReachServiceImpl extends ServiceImpl<SmsReachMapper, SmsReach> implements SmsReachService {
|
||||
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,10 +29,9 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SmsSignServiceImpl extends ServiceImpl<SmsSignMapper, SmsSign> implements SmsSignService {
|
||||
|
||||
private final AliSmsUtil aliSmsUtil;
|
||||
@Autowired
|
||||
private AliSmsUtil aliSmsUtil;
|
||||
|
||||
@Override
|
||||
public void addSmsSign(SmsSign smsSign) {
|
||||
|
||||
@@ -26,10 +26,9 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SmsTemplateServiceImpl extends ServiceImpl<SmsTemplateMapper, SmsTemplate> implements SmsTemplateService {
|
||||
|
||||
private final AliSmsUtil aliSmsUtil;
|
||||
@Autowired
|
||||
private AliSmsUtil aliSmsUtil;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,7 +13,6 @@ import cn.lili.modules.message.service.StoreMessageService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.elasticsearch.ResourceNotFoundException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -29,10 +28,9 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class StoreMessageServiceImpl extends ServiceImpl<StoreMessageMapper, StoreMessage> implements StoreMessageService {
|
||||
|
||||
private final StoreMessageMapper storeMessageMapper;
|
||||
@Autowired
|
||||
private StoreMessageMapper storeMessageMapper;
|
||||
|
||||
@Override
|
||||
public boolean deleteByMessageId(String messageId) {
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -35,11 +34,12 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class WechatMPMessageServiceImpl extends ServiceImpl<WechatMPMessageMapper, WechatMPMessage> implements WechatMPMessageService {
|
||||
|
||||
private final WechatMPMessageMapper wechatMPMessageMapper;
|
||||
private final WechatAccessTokenUtil wechatAccessTokenUtil;
|
||||
public class WechatMPMessageServiceImpl extends ServiceImpl<WechatMPMessageMapper, WechatMPMessage> implements WechatMPMessageService {
|
||||
@Autowired
|
||||
private WechatMPMessageMapper wechatMPMessageMapper;
|
||||
@Autowired
|
||||
private WechatAccessTokenUtil wechatAccessTokenUtil;
|
||||
|
||||
//get 获取所有的模版
|
||||
private final String allMsgTpl = "https://api.weixin.qq.com/wxaapi/newtmpl/gettemplate?access_token=";
|
||||
|
||||
@@ -34,11 +34,11 @@ import java.util.Map;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class WechatMessageServiceImpl extends ServiceImpl<WechatMessageMapper, WechatMessage> implements WechatMessageService {
|
||||
|
||||
private final WechatMessageMapper wechatMessageMapper;
|
||||
private final WechatAccessTokenUtil wechatAccessTokenUtil;
|
||||
@Autowired
|
||||
private WechatMessageMapper wechatMessageMapper;
|
||||
@Autowired
|
||||
private WechatAccessTokenUtil wechatAccessTokenUtil;
|
||||
|
||||
//get 获取所有的模版
|
||||
private final String allMsgTpl = "https://api.weixin.qq.com/cgi-bin/template/get_all_private_template?access_token=";
|
||||
|
||||
@@ -27,12 +27,11 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class WechatAccessTokenUtil {
|
||||
|
||||
private final Cache cache;
|
||||
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
/**
|
||||
* 获取某一平台等cgi token 用于业务调用,例如发送公众号消息
|
||||
|
||||
@@ -7,7 +7,6 @@ import cn.lili.modules.message.entity.dos.ShortLink;
|
||||
import cn.lili.modules.message.service.ShortLinkService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.HttpEntity;
|
||||
@@ -38,16 +37,13 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class WechatMpCodeUtil {
|
||||
|
||||
private static String UN_LIMIT_API = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=";
|
||||
private static String CREATE_QR_CODE = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=";
|
||||
|
||||
|
||||
@Autowired
|
||||
private WechatAccessTokenUtil wechatAccessTokenUtil;
|
||||
|
||||
@Autowired
|
||||
private ShortLinkService shortLinkService;
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package cn.lili.modules.order.cart.render;
|
||||
|
||||
import cn.lili.modules.order.cart.entity.dto.TradeDTO;
|
||||
import cn.lili.modules.order.cart.entity.enums.CartTypeEnum;
|
||||
import cn.lili.modules.order.cart.entity.vo.CartSkuVO;
|
||||
import cn.lili.modules.order.cart.entity.vo.CartVO;
|
||||
import cn.lili.modules.order.cart.service.CartService;
|
||||
import cn.lili.modules.order.order.entity.dos.Trade;
|
||||
import cn.lili.modules.order.order.service.TradeService;
|
||||
import cn.lili.modules.order.cart.entity.enums.CartTypeEnum;
|
||||
import cn.lili.modules.order.cart.service.CartService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -24,12 +23,13 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class TradeBuilder {
|
||||
//购物车渲染
|
||||
private final List<CartRenderStep> cartRenderSteps;
|
||||
@Autowired
|
||||
private List<CartRenderStep> cartRenderSteps;
|
||||
//交易
|
||||
private final TradeService tradeService;
|
||||
@Autowired
|
||||
private TradeService tradeService;
|
||||
|
||||
/**
|
||||
* 渲染整比交易
|
||||
@@ -44,12 +44,8 @@ public class TradeBuilder {
|
||||
/**
|
||||
* 0-> 校验商品 1-》 满优惠渲染 2->渲染优惠 3->优惠券渲染 4->计算运费 5->计算价格 6->分销渲染 7->扩展操作
|
||||
*/
|
||||
private CartService cartService;
|
||||
|
||||
@Autowired
|
||||
public void setCartService(CartService cartService) {
|
||||
this.cartService = cartService;
|
||||
}
|
||||
private CartService cartService;
|
||||
|
||||
/**
|
||||
* 构造购物车
|
||||
|
||||
@@ -26,12 +26,12 @@ import java.util.Map;
|
||||
*/
|
||||
@Order(5)
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class CartPriceRender implements CartRenderStep {
|
||||
|
||||
|
||||
//商品分类
|
||||
private final CategoryService categoryService;
|
||||
@Autowired
|
||||
private CategoryService categoryService;
|
||||
|
||||
@Override
|
||||
public void render(TradeDTO tradeDTO) {
|
||||
|
||||
@@ -21,10 +21,10 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Order(0)
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class CheckDataRender implements CartRenderStep {
|
||||
|
||||
private final GoodsSkuService goodsSkuService;
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
|
||||
@Override
|
||||
public void render(TradeDTO tradeDTO) {
|
||||
|
||||
@@ -19,12 +19,12 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
@Order(6)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DistributionPriceRender implements CartRenderStep {
|
||||
/**
|
||||
* 缓存
|
||||
*/
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
@Override
|
||||
public void render(TradeDTO tradeDTO) {
|
||||
|
||||
@@ -27,10 +27,10 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Order(1)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class FullDiscountRender implements CartRenderStep {
|
||||
|
||||
private final FullDiscountService fullDiscountService;
|
||||
@Autowired
|
||||
private FullDiscountService fullDiscountService;
|
||||
|
||||
@Override
|
||||
public void render(TradeDTO tradeDTO) {
|
||||
|
||||
@@ -25,10 +25,10 @@ import java.util.List;
|
||||
*/
|
||||
@Order(4)
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SkuFreightRender implements CartRenderStep {
|
||||
|
||||
private final FreightTemplateService freightTemplateService;
|
||||
@Autowired
|
||||
private FreightTemplateService freightTemplateService;
|
||||
|
||||
@Override
|
||||
public void render(TradeDTO tradeDTO) {
|
||||
|
||||
@@ -37,12 +37,13 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Order(2)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SkuPromotionRender implements CartRenderStep {
|
||||
//促销计算
|
||||
private final PromotionPriceService promotionPriceService;
|
||||
@Autowired
|
||||
private PromotionPriceService promotionPriceService;
|
||||
//促销商品
|
||||
private final PromotionGoodsService promotionGoodsService;
|
||||
@Autowired
|
||||
private PromotionGoodsService promotionGoodsService;
|
||||
|
||||
@Override
|
||||
public void render(TradeDTO tradeDTO) {
|
||||
|
||||
@@ -35,7 +35,6 @@ import cn.lili.modules.store.entity.dos.FreightTemplateChild;
|
||||
import cn.lili.modules.store.entity.vos.FreightTemplateVO;
|
||||
import cn.lili.modules.store.service.FreightTemplateService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -53,25 +52,33 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class CartServiceImpl implements CartService {
|
||||
|
||||
static String errorMessage = "购物车异常,请稍后重试";
|
||||
|
||||
//缓存
|
||||
private final Cache<Object> cache;
|
||||
@Autowired
|
||||
private Cache<Object> cache;
|
||||
//会员优惠券
|
||||
private final MemberCouponService memberCouponService;
|
||||
@Autowired
|
||||
private MemberCouponService memberCouponService;
|
||||
//规格商品
|
||||
private final GoodsSkuService goodsSkuService;
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
//促销商品
|
||||
private final PromotionGoodsService promotionGoodsService;
|
||||
@Autowired
|
||||
private PromotionGoodsService promotionGoodsService;
|
||||
//会员地址
|
||||
private final MemberAddressService memberAddressService;
|
||||
@Autowired
|
||||
private MemberAddressService memberAddressService;
|
||||
//ES商品
|
||||
private final EsGoodsSearchService esGoodsSearchService;
|
||||
@Autowired
|
||||
private EsGoodsSearchService esGoodsSearchService;
|
||||
//运费模板
|
||||
private final FreightTemplateService freightTemplateService;
|
||||
@Autowired
|
||||
private FreightTemplateService freightTemplateService;
|
||||
//交易
|
||||
@Autowired
|
||||
private TradeBuilder tradeBuilder;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,11 +28,10 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@Aspect
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class AfterSaleOperationLogAspect {
|
||||
|
||||
|
||||
private final AfterSaleLogService afterSaleLogService;
|
||||
@Autowired
|
||||
private AfterSaleLogService afterSaleLogService;
|
||||
|
||||
@AfterReturning(returning = "rvt", pointcut = "@annotation(cn.lili.modules.order.order.aop.AfterSaleLogPoint)")
|
||||
public void afterReturning(JoinPoint joinPoint, Object rvt) {
|
||||
|
||||
@@ -25,10 +25,10 @@ import java.util.Map;
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class OrderOperationLogAspect {
|
||||
|
||||
private final OrderLogService orderLogService;
|
||||
@Autowired
|
||||
private OrderLogService orderLogService;
|
||||
|
||||
@After("@annotation(cn.lili.modules.order.order.aop.OrderLogPoint)")
|
||||
public void doAfter(JoinPoint joinPoint) {
|
||||
|
||||
@@ -47,7 +47,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -63,23 +62,29 @@ import java.util.Date;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class AfterSaleServiceImpl extends ServiceImpl<AfterSaleMapper, AfterSale> implements AfterSaleService {
|
||||
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//订单货物
|
||||
private final OrderItemService orderItemService;
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
//物流公司
|
||||
private final LogisticsService logisticsService;
|
||||
@Autowired
|
||||
private LogisticsService logisticsService;
|
||||
//店铺详情
|
||||
private final StoreDetailService storeDetailService;
|
||||
@Autowired
|
||||
private StoreDetailService storeDetailService;
|
||||
//售后支持,这里用于退款操作
|
||||
@Autowired
|
||||
private RefundSupport refundSupport;
|
||||
//RocketMQ配置
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
//RocketMQ
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
|
||||
@Override
|
||||
public IPage<AfterSaleVO> getAfterSalePages(AfterSaleSearchParams saleSearchParams) {
|
||||
@@ -483,11 +488,6 @@ public class AfterSaleServiceImpl extends ServiceImpl<AfterSaleMapper, AfterSale
|
||||
this.update(afterSale, queryWrapper);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setRefundSupport(RefundSupport refundSupport) {
|
||||
this.refundSupport = refundSupport;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送售后消息
|
||||
*
|
||||
|
||||
@@ -30,7 +30,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -46,17 +45,21 @@ import java.util.List;
|
||||
**/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
|
||||
public class OrderComplaintServiceImpl extends ServiceImpl<OrderComplaintMapper, OrderComplaint> implements OrderComplaintService {
|
||||
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//订单货物
|
||||
private final OrderItemService orderItemService;
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
//商品规格
|
||||
private final GoodsSkuService goodsSkuService;
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
//交易投诉沟通
|
||||
private final OrderComplaintCommunicationService orderComplaintCommunicationService;
|
||||
@Autowired
|
||||
private OrderComplaintCommunicationService orderComplaintCommunicationService;
|
||||
|
||||
/**
|
||||
* 分页获取交易投诉信息
|
||||
|
||||
@@ -28,10 +28,10 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem> implements OrderItemService {
|
||||
|
||||
private final OrderItemMapper orderItemMapper;
|
||||
@Autowired
|
||||
private OrderItemMapper orderItemMapper;
|
||||
|
||||
@Override
|
||||
public void updateCommentStatus(String orderItemSn, CommentStatusEnum commentStatusEnum) {
|
||||
|
||||
@@ -21,7 +21,6 @@ import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.payment.kit.enums.PaymentMethodEnum;
|
||||
import cn.lili.modules.payment.kit.plugin.bankTransfer.BankTransferPlugin;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -36,20 +35,23 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class OrderPriceServiceImpl implements OrderPriceService {
|
||||
|
||||
//线下收款
|
||||
private final BankTransferPlugin bankTransferPlugin;
|
||||
|
||||
private final OrderItemService orderItemService;
|
||||
|
||||
@Autowired
|
||||
private BankTransferPlugin bankTransferPlugin;
|
||||
//订单货物
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
//交易数据层
|
||||
private final TradeMapper tradeMapper;
|
||||
@Autowired
|
||||
private TradeMapper tradeMapper;
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//商品分类
|
||||
private final CategoryService categoryService;
|
||||
@Autowired
|
||||
private CategoryService categoryService;
|
||||
|
||||
@Override
|
||||
@SystemLogPoint(description = "修改订单价格", customerLog = "'订单编号:'+#orderSn +',价格修改为:'+#orderPrice")
|
||||
|
||||
@@ -60,7 +60,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -78,19 +77,20 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
|
||||
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
|
||||
|
||||
private static final String ORDER_SN_COLUMN = "order_sn";
|
||||
|
||||
//订单数据层
|
||||
private final OrderMapper orderMapper;
|
||||
|
||||
@Autowired
|
||||
private OrderMapper orderMapper;
|
||||
//延时任务
|
||||
private final TimeTrigger timeTrigger;
|
||||
|
||||
@Autowired
|
||||
private TimeTrigger timeTrigger;
|
||||
//订单货物数据层
|
||||
private final OrderItemMapper orderItemMapper;
|
||||
@Autowired
|
||||
private OrderItemMapper orderItemMapper;
|
||||
//发票
|
||||
@Autowired
|
||||
private ReceiptService receiptService;
|
||||
@@ -694,19 +694,4 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
||||
}
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setStoreFlowService(StoreFlowService storeFlowService) {
|
||||
this.storeFlowService = storeFlowService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setPintuanService(PintuanService pintuanService) {
|
||||
this.pintuanService = pintuanService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private void setGoodsSkuService(GoodsSkuService goodsSkuService) {
|
||||
this.goodsSkuService = goodsSkuService;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,11 +28,11 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class ReceiptServiceImpl extends ServiceImpl<ReceiptMapper, Receipt> implements ReceiptService {
|
||||
|
||||
//发票mapper
|
||||
private final ReceiptMapper receiptMapper;
|
||||
@Autowired
|
||||
private ReceiptMapper receiptMapper;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,8 +2,6 @@ package cn.lili.modules.order.order.serviceimpl;
|
||||
|
||||
import cn.lili.common.utils.*;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.modules.goods.service.CategoryService;
|
||||
import cn.lili.modules.goods.service.GoodsService;
|
||||
import cn.lili.modules.order.order.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
import cn.lili.modules.order.order.entity.dos.OrderItem;
|
||||
@@ -15,14 +13,12 @@ import cn.lili.modules.order.order.service.OrderItemService;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.order.service.StoreFlowService;
|
||||
import cn.lili.modules.payment.entity.RefundLog;
|
||||
import cn.lili.modules.payment.service.PaymentService;
|
||||
import cn.lili.modules.payment.service.RefundLogService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -41,21 +37,17 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class StoreFlowServiceImpl extends ServiceImpl<StoreFlowMapper, StoreFlow> implements StoreFlowService {
|
||||
|
||||
//商品
|
||||
private final GoodsService goodsService;
|
||||
//商品分类
|
||||
private final CategoryService categoryService;
|
||||
//订单
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//订单货物
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
//退款日志
|
||||
@Autowired
|
||||
private RefundLogService refundLogService;
|
||||
//支付日志
|
||||
private PaymentService paymentService;
|
||||
|
||||
@Override
|
||||
public void payOrder(String orderSn) {
|
||||
@@ -159,24 +151,4 @@ public class StoreFlowServiceImpl extends ServiceImpl<StoreFlowMapper, StoreFlow
|
||||
|
||||
return this.page(PageUtil.initPage(pageVO), lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setOrderItemService(OrderItemService orderItemService) {
|
||||
this.orderItemService = orderItemService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setOrderService(OrderService orderService) {
|
||||
this.orderService = orderService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setRefundLogService(RefundLogService refundLogService) {
|
||||
this.refundLogService = refundLogService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setPaymentService(PaymentService paymentService) {
|
||||
this.paymentService = paymentService;
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,6 @@ import cn.lili.modules.promotion.service.CouponService;
|
||||
import cn.lili.modules.promotion.service.MemberCouponService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -41,23 +40,29 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class TradeServiceImpl extends ServiceImpl<TradeMapper, Trade> implements TradeService {
|
||||
|
||||
//缓存
|
||||
private final Cache<Object> cache;
|
||||
@Autowired
|
||||
private Cache<Object> cache;
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//会员
|
||||
private final MemberService memberService;
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
//优惠券
|
||||
private final CouponService couponService;
|
||||
@Autowired
|
||||
private CouponService couponService;
|
||||
//会员优惠券
|
||||
private final MemberCouponService memberCouponService;
|
||||
@Autowired
|
||||
private MemberCouponService memberCouponService;
|
||||
//RocketMQ
|
||||
private final RocketMQTemplate rocketMQTemplate;
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
//RocketMQ 配置
|
||||
private final RocketmqCustomProperties rocketmqCustomProperties;
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class OrderLogServiceImpl extends ServiceImpl<OrderLogMapper, OrderLog> implements OrderLogService {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,12 +33,13 @@ import java.util.Date;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> implements RechargeService {
|
||||
|
||||
//预存款
|
||||
private final RechargeMapper rechargeMapper;
|
||||
@Autowired
|
||||
private RechargeMapper rechargeMapper;
|
||||
//会员预存款
|
||||
@Autowired
|
||||
private MemberWalletService memberWalletService;
|
||||
|
||||
@Override
|
||||
@@ -102,8 +103,4 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
|
||||
throw new ServiceException(ResultCode.ORDER_NOT_EXIST);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setMemberWalletService(MemberWalletService memberWalletService) {
|
||||
this.memberWalletService = memberWalletService;
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import cn.lili.modules.order.trade.service.WalletLogService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -25,10 +24,10 @@ import java.util.Date;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class WalletLogServiceImpl extends ServiceImpl<WalletLogMapper, WalletLog> implements WalletLogService {
|
||||
|
||||
private final WalletLogMapper walletLogMapper;
|
||||
@Autowired
|
||||
private WalletLogMapper walletLogMapper;
|
||||
|
||||
@Override
|
||||
public IPage<WalletLog> depositLogPage(PageVO page, DepositQueryVO depositQueryVO) {
|
||||
|
||||
@@ -32,12 +32,13 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class ArticleCategoryServiceImpl extends ServiceImpl<ArticleCategoryMapper, ArticleCategory> implements ArticleCategoryService {
|
||||
|
||||
//缓存
|
||||
private final Cache cache;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
//文章
|
||||
@Autowired
|
||||
private ArticleService articleService;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -33,10 +32,10 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService {
|
||||
|
||||
private final ArticleMapper articleMapper;
|
||||
@Autowired
|
||||
private ArticleMapper articleMapper;
|
||||
|
||||
@Override
|
||||
public IPage<ArticleVO> articlePage(ArticleSearchParams articleSearchParams) {
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, Feedback> implements FeedbackService {
|
||||
|
||||
}
|
||||
@@ -29,10 +29,9 @@ import org.springframework.stereotype.Service;
|
||||
* @date 2020/12/11 9:15
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class PageDataServiceImpl extends ServiceImpl<PageDataMapper, PageData> implements PageDataService {
|
||||
|
||||
private final PageDataMapper pageDataMapper;
|
||||
@Autowired
|
||||
private PageDataMapper pageDataMapper;
|
||||
|
||||
@Override
|
||||
public void addStorePageData(String storeId) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import cn.lili.modules.page.mapper.SpecialMapper;
|
||||
import cn.lili.modules.page.service.PageDataService;
|
||||
import cn.lili.modules.page.service.SpecialService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -17,13 +16,14 @@ import org.springframework.stereotype.Service;
|
||||
* @date 2020/12/7 11:27
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class SpecialServiceImpl extends ServiceImpl<SpecialMapper, Special> implements SpecialService {
|
||||
|
||||
//专题
|
||||
private final SpecialMapper specialMapper;
|
||||
@Autowired
|
||||
private SpecialMapper specialMapper;
|
||||
//页面数据
|
||||
private final PageDataService pageDataService;
|
||||
@Autowired
|
||||
private PageDataService pageDataService;
|
||||
|
||||
@Override
|
||||
public Special addSpecial(Special special) {
|
||||
|
||||
@@ -19,7 +19,6 @@ import cn.lili.modules.system.entity.dto.payment.PaymentSupportSetting;
|
||||
import cn.lili.modules.system.entity.dto.payment.dto.PaymentSupportItem;
|
||||
import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -36,14 +35,16 @@ import java.util.List;
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class CashierSupport {
|
||||
//收银台
|
||||
private final List<CashierExecute> cashierExecuteList;
|
||||
@Autowired
|
||||
private List<CashierExecute> cashierExecuteList;
|
||||
//预存款
|
||||
private final MemberWalletService memberWalletService;
|
||||
@Autowired
|
||||
private MemberWalletService memberWalletService;
|
||||
//配置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
/**
|
||||
* 支付
|
||||
|
||||
@@ -10,7 +10,6 @@ import cn.lili.modules.order.order.service.StoreFlowService;
|
||||
import cn.lili.modules.payment.entity.RefundLog;
|
||||
import cn.lili.modules.payment.kit.enums.PaymentMethodEnum;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -26,15 +25,16 @@ import java.util.Date;
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class RefundSupport {
|
||||
//店铺流水
|
||||
private final StoreFlowService storeFlowService;
|
||||
@Autowired
|
||||
private StoreFlowService storeFlowService;
|
||||
//售后
|
||||
@Autowired
|
||||
private AfterSaleService afterSaleService;
|
||||
|
||||
private final OrderService orderService;
|
||||
//订单
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
/**
|
||||
* 售后退款
|
||||
|
||||
@@ -32,12 +32,13 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class OrderCashier implements CashierExecute {
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
@Override
|
||||
public CashierEnum cashierEnum() {
|
||||
|
||||
@@ -27,12 +27,13 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class RechargeCashier implements CashierExecute {
|
||||
//余额
|
||||
private final RechargeService rechargeService;
|
||||
@Autowired
|
||||
private RechargeService rechargeService;
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,15 +9,14 @@ import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.order.service.TradeService;
|
||||
import cn.lili.modules.payment.kit.dto.PaymentSuccessParams;
|
||||
import cn.lili.modules.payment.kit.dto.PayParam;
|
||||
import cn.lili.modules.payment.kit.dto.PaymentSuccessParams;
|
||||
import cn.lili.modules.payment.kit.enums.CashierEnum;
|
||||
import cn.lili.modules.payment.kit.params.CashierExecute;
|
||||
import cn.lili.modules.payment.kit.params.dto.CashierParam;
|
||||
import cn.lili.modules.system.entity.dto.BaseSetting;
|
||||
import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -33,15 +32,17 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class TradeCashier implements CashierExecute {
|
||||
|
||||
//交易
|
||||
private final TradeService tradeService;
|
||||
@Autowired
|
||||
private TradeService tradeService;
|
||||
//订单
|
||||
private final OrderService orderService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.alipay.api.domain.*;
|
||||
import com.alipay.api.internal.util.AlipaySignature;
|
||||
import com.alipay.api.response.AlipayTradeCancelResponse;
|
||||
import com.alipay.api.response.AlipayTradeRefundResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -47,18 +46,22 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class AliPayPlugin implements Payment {
|
||||
//支付日志
|
||||
private final PaymentService paymentService;
|
||||
@Autowired
|
||||
private PaymentService paymentService;
|
||||
//退款日志
|
||||
private final RefundLogService refundLogService;
|
||||
@Autowired
|
||||
private RefundLogService refundLogService;
|
||||
//收银台
|
||||
private final CashierSupport cashierSupport;
|
||||
@Autowired
|
||||
private CashierSupport cashierSupport;
|
||||
//设置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
//API域名
|
||||
private final ApiProperties apiProperties;
|
||||
@Autowired
|
||||
private ApiProperties apiProperties;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,6 @@ import cn.lili.modules.payment.kit.enums.PaymentMethodEnum;
|
||||
import cn.lili.modules.payment.kit.params.dto.CashierParam;
|
||||
import cn.lili.modules.payment.service.PaymentService;
|
||||
import cn.lili.modules.payment.service.RefundLogService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -24,11 +23,12 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class BankTransferPlugin implements Payment {
|
||||
//退款日志
|
||||
private final RefundLogService refundLogService;
|
||||
@Autowired
|
||||
private RefundLogService refundLogService;
|
||||
//支付日志
|
||||
@Autowired
|
||||
private PaymentService paymentService;
|
||||
|
||||
@Override
|
||||
@@ -69,9 +69,4 @@ public class BankTransferPlugin implements Payment {
|
||||
log.info("支付回调通知:线上支付:{}", payParam);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private void setPaymentService(PaymentService paymentService) {
|
||||
this.paymentService = paymentService;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.utils.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.base.entity.enums.ClientTypeEnum;
|
||||
import cn.lili.modules.member.service.MemberWalletService;
|
||||
import cn.lili.modules.order.trade.entity.enums.DepositServiceTypeEnum;
|
||||
import cn.lili.modules.payment.entity.RefundLog;
|
||||
@@ -17,7 +16,6 @@ import cn.lili.modules.payment.kit.enums.PaymentMethodEnum;
|
||||
import cn.lili.modules.payment.kit.params.dto.CashierParam;
|
||||
import cn.lili.modules.payment.service.PaymentService;
|
||||
import cn.lili.modules.payment.service.RefundLogService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -34,16 +32,19 @@ import javax.servlet.http.HttpServletResponse;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class WalletPlugin implements Payment {
|
||||
|
||||
//支付日志
|
||||
private final PaymentService paymentService;
|
||||
@Autowired
|
||||
private PaymentService paymentService;
|
||||
//退款日志
|
||||
private final RefundLogService refundLogService;
|
||||
@Autowired
|
||||
private RefundLogService refundLogService;
|
||||
//会员余额
|
||||
private final MemberWalletService memberWalletService;
|
||||
@Autowired
|
||||
private MemberWalletService memberWalletService;
|
||||
//收银台
|
||||
@Autowired
|
||||
private CashierSupport cashierSupport;
|
||||
|
||||
@Override
|
||||
@@ -169,9 +170,4 @@ public class WalletPlugin implements Payment {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
public void setCashierSupport(CashierSupport cashierSupport) {
|
||||
this.cashierSupport = cashierSupport;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ import cn.lili.modules.system.entity.dto.payment.WechatPaymentSetting;
|
||||
import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -65,22 +64,29 @@ import java.util.Objects;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class WechatPlugin implements Payment {
|
||||
|
||||
//收银台
|
||||
private final CashierSupport cashierSupport;
|
||||
@Autowired
|
||||
private CashierSupport cashierSupport;
|
||||
//支付日志
|
||||
private final PaymentService paymentService;
|
||||
@Autowired
|
||||
private PaymentService paymentService;
|
||||
//缓存
|
||||
private final Cache<String> cache;
|
||||
@Autowired
|
||||
private Cache<String> cache;
|
||||
//退款日志
|
||||
private final RefundLogService refundLogService;
|
||||
@Autowired
|
||||
private RefundLogService refundLogService;
|
||||
//API域名
|
||||
private final ApiProperties apiProperties;
|
||||
@Autowired
|
||||
private ApiProperties apiProperties;
|
||||
//配置
|
||||
private final SettingService settingService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
//联合登陆
|
||||
private final ConnectService connectService;
|
||||
@Autowired
|
||||
private ConnectService connectService;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,15 +26,14 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class PaymentServiceImpl implements PaymentService {
|
||||
|
||||
@Autowired
|
||||
private List<CashierExecute> cashierExecutes;
|
||||
@Autowired
|
||||
private CashierSupport cashierSupport;
|
||||
|
||||
private final OrderMapper orderMapper;
|
||||
@Autowired
|
||||
private OrderMapper orderMapper;
|
||||
|
||||
@Override
|
||||
public void success(PaymentSuccessParams paymentSuccessParams) {
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -41,17 +40,16 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser> implements AdminUserService {
|
||||
|
||||
@Autowired
|
||||
private UserRoleService userRoleService;
|
||||
|
||||
@Autowired
|
||||
private RoleService roleService;
|
||||
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
|
||||
@Autowired
|
||||
private MenuService menuService;
|
||||
|
||||
@Autowired
|
||||
private ManagerTokenGenerate managerTokenGenerate;
|
||||
|
||||
@Override
|
||||
@@ -235,26 +233,4 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
||||
roles.forEach(id -> userRoles.add(new UserRole(userId, id)));
|
||||
userRoleService.updateUserRole(userId, userRoles);
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
public void setUserRoleService(UserRoleService userRoleService) {
|
||||
this.userRoleService = userRoleService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setRoleService(RoleService roleService) {
|
||||
this.roleService = roleService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setDepartmentService(DepartmentService departmentService) {
|
||||
this.departmentService = departmentService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setMenuService(MenuService menuService) {
|
||||
this.menuService = menuService;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,10 +20,9 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DepartmentRoleServiceImpl extends ServiceImpl<DepartmentRoleMapper, DepartmentRole> implements DepartmentRoleService {
|
||||
|
||||
private final DepartmentRoleMapper departmentRoleMapper;
|
||||
@Autowired
|
||||
private DepartmentRoleMapper departmentRoleMapper;
|
||||
|
||||
@Override
|
||||
public List<DepartmentRole> listByDepartmentId(String departmentId) {
|
||||
|
||||
@@ -27,24 +27,15 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements DepartmentService {
|
||||
|
||||
//管理员
|
||||
@Autowired
|
||||
private AdminUserService adminUserService;
|
||||
//部门角色
|
||||
@Autowired
|
||||
private DepartmentRoleService departmentRoleService;
|
||||
|
||||
@Autowired
|
||||
public void setDepartmentRoleService(DepartmentRoleService departmentRoleService) {
|
||||
this.departmentRoleService = departmentRoleService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setAdminUserService(AdminUserService adminUserService) {
|
||||
this.adminUserService = adminUserService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
QueryWrapper<AdminUser> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user