Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fda743ceee
|
|
@ -14,10 +14,10 @@
|
||||||
</appender>
|
</appender>
|
||||||
<!--按天生成日志-->
|
<!--按天生成日志-->
|
||||||
<appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>logs/logback.log</file>
|
<file>logs/account/logback.log</file>
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!--生成日志文件名称-->
|
<!--生成日志文件名称-->
|
||||||
<fileNamePattern>logs/history/%d{yyyy-MM-dd}/logback.%i.log.gz</fileNamePattern>
|
<fileNamePattern>logs/account/history/%d{yyyy-MM-dd}/logback.%i.log.gz</fileNamePattern>
|
||||||
<!--日志文件保留天数-->
|
<!--日志文件保留天数-->
|
||||||
<MaxHistory>30</MaxHistory>
|
<MaxHistory>30</MaxHistory>
|
||||||
<maxFileSize>20MB</maxFileSize>
|
<maxFileSize>20MB</maxFileSize>
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@
|
||||||
</appender>
|
</appender>
|
||||||
<!--按天生成日志-->
|
<!--按天生成日志-->
|
||||||
<appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>logs/logback.log</file>
|
<file>logs/order/logback.log</file>
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!--生成日志文件名称-->
|
<!--生成日志文件名称-->
|
||||||
<fileNamePattern>logs/history/%d{yyyy-MM-dd}/logback.%i.log.gz</fileNamePattern>
|
<fileNamePattern>logs/order/history/%d{yyyy-MM-dd}/logback.%i.log.gz</fileNamePattern>
|
||||||
<!--日志文件保留天数-->
|
<!--日志文件保留天数-->
|
||||||
<MaxHistory>30</MaxHistory>
|
<MaxHistory>30</MaxHistory>
|
||||||
<maxFileSize>20MB</maxFileSize>
|
<maxFileSize>20MB</maxFileSize>
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,12 @@ public class HomeController {
|
||||||
* @param lat 经度
|
* @param lat 经度
|
||||||
* @param address 城市
|
* @param address 城市
|
||||||
* @param categoryId 分类 0双人餐 1饮品明细 2咖啡饮品
|
* @param categoryId 分类 0双人餐 1饮品明细 2咖啡饮品
|
||||||
* @param orderType 排序规则 0离我最近 1销量优先 2价格优先
|
* @param orderType 排序规则 0离我最近 1销量优先 2价格优先 3上新
|
||||||
* @param distanceType 1000m 2000m
|
* @param distanceType 1000m 2000m
|
||||||
* @return 商品列表
|
* @return 商品列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/product")
|
@GetMapping("/product")
|
||||||
public CzgResult<Page<RecommendProVO>> home(String lng, String lat, String address, Integer categoryId, Integer orderType, Integer distanceType) {
|
public CzgResult<Page<RecommendProVO>> home(String lng, String lat, String address, Integer categoryId, Integer orderType, Integer distanceType, String name) {
|
||||||
return CzgResult.success(homePageService.getProd(lng, lat, address, categoryId, orderType, distanceType));
|
return CzgResult.success(homePageService.getProd(lng, lat, address, categoryId, orderType, distanceType, name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@
|
||||||
</appender>
|
</appender>
|
||||||
<!--按天生成日志-->
|
<!--按天生成日志-->
|
||||||
<appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>logs/logback.log</file>
|
<file>logs/product/logback.log</file>
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!--生成日志文件名称-->
|
<!--生成日志文件名称-->
|
||||||
<fileNamePattern>logs/history/%d{yyyy-MM-dd}/logback.%i.log.gz</fileNamePattern>
|
<fileNamePattern>logs/product/history/%d{yyyy-MM-dd}/logback.%i.log.gz</fileNamePattern>
|
||||||
<!--日志文件保留天数-->
|
<!--日志文件保留天数-->
|
||||||
<MaxHistory>30</MaxHistory>
|
<MaxHistory>30</MaxHistory>
|
||||||
<maxFileSize>20MB</maxFileSize>
|
<maxFileSize>20MB</maxFileSize>
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@
|
||||||
</appender>
|
</appender>
|
||||||
<!--按天生成日志-->
|
<!--按天生成日志-->
|
||||||
<appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>logs/logback.log</file>
|
<file>logs/system/logback.log</file>
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!--生成日志文件名称-->
|
<!--生成日志文件名称-->
|
||||||
<fileNamePattern>logs/history/%d{yyyy-MM-dd}/logback.%i.log.gz</fileNamePattern>
|
<fileNamePattern>logs/system/history/%d{yyyy-MM-dd}/logback.%i.log.gz</fileNamePattern>
|
||||||
<!--日志文件保留天数-->
|
<!--日志文件保留天数-->
|
||||||
<MaxHistory>30</MaxHistory>
|
<MaxHistory>30</MaxHistory>
|
||||||
<maxFileSize>20MB</maxFileSize>
|
<maxFileSize>20MB</maxFileSize>
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
||||||
// 重置根路径,防止satoken切割根路径导致匹配不到路径
|
// 重置根路径,防止satoken切割根路径导致匹配不到路径
|
||||||
ApplicationInfo.routePrefix = "";
|
ApplicationInfo.routePrefix = "";
|
||||||
|
|
||||||
SaRouter.match("/user/**").notMatch("/user/login", "/user/test", "/user/geo/**", "/user/home/**")
|
SaRouter.match("/user/**").notMatch("/user/login", "/user/test", "/user/geo/**", "/user/home/**", "/user/home/**", "/user/dict/**")
|
||||||
.notMatch("/pay/**")
|
.notMatch("/pay/**")
|
||||||
.notMatch("/notify/**")
|
.notMatch("/notify/**")
|
||||||
.check(r -> MyStpLogic.CLIENT_LOGIC.checkLogin())
|
.check(r -> MyStpLogic.CLIENT_LOGIC.checkLogin())
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public class PrinterEditDTO {
|
||||||
/**
|
/**
|
||||||
* 打印机品牌
|
* 打印机品牌
|
||||||
*/
|
*/
|
||||||
@Size(min = 1, message = "打印机品牌不为空")
|
// @Size(min = 1, message = "打印机品牌不为空")
|
||||||
private String contentType;
|
private String contentType;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,6 @@ import com.mybatisflex.core.paginate.Page;
|
||||||
public interface HomePageService {
|
public interface HomePageService {
|
||||||
HomePageVO getHomeInfo();
|
HomePageVO getHomeInfo();
|
||||||
|
|
||||||
Page<RecommendProVO> getProd(String lng, String lat, String address, Integer classify, Integer orderType, Integer distanceType);
|
Page<RecommendProVO> getProd(String lng, String lat, String address, Integer classify, Integer orderType, Integer distanceType, String name);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,5 +41,5 @@ public interface ProductMapper extends BaseMapper<Product> {
|
||||||
|
|
||||||
List<RecommendProVO> selectRecommendProductList(@Param("lng") String lng, @Param("lat") String lat, @Param("address") String address,
|
List<RecommendProVO> selectRecommendProductList(@Param("lng") String lng, @Param("lat") String lat, @Param("address") String address,
|
||||||
@Param("classify") Integer classify, @Param("orderType") Integer orderType,
|
@Param("classify") Integer classify, @Param("orderType") Integer orderType,
|
||||||
@Param("distanceType") Integer distanceType);
|
@Param("distanceType") Integer distanceType, @Param("name") String name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,8 @@ public class HomePageServiceImpl implements HomePageService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<RecommendProVO> getProd(String lng, String lat, String address, Integer classify, Integer orderType, Integer distanceType) {
|
public Page<RecommendProVO> getProd(String lng, String lat, String address, Integer classify, Integer orderType, Integer distanceType, String name) {
|
||||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||||
return PageUtil.convert(new PageInfo<>(productMapper.selectRecommendProductList(lng, lat, address, classify, orderType, distanceType)));
|
return PageUtil.convert(new PageInfo<>(productMapper.selectRecommendProductList(lng, lat, address, classify, orderType, distanceType, name)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,8 +173,12 @@
|
||||||
<if test="address != null and address != ''">
|
<if test="address != null and address != ''">
|
||||||
and (b.cities like concat('%', #{address}, '%') or b.districts like concat('%', #{address}, '%'))
|
and (b.cities like concat('%', #{address}, '%') or b.districts like concat('%', #{address}, '%'))
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and c.name like concat('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
<if test="classify != null">
|
<if test="classify != null">
|
||||||
and c.category_id = #{classify}
|
and c.group_category_id = #{classify}
|
||||||
</if>
|
</if>
|
||||||
<if test="distanceType != null">
|
<if test="distanceType != null">
|
||||||
and ST_Distance_Sphere(POINT(b.lng, b.lat), POINT(#{lng}, #{lat})) <= #{distanceType}
|
and ST_Distance_Sphere(POINT(b.lng, b.lat), POINT(#{lng}, #{lat})) <= #{distanceType}
|
||||||
|
|
@ -190,6 +194,10 @@
|
||||||
ORDER BY a.sale_price
|
ORDER BY a.sale_price
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test="orderType == 3">
|
||||||
|
ORDER BY c.create_time desc
|
||||||
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<update id="updateProductStockNum">
|
<update id="updateProductStockNum">
|
||||||
update tb_product
|
update tb_product
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue