feat:预约菜谱类型
This commit is contained in:
1 parent
e4575a0c1a
commit
03f3c8cb07
10 files changed
+47
-11
No files matched your search
+1
-1
@@ -138,7 +138,7 @@ public class HardDoorCabinetServiceImpl extends ServiceImpl<HardDoorCabinetMappe
|
||||
private String generateUrlQrCode(HardDoorCabinetEntity detail) {
|
||||
HardDoorCabinetCodeVo cabinetCodeVo = new HardDoorCabinetCodeVo();
|
||||
String fileName = String.format("%s-%s.png", detail.getHardDoorId(), System.currentTimeMillis());
|
||||
String coeContent = String.format("https://stgl.pj.gov.cn/h5/#/pages/cabinet/buy?hardDoorId=%s&cabinetNo=%s", detail.getHardDoorId(), detail.getCabinetNo());
|
||||
String coeContent = String.format("https://www.pjzhhq.cn/h5/#/pages/cabinet/buy?hardDoorId=%s&cabinetNo=%s", detail.getHardDoorId(), detail.getCabinetNo());
|
||||
try {
|
||||
byte[] bytes = QRCodeImageGenerator.generateQrCodeImage(coeContent, 300);
|
||||
MultipartFile multipartFile = new MockMultipartFile("file", fileName, "image/png", new ByteArrayInputStream(bytes));
|
||||
|
||||
+1
-1
@@ -769,7 +769,7 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
|
||||
redisTemplate.opsForValue().set(redisKey, String.valueOf(orderObj.getId()), 300, TimeUnit.SECONDS);
|
||||
|
||||
// String qrCodeData = String.format("http://192.168.101.173:8889/h5/#/pages/pay/scanPay?action=harQrCodeScanPay&orderId=%s&mchId=%s", orderObj.getId(), orderObj.getMerchantId());
|
||||
String qrCodeData = String.format("https://stgl.pj.gov.cn/h5/#/pages/pay/scan-pay?action=harQrCodeScanPay&orderId=%s&mchId=%s", orderObj.getId(), orderObj.getMerchantId());
|
||||
String qrCodeData = String.format("https://www.pjzhhq.cn/h5/#/pages/pay/scan-pay?action=harQrCodeScanPay&orderId=%s&mchId=%s", orderObj.getId(), orderObj.getMerchantId());
|
||||
return HardCreateHardQrCodeScanOrderVo.builder().orderId(orderObj.getId()).mchId(orderObj.getMerchantId()).qrCodeData(qrCodeData).build();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ spring:
|
||||
# public-key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2thnpmLBNBxMQ1/LRLu5Ld3FT5D8iT4GZJZMjJqSNbkwbAPKnCgaEvPH3g/0Pn97OnrRqAcU4pZ97wVWQTBhsKS/G3MRrtSC3HmvDwTrCn3URResDeA7C7VS/ujtpCvUgzqmZELf2xFRN7V5Y8bUPooFNK2mViEkF1gsHpMs4OAkC3zAaCY9PyReGaYsNnWLwUSoBJ0fB+6cwgESbjewdxuDVq38kchZ+vovqA5hXMA9nsMEPIF/R3u5qoJ/v3Ii0YJv8odKKyinxAhX0FB97WVVufUFO2AF7cj3aUxgqbWZDOaa4fWwhlSqDp+0tORUclCcUQ/XRHp/KclTDoUjEQIDAQAB
|
||||
# alipay-public-key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqnCB+N172m5gxf1Rolfx5LErSiVwQCh0XQdDrVy6aTuVF5EtdqahSHtADyEPsBWudMBhzCfqpoZvfnvH7a+PED6uZ3DoXt7ETh8TmNM5yc+WTnD8pSphQvuHDJ3zMks489KNxiX6sXag71k9H1MXklJGPOUaljHqy/QlRn2ZLT7pFgaFH9LEcVoQBPIOurUn95078h848RFD30jZFW3fakxUGAGVVZaHH62z5OEWOmcA+CwxsEDMa1XMt02RGXgAAq4WOj+BqOGiFmhM8rnrUMchTyvx4umOzGvbF2Y9irN3aBZ5lfg+bzYcJpIOMzlM/V00LnEWzCblJzXNyH4hJQIDAQAB
|
||||
# callback-url: https://rj4jv5rwqs.by.takin.cc/hard/hard-ali-pay/callback
|
||||
# # callback-url: https://stgl.pj.gov.cn/api/hard/hard-ali-pay/callback
|
||||
# # callback-url: https://www.pjzhhq.cn/api/hard/hard-ali-pay/callback
|
||||
mini-ali-pay:
|
||||
app-id: 2021005197658445
|
||||
merchant-id: 2088570073831141
|
||||
@@ -51,7 +51,7 @@ mini-ali-pay:
|
||||
public-key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk2B2NAFtnI2x6Dopw/H+AijCmrA5m0cOAhDGrBuSM3JJnrk6rrdxpscUUZbOts5V0VTgg2IJxocxIQ/5zGMdEzAV9pmKPnx/V1DLWTCmPqdqz0105T5xn20OHnVGKH0dLatboPsBzg+f48bsDtcz3we7fHV94DWuDON30zytpjw3qP1IkQeOQz41Fr2zF+fZbWGDIJgFtEwG15kQBihca5l9x3XSStI0sBKU3B2kVdwuha2FePL1hxJYr4lQVLC0SKcL909xWGZtGtfS3BkLcm3k4V2mgmK4+y8KH35PL/Ay9oNvCAHohbY45FmzxSijArEnvy1ZL3UE7oZ3Lg2skwIDAQAB
|
||||
alipay-public-key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqnCB+N172m5gxf1Rolfx5LErSiVwQCh0XQdDrVy6aTuVF5EtdqahSHtADyEPsBWudMBhzCfqpoZvfnvH7a+PED6uZ3DoXt7ETh8TmNM5yc+WTnD8pSphQvuHDJ3zMks489KNxiX6sXag71k9H1MXklJGPOUaljHqy/QlRn2ZLT7pFgaFH9LEcVoQBPIOurUn95078h848RFD30jZFW3fakxUGAGVVZaHH62z5OEWOmcA+CwxsEDMa1XMt02RGXgAAq4WOj+BqOGiFmhM8rnrUMchTyvx4umOzGvbF2Y9irN3aBZ5lfg+bzYcJpIOMzlM/V00LnEWzCblJzXNyH4hJQIDAQAB
|
||||
callback-url: https://rj4jv5rwqs.by.takin.cc/hard/hard-ali-pay/callback
|
||||
# callback-url: https://stgl.pj.gov.cn/api/hard/hard-ali-pay/callback
|
||||
# callback-url: https://www.pjzhhq.cn/api/hard/hard-ali-pay/callback
|
||||
|
||||
yyx:
|
||||
base-url: https://open.sw-aiot.com
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ zy:
|
||||
|
||||
# 旷世识别
|
||||
# ks-discern:
|
||||
# base-url: https://retail.xlsdn.com
|
||||
# base-url: https://retailbox.stepfun.com
|
||||
# access-key: ed5A923eF0e941A1968eGTpF
|
||||
# secret-key: Ex3X0kgoc94sBOtivjWm5Vz9AyZTOUpl
|
||||
# host: retail.xlsdn.com
|
||||
|
||||
+1
-1
@@ -21,6 +21,6 @@ public enum WalletMchPickUpStatusEnum {
|
||||
|
||||
public static WalletMchPickUpStatusEnum valueOfByCode(String code) {
|
||||
if (ObjectUtil.isEmpty(code)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(code, v.getCode())).findFirst().get();
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(code, v.getCode())).findFirst().orElse(null);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -21,7 +21,7 @@ public enum WalletMchRulePriceTypeEnum {
|
||||
|
||||
public static WalletMchRulePriceTypeEnum valueOfByCode(String code) {
|
||||
if (ObjectUtil.isEmpty(code)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(code, v.getCode())).findFirst().get();
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(code, v.getCode())).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -24,7 +24,7 @@ public enum WalletMchSupType {
|
||||
public static WalletMchSupType valueOfByType(String code) {
|
||||
return Arrays.stream(WalletMchSupType.values())
|
||||
.filter(v -> ObjectUtil.equal(v.getCode(), code))
|
||||
.findFirst().get();
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.bsd.pjcloud.wallet.api.constant.mch;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 商户订餐商品类型
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WalletMchTableReservationMode {
|
||||
ONLONE_PRODUCT("10", "线上订餐产品","商户列表->商户详情->下单页面"),
|
||||
DAILY_MENU("20", "每日菜谱菜谱","商户列表->下单页面"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
private final String summary;
|
||||
private final String desc;
|
||||
|
||||
public static WalletMchTableReservationMode valueOfByType(String code) {
|
||||
return Arrays.stream(WalletMchTableReservationMode.values())
|
||||
.filter(v -> ObjectUtil.equal(v.getCode(), code))
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
}
|
||||
+10
-2
@@ -3,6 +3,7 @@ package com.bsd.pjcloud.wallet.api.entity.mch;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.bsd.pjcloud.wallet.api.constant.mch.WalletMchTableReservationMode;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -177,9 +178,9 @@ public class MchManageEntity extends Model<MchManageEntity> {
|
||||
private TableReservationConf tableReservationConf;
|
||||
|
||||
/**
|
||||
* 功能范围
|
||||
* 钱包别名
|
||||
*/
|
||||
@Schema(description = "功能范围")
|
||||
@Schema(description = "钱包别名")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<WalletAlias> walletAliasList;
|
||||
|
||||
@@ -231,6 +232,13 @@ public class MchManageEntity extends Model<MchManageEntity> {
|
||||
@Data
|
||||
public static class TableReservationConf {
|
||||
|
||||
/**
|
||||
* 订餐模式
|
||||
*
|
||||
* @see WalletMchTableReservationMode
|
||||
*/
|
||||
private String mode = WalletMchTableReservationMode.ONLONE_PRODUCT.getCode();
|
||||
|
||||
/**
|
||||
* 商户当前使用的预约模式。历史 JSON 缺少该属性时由字段默认值兼容为动态时间窗。
|
||||
*/
|
||||
|
||||
+1
-1
@@ -620,7 +620,7 @@ public class MchManageServiceImpl extends ServiceImpl<MchManageMapper, MchManage
|
||||
|
||||
// 生成url二维码
|
||||
private String generateUrlQrCode(MchManageEntity mchDetail) {
|
||||
String url = String.format("https://stgl.pj.gov.cn/h5/#/pages/pay/scan-pay?id=%s", mchDetail.getId());
|
||||
String url = String.format("https://www.pjzhhq.cn/h5/#/pages/pay/scan-pay?id=%s", mchDetail.getId());
|
||||
String fileName = String.format("%s-%s.png", mchDetail.getId(), System.currentTimeMillis());
|
||||
try {
|
||||
Drawing2D drawing = new Drawing2D();
|
||||
|
||||
Reference in new issue
Block a user