Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -7,6 +7,7 @@ import com.czg.product.vo.RecommendProVO;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 小程序主页相关接口
|
||||
* @author Administrator
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/user/home")
|
||||
public class HomeController {
|
||||
@@ -43,6 +45,7 @@ public class HomeController {
|
||||
*/
|
||||
@GetMapping("/product")
|
||||
public CzgResult<Page<RecommendProVO>> home(String lng, String lat, String address, Integer categoryId, Integer orderType, Integer distanceType, String name) {
|
||||
log.info("请求参数, lng: {}, lat: {}, address: {}, caId: {}, orderType: {}, distan: {}, name: {}", lng,lat,address, categoryId, orderType, distanceType, name);
|
||||
return CzgResult.success(homePageService.getProd(lng, lat, address, categoryId, orderType, distanceType, name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.czg.account.dto.freeding.FreeDineConfigEditDTO;
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.account.entity.FreeDineConfig;
|
||||
import com.czg.account.service.FreeDineConfigService;
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.service.account.mapper.FreeDineConfigMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
|
||||
/**
|
||||
* 霸王餐配置信息表 服务层实现。
|
||||
@@ -19,7 +16,7 @@ import org.springframework.stereotype.Service;
|
||||
* @author zs
|
||||
* @since 2025-02-21
|
||||
*/
|
||||
@Service
|
||||
@DubboService
|
||||
public class FreeDineConfigServiceImpl extends ServiceImpl<FreeDineConfigMapper, FreeDineConfig> implements FreeDineConfigService{
|
||||
@Override
|
||||
public FreeDineConfig getConfig(long shopId) {
|
||||
|
||||
@@ -466,7 +466,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
Long key = entry.getKey();
|
||||
List<OrderDetail> value = entry.getValue();
|
||||
BigDecimal couponNum = BigDecimal.ZERO;
|
||||
if (prodCouponMap.containsKey(key)) {
|
||||
if (CollUtil.isNotEmpty(prodCouponMap) && prodCouponMap.containsKey(key)){
|
||||
couponNum = new BigDecimal(prodCouponMap.get(key));
|
||||
if (value.size() > 1) {
|
||||
value.sort(Comparator.comparing(OrderDetail::getPrice));
|
||||
|
||||
Reference in New Issue
Block a user