文件上传https

This commit is contained in:
chen-xin-zhi 2025-03-17 18:47:58 +08:00
parent 18084c2b10
commit 2c022df7f8
16 changed files with 261 additions and 166 deletions

View File

@ -8,9 +8,9 @@ public interface FileConstant {
// String SERVER_HOST = "http://123.249.108.160:8888/api/file/downloadFile?objectKey=";
// String SERVER_HOST = "https://www.carboner.cn:8888/api/file/downloadFile?objectKey=";
String SERVER_HOST = "https://www.carboner.cn:8888/api/file/downloadFile?objectKey=";
String SERVER_HOST = "";
// String SERVER_HOST = "";
}

View File

@ -979,5 +979,29 @@ public class GoodController {
/**
* 小程序端用户根据id查询服务类商品信息不含预约日期和时间段
* @param commonRequest 商品id
* @return 服务类商品信息
*/
@PostMapping("/query/service/id")
@Operation(summary = "小程序端用户根据id查询服务类商品信息不含预约日期和时间段", description = "参数商品id权限所有人方法名queryServiceGoodMainInfoById")
public BaseResponse<ServiceGoodCardVO> queryServiceGoodMainInfoById(@RequestBody CommonRequest commonRequest, HttpServletRequest request) {
if (commonRequest == null || commonRequest.getId() <= 0) {
throw new BusinessException(ErrorCode.PARAMS_ERROR);
}
userService.getLoginUser(request);
Long id = commonRequest.getId();
Good good = goodService.getById(id);
ThrowUtils.throwIf(good == null, ErrorCode.NOT_FOUND_ERROR, "商品不存在");
// TODO
good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg());
ServiceGoodCardVO serviceGoodVO = new ServiceGoodCardVO();
BeanUtils.copyProperties(good, serviceGoodVO);
return ResultUtils.success(serviceGoodVO);
}
}

View File

@ -4,6 +4,7 @@ package com.cultural.heritage.controller.order;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cultural.heritage.annotation.AuthCheck;
import com.cultural.heritage.common.BaseResponse;
@ -17,6 +18,7 @@ import com.cultural.heritage.exception.ThrowUtils;
import com.cultural.heritage.model.dto.CommonRequest;
import com.cultural.heritage.model.dto.advanceOrder.AdvanceOrderAddRequest;
import com.cultural.heritage.model.dto.advanceOrder.AdvanceOrderQueryRequest;
import com.cultural.heritage.model.dto.order.OrderStatusUpdateRequest;
import com.cultural.heritage.model.dto.snapshot.ContactsSnapshot;
import com.cultural.heritage.model.dto.snapshot.PhotoProductsSnapshot;
import com.cultural.heritage.model.entity.*;
@ -34,6 +36,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -348,4 +351,30 @@ public class AdvanceOrderController {
/**
* Web端管理员更新写真预约订单状态
* @param orderStatusUpdateRequest 订单状态更新请求体
* @return 是否更新成功
*/
@PostMapping("/update/orderStatus")
@Operation(summary = "Web端管理员更新写真预约订单状态", description = "参数:订单状态更新请求体,权限:管理员(admin, boss)方法名updateOrderStatus")
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
public BaseResponse<Boolean> updateOrderStatus(@RequestBody OrderStatusUpdateRequest orderStatusUpdateRequest) {
if (orderStatusUpdateRequest == null || orderStatusUpdateRequest.getId() <= 0) {
throw new BusinessException(ErrorCode.PARAMS_ERROR);
}
Long id = orderStatusUpdateRequest.getId();
String orderStatus = orderStatusUpdateRequest.getOrderStatus();
ThrowUtils.throwIf(StringUtils.isBlank(orderStatus), ErrorCode.OPERATION_ERROR, "订单状态参数为空");
UpdateWrapper<AdvanceOrder> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("id", id);
updateWrapper.set("orderStatus", orderStatus);
boolean result = advanceOrderService.update(updateWrapper);
ThrowUtils.throwIf(!result, ErrorCode.OPERATION_ERROR, "订单状态不存在或订单状态更新失败");
return ResultUtils.success(true);
}
}

