Merge branch 'master' into master_zhp

# Conflicts:
#	ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
This commit is contained in:
鲸落
2024-10-11 17:22:13 +08:00
16 changed files with 69 additions and 46 deletions

View File

@@ -66,7 +66,7 @@ public class CustomerApplyLogController extends BaseController
* @return 结果
*/
@GetMapping("/customerApply")
public R<Boolean> customerApply(@PathVariable("customerID") Long customerID,@RequestHeader(SecurityConstants.FROM_SOURCE) String source){
public R<Boolean> customerApply(@RequestParam("customerID") Long customerID,@RequestHeader(SecurityConstants.FROM_SOURCE) String source){
return customerApplyLogService.getCustomerApply(customerID);
}
/**

View File

@@ -134,7 +134,7 @@ public class CustomerApplyLogServiceImpl extends ServiceImpl<CustomerApplyLogMap
Long aLong = customerApplyLogMapper.selectCount(
new LambdaQueryWrapper<CustomerApplyLog>()
.isNotNull(CustomerApplyLog::getMerchantId)
.eq(CustomerApplyLog::getOrderStatus, 0)
.eq(CustomerApplyLog::getOrderStatus, 20)
.ge(CustomerApplyLog::getCreateTime, LocalDateTimeUtils.getDateFromLocalDateTime(LocalDateTimeUtils.getTodayStartTime()))
.le(CustomerApplyLog::getCreateTime, LocalDateTimeUtils.getDateFromLocalDateTime(LocalDateTimeUtils.getTodayEndTime())));
return R.ok(aLong>0);

View File

@@ -19,6 +19,8 @@ import com.ruoyi.system.mapper.MerchantMapper;
import com.ruoyi.system.service.ICustomerApplyLogService;
import com.ruoyi.system.service.IMerchantService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -32,12 +34,13 @@ import java.util.stream.Collectors;
/**
* 商户Service业务层处理
*
*
* @author ruoyi
* @date 2024-09-15
*/
@Service
@RequiredArgsConstructor
@Slf4j
public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> implements IService<Merchant>,IMerchantService
{
private final MerchantMapper merchantMapper;
@@ -48,7 +51,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
/**
* 查询商户
*
*
* @param id 商户主键
* @return 商户
*/
@@ -60,7 +63,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
/**
* 查询商户列表
*
*
* @param merchant 商户
* @return 商户
*/
@@ -72,7 +75,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
/**
* 新增商户
*
*
* @param merchant 商户
* @return 结果
*/
@@ -85,7 +88,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
/**
* 修改商户
*
*
* @param merchant 商户
* @return 结果
*/
@@ -98,7 +101,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
/**
* 批量删除商户
*
*
* @param ids 需要删除的商户主键
* @return 结果
*/
@@ -110,7 +113,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
/**
* 删除商户信息
*
*
* @param id 商户主键
* @return 结果
*/
@@ -144,6 +147,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
if (customerId==null){
return AjaxResult.error("用户不存在或未登录");
}
log.info("H5打开页面{}",customerId);
Customer customer = customerMapper.selectById(customerId);
List<Merchant> merchants = matchMerchant(customer);
List<MerchantListDto> merchantListDtos = new ArrayList<>();
@@ -167,6 +171,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
if (aBoolean){
return AjaxResult.error("请勿重复点击");
}
log.info("H5申请用户{}",customerId);
Customer customer = customerMapper.selectById(customerId);
Merchant merchant = merchantMapper.selectById(merchantId);
redisService.setCacheObject(RedisConstant.H5_APPLY_CHECK+customerId,1,10l, TimeUnit.SECONDS);

View File

@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 124.222.144.55:8848
namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
server-addr: 124.222.144.55:8848
namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
# 共享配置