升级springboot版本为2.6.7、mybatis plus版本为3.5.1、pagehelper版本为1.4.2、其它依赖升级

This commit is contained in:
taozi
2022-05-01 14:26:46 +08:00
parent 8d424d5425
commit 31c1d0561f
211 changed files with 604 additions and 592 deletions

131
pom.xml
View File

@ -28,7 +28,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.13</version>
<version>2.6.7</version>
</parent>
<properties>
@ -50,9 +50,9 @@
<xerces.version>2.11.0</xerces.version>
<javax.version>1</javax.version>
<whvcse.version>1.6.2</whvcse.version>
<bitwalker.version>1.20</bitwalker.version>
<validator.version>6.1.6.Final</validator.version>
<gson.version>2.8.0</gson.version>
<bitwalker.version>1.21</bitwalker.version>
<validator.version>6.1.7.Final</validator.version>
<gson.version>2.8.9</gson.version>
</properties>
@ -60,12 +60,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@ -73,25 +67,6 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.gos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
@ -128,32 +103,20 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<exclusions>
<exclusion>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>
<!--Spring boot end-->
<!--spring2.0集成redis所需common-pool2-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>${commons-pool2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.commons</groupId>-->
<!-- <artifactId>commons-pool2</artifactId>-->
<!-- <version>${commons-pool2.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.commons</groupId>-->
<!-- <artifactId>commons-lang3</artifactId>-->
<!-- </dependency>-->
<!-- RESTful APIs swagger2 -->
<dependency>
@ -191,6 +154,22 @@
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>${github-xiaoymin.version}</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>${swagger-models.version}</version>
<scope>compile</scope>
</dependency>
<!--Mysql依赖包-->
<dependency>
@ -219,22 +198,22 @@
<version>${hutool.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.poi</groupId>-->
<!-- <artifactId>poi</artifactId>-->
<!-- <version>${poi.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/xerces/xercesImpl -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>${xerces.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>xerces</groupId>-->
<!-- <artifactId>xercesImpl</artifactId>-->
<!-- <version>${xerces.version}</version>-->
<!-- </dependency>-->
<!-- fastjson -->
<dependency>
@ -243,22 +222,22 @@
<version>${fastjson.version}</version>
</dependency>
<!--mapStruct依赖-->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.mapstruct</groupId>-->
<!-- <artifactId>mapstruct-jdk8</artifactId>-->
<!-- <version>${mapstruct.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.mapstruct</groupId>-->
<!-- <artifactId>mapstruct-processor</artifactId>-->
<!-- <version>${mapstruct.version}</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>javax.inject</groupId>-->
<!-- <artifactId>javax.inject</artifactId>-->
<!-- <version>1</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>

View File

@ -64,8 +64,8 @@
<!-- quartz -->
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
<!--weixinpay-->
<dependency>

View File

@ -1,7 +1,9 @@
package co.yixiang.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -16,7 +18,9 @@ public class MybatisPlusConfig {
* mybatis-plus分页插件
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}

View File

@ -1,6 +1,6 @@
package co.yixiang.modules.monitor.rest;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.monitor.domain.vo.RedisVo;
import co.yixiang.modules.monitor.service.RedisService;

View File

@ -1,7 +1,7 @@
package co.yixiang.modules.monitor.service.impl;
import co.yixiang.common.service.impl.BaseServiceImpl;
import co.yixiang.logging.service.mapper.LogMapper;
import co.yixiang.modules.logging.service.mapper.LogMapper;
import co.yixiang.modules.monitor.domain.Visits;
import co.yixiang.modules.monitor.service.VisitsService;
import co.yixiang.modules.monitor.service.mapper.VisitsMapper;

View File

@ -7,7 +7,7 @@ package co.yixiang.modules.quartz.rest;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.exception.BadRequestException;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.quartz.domain.QuartzJob;
import co.yixiang.modules.quartz.service.QuartzJobService;
@ -17,7 +17,6 @@ import co.yixiang.modules.quartz.service.dto.QuartzJobQueryCriteria;
import co.yixiang.modules.quartz.service.dto.QuartzLogDto;
import co.yixiang.modules.quartz.service.dto.QuartzLogQueryCriteria;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

View File

@ -9,7 +9,7 @@ import cn.hutool.crypto.asymmetric.KeyType;
import cn.hutool.crypto.asymmetric.RSA;
import co.yixiang.annotation.AnonymousAccess;
import co.yixiang.exception.BadRequestException;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.security.config.SecurityProperties;
import co.yixiang.modules.security.security.TokenUtil;
import co.yixiang.modules.security.security.vo.AuthUser;

View File

@ -5,7 +5,7 @@
*/
package co.yixiang.modules.security.rest;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.security.service.OnlineUserService;
import io.swagger.annotations.Api;

View File

@ -9,7 +9,7 @@ import cn.hutool.core.collection.CollectionUtil;
import co.yixiang.config.DataScope;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.exception.BadRequestException;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.system.domain.Dept;
import co.yixiang.modules.system.service.DeptService;

View File

@ -7,7 +7,7 @@ package co.yixiang.modules.system.rest;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.exception.BadRequestException;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.dict.domain.Dict;
import co.yixiang.modules.dict.service.DictService;

View File

@ -6,7 +6,7 @@
package co.yixiang.modules.system.rest;
import co.yixiang.exception.BadRequestException;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.dict.domain.DictDetail;
import co.yixiang.modules.dict.service.DictDetailService;

View File

@ -8,7 +8,7 @@ package co.yixiang.modules.system.rest;
import co.yixiang.config.DataScope;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.exception.BadRequestException;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.system.domain.Job;
import co.yixiang.modules.system.service.JobService;

View File

@ -7,7 +7,7 @@ package co.yixiang.modules.system.rest;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.exception.BadRequestException;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.system.domain.Menu;
import co.yixiang.modules.system.service.MenuService;

View File

@ -8,7 +8,7 @@ package co.yixiang.modules.system.rest;
import cn.hutool.core.lang.Dict;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.exception.BadRequestException;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.system.domain.Role;
import co.yixiang.modules.system.service.RoleService;

View File

@ -11,7 +11,7 @@ import co.yixiang.config.DataScope;
import co.yixiang.constant.ShopConstants;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.exception.BadRequestException;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.system.domain.User;
import co.yixiang.modules.system.domain.vo.UserPassVo;
@ -21,8 +21,8 @@ import co.yixiang.modules.system.service.UserService;
import co.yixiang.modules.system.service.dto.RoleSmallDto;
import co.yixiang.modules.system.service.dto.UserDto;
import co.yixiang.modules.system.service.dto.UserQueryCriteria;
import co.yixiang.tools.domain.VerificationCode;
import co.yixiang.tools.service.VerificationCodeService;
import co.yixiang.modules.tools.domain.VerificationCode;
import co.yixiang.modules.tools.service.VerificationCodeService;
import co.yixiang.utils.PageUtil;
import co.yixiang.utils.SecurityUtils;
import co.yixiang.utils.YshopConstant;

View File

@ -166,8 +166,8 @@ public class DeptServiceImpl extends BaseServiceImpl<DeptMapper, Dept> implement
*/
@Override
public void delDepts(List<Long> deptIds){
int jobCount = jobMapper.selectCount(Wrappers.<Job>lambdaQuery().in(Job::getDeptId,deptIds));
int roleCount = rolesDeptsMapper.selectCount(Wrappers.<RolesDepts>lambdaQuery()
Long jobCount = jobMapper.selectCount(Wrappers.<Job>lambdaQuery().in(Job::getDeptId,deptIds));
Long roleCount = rolesDeptsMapper.selectCount(Wrappers.<RolesDepts>lambdaQuery()
.in(RolesDepts::getDeptId,deptIds));
if(jobCount > 0) {
throw new BadRequestException( "所选部门中存在与岗位关联,请取消关联后再试");

View File

@ -313,8 +313,8 @@ public class MenuServiceImpl extends BaseServiceImpl<MenuMapper, Menu> implement
throw new EntityExistException(Menu.class,"name",resources.getName());
}
if(StringUtils.isNotBlank(resources.getComponentName())&&resources.getType()!=1&& !resources.getIFrame()){
int menuCount = this.lambdaQuery().eq(Menu::getComponentName,resources.getComponentName()).count();
if (StringUtils.isNotBlank(resources.getComponentName()) && resources.getType() != 1 && !resources.getIFrame()) {
Long menuCount = this.lambdaQuery().eq(Menu::getComponentName,resources.getComponentName()).count();
if(menuCount > 1) {
throw new YshopException("请保持菜单组件名称唯一");
}

View File

@ -2,6 +2,8 @@ server:
port: 8001
spring:
main:
allow-circular-references: true
freemarker:
check-template-location: false
profiles:

View File

@ -10,7 +10,7 @@ package ${package}.rest;
import java.util.Arrays;
import co.yixiang.dozer.service.IGenerator;
import lombok.AllArgsConstructor;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.logging.aop.log.Log;
import ${package}.domain.${className};
import ${package}.service.${className}Service;
import ${package}.service.dto.${className}QueryCriteria;

View File

@ -6,8 +6,8 @@
package co.yixiang.common.aspect;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.logging.domain.Log;
import co.yixiang.logging.service.LogService;
import co.yixiang.modules.logging.domain.Log;
import co.yixiang.modules.logging.service.LogService;
import co.yixiang.utils.RequestHolder;
import co.yixiang.utils.StringUtils;
import co.yixiang.utils.ThrowableUtil;
@ -42,7 +42,7 @@ public class AppLogAspect {
/**
* 配置切入点
*/
@Pointcut("@annotation(co.yixiang.logging.aop.log.AppLog)")
@Pointcut("@annotation(co.yixiang.modules.logging.aop.log.AppLog)")
public void logPointcut() {
// 该方法无方法体,主要为了让同类中其他方法使用此切入点
}

View File

@ -9,7 +9,9 @@
package co.yixiang.common.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -24,7 +26,10 @@ public class MybatisPlusConfig {
* mybatis-plus分页插件
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}

View File

@ -21,8 +21,8 @@ import com.auth0.jwt.interfaces.Claim;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -34,7 +34,7 @@ import java.util.Optional;
* @author hupeng
* @date 2020-04-30
*/
public class PermissionInterceptor extends HandlerInterceptorAdapter {
public class PermissionInterceptor implements HandlerInterceptor {
@Autowired
private YxUserService userService;
@ -54,7 +54,7 @@ public class PermissionInterceptor extends HandlerInterceptorAdapter {
}
String bearerToken = request.getHeader("Authorization");
if (StringUtils.isEmpty(bearerToken)) {
if (!StringUtils.hasLength(bearerToken)) {
throw new UnAuthenticatedException(ApiCode.UNAUTHORIZED);
}
@ -105,13 +105,13 @@ public class PermissionInterceptor extends HandlerInterceptorAdapter {
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
super.postHandle(request, response, handler, modelAndView);
HandlerInterceptor.super.postHandle(request, response, handler, modelAndView);
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
LocalUser.clear();
super.afterCompletion(request, response, handler, ex);
HandlerInterceptor.super.afterCompletion(request, response, handler, ex);
}
private Optional<AuthCheck> getAuthCheck(Object handler) {

View File

@ -8,19 +8,19 @@
*/
package co.yixiang.common.util;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.params.SetParams;
import java.util.Collections;
import java.util.concurrent.TimeUnit;
/**
* Redis 分布式锁实现
*/
@Service
@Slf4j
public class RedisLock {
private static final Long RELEASE_SUCCESS = 1L;
@ -46,15 +46,31 @@ public class RedisLock {
* @return
*/
public boolean tryLock(String lockKey, String clientId, long seconds) {
return redisTemplate.execute((RedisCallback<Boolean>) redisConnection -> {
Jedis jedis = (Jedis) redisConnection.getNativeConnection();
SetParams setParams = new SetParams();
String result = jedis.set(lockKey, clientId, setParams.nx().px(seconds));
if (LOCK_SUCCESS.equals(result)) {
//return redisTemplate.execute((RedisCallback<Boolean>) redisConnection -> {
// Jedis jedis = (Jedis) redisConnection.getNativeConnection();
// SetParams setParams = new SetParams();
// String result = jedis.set(lockKey, clientId, setParams.nx().px(seconds));
// if (LOCK_SUCCESS.equals(result)) {
// return true;
// }
// return false;
//});
if(redisTemplate.opsForValue().setIfAbsent(lockKey,clientId)){
return true;
}
String currentValue = redisTemplate.opsForValue().get(lockKey);
if(!StringUtils.isEmpty(currentValue) &&
Long.parseLong(currentValue)<System.currentTimeMillis()){
String oldValue =redisTemplate.opsForValue().getAndSet(lockKey,clientId);
if (seconds > 0) {
redisTemplate.expire(lockKey, seconds, TimeUnit.SECONDS);
}
if(!StringUtils.isEmpty(oldValue)&& oldValue.equals(currentValue)){
return true;
}
return false;
});
}
return false;
}
/**
@ -65,14 +81,24 @@ public class RedisLock {
* @return
*/
public boolean releaseLock(String lockKey, String clientId) {
return redisTemplate.execute((RedisCallback<Boolean>) redisConnection -> {
Jedis jedis = (Jedis) redisConnection.getNativeConnection();
Object result = jedis.eval(RELEASE_LOCK_SCRIPT, Collections.singletonList(lockKey),
Collections.singletonList(clientId));
if (RELEASE_SUCCESS.equals(result)) {
return true;
//return redisTemplate.execute((RedisCallback<Boolean>) redisConnection -> {
// Jedis jedis = (Jedis) redisConnection.getNativeConnection();
// Object result = jedis.eval(RELEASE_LOCK_SCRIPT, Collections.singletonList(lockKey),
// Collections.singletonList(clientId));
// if (RELEASE_SUCCESS.equals(result)) {
// return true;
// }
// return false;
//});
try {
String currentValue = redisTemplate.opsForValue().get(lockKey);
if (!StringUtils.isEmpty(currentValue) && currentValue.equals(clientId)) {
redisTemplate.opsForValue().getOperations().delete(lockKey);
}
return true;
} catch (Exception e){
log.error("【redis分布式锁异常】{}",e);
return false;
});
}
}
}

View File

@ -13,7 +13,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.aop.NoRepeatSubmit;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
@ -54,7 +54,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collections;
import java.util.List;
import java.util.Map;

View File

@ -12,7 +12,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.constant.SystemConfigConstants;
@ -23,7 +23,6 @@ import co.yixiang.modules.activity.service.YxStorePinkService;
import co.yixiang.modules.activity.vo.CombinationQueryVo;
import co.yixiang.modules.activity.vo.PinkInfoVo;
import co.yixiang.modules.activity.vo.StoreCombinationVo;
import co.yixiang.modules.activity.vo.YxStoreCombinationQueryVo;
import co.yixiang.modules.product.service.YxStoreProductRelationService;
import co.yixiang.modules.services.CreatShareProductService;
import co.yixiang.modules.shop.service.YxSystemConfigService;
@ -45,8 +44,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**

View File

@ -13,7 +13,7 @@ import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.constant.ShopConstants;
@ -42,7 +42,6 @@ import org.springframework.web.bind.annotation.RestController;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

View File

@ -10,7 +10,7 @@ package co.yixiang.modules.cart.rest;
import co.yixiang.annotation.Limit;
import co.yixiang.api.ApiResult;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.aop.NoRepeatSubmit;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;

View File

@ -11,7 +11,7 @@ package co.yixiang.modules.coupon.rest;
import cn.hutool.core.util.NumberUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.aop.NoRepeatSubmit;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;

View File

@ -12,7 +12,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.modules.manage.param.OrderPriceParam;
import co.yixiang.modules.manage.param.ShoperQueryParam;

View File

@ -17,7 +17,7 @@ import co.yixiang.common.aop.NoRepeatSubmit;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.enums.*;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.modules.mp.domain.YxWechatTemplate;
import co.yixiang.modules.mp.service.WeixinPayService;
import co.yixiang.modules.mp.service.YxWechatTemplateService;
@ -36,9 +36,9 @@ import co.yixiang.modules.order.vo.YxStoreOrderQueryVo;
import co.yixiang.modules.services.CreatShareProductService;
import co.yixiang.modules.services.OrderSupplyService;
import co.yixiang.modules.user.domain.YxUser;
import co.yixiang.tools.express.ExpressService;
import co.yixiang.tools.express.config.ExpressAutoConfiguration;
import co.yixiang.tools.express.dao.ExpressInfo;
import co.yixiang.modules.tools.express.ExpressService;
import co.yixiang.modules.tools.express.config.ExpressAutoConfiguration;
import co.yixiang.modules.tools.express.dao.ExpressInfo;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.vdurmont.emoji.EmojiParser;
import io.swagger.annotations.Api;

View File

@ -18,7 +18,7 @@ import cn.hutool.extra.qrcode.QrCodeUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.constant.ShopConstants;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.aop.NoRepeatSubmit;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;

View File

@ -12,7 +12,7 @@ import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.common.util.CityTreeUtil;

View File

@ -12,7 +12,7 @@ import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.constant.SystemConfigConstants;
@ -155,7 +155,7 @@ public class UserBillController {
map.put("list",yxUserService.getUserSpreadGrade(uid,param.getPage(),param.getLimit()
,param.getGrade(),param.getKeyword(),param.getSort()));
Map<String,Integer> countMap = yxUserService.getSpreadCount(uid);
Map<String,Long> countMap = yxUserService.getSpreadCount(uid);
map.put("total",countMap.get("first"));
map.put("totalLevel",countMap.get("second"));
return ApiResult.ok(map);

View File

@ -10,7 +10,7 @@ package co.yixiang.modules.user.rest;
import co.yixiang.api.ApiResult;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.aop.NoRepeatSubmit;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
@ -211,7 +211,7 @@ public class UserController {
@ApiOperation(value = "开始签到",notes = "开始签到")
public ApiResult<Object> signIntegral(){
YxUser yxUser = LocalUser.getUser();
int integral = userSignService.sign(yxUser);;
int integral = userSignService.sign(yxUser);
Map<String,Object> map = new LinkedHashMap<>();
map.put("integral",integral);

View File

@ -10,7 +10,7 @@ package co.yixiang.modules.user.rest;
import co.yixiang.api.ApiResult;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.constant.SystemConfigConstants;

View File

@ -12,7 +12,7 @@ import cn.hutool.core.bean.BeanUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.enums.ShopCommonEnum;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.constant.ShopConstants;

View File

@ -14,7 +14,7 @@ import cn.hutool.core.util.StrUtil;
import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.constant.ShopConstants;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.modules.user.domain.YxUser;
@ -24,12 +24,10 @@ import co.yixiang.modules.wechat.rest.param.WxPhoneParam;
import co.yixiang.modules.mp.config.WxMaConfiguration;
import co.yixiang.utils.RedisUtil;
import co.yixiang.utils.RedisUtils;
import co.yixiang.utils.SecurityUtils;
import co.yixiang.utils.ShopKeyUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;

View File

@ -6,7 +6,7 @@ import co.yixiang.api.ApiResult;
import co.yixiang.api.YshopException;
import co.yixiang.common.bean.LocalUser;
import co.yixiang.common.interceptor.AuthCheck;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.modules.order.domain.YxExpress;
import co.yixiang.modules.order.service.YxExpressService;
import co.yixiang.modules.order.service.dto.YxExpressQueryCriteria;

View File

@ -9,8 +9,12 @@ server:
tomcat:
uri-encoding: UTF-8
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
main:
allow-circular-references: true
freemarker:
check-template-location: false
profiles:

View File

@ -12,7 +12,7 @@
<artifactId>yshop-common</artifactId>
<name>公共模块</name>
<properties>
<weixin-java.version>4.2.0</weixin-java.version>
<weixin-java.version>4.3.0</weixin-java.version>
</properties>
<dependencies>
<dependency>

View File

@ -7,7 +7,6 @@ package co.yixiang.aspect;
import co.yixiang.annotation.Limit;
import co.yixiang.exception.BadLimitRequestException;
import co.yixiang.exception.BadRequestException;
import co.yixiang.utils.RequestHolder;
import co.yixiang.utils.StringUtils;
import com.google.common.collect.ImmutableList;
@ -63,8 +62,8 @@ public class LimitAspect {
ImmutableList<Object> keys = ImmutableList.of(StringUtils.join(limit.prefix(), "_", key, "_", request.getRequestURI().replaceAll("/","_")));
String luaScript = buildLuaScript();
RedisScript<Number> redisScript = new DefaultRedisScript<>(luaScript, Number.class);
Number count = redisTemplate.execute(redisScript, keys, limit.count(), limit.period());
RedisScript<Long> redisScript = new DefaultRedisScript<>(luaScript, Long.class);
Long count = redisTemplate.execute(redisScript, keys, limit.count(), limit.period());
if (null != count && count.intValue() <= limit.count()) {
logger.info("第{}次访问key为 {},描述为 [{}] 的接口", count, keys, limit.name());
return joinPoint.proceed();

View File

@ -26,7 +26,7 @@ import java.util.stream.Collectors;
* @version: 1.0
*/
@Component
@Lazy(true)
@Lazy()
public class EJBGenerator implements IGenerator {
@Autowired

View File

@ -3,9 +3,9 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.domain;
package co.yixiang.modules.gen.domain;
import co.yixiang.gen.utils.GenUtil;
import co.yixiang.modules.gen.utils.GenUtil;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.domain;
package co.yixiang.modules.gen.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.domain.vo;
package co.yixiang.modules.gen.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Data;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.domain.vo;
package co.yixiang.modules.gen.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;

View File

@ -3,10 +3,10 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.rest;
package co.yixiang.modules.gen.rest;
import co.yixiang.gen.domain.GenConfig;
import co.yixiang.gen.service.GenConfigService;
import co.yixiang.modules.gen.domain.GenConfig;
import co.yixiang.modules.gen.service.GenConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.HttpStatus;

View File

@ -3,12 +3,12 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.rest;
package co.yixiang.modules.gen.rest;
import co.yixiang.exception.BadRequestException;
import co.yixiang.gen.domain.ColumnConfig;
import co.yixiang.gen.service.GenConfigService;
import co.yixiang.gen.service.GeneratorService;
import co.yixiang.modules.gen.domain.ColumnConfig;
import co.yixiang.modules.gen.service.GenConfigService;
import co.yixiang.modules.gen.service.GeneratorService;
import co.yixiang.utils.PageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@ -3,9 +3,9 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.service;
package co.yixiang.modules.gen.service;
import co.yixiang.gen.domain.GenConfig;
import co.yixiang.modules.gen.domain.GenConfig;
/**
* @author Zheng Jie

View File

@ -3,10 +3,10 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.service;
package co.yixiang.modules.gen.service;
import co.yixiang.gen.domain.ColumnConfig;
import co.yixiang.gen.domain.GenConfig;
import co.yixiang.modules.gen.domain.ColumnConfig;
import co.yixiang.modules.gen.domain.GenConfig;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Async;

View File

@ -3,12 +3,12 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.service.impl;
package co.yixiang.modules.gen.service.impl;
import co.yixiang.common.service.impl.BaseServiceImpl;
import co.yixiang.gen.domain.GenConfig;
import co.yixiang.gen.service.GenConfigService;
import co.yixiang.gen.service.mapper.GenConfigMapper;
import co.yixiang.modules.gen.domain.GenConfig;
import co.yixiang.modules.gen.service.GenConfigService;
import co.yixiang.modules.gen.service.mapper.GenConfigMapper;
import co.yixiang.utils.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;

View File

@ -3,19 +3,19 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.service.impl;
package co.yixiang.modules.gen.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ZipUtil;
import co.yixiang.common.service.impl.BaseServiceImpl;
import co.yixiang.exception.BadRequestException;
import co.yixiang.gen.domain.ColumnConfig;
import co.yixiang.gen.domain.GenConfig;
import co.yixiang.gen.domain.vo.TableInfo;
import co.yixiang.gen.service.GeneratorService;
import co.yixiang.gen.service.mapper.ColumnInfoMapper;
import co.yixiang.gen.utils.GenUtil;
import co.yixiang.modules.gen.domain.ColumnConfig;
import co.yixiang.modules.gen.domain.GenConfig;
import co.yixiang.modules.gen.domain.vo.TableInfo;
import co.yixiang.modules.gen.service.GeneratorService;
import co.yixiang.modules.gen.service.mapper.ColumnInfoMapper;
import co.yixiang.modules.gen.utils.GenUtil;
import co.yixiang.utils.FileUtil;
import co.yixiang.utils.PageUtil;
import co.yixiang.utils.StringUtils;

View File

@ -3,11 +3,11 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.service.mapper;
package co.yixiang.modules.gen.service.mapper;
import co.yixiang.common.mapper.CoreMapper;
import co.yixiang.gen.domain.ColumnConfig;
import co.yixiang.gen.domain.vo.TableInfo;
import co.yixiang.modules.gen.domain.ColumnConfig;
import co.yixiang.modules.gen.domain.vo.TableInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;

View File

@ -3,10 +3,10 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.service.mapper;
package co.yixiang.modules.gen.service.mapper;
import co.yixiang.common.mapper.CoreMapper;
import co.yixiang.gen.domain.GenConfig;
import co.yixiang.modules.gen.domain.GenConfig;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.utils;
package co.yixiang.modules.gen.utils;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.gen.utils;
package co.yixiang.modules.gen.utils;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.template.Template;
@ -11,8 +11,8 @@ import cn.hutool.extra.template.TemplateConfig;
import cn.hutool.extra.template.TemplateEngine;
import cn.hutool.extra.template.TemplateException;
import cn.hutool.extra.template.TemplateUtil;
import co.yixiang.gen.domain.ColumnConfig;
import co.yixiang.gen.domain.GenConfig;
import co.yixiang.modules.gen.domain.ColumnConfig;
import co.yixiang.modules.gen.domain.GenConfig;
import co.yixiang.utils.FileUtil;
import co.yixiang.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.aop.log;
package co.yixiang.modules.logging.aop.log;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.aop.log;
package co.yixiang.modules.logging.aop.log;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@ -3,10 +3,10 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.aspect;
package co.yixiang.modules.logging.aspect;
import co.yixiang.logging.domain.Log;
import co.yixiang.logging.service.LogService;
import co.yixiang.modules.logging.domain.Log;
import co.yixiang.modules.logging.service.LogService;
import co.yixiang.utils.RequestHolder;
import co.yixiang.utils.SecurityUtils;
import co.yixiang.utils.StringUtils;
@ -42,7 +42,7 @@ public class LogAspect {
/**
* 配置切入点
*/
@Pointcut("@annotation(co.yixiang.logging.aop.log.Log)")
@Pointcut("@annotation(co.yixiang.modules.logging.aop.log.Log)")
public void logPointcut() {
// 该方法无方法体,主要为了让同类中其他方法使用此切入点
}

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.domain;
package co.yixiang.modules.logging.domain;
import co.yixiang.domain.BaseDomain;
import com.baomidou.mybatisplus.annotation.TableField;

View File

@ -3,11 +3,11 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.rest;
package co.yixiang.modules.logging.rest;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.logging.service.LogService;
import co.yixiang.logging.service.dto.LogQueryCriteria;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.logging.service.LogService;
import co.yixiang.modules.logging.service.dto.LogQueryCriteria;
import co.yixiang.utils.SecurityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@ -3,11 +3,11 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.service;
package co.yixiang.modules.logging.service;
import co.yixiang.common.service.BaseService;
import co.yixiang.logging.domain.Log;
import co.yixiang.logging.service.dto.LogQueryCriteria;
import co.yixiang.modules.logging.domain.Log;
import co.yixiang.modules.logging.service.dto.LogQueryCriteria;
import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.service.dto;
package co.yixiang.modules.logging.service.dto;
import lombok.Data;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.service.dto;
package co.yixiang.modules.logging.service.dto;
import co.yixiang.annotation.Query;
import lombok.Data;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.service.dto;
package co.yixiang.modules.logging.service.dto;
import lombok.Data;

View File

@ -3,7 +3,7 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.service.impl;
package co.yixiang.modules.logging.service.impl;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
@ -11,13 +11,13 @@ import cn.hutool.json.JSONObject;
import co.yixiang.common.service.impl.BaseServiceImpl;
import co.yixiang.common.utils.QueryHelpPlus;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.logging.service.LogService;
import co.yixiang.logging.service.dto.LogErrorDTO;
import co.yixiang.logging.service.dto.LogQueryCriteria;
import co.yixiang.logging.service.dto.LogSmallDTO;
import co.yixiang.logging.service.mapper.LogMapper;
import co.yixiang.modules.logging.aop.log.AppLog;
import co.yixiang.modules.logging.aop.log.Log;
import co.yixiang.modules.logging.service.LogService;
import co.yixiang.modules.logging.service.dto.LogErrorDTO;
import co.yixiang.modules.logging.service.dto.LogQueryCriteria;
import co.yixiang.modules.logging.service.dto.LogSmallDTO;
import co.yixiang.modules.logging.service.mapper.LogMapper;
import co.yixiang.utils.FileUtil;
import co.yixiang.utils.StringUtils;
import co.yixiang.utils.ValidationUtil;
@ -44,7 +44,7 @@ import java.util.Map;
@SuppressWarnings("unchecked")
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class LogServiceImpl extends BaseServiceImpl<LogMapper, co.yixiang.logging.domain.Log> implements LogService {
public class LogServiceImpl extends BaseServiceImpl<LogMapper, co.yixiang.modules.logging.domain.Log> implements LogService {
private final LogMapper logMapper;
@ -59,7 +59,7 @@ public class LogServiceImpl extends BaseServiceImpl<LogMapper, co.yixiang.loggin
@Override
public Object findAllByPageable(String nickname, Pageable pageable) {
getPage(pageable);
PageInfo<co.yixiang.logging.domain.Log> page = new PageInfo<>(logMapper.findAllByPageable(nickname));
PageInfo<co.yixiang.modules.logging.domain.Log> page = new PageInfo<>(logMapper.findAllByPageable(nickname));
Map<String,Object> map = new LinkedHashMap<>(2);
map.put("content",page.getList());
map.put("totalElements",page.getTotal());
@ -71,7 +71,7 @@ public class LogServiceImpl extends BaseServiceImpl<LogMapper, co.yixiang.loggin
public Object queryAll(LogQueryCriteria criteria, Pageable pageable){
getPage(pageable);
PageInfo<co.yixiang.logging.domain.Log> page = new PageInfo<>(queryAll(criteria));
PageInfo<co.yixiang.modules.logging.domain.Log> page = new PageInfo<>(queryAll(criteria));
Map<String, Object> map = new LinkedHashMap<>(2);
String status = "ERROR";
if(status.equals(criteria.getLogType())){
@ -84,14 +84,14 @@ public class LogServiceImpl extends BaseServiceImpl<LogMapper, co.yixiang.loggin
}
@Override
public List<co.yixiang.logging.domain.Log> queryAll(LogQueryCriteria criteria) {
return baseMapper.selectList(QueryHelpPlus.getPredicate(co.yixiang.logging.domain.Log.class, criteria));
public List<co.yixiang.modules.logging.domain.Log> queryAll(LogQueryCriteria criteria) {
return baseMapper.selectList(QueryHelpPlus.getPredicate(co.yixiang.modules.logging.domain.Log.class, criteria));
}
@Override
public Object queryAllByUser(LogQueryCriteria criteria, Pageable pageable) {
getPage(pageable);
PageInfo<co.yixiang.logging.domain.Log> page = new PageInfo<>(queryAll(criteria));
PageInfo<co.yixiang.modules.logging.domain.Log> page = new PageInfo<>(queryAll(criteria));
Map<String, Object> map = new LinkedHashMap<>(2);
map.put("content", generator.convert(page.getList(), LogSmallDTO.class));
map.put("totalElements", page.getTotal());
@ -102,7 +102,7 @@ public class LogServiceImpl extends BaseServiceImpl<LogMapper, co.yixiang.loggin
@Override
@Transactional(rollbackFor = Exception.class)
public void save(String username, String ip, ProceedingJoinPoint joinPoint,
co.yixiang.logging.domain.Log log, Long uid){
co.yixiang.modules.logging.domain.Log log, Long uid){
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method method = signature.getMethod();
@ -152,7 +152,7 @@ public class LogServiceImpl extends BaseServiceImpl<LogMapper, co.yixiang.loggin
@Override
@Transactional(rollbackFor = Exception.class)
public void saveApp(String username, String ip, ProceedingJoinPoint joinPoint,
co.yixiang.logging.domain.Log log, Long uid){
co.yixiang.modules.logging.domain.Log log, Long uid){
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method method = signature.getMethod();
@ -200,16 +200,16 @@ public class LogServiceImpl extends BaseServiceImpl<LogMapper, co.yixiang.loggin
}
@Override
public Object findByErrDetail(Long id) {
co.yixiang.logging.domain.Log log = this.getById(id);
co.yixiang.modules.logging.domain.Log log = this.getById(id);
ValidationUtil.isNull( log.getId(),"Log","id", id);
byte[] details = log.getExceptionDetail();
return Dict.create().set("exception",new String(ObjectUtil.isNotNull(details) ? details : "".getBytes()));
}
@Override
public void download(List<co.yixiang.logging.domain.Log> logs, HttpServletResponse response) throws IOException {
public void download(List<co.yixiang.modules.logging.domain.Log> logs, HttpServletResponse response) throws IOException {
List<Map<String, Object>> list = new ArrayList<>();
for (co.yixiang.logging.domain.Log log : logs) {
for (co.yixiang.modules.logging.domain.Log log : logs) {
Map<String,Object> map = new LinkedHashMap<>();
map.put("用户名", log.getUsername());
map.put("IP", log.getRequestIp());

View File

@ -3,10 +3,10 @@
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.logging.service.mapper;
package co.yixiang.modules.logging.service.mapper;
import co.yixiang.common.mapper.CoreMapper;
import co.yixiang.logging.domain.Log;
import co.yixiang.modules.logging.domain.Log;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

View File

@ -37,11 +37,12 @@ public interface YxStoreBargainUserHelpService extends BaseService<YxStoreBargai
/**
* 获取砍价帮总人数
* @param bargainId 砍价产品ID
*
* @param bargainId 砍价产品ID
* @param bargainUserUid 用户参与砍价表id
* @return int
*/
int getBargainUserHelpPeopleCount(Long bargainId,Long bargainUserUid);
Long getBargainUserHelpPeopleCount(Long bargainId,Long bargainUserUid);
}

View File

@ -79,11 +79,12 @@ public interface YxStoreBargainUserService extends BaseService<YxStoreBargainUse
/**
* 获取参与砍价的用户数量
*
* @param bargainId 砍价id
* @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功
* @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功
* @return int
*/
int getBargainUserCount(Long bargainId,Integer status);
Long getBargainUserCount(Long bargainId,Integer status);
}

View File

@ -33,7 +33,7 @@ public interface YxStoreCouponUserService extends BaseService<YxStoreCouponUser>
* @param uid uid
* @return int
*/
int getUserValidCouponCount(Long uid);
Long getUserValidCouponCount(Long uid);
void useCoupon(int id);

View File

@ -55,10 +55,11 @@ public interface YxStorePinkService extends BaseService<YxStorePink>{
/**
* 返回正在拼团的人数
*
* @param id 拼团id
* @return int
*/
int pinkIngCount(Long id);
Long pinkIngCount(Long id);
/**
* 创建拼团

View File

@ -46,13 +46,13 @@ public class YxStoreCombinationDto implements Serializable {
private List<String> sliderImage;
//参与人数
private Integer countPeopleAll;
private Long countPeopleAll;
//成团人数
private Integer countPeoplePink;
private Long countPeoplePink;
//访问人数
private Integer countPeopleBrowse;
private Long countPeopleBrowse;
// 活动标题
private String title;

View File

@ -81,5 +81,5 @@ public class YxStorePinkDto implements Serializable {
/**
* 参团人数
*/
private int countPeople;
private Long countPeople;
}

View File

@ -206,7 +206,7 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
if(storeBargainUser == null) {
return BargainCountVo
.builder()
.count(0)
.count(0L)
.alreadyPrice(0d)
.status(0)
.pricePercent(0)
@ -216,7 +216,7 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
}
int helpCount = storeBargainUserHelpService.lambdaQuery()
Long helpCount = storeBargainUserHelpService.lambdaQuery()
.eq(YxStoreBargainUserHelp::getBargainUserId,storeBargainUser.getId())
.eq(YxStoreBargainUserHelp::getBargainId,bargainId)
.eq(YxStoreBargainUserHelp::getUid,myUid)
@ -227,7 +227,7 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
}
int count = storeBargainUserHelpService
Long count = storeBargainUserHelpService
.getBargainUserHelpPeopleCount(bargainId,storeBargainUser.getId());
//用户可以砍掉的价格
double diffPrice = NumberUtil.sub(storeBargainUser.getBargainPrice()
@ -345,7 +345,7 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
* @param bargainId 砍价id
* @return int
*/
private int getBargainPayCount(Long bargainId) {
private Long getBargainPayCount(Long bargainId) {
return storeOrderService.lambdaQuery().eq(YxStoreOrder::getBargainId,bargainId)
.eq(YxStoreOrder::getPaid,OrderInfoEnum.PAY_STATUS_1.getValue())
.eq(YxStoreOrder::getRefundStatus,OrderInfoEnum.REFUND_STATUS_0.getValue())

View File

@ -92,12 +92,13 @@ public class YxStoreBargainUserHelpServiceImpl extends BaseServiceImpl<YxStoreBa
/**
* 获取砍价帮总人数
* @param bargainId 砍价产品ID
*
* @param bargainId 砍价产品ID
* @param bargainUserUid 用户参与砍价表id
* @return int
*/
@Override
public int getBargainUserHelpPeopleCount(Long bargainId, Long bargainUserUid) {
public Long getBargainUserHelpPeopleCount(Long bargainId, Long bargainUserUid) {
return this.lambdaQuery()
.eq(YxStoreBargainUserHelp::getBargainUserId,bargainUserUid)
.eq(YxStoreBargainUserHelp::getBargainId,bargainId)

View File

@ -128,7 +128,7 @@ public class YxStoreBargainUserServiceImpl extends BaseServiceImpl<YxStoreBargai
if(ObjectUtil.isNull(storeBargainUser) || ObjectUtil.isNull(storeBargain)){
return false;
}
int count = storeBargainUserHelpService.lambdaQuery()
Long count = storeBargainUserHelpService.lambdaQuery()
.eq(YxStoreBargainUserHelp::getBargainId,bargainId)
.eq(YxStoreBargainUserHelp::getBargainUserId,storeBargainUser.getId())
.eq(YxStoreBargainUserHelp::getUid,uid)
@ -197,12 +197,13 @@ public class YxStoreBargainUserServiceImpl extends BaseServiceImpl<YxStoreBargai
/**
* 获取参与砍价的用户数量
*
* @param bargainId 砍价id
* @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功
* @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功
* @return int
*/
@Override
public int getBargainUserCount(Long bargainId, Integer status) {
public Long getBargainUserCount(Long bargainId, Integer status) {
return this.lambdaQuery().eq(YxStoreBargainUser::getBargainId,bargainId)
.eq(YxStoreBargainUser::getStatus,status).count();
}

View File

@ -134,7 +134,7 @@ public class YxStoreCombinationServiceImpl extends BaseServiceImpl<YxStoreCombin
//评价
storeCombinationVo.setReply(replyService
.getReply(storeCombinationQueryVo.getProductId()));
int replyCount = replyService.productReplyCount(storeCombinationQueryVo.getProductId());
Long replyCount = replyService.productReplyCount(storeCombinationQueryVo.getProductId());
//总条数
storeCombinationVo.setReplyCount(replyCount);
//好评比例

View File

@ -72,7 +72,7 @@ public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl<YxStoreCoupon
throw new YshopException("领取的优惠劵已领完或已过期");
}
int count = this.couponCount(id,uid);
Long count = this.couponCount(id,uid);
if(count > 0) {
throw new YshopException("已领取过该优惠劵");
}
@ -110,7 +110,7 @@ public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl<YxStoreCoupon
List<YxStoreCouponIssueQueryVo> list = yxStoreCouponIssueMapper
.selecCoupontList(pageModel,type,productId);
for (YxStoreCouponIssueQueryVo couponIssue : list) {
int count = this.couponCount(couponIssue.getId(),uid);
Long count = this.couponCount(couponIssue.getId(),uid);
if(count > 0){
couponIssue.setIsUse(true);
}else{
@ -128,7 +128,7 @@ public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl<YxStoreCoupon
* @param uid 用户id
* @return int
*/
private int couponCount(Integer id, Long uid) {
private Long couponCount(Integer id, Long uid) {
return storeCouponIssueUserService.lambdaQuery()
.eq(YxStoreCouponIssueUser::getUid,uid)
.eq(YxStoreCouponIssueUser::getIssueCouponId,id)

View File

@ -72,11 +72,12 @@ public class YxStoreCouponUserServiceImpl extends BaseServiceImpl<YxStoreCouponU
/**
* 获取当前用户优惠券数量
*
* @param uid uid
* @return int
*/
@Override
public int getUserValidCouponCount(Long uid) {
public Long getUserValidCouponCount(Long uid) {
this.checkInvalidCoupon();
return this.lambdaQuery()
.eq(YxStoreCouponUser::getStatus, CouponEnum.STATUS_0.getValue())

View File

@ -270,11 +270,12 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
/**
* 返回正在拼团的人数
*
* @param id 拼团id
* @return int
*/
@Override
public int pinkIngCount(Long id) {
public Long pinkIngCount(Long id) {
return this.lambdaQuery()
.eq(YxStorePink::getId,id)
.eq(YxStorePink::getStatus,OrderInfoEnum.PINK_STATUS_1.getValue())
@ -291,7 +292,7 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
YxStoreCombination storeCombination = combinationService.getById(order.getCombinationId());
order = storeOrderService.handleOrder(order);
YxStoreCart storeCart = yxStoreCartService.getById(order.getCartId());
int pinkCount = yxStorePinkMapper.selectCount(Wrappers.<YxStorePink>lambdaQuery()
Long pinkCount = yxStorePinkMapper.selectCount(Wrappers.<YxStorePink>lambdaQuery()
.eq(YxStorePink::getOrderId,order.getOrderId()));
if(pinkCount > 0) {
return;
@ -363,7 +364,7 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
*/
@Override
public boolean getIsPinkUid(Long id, Long uid) {
int count = this.lambdaQuery()
Long count = this.lambdaQuery()
.eq(YxStorePink::getIsRefund, OrderInfoEnum.PINK_REFUND_STATUS_0.getValue())
.eq(YxStorePink::getUid,uid)
.and(i->i.eq(YxStorePink::getKId,id).or().eq(YxStorePink::getId,id))
@ -503,7 +504,7 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
* @return boolean
*/
private boolean getPinkStatus(List<Long> idAll) {
int count = this.lambdaQuery().in(YxStorePink::getId,idAll)
Long count = this.lambdaQuery().in(YxStorePink::getId,idAll)
.eq(YxStorePink::getIsRefund,OrderInfoEnum.PINK_REFUND_STATUS_1.getValue())
.count();
if(count == 0) {
@ -631,12 +632,12 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
* @param people 当前满足拼团的人数
* @return int
*/
private int getPinkPeople(Long kid, int people) {
private Long getPinkPeople(Long kid, int people) {
LambdaQueryWrapper<YxStorePink> wrapper= new LambdaQueryWrapper<>();
wrapper.eq(YxStorePink::getKId,kid)
.eq(YxStorePink::getIsRefund, OrderInfoEnum.PINK_REFUND_STATUS_0.getValue());
//加上团长自己
int count = yxStorePinkMapper.selectCount(wrapper) + 1;
Long count = yxStorePinkMapper.selectCount(wrapper) + 1;
return people - count;
}
@ -657,7 +658,7 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
i.setUserImg(yxUser.getAvatar());
i.setProduct(storeCombination.getTitle());
i.setImage(storeCombination.getImage());
i.setCountPeople( this.count(new LambdaQueryWrapper<YxStorePink>().eq(YxStorePink::getCid,i.getCid())));
i.setCountPeople(this.count(new LambdaQueryWrapper<YxStorePink>().eq(YxStorePink::getCid,i.getCid())));
});
map.put("content", yxStorePinkDtos);
map.put("totalElements", page.getTotal());

View File

@ -14,7 +14,7 @@ import java.io.Serializable;
@Builder
public class BargainCountVo implements Serializable {
private Double alreadyPrice;
private Integer count;
private Long count;
private Integer pricePercent;
private Integer status;
private Double price; //剩余的砍价金额

View File

@ -17,5 +17,5 @@ import java.io.Serializable;
public class BargainVo implements Serializable {
private YxStoreBargainQueryVo bargain;
private YxUserQueryVo userInfo;
private Integer bargainSumCount;//砍价支付成功订单数量
private Long bargainSumCount;//砍价支付成功订单数量
}

View File

@ -43,7 +43,7 @@ public class PinkInfoVo implements Serializable {
private String storeCombinationHost;
@ApiModelProperty(value = "是否在团内 0不在 1在")
private Integer userBool = 0;
private Integer userBool;
@ApiModelProperty(value = "拼团用户信息")
private YxUserQueryVo userInfo;

View File

@ -41,7 +41,7 @@ public class StoreCombinationVo implements Serializable {
private YxStoreProductReplyQueryVo reply;
@ApiModelProperty(value = "拼团评论总条数")
private Integer replyCount = 0;
private Long replyCount;
@ApiModelProperty(value = "拼团好评比例")
private String replyChance;

View File

@ -31,7 +31,7 @@ public class StoreSeckillVo implements Serializable {
private YxStoreProductReplyQueryVo reply;
@ApiModelProperty(value = "秒杀产品评论数量")
private Integer replyCount;
private Long replyCount;
@ApiModelProperty(value = "秒杀产品信息")
private YxStoreSeckillQueryVo storeInfo;

View File

@ -15,7 +15,7 @@ import java.io.Serializable;
public class TopCountVo implements Serializable {
private Integer lookCount;
private Integer shareCount;
private Integer userCount;
private Long userCount;
}

View File

@ -111,7 +111,7 @@ public class YxStoreBargainQueryVo implements Serializable {
private Integer share;
@ApiModelProperty(value = "砍价产品参与人数")
private Integer people;
private Long people;
}

View File

@ -72,6 +72,6 @@ public class YxStoreCartQueryVo implements Serializable {
private String unique;
@ApiModelProperty(value = "是否评价")
private Integer isReply;
private Long isReply;
}

View File

@ -26,8 +26,8 @@ public class OrderTimeDataDto implements Serializable {
private Integer lastWeekCount;//上周
private Double lastWeekPrice; //上周
private Integer userCount;
private Integer orderCount;
private Long userCount;
private Long orderCount;
private Double priceCount;
private Integer goodsCount;
private Long goodsCount;
}

View File

@ -75,9 +75,9 @@ import co.yixiang.modules.user.service.YxUserLevelService;
import co.yixiang.modules.user.service.YxUserService;
import co.yixiang.modules.user.service.dto.YxUserDto;
import co.yixiang.modules.user.vo.YxUserQueryVo;
import co.yixiang.tools.domain.AlipayConfig;
import co.yixiang.tools.domain.vo.TradeVo;
import co.yixiang.tools.service.AlipayConfigService;
import co.yixiang.modules.tools.domain.AlipayConfig;
import co.yixiang.modules.tools.domain.vo.TradeVo;
import co.yixiang.modules.tools.service.AlipayConfigService;
import co.yixiang.utils.FileUtil;
import co.yixiang.utils.OrderUtil;
import co.yixiang.utils.RedisUtils;
@ -597,7 +597,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
throw new YshopException("评价产品不存在");
}
int count = productReplyService.count(Wrappers.<YxStoreProductReply>lambdaQuery()
Long count = productReplyService.count(Wrappers.<YxStoreProductReply>lambdaQuery()
.eq(YxStoreProductReply::getOid, orderCartInfo.getOid())
.eq(YxStoreProductReply::getProductId, orderCartInfo.getProductId()));
if (count > 0) {
@ -618,9 +618,9 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
productReplyService.save(storeProductReply);
//获取评价商品数量
int replyCount = productReplyService.count(new LambdaQueryWrapper<YxStoreProductReply>().eq(YxStoreProductReply::getOid, orderCartInfo.getOid()));
Long replyCount = productReplyService.count(new LambdaQueryWrapper<YxStoreProductReply>().eq(YxStoreProductReply::getOid, orderCartInfo.getOid()));
//购买商品数量
int cartCount = storeOrderCartInfoService.count(new LambdaQueryWrapper<YxStoreOrderCartInfo>().eq(YxStoreOrderCartInfo::getOid, orderCartInfo.getOid()));
Long cartCount = storeOrderCartInfoService.count(new LambdaQueryWrapper<YxStoreOrderCartInfo>().eq(YxStoreOrderCartInfo::getOid, orderCartInfo.getOid()));
if (replyCount == cartCount) {
YxStoreOrder storeOrder = new YxStoreOrder();
storeOrder.setStatus(OrderInfoEnum.STATUS_3.getValue());
@ -1316,7 +1316,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
}
wrapperOne.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue());
Integer orderCount = yxStoreOrderMapper.selectCount(wrapperOne);
Long orderCount = yxStoreOrderMapper.selectCount(wrapperOne);
//订单支付没有退款 支付总金额
double sumPrice = yxStoreOrderMapper.sumPrice(uid);
@ -1329,7 +1329,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
wrapperTwo.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_0.getValue())
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue());
Integer unpaidCount = yxStoreOrderMapper.selectCount(wrapperTwo);
Long unpaidCount = yxStoreOrderMapper.selectCount(wrapperTwo);
//订单待发货 数量
LambdaQueryWrapper<YxStoreOrder> wrapperThree = new LambdaQueryWrapper<>();
@ -1339,7 +1339,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
wrapperThree.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue());
Integer unshippedCount = yxStoreOrderMapper.selectCount(wrapperThree);
Long unshippedCount = yxStoreOrderMapper.selectCount(wrapperThree);
//订单待收货 数量
LambdaQueryWrapper<YxStoreOrder> wrapperFour = new LambdaQueryWrapper<>();
@ -1349,7 +1349,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
wrapperFour.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_1.getValue());
Integer receivedCount = yxStoreOrderMapper.selectCount(wrapperFour);
Long receivedCount = yxStoreOrderMapper.selectCount(wrapperFour);
//订单待评价 数量
LambdaQueryWrapper<YxStoreOrder> wrapperFive = new LambdaQueryWrapper<>();
@ -1359,7 +1359,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
wrapperFive.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_2.getValue());
Integer evaluatedCount = yxStoreOrderMapper.selectCount(wrapperFive);
Long evaluatedCount = yxStoreOrderMapper.selectCount(wrapperFive);
//订单已完成 数量
LambdaQueryWrapper<YxStoreOrder> wrapperSix = new LambdaQueryWrapper<>();
@ -1369,7 +1369,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
wrapperSix.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_3.getValue());
Integer completeCount = yxStoreOrderMapper.selectCount(wrapperSix);
Long completeCount = yxStoreOrderMapper.selectCount(wrapperSix);
//订单退款
LambdaQueryWrapper<YxStoreOrder> wrapperSeven = new LambdaQueryWrapper<>();
@ -1379,7 +1379,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
String[] strArr = {"1", "2"};
wrapperSeven.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
.in(YxStoreOrder::getRefundStatus, Arrays.asList(strArr));
Integer refundCount = yxStoreOrderMapper.selectCount(wrapperSeven);
Long refundCount = yxStoreOrderMapper.selectCount(wrapperSeven);
return UserOrderCountVo.builder()
@ -2083,7 +2083,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
Integer mapKey = entry.getKey();
TemplateDto mapValue = entry.getValue();
int count = shippingTemplatesFreeService.count(Wrappers.<YxShippingTemplatesFree>lambdaQuery()
Long count = shippingTemplatesFreeService.count(Wrappers.<YxShippingTemplatesFree>lambdaQuery()
.eq(YxShippingTemplatesFree::getTempId, mapValue.getTempId())
.eq(YxShippingTemplatesFree::getCityId, mapValue.getCityId())
.le(YxShippingTemplatesFree::getNumber, mapValue.getNumber())

View File

@ -16,22 +16,22 @@ public class ShoperOrderTimeDataVo implements Serializable {
private Double todayPrice;
/**今日订单数*/
private Integer todayCount;
private Long todayCount;
/**昨日成交额*/
private Double proPrice;
/**昨日订单数*/
private Integer proCount;
private Long proCount;
/**本月成交额*/
private Double monthPrice;
/**本月订单数*/
private Integer monthCount;
private Long monthCount;
/**上周订单数*/
private Integer lastWeekCount;
private Long lastWeekCount;
/**上周成交额*/
private Double lastWeekPrice;

View File

@ -23,7 +23,7 @@ public class UserOrderCountVo implements Serializable {
/**订单支付没有退款 数量*/
@ApiModelProperty(value = "订单支付没有退款数量")
private Integer orderCount;
private Long orderCount;
/**订单支付没有退款 支付总金额*/
@ApiModelProperty(value = "订单支付没有退款支付总金额")
@ -31,25 +31,25 @@ public class UserOrderCountVo implements Serializable {
/**订单待支付 数量*/
@ApiModelProperty(value = "订单待支付数量")
private Integer unpaidCount;
private Long unpaidCount;
/**订单待发货数量*/
@ApiModelProperty(value = "订单待发货数量")
private Integer unshippedCount;
private Long unshippedCount;
/**订单待收货数量*/
@ApiModelProperty(value = "订单待收货数量")
private Integer receivedCount;
private Long receivedCount;
/**订单待评价数量*/
@ApiModelProperty(value = "订单待评价数量")
private Integer evaluatedCount;
private Long evaluatedCount;
/**订单已完成数量*/
@ApiModelProperty(value = "订单已完成数量")
private Integer completeCount;
private Long completeCount;
/**订单退款数量*/
@ApiModelProperty(value = "订单退款数量")
private Integer refundCount;
private Long refundCount;
}

View File

@ -58,11 +58,11 @@ public interface YxStoreProductReplyService extends BaseService<YxStoreProductR
*/
List<YxStoreProductReplyQueryVo> getReplyList(long productId,int type,int page, int limit);
int getInfoCount(Integer oid, String unique);
Long getInfoCount(Integer oid, String unique);
int productReplyCount(long productId);
Long productReplyCount(long productId);
int replyCount(String unique);
Long replyCount(String unique);
String replyPer(long productId);

View File

@ -45,7 +45,7 @@ public class YxStoreProductAttrResultServiceImpl extends BaseServiceImpl<StorePr
yxStoreProductAttrResult.setResult(JSON.toJSONString(map));
yxStoreProductAttrResult.setChangeTime(new Date());
int count = this.count(Wrappers.<YxStoreProductAttrResult>lambdaQuery()
Long count = this.count(Wrappers.<YxStoreProductAttrResult>lambdaQuery()
.eq(YxStoreProductAttrResult::getProductId,productId));
if(count > 0) {
this.remove(Wrappers.<YxStoreProductAttrResult>lambdaQuery()

View File

@ -117,7 +117,7 @@ public class YxStoreProductRelationServiceImpl extends BaseServiceImpl<YxStorePr
*/
@Override
public Boolean isProductRelation(long productId, long uid) {
int count = yxStoreProductRelationMapper
Long count = yxStoreProductRelationMapper
.selectCount(Wrappers.<YxStoreProductRelation>lambdaQuery()
.eq(YxStoreProductRelation::getUid,uid)
.eq(YxStoreProductRelation::getType,"collect")

View File

@ -73,25 +73,25 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
*/
@Override
public ReplyCountVo getReplyCount(long productId) {
int sumCount = productReplyCount(productId);
Long sumCount = productReplyCount(productId);
if(sumCount == 0) {
return new ReplyCountVo();
}
//好评
int goodCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
Long goodCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
.eq(YxStoreProductReply::getProductId,productId)
.eq(YxStoreProductReply::getProductScore,5));
//中评
int inCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
Long inCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
.eq(YxStoreProductReply::getProductId,productId)
.lt(YxStoreProductReply::getProductScore,5)
.gt(YxStoreProductReply::getProductScore,2));
//差评
int poorCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
Long poorCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
.eq(YxStoreProductReply::getProductId,productId)
.lt(YxStoreProductReply::getProductScore,2));
@ -185,14 +185,14 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
}
@Override
public int getInfoCount(Integer oid, String unique) {
LambdaQueryWrapper<YxStoreProductReply> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(YxStoreProductReply::getUnique,unique).eq(YxStoreProductReply::getOid,oid);
public Long getInfoCount(Integer oid, String unique) {
LambdaQueryWrapper<YxStoreProductReply> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(YxStoreProductReply::getUnique, unique).eq(YxStoreProductReply::getOid, oid);
return this.baseMapper.selectCount(wrapper);
}
@Override
public int productReplyCount(long productId) {
public Long productReplyCount(long productId) {
return this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
.eq(YxStoreProductReply::getProductId,productId));
@ -200,7 +200,7 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
}
@Override
public int replyCount(String unique) {
public Long replyCount(String unique) {
LambdaQueryWrapper<YxStoreProductReply> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(YxStoreProductReply::getUnique,unique);
return this.baseMapper.selectCount(wrapper);
@ -217,8 +217,8 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
wrapper.eq(YxStoreProductReply::getProductId,productId)
.eq(YxStoreProductReply::getIsDel,ShopCommonEnum.DELETE_0.getValue())
.eq(YxStoreProductReply::getProductScore,5);
int productScoreCount = this.baseMapper.selectCount(wrapper);
int count = productReplyCount(productId);
Long productScoreCount = this.baseMapper.selectCount(wrapper);
Long count = productReplyCount(productId);
if(count > 0){
return ""+NumberUtil.round(NumberUtil.mul(NumberUtil.div(productScoreCount,count),100),2);
}

View File

@ -325,7 +325,7 @@ public class YxStoreProductServiceImpl extends BaseServiceImpl<StoreProductMappe
storeProductQueryVo.setUserCollect(isCollect);
}
//总条数
int totalCount = replyService.productReplyCount(id);
Long totalCount = replyService.productReplyCount(id);
productVo.setReplyCount(totalCount);
//评价

View File

@ -39,7 +39,7 @@ public class ProductVo{
private String replyChance;
@ApiModelProperty(value = "回复数")
private Integer replyCount = 0;
private Long replyCount;
//todo
private List similarity = new ArrayList();

View File

@ -22,16 +22,16 @@ import java.io.Serializable;
public class ReplyCountVo implements Serializable {
@ApiModelProperty(value = "总的评论数")
private Integer sumCount;
private Long sumCount;
@ApiModelProperty(value = "好评数")
private Integer goodCount;
private Long goodCount;
@ApiModelProperty(value = "中评数")
private Integer inCount;
private Long inCount;
@ApiModelProperty(value = "差评数")
private Integer poorCount;
private Long poorCount;
@ApiModelProperty(value = "好评率")
private String replyChance;

View File

@ -1,8 +1,6 @@
package co.yixiang.modules.sales.service.vo;
import co.yixiang.modules.cart.vo.YxStoreCartQueryVo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -19,7 +17,6 @@ import java.util.List;
public class StoreAfterSalesVo {
/** id */
@TableId(value = "uid", type = IdType.AUTO)
private Long id;
/** 订单号 */

Some files were not shown because too many files have changed in this diff Show More