View File

@ -18,6 +18,7 @@ import com.cultural.heritage.model.dto.cart.CartOrderItemAddRequest;
import com.cultural.heritage.model.dto.cartService.CartExperienceOrderAddRequest;
import com.cultural.heritage.model.dto.cartService.CartExperienceOrderItemAddRequest;
import com.cultural.heritage.model.dto.order.OrderQueryRequest;
import com.cultural.heritage.model.dto.order.OrderStatusUpdateRequest;
import com.cultural.heritage.model.dto.order.OrderUpdateRequest;
import com.cultural.heritage.model.dto.order.capital.GeneralGoodSingleBuyAddRequest;
import com.cultural.heritage.model.dto.order.capital.OrderMainInfoAddRequest;
@ -39,6 +40,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
@ -359,12 +361,12 @@ public class OrderController {
/**
* Web端管理员更新订单状态
* Web端管理员更新物流单号
* @param orderUpdateRequest 订单状态更新请求体
* @return 是否更新成功
*/
@PostMapping("/update")
@Operation(summary = "Web端管理员更新订单状态", description = "参数:订单状态更新请求体,权限:管理员(admin, boss)方法名updateOrderStatus")
@Operation(summary = "Web端管理员更新物流单号", description = "参数:订单状态更新请求体,权限:管理员(admin, boss)方法名updateOrderStatus")
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
public BaseResponse<Boolean> updateOrderStatus(@RequestBody OrderUpdateRequest orderUpdateRequest) {
if (orderUpdateRequest == null || orderUpdateRequest.getId() <= 0) {
@ -377,7 +379,7 @@ public class OrderController {
updateWrapper.set("trackingNumber", trackingNumber);
updateWrapper.set("orderStatus", OrderStatusConstant.PENDING_DELIVERY);
boolean result = orderService.update(updateWrapper);
ThrowUtils.throwIf(!result, ErrorCode.OPERATION_ERROR);
ThrowUtils.throwIf(!result, ErrorCode.OPERATION_ERROR, "订单状态不存在或订单状态更新失败");
return ResultUtils.success(true);
}
@ -566,4 +568,31 @@ public class OrderController {
/**
* Web端管理员更新订单状态
* @param orderStatusUpdateRequest 订单状态更新请求体
* @return 是否更新成功
*/
@PostMapping("/update/all/orderStatus")
@Operation(summary = "Web端管理员更新订单状态", description = "参数:订单状态更新请求体,权限:管理员(admin, boss)方法名updateAllOrderStatus")
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
public BaseResponse<Boolean> updateAllOrderStatus(@RequestBody OrderStatusUpdateRequest orderStatusUpdateRequest) {
if (orderStatusUpdateRequest == null || orderStatusUpdateRequest.getId() <= 0) {
throw new BusinessException(ErrorCode.PARAMS_ERROR);
}
Long id = orderStatusUpdateRequest.getId();
String orderStatus = orderStatusUpdateRequest.getOrderStatus();
ThrowUtils.throwIf(StringUtils.isBlank(orderStatus), ErrorCode.OPERATION_ERROR, "订单状态参数为空");
UpdateWrapper<Order> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("id", id);
updateWrapper.set("orderStatus", orderStatus);
boolean result = orderService.update(updateWrapper);
ThrowUtils.throwIf(!result, ErrorCode.OPERATION_ERROR, "订单状态不存在或订单状态更新失败");
return ResultUtils.success(true);
}
}

View File

@ -23,6 +23,7 @@ import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPayment
import com.wechat.pay.java.service.payments.model.Transaction;
import com.wechat.pay.java.service.refund.model.Refund;
import com.wechat.pay.java.service.refund.model.RefundNotification;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
@ -85,9 +86,11 @@ public class WeChatPayController {
/**
* JSAPI 下单回调商品类
*/
@Hidden
@PostMapping("/payment/callback")
@Transactional(rollbackFor = Exception.class)
@Operation(summary = "JSAPI 下单回调(商品类)", description = "参数订单id, 权限:所有人, 方法名callbackPayment")
@ -103,6 +106,8 @@ public class WeChatPayController {
/**
* JSAPI 下单写真预约类
*/
@ -128,6 +133,7 @@ public class WeChatPayController {
/**
* JSAPI 下单回调写真预约类
*/
@Hidden
@PostMapping("/payment/photo/callback")
@Transactional(rollbackFor = Exception.class)
@Operation(summary = "JSAPI 下单回调(写真预约类)", description = "参数订单id, 权限:所有人, 方法名callbackPhotoProductsPayment")
@ -211,6 +217,7 @@ public class WeChatPayController {
* Web管理员剩余部分退款
* @param commonRequest 订单id
*/
@Hidden
@PostMapping("/refund/rest/create")
@Operation(summary = "Web管理员剩余部分退款", description = "参数订单id, 权限web端管理员, 方法名createRestRefund")
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
@ -233,6 +240,7 @@ public class WeChatPayController {
/**
* 全额退款回调商品类
*/
@Hidden
@PostMapping("/refund/callback")
@Operation(summary = "全额退款回调(商品类)", description = "参数订单id, 权限web端管理员, 方法名callbackRefund")
public BaseResponse<Boolean> callbackRefund(HttpServletRequest request) {
@ -248,6 +256,7 @@ public class WeChatPayController {
/**
* 全额退款回调写真预约类
*/
@Hidden
@PostMapping("/refund/photo/callback")
@Operation(summary = "全额退款回调(写真预约类)", description = "参数订单id, 权限web端管理员, 方法名callbackPhotoProductsRefund")
public BaseResponse<Boolean> callbackPhotoProductsRefund(HttpServletRequest request) {
@ -265,6 +274,7 @@ public class WeChatPayController {
/**
* 部分退款回调
*/
@Hidden
@PostMapping("/refund/part/callback")
@Operation(summary = "部分退款回调", description = "参数订单id, 权限web端管理员, 方法名callbackRefundPart")
public BaseResponse<Boolean> callbackRefundPart(HttpServletRequest request) {
@ -282,6 +292,7 @@ public class WeChatPayController {
/**
* 剩余退款回调
*/
@Hidden
@PostMapping("/refund/rest/callback")
@Operation(summary = "剩余退款回调", description = "参数订单id, 权限web端管理员, 方法名callbackRestRefund")
public BaseResponse<Boolean> callbackRestRefund(HttpServletRequest request) {

View File

@ -0,0 +1,29 @@
package com.cultural.heritage.model.dto.order;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
@Data
public class OrderStatusUpdateRequest implements Serializable {
/**
* 订单id
*/
@Schema(description = "订单id", example = "445")
private Long id;
/**
* 订单状态
*/
@Schema(description = "订单状态", example = "待支付")
private String orderStatus;
@Serial
private static final long serialVersionUID = 1L;
}

View File

@ -11,7 +11,7 @@ import java.io.Serializable;
*/
@Data
@Schema(description = "用户创建请求体", requiredProperties = {"userName", "userAccount", "userPassword", "userAvatar", "phone", "userRole"})
@Schema(description = "用户创建请求体", requiredProperties = {"userName", "userAccount", "userPassword", "userAvatar", "userRole"})
public class UserAddRequest implements Serializable {
@ -40,11 +40,6 @@ public class UserAddRequest implements Serializable {
@Schema(description = "用户头像", example = "https://xxx/xxx.jpg")
private String userAvatar;
/**
* 手机号
*/
@Schema(description = "手机号", example = "18845892473")
private String phone;
/**
* 用户角色 user, admin

View File

@ -30,11 +30,6 @@ public class UserQueryRequest extends PageRequest implements Serializable {
@Schema(description = "用户昵称", example = "chenxinzhi")
private String userName;
/**
* 手机号
*/
@Schema(description = "手机号", example = "18845892473")
private String phone;
/**
* 用户角色user/admin/ban

View File

@ -7,7 +7,7 @@ import java.io.Serial;
import java.io.Serializable;
@Data
@Schema(description = "用户更新请求体", requiredProperties = {"id", "userPassword", "userName", "userAvatar", "phone", "userRole"})
@Schema(description = "用户更新请求体", requiredProperties = {"id", "userPassword", "userName", "userAvatar", "userRole"})
public class UserUpdateRequest implements Serializable {
@ -35,11 +35,6 @@ public class UserUpdateRequest implements Serializable {
@Schema(description = "用户头像", example = "https://xxx/xxx.jpg")
private String userAvatar;
/**
* 手机号
*/
@Schema(description = "手机号", example = "18845892473")
private String phone;
/**
* 用户角色

View File

@ -50,10 +50,6 @@ public class User implements Serializable {
*/
private String userAvatar;
/**
* 手机号
*/
private String phone;
/**
* 积分

View File

@ -2,6 +2,7 @@ package com.cultural.heritage.model.vo.user;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
@Data
@ -22,11 +23,6 @@ public class UserVO implements Serializable {
*/
private String userAvatar;
/**
* 手机号
*/
private String phone;
/**
* 积分
*/
@ -38,6 +34,7 @@ public class UserVO implements Serializable {
private String userRole;
@Serial
private static final long serialVersionUID = 1L;
}

View File

@ -15,7 +15,6 @@ import com.cultural.heritage.model.entity.User;
import com.cultural.heritage.model.enums.UserRoleEnum;
import com.cultural.heritage.model.vo.user.UserVO;
import com.cultural.heritage.service.user.UserService;
import com.cultural.heritage.utils.RegexUtils;
import com.cultural.heritage.utils.SqlUtils;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
@ -86,14 +85,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
String userName = user.getUserName();
String userPassword = user.getUserPassword();
String userAvatar = user.getUserAvatar();
String phone = user.getPhone();
String userRole = user.getUserRole();
Long id = user.getId();
ThrowUtils.throwIf(update && id == null, ErrorCode.OPERATION_ERROR, "id字段为null");
if (StringUtils.isAnyBlank(userName, userAvatar, phone, userRole, userPassword)) {
if (StringUtils.isAnyBlank(userName, userAvatar, userRole, userPassword)) {
throw new BusinessException(ErrorCode.PARAMS_ERROR, "存在参数为空");
}
ThrowUtils.throwIf(RegexUtils.isPhoneInvalid(phone), ErrorCode.OPERATION_ERROR, "手机号格式错误");
}
@ -142,7 +139,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
Long id = userQueryRequest.getId();
String miniOpenId = userQueryRequest.getMiniOpenId();
String userName = userQueryRequest.getUserName();
String phone = userQueryRequest.getPhone();
String userRole = userQueryRequest.getUserRole();
String sortField = userQueryRequest.getSortField();
String sortOrder = userQueryRequest.getSortOrder();
@ -151,7 +147,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
queryWrapper.eq(id != null, "id", id);
queryWrapper.eq(StringUtils.isNotBlank(miniOpenId), "miniOpenId", miniOpenId);
queryWrapper.eq(StringUtils.isNotBlank(userRole), "userRole", userRole);
queryWrapper.eq(StringUtils.isNotBlank(phone), "phone", phone);
queryWrapper.like(StringUtils.isNotBlank(userName), "userName", userName);
queryWrapper.orderBy(SqlUtils.validSortField(sortField), sortOrder.equals(CommonConstant.SORT_ORDER_ASC),
sortField);

View File

@ -512,7 +512,7 @@ public class WeChatServiceImpl implements WeChatService {
BigDecimal conditionAmount = couponSnapshot.getConditionAmount();
totalAmount = totalAmount.add(conditionAmount);
}
totalAmount = totalAmount.multiply(new BigDecimal("100"));
// totalAmount = totalAmount.multiply(new BigDecimal("100"));
userService.addOrSubUserPoints(order.getUserId(), isAdd, totalAmount.intValue());
}
@ -522,7 +522,7 @@ public class WeChatServiceImpl implements WeChatService {
*/
private void dealUserPointsByPhoto(AdvanceOrder advanceOrder, boolean isAdd) {
BigDecimal totalAmount = advanceOrder.getTotalAmount();
totalAmount = totalAmount.multiply(new BigDecimal("100"));
// totalAmount = totalAmount.multiply(new BigDecimal("100"));
userService.addOrSubUserPoints(advanceOrder.getUserId(), isAdd, totalAmount.intValue());
}

View File

@ -1,89 +1,89 @@
package com.cultural.heritage.test;
import com.cultural.heritage.model.dto.CommonRequest;
import com.cultural.heritage.model.entity.Good;
import com.cultural.heritage.service.good.GoodService;
import jakarta.annotation.Resource;
import org.springframework.data.redis.core.*;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Set;
@RestController
public class GoodHandler {
@Resource
private RedisTemplate redisTemplate;
@Resource
private GoodService goodService;
@PostMapping("/set")
public void set(@RequestBody CommonRequest commonRequest) {
Long id = commonRequest.getId();
Good good = goodService.getById(id);
redisTemplate.opsForValue().set("good", good);
}
@GetMapping("/get/{key}")
public Good get(@PathVariable("key") String key) {
return (Good) redisTemplate.opsForValue().get(key);
}
@DeleteMapping("/delete/{key}")
public boolean delete(@PathVariable("key") String key) {
redisTemplate.delete(key);
return redisTemplate.hasKey(key);
}
@GetMapping("/string")
public String stringTest() {
redisTemplate.opsForValue().set("str", "Hello World!");
return (String) redisTemplate.opsForValue().get("str");
}
@GetMapping("/list")
public List<String> listTest() {
ListOperations<String, String> listOperations = redisTemplate.opsForList();
listOperations.leftPush("list", "hello");
listOperations.leftPush("list", "World");
listOperations.leftPush("list", "Java");
List<String> list = listOperations.range("list", 0, 2);
return list;
}
@GetMapping("/set")
public Set<String> setTest() {
SetOperations<String, String> setOperations = redisTemplate.opsForSet();
setOperations.add("set", "Hello");
setOperations.add("set", "Hello");
setOperations.add("set", "World");
setOperations.add("set", "World");
Set<String> set = setOperations.members("set");
return set;
}
@GetMapping("/zset")
public Set<String> zSetTest() {
ZSetOperations<String, String> zSetOperations = redisTemplate.opsForZSet();
zSetOperations.add("zset", "Hello", 1);
zSetOperations.add("zset", "World", 3);
zSetOperations.add("zset", "Hi", 2);
Set<String> zset = zSetOperations.range("zset", 0, 2);
return zset;
}
@GetMapping("/hash")
public String hashTest() {
HashOperations<String, String, String> hashOperations = redisTemplate.opsForHash();
hashOperations.put("key", "hashKey", "hello");
String value = hashOperations.get("key", "hashKey");
return value;
}
}
//package com.cultural.heritage.test;
//
//import com.cultural.heritage.model.dto.CommonRequest;
//import com.cultural.heritage.model.entity.Good;
//import com.cultural.heritage.service.good.GoodService;
//import jakarta.annotation.Resource;
//import org.springframework.data.redis.core.*;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//import java.util.Set;
//
//@RestController
//public class GoodHandler {
//
// @Resource
// private RedisTemplate redisTemplate;
//
//
// @Resource
// private GoodService goodService;
//
// @PostMapping("/set")
// public void set(@RequestBody CommonRequest commonRequest) {
// Long id = commonRequest.getId();
// Good good = goodService.getById(id);
// redisTemplate.opsForValue().set("good", good);
// }
//
// @GetMapping("/get/{key}")
// public Good get(@PathVariable("key") String key) {
// return (Good) redisTemplate.opsForValue().get(key);
// }
//
// @DeleteMapping("/delete/{key}")
// public boolean delete(@PathVariable("key") String key) {
// redisTemplate.delete(key);
// return redisTemplate.hasKey(key);
// }
//
// @GetMapping("/string")
// public String stringTest() {
// redisTemplate.opsForValue().set("str", "Hello World!");
// return (String) redisTemplate.opsForValue().get("str");
// }
//
// @GetMapping("/list")
// public List<String> listTest() {
// ListOperations<String, String> listOperations = redisTemplate.opsForList();
// listOperations.leftPush("list", "hello");
// listOperations.leftPush("list", "World");
// listOperations.leftPush("list", "Java");
// List<String> list = listOperations.range("list", 0, 2);
// return list;
// }
//
//
// @GetMapping("/set")
// public Set<String> setTest() {
// SetOperations<String, String> setOperations = redisTemplate.opsForSet();
// setOperations.add("set", "Hello");
// setOperations.add("set", "Hello");
// setOperations.add("set", "World");
// setOperations.add("set", "World");
// Set<String> set = setOperations.members("set");
// return set;
// }
//
//
// @GetMapping("/zset")
// public Set<String> zSetTest() {
// ZSetOperations<String, String> zSetOperations = redisTemplate.opsForZSet();
// zSetOperations.add("zset", "Hello", 1);
// zSetOperations.add("zset", "World", 3);
// zSetOperations.add("zset", "Hi", 2);
// Set<String> zset = zSetOperations.range("zset", 0, 2);
// return zset;
// }
//
// @GetMapping("/hash")
// public String hashTest() {
// HashOperations<String, String, String> hashOperations = redisTemplate.opsForHash();
// hashOperations.put("key", "hashKey", "hello");
// String value = hashOperations.get("key", "hashKey");
// return value;
// }
//
//
//}

View File

@ -1,40 +1,38 @@
package com.cultural.heritage.test;
import org.springframework.stereotype.Component;
import java.util.Base64;
@Component
public class TestRedis {
// @Resource
// private StringRedisTemplate stringRedisTemplate;
//package com.cultural.heritage.test;
//
// @Resource
// private GoodMapper goodMapper;
//import org.springframework.stereotype.Component;
//
// @PostConstruct
// public void test() {
// List<Good> goodList = goodMapper.selectList(null);
//@Component
//public class TestRedis {
//
// Map<String, String> map = goodList.stream().collect(Collectors.toMap
// (good -> good.getId().toString(), good -> good.getName()));
// stringRedisTemplate.opsForHash().putAll("test", map);
// stringRedisTemplate.opsForHash().get("test", "238");
// }
public static void main(String[] args) {
String encodedStr = "PGgxIHN0eWxlPSJ0ZXh0LWFsaWduOiBjZW50ZXI7Ij7ov5nmmK/lr4zmlofmnKxiYXNlNjTmtYvor5U8L2gxPg=="; // 前端 btoa("Hello world!")
// Base64 解码
byte[] decodedBytes = Base64.getDecoder().decode(encodedStr);
String decodedStr = new String(decodedBytes);
System.out.println("解码后的字符串: " + decodedStr);
}
}
//// @Resource
//// private StringRedisTemplate stringRedisTemplate;
////
//// @Resource
//// private GoodMapper goodMapper;
////
//// @PostConstruct
//// public void test() {
//// List<Good> goodList = goodMapper.selectList(null);
////
//// Map<String, String> map = goodList.stream().collect(Collectors.toMap
//// (good -> good.getId().toString(), good -> good.getName()));
//// stringRedisTemplate.opsForHash().putAll("test", map);
//// stringRedisTemplate.opsForHash().get("test", "238");
//// }
//
////
//// public static void main(String[] args) {
//// String encodedStr = "PGgxIHN0eWxlPSJ0ZXh0LWFsaWduOiBjZW50ZXI7Ij7ov5nmmK/lr4zmlofmnKxiYXNlNjTmtYvor5U8L2gxPg=="; // 前端 btoa("Hello world!")
////
//// // Base64 解码
//// byte[] decodedBytes = Base64.getDecoder().decode(encodedStr);
//// String decodedStr = new String(decodedBytes);
////
//// System.out.println("解码后的字符串: " + decodedStr);
//// }
//
//
//
//
//}

View File

@ -132,7 +132,9 @@ wx:
#通知地址
# notifyUrl: https://winning-mouse-internally.ngrok-free.app
# notifyUrl: http://123.249.108.160:8888
notifyUrl: http://154.8.193.216:9092
# notifyUrl: http://154.8.193.216:9092
notifyUrl: https://www.carboner.cn:8888
#微信服务器地址
domain: https://api.mch.weixin.qq.com