mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-29 04:51:58 +08:00
2024-09-24 生产配置
This commit is contained in:
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.domain.GetSumDto;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.system.domain.dto.ApplyCallback;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -47,13 +48,13 @@ public class CustomerApplyLogController extends BaseController
|
||||
* 获取商户今日已申请数
|
||||
*
|
||||
*
|
||||
* @param merchantId
|
||||
* @param getSumDto
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/sum")
|
||||
public R<Integer> sum(@PathVariable("merchantId") Long merchantId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source){
|
||||
return R.ok(customerApplyLogService.getApplySum(merchantId));
|
||||
@PostMapping("/sum")
|
||||
public R<Integer> sum(@RequestBody GetSumDto getSumDto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source){
|
||||
return R.ok(customerApplyLogService.getApplySum(getSumDto.getMerchantId()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -88,7 +88,7 @@ public class CustomerController extends BaseController
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/updateByPhoneMd5")
|
||||
public R updateByPhoneMd5(Customer customer ,@RequestHeader(SecurityConstants.FROM_SOURCE) String source){
|
||||
public R updateByPhoneMd5(@RequestBody Customer customer ,@RequestHeader(SecurityConstants.FROM_SOURCE) String source){
|
||||
return customerService.updateByPhoneMd5(customer);
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public class CustomerController extends BaseController
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getCustomerToken")
|
||||
public String getCustomerToken(@RequestParam("phone") String phone) {
|
||||
public String getCustomerToken(@RequestParam("phone") String phone,@RequestParam("channelId")Long channelId) {
|
||||
return customerService.getCustomerToken(phone);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,14 @@ import lombok.Data;
|
||||
public class MerchantListDto {
|
||||
|
||||
//商户名
|
||||
String merchantName;
|
||||
private String merchantName;
|
||||
|
||||
//商户跳转地址
|
||||
String merchantUrl;
|
||||
private String merchantUrl;
|
||||
|
||||
//商户描述
|
||||
String merchantDescribe;
|
||||
private String merchantDescribe;
|
||||
|
||||
//商户ID
|
||||
private Long merchantId;
|
||||
}
|
||||
|
||||
@@ -86,6 +86,13 @@ public interface ICustomerService extends IService<Customer>
|
||||
*/
|
||||
String getCustomerToken(String phone);
|
||||
|
||||
/**
|
||||
* 注册并返回token
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
public String registAndretrunToken(String phone,Long channelId);
|
||||
|
||||
/**
|
||||
* h5用户登录
|
||||
* @param phone
|
||||
|
||||
@@ -40,7 +40,9 @@ public class ChannelServiceImpl implements IChannelService
|
||||
log.info("初始化渠道数据开始");
|
||||
List<Channel> channels = channelMapper.selectList(new LambdaQueryWrapper<Channel>());
|
||||
for (Channel channel:channels) {
|
||||
redisService.deleteObject(CacheConstants.CHANNEL_ID+channel.getId());
|
||||
redisService.setCacheObject(CacheConstants.CHANNEL_ID+channel.getId(),channel);
|
||||
redisService.deleteObject(CacheConstants.CHANNEL_SIGN+channel.getChannelSign());
|
||||
redisService.setCacheObject(CacheConstants.CHANNEL_SIGN+channel.getChannelSign(),channel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,8 +149,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
||||
|
||||
@Override
|
||||
public String getCustomerToken(String phone) {
|
||||
log.info("获取用户token,手机号:{},加密结果:{}", phone, EncryptUtil.AESencode(phone, systemConfig.getAESkey()));
|
||||
Customer customer = this.getOne(new LambdaQueryWrapper<Customer>().eq(Customer::getPhone, EncryptUtil.AESencode(phone, systemConfig.getAESkey())));
|
||||
log.info("获取用户token,手机号:{}", phone);
|
||||
Customer customer = this.getOne(new LambdaQueryWrapper<Customer>().eq(Customer::getPhone, phone));
|
||||
log.info("获取用户token,用户信息:{}", customer);
|
||||
//获取到用户登陆的token
|
||||
String token = customerTokenService.getToken(customer.getId());
|
||||
|
||||
@@ -155,6 +155,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
|
||||
merchantListDto.setMerchantName(merchant.getMerchantName());
|
||||
merchantListDto.setMerchantDescribe(merchant.getMerchantDescribe());
|
||||
merchantListDto.setMerchantUrl(merchant.getHitUrl());
|
||||
merchantListDto.setMerchantId(merchant.getId());
|
||||
merchantListDtos.add(merchantListDto);
|
||||
}
|
||||
return AjaxResult.success(merchantListDtos);
|
||||
|
||||
@@ -14,12 +14,12 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 47.109.135.151:8848
|
||||
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
|
||||
server-addr: 124.222.144.55:8848
|
||||
namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 47.109.135.151:8848
|
||||
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
|
||||
server-addr: 124.222.144.55:8848
|
||||
namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
||||
Reference in New Issue
Block a user