From 4b5d194d994abb90d851d2fb366b1605d7cd0283 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Sat, 1 Feb 2025 11:50:03 +0800 Subject: [PATCH] pwd --- .../main/java/net/xnzn}/api/SmsCodeApi.java | 4 +- .../net/xnzn/domain}/SmsCodeVerifyDTO.java | 2 +- .../bonus/auth/BonusCustAuthApplication.java | 1 + .../auth/controller/TokenController.java | 24 +-- .../java/com/bonus/auth/form/LoginType.java | 10 +- .../core/BonusSmartCanteenApplication.java | 2 + .../xnzn/core/customer/api/CustCasualApi.java | 2 + .../service/CustCasualRelationService.java | 4 +- .../service/impl/CustInfoServiceImpl.java | 6 +- .../core/pay/controller/PayController.java | 150 ------------------ .../core/pay/domain/CustListQueryDTO.java | 43 ----- .../xnzn/core/pay/domain/CustQueryDTO.java | 53 ------- .../xnzn/core/pay/domain/OrdDetailDTO.java | 18 --- .../xnzn/core/pay/domain/PayDeviceDTO.java | 50 ------ .../net/xnzn/core/pay/domain/PayResDTO.java | 14 -- .../xnzn/core/pay/domain/RechargeResDTO.java | 40 ----- .../xnzn/core/pay/service/IPayService.java | 12 -- .../core/pay/service/impl/PayServiceImpl.java | 29 ---- bonus.iml | 2 +- 19 files changed, 34 insertions(+), 432 deletions(-) rename {bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/notice/notice/v2 => bonus-common-biz/src/main/java/net/xnzn}/api/SmsCodeApi.java (96%) rename {bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/merchant/dto => bonus-common-biz/src/main/java/net/xnzn/domain}/SmsCodeVerifyDTO.java (88%) delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/controller/PayController.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/CustListQueryDTO.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/CustQueryDTO.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/OrdDetailDTO.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/PayDeviceDTO.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/PayResDTO.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/RechargeResDTO.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/service/IPayService.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/service/impl/PayServiceImpl.java diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/notice/notice/v2/api/SmsCodeApi.java b/bonus-common-biz/src/main/java/net/xnzn/api/SmsCodeApi.java similarity index 96% rename from bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/notice/notice/v2/api/SmsCodeApi.java rename to bonus-common-biz/src/main/java/net/xnzn/api/SmsCodeApi.java index 64a3f6b0..4edf95b3 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/notice/notice/v2/api/SmsCodeApi.java +++ b/bonus-common-biz/src/main/java/net/xnzn/api/SmsCodeApi.java @@ -1,8 +1,8 @@ -package net.xnzn.core.notice.notice.v2.api; +package net.xnzn.api; import cn.hutool.core.util.ObjectUtil; import com.bonus.common.redis.service.RedisService; -import net.xnzn.core.merchant.dto.SmsCodeVerifyDTO; +import net.xnzn.domain.SmsCodeVerifyDTO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/merchant/dto/SmsCodeVerifyDTO.java b/bonus-common-biz/src/main/java/net/xnzn/domain/SmsCodeVerifyDTO.java similarity index 88% rename from bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/merchant/dto/SmsCodeVerifyDTO.java rename to bonus-common-biz/src/main/java/net/xnzn/domain/SmsCodeVerifyDTO.java index 78fd1c27..b36f20d9 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/merchant/dto/SmsCodeVerifyDTO.java +++ b/bonus-common-biz/src/main/java/net/xnzn/domain/SmsCodeVerifyDTO.java @@ -1,4 +1,4 @@ -package net.xnzn.core.merchant.dto; +package net.xnzn.domain; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/bonus-cust-auth/src/main/java/com/bonus/auth/BonusCustAuthApplication.java b/bonus-cust-auth/src/main/java/com/bonus/auth/BonusCustAuthApplication.java index 5867331c..6f24db8a 100644 --- a/bonus-cust-auth/src/main/java/com/bonus/auth/BonusCustAuthApplication.java +++ b/bonus-cust-auth/src/main/java/com/bonus/auth/BonusCustAuthApplication.java @@ -2,6 +2,7 @@ package com.bonus.auth; import com.bonus.common.security.annotation.EnableCustomConfig; import com.bonus.common.swagger.annotation.EnableCustomSwagger2; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; diff --git a/bonus-cust-auth/src/main/java/com/bonus/auth/controller/TokenController.java b/bonus-cust-auth/src/main/java/com/bonus/auth/controller/TokenController.java index 36e87e19..051cdd35 100644 --- a/bonus-cust-auth/src/main/java/com/bonus/auth/controller/TokenController.java +++ b/bonus-cust-auth/src/main/java/com/bonus/auth/controller/TokenController.java @@ -2,6 +2,7 @@ package com.bonus.auth.controller; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.util.IdUtil; +import net.xnzn.api.SmsCodeApi; import net.xnzn.constant.CustLoginTypeEnum; import net.xnzn.constant.DelFlagEnum; import net.xnzn.constant.LeConstants; @@ -12,6 +13,7 @@ import com.bonus.auth.form.LoginBody; import com.bonus.auth.mapper.CustCasualMapper; import com.bonus.auth.mapper.CustInfoMapper; import com.bonus.auth.service.*; +import net.xnzn.domain.SmsCodeVerifyDTO; import net.xnzn.utils.AesEncryptUtil; import net.xnzn.utils.Id; import net.xnzn.utils.SM4EncryptUtils; @@ -66,6 +68,10 @@ public class TokenController { @Resource private RemoteConfigService configService; + @Autowired + @Lazy + private SmsCodeApi smsCodeApi; + @Autowired private CustInfoMapper custInfoMapper; @@ -119,17 +125,17 @@ public class TokenController { } else if (CustLoginTypeEnum.TEL_PWD.key().equals(content.getLoginType())) { custInfo.setMobile(SM4EncryptUtils.sm4Encryptbyconfig(content.getMobile())); } else if (CustLoginTypeEnum.TEL_CODE.key().equals(content.getLoginType())) { -// SmsCodeVerifyDTO smsCodeVerifyDTO = new SmsCodeVerifyDTO(); -// smsCodeVerifyDTO.setCode(content.getCode()); -// smsCodeVerifyDTO.setTelephoneNumber(content.getMobile()); -// boolean flag = this.smsCodeApi.verifySmsCode(smsCodeVerifyDTO); -// if (!flag) { -// throw new ServiceException("验证码错误"); -// } - R result = sysLoginService.getPhoneCode(content.getMobile(), content.getVerificationCodeType()); - if (result.getCode() != 200) { + SmsCodeVerifyDTO smsCodeVerifyDTO = new SmsCodeVerifyDTO(); + smsCodeVerifyDTO.setCode(content.getCode()); + smsCodeVerifyDTO.setTelephoneNumber(content.getMobile()); + boolean flag = this.smsCodeApi.verifySmsCode(smsCodeVerifyDTO); + if (!flag) { throw new ServiceException("验证码错误"); } +// R result = sysLoginService.getPhoneCode(content.getMobile(), content.getVerificationCodeType()); +// if (result.getCode() != 200) { +// throw new ServiceException("验证码错误"); +// } custInfo.setMobile(SM4EncryptUtils.sm4Encryptbyconfig(content.getMobile())); } else { if (!CustLoginTypeEnum.ID_CARD_PWD.key().equals(content.getLoginType())) { diff --git a/bonus-cust-auth/src/main/java/com/bonus/auth/form/LoginType.java b/bonus-cust-auth/src/main/java/com/bonus/auth/form/LoginType.java index d3cfe386..d88e6ffc 100644 --- a/bonus-cust-auth/src/main/java/com/bonus/auth/form/LoginType.java +++ b/bonus-cust-auth/src/main/java/com/bonus/auth/form/LoginType.java @@ -1,5 +1,5 @@ -package com.bonus.auth.form; - -public enum LoginType { - PASSWORD, MOBILE -} +//package com.bonus.auth.form; +// +//public enum LoginType { +// PASSWORD, MOBILE +//} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/BonusSmartCanteenApplication.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/BonusSmartCanteenApplication.java index 0c6540b1..2d63fb3b 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/BonusSmartCanteenApplication.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/BonusSmartCanteenApplication.java @@ -3,6 +3,7 @@ package net.xnzn.core; import com.bonus.common.security.annotation.EnableCustomConfig; import com.bonus.common.security.annotation.EnableRyFeignClients; import com.bonus.common.swagger.annotation.EnableCustomSwagger2; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; @@ -18,6 +19,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; @EnableScheduling @EnableRyFeignClients @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) +@MapperScan("net.xnzn.core") public class BonusSmartCanteenApplication { public static void main(String[] args) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/api/CustCasualApi.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/api/CustCasualApi.java index f883e0fe..0c779218 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/api/CustCasualApi.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/api/CustCasualApi.java @@ -2,12 +2,14 @@ package net.xnzn.core.customer.api; import net.xnzn.core.customer.service.CustCasualRelationService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; @Service public class CustCasualApi { @Autowired + @Lazy private CustCasualRelationService custCasualRelationService; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/CustCasualRelationService.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/CustCasualRelationService.java index b8344991..1535b69f 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/CustCasualRelationService.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/CustCasualRelationService.java @@ -4,6 +4,7 @@ import net.xnzn.constant.LeConstants; import net.xnzn.core.customer.mapper.CustCasualRelationMapper; import net.xnzn.core.customer.model.CustCasualRelation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -11,7 +12,8 @@ import javax.annotation.Resource; @Service public class CustCasualRelationService { - @Resource + @Autowired + @Lazy private CustCasualRelationMapper custCasualRelationMapper; public void updateBycustIdAndOpenid(Long custId, String openId) { diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/impl/CustInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/impl/CustInfoServiceImpl.java index 16489765..e925add8 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/impl/CustInfoServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/service/impl/CustInfoServiceImpl.java @@ -2,22 +2,20 @@ package net.xnzn.core.customer.service.impl; import cn.hutool.core.util.ObjectUtil; import com.bonus.common.core.exception.ServiceException; +import net.xnzn.api.SmsCodeApi; import net.xnzn.constant.RetCodeEnum; import net.xnzn.core.customer.api.CustCasualApi; -import net.xnzn.core.customer.constants.PersonalStatusEnum; import net.xnzn.core.customer.dto.CustChangePasswordDTO; import net.xnzn.core.customer.dto.CustForgetPasswordDTO; import net.xnzn.core.customer.mapper.CustInfoMapper; import net.xnzn.core.customer.service.*; -import net.xnzn.core.merchant.dto.SmsCodeVerifyDTO; -import net.xnzn.core.notice.notice.v2.api.SmsCodeApi; +import net.xnzn.domain.SmsCodeVerifyDTO; import net.xnzn.domain.CustInfo; import net.xnzn.utils.AesEncryptUtil; import net.xnzn.utils.SM4EncryptUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Lazy; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Service; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/controller/PayController.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/controller/PayController.java deleted file mode 100644 index 6cd91c71..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/controller/PayController.java +++ /dev/null @@ -1,150 +0,0 @@ -package net.xnzn.core.pay.controller; - -import com.alipay.api.AlipayApiException; -import com.alipay.api.AlipayClient; -import com.alipay.api.AlipayConfig; -import com.alipay.api.DefaultAlipayClient; -import com.alipay.api.domain.AlipayTradeWapPayModel; -import com.alipay.api.request.AlipayTradeWapPayRequest; -import com.alipay.api.response.AlipayTradeWapPayResponse; -import com.bonus.common.core.web.domain.AjaxResult; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import net.xnzn.core.pay.domain.CustQueryDTO; -import net.xnzn.core.pay.service.IPayService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import static com.bonus.common.core.web.domain.AjaxResult.success; - -@RestController -@RequestMapping({"/leopen"}) -@Slf4j -public class PayController { - @Value("${alipay.URL}") - private String URL; - - @Value("${alipay.APPID}") - private String APPID; - @Value("${alipay.PID}") - private String PID; - - @Value("${alipay.PRIVATE_KEY}") - private String PRIVATE_KEY; - @Value("${alipay.FORMAT}") - private String FORMAT; - @Value("${alipay.CHARSET}") - private String CHARSET; - @Value("${alipay.SIGN_TYPE}") - private String SIGN_TYPE; - @Value("${alipay.ALIPAY_PUBLIC_KEY}") - private String ALIPAY_PUBLIC_KEY; - - @Autowired - IPayService payService; - - /** - * 获取订单详细信息 - */ - @ApiOperation(value = "获取支付二维码") - @PostMapping(value = "/getOrderQRCode") - public AjaxResult getOrderQRCode(@RequestBody CustQueryDTO custQueryDTO) { - return success(payService.getOrderQRCode("1", String.valueOf(custQueryDTO.getCustId()))); - } - -// @ApiOperation("钱包余额查询") -// @PostMapping({"/account/balance/query"}) -// public String getBalanceQuery(@RequestBody PayResDTO payResDTO) { -// -// String api = siteurl + "/tengyun-api/leopen/account/balance/query"; -// HashMap bodyMap = (HashMap) LeniuApiUtil.convertObjectToMap(payResDTO); -// return LeniuApiUtil.callLeniuApi(api, bodyMap).body(); -// } -// -// @ApiOperation("钱包充值") -// @PostMapping({"/account/charge"}) -// public String getAccountCharge(@RequestBody RechargeResDTO rechargeResDTO) { -// rechargeResDTO.setThirdRechargeNum(StringUtil.generateRandomString(18)); -// -// String api = siteurl + "/tengyun-api/leopen/account/charge"; -// HashMap bodyMap = (HashMap) LeniuApiUtil.convertObjectToMap(rechargeResDTO); -// //支付宝进行支付 -// AlipayTradeWapPayModel model = new AlipayTradeWapPayModel(); -// model.setOutTradeNo(rechargeResDTO.getThirdRechargeNum());//商户订单号 -// model.setTotalAmount(rechargeResDTO.getRechargeAmount().toString());//订单总金额 -// model.setSubject("充值");//订单标题 -// model.setProductCode("QUICK_WAP_WAY");//产品码 -// model.setSellerId(PID);//卖家支付宝 Id -// AlipayTradeWapPayResponse response = getPayGoods(model); -// if (response.isSuccess()) { -// System.err.println("调用成功"); -// return LeniuApiUtil.callLeniuApi(api, bodyMap).body(); -// } else { -// System.err.println("调用失败"); -// // sdk 版本是"4.38.0.ALL"及以上,可以参考下面的示例获取诊断链接 -// // String diagnosisUrl = DiagnosisUtils.getDiagnosisUrl(response); -// // System.out.println(diagnosisUrl); } -// return "充值失败"; -// } -// -// } -// -// -// @ApiOperation("下单支付(食堂)") -// @PostMapping({"/pay/device"}) -// public String getPayDevice(@RequestBody PayDeviceDTO payDeviceDTO) { -// -// String api = siteurl + "/tengyun-api/leopen/pay/device"; -// HashMap bodyMap = (HashMap) LeniuApiUtil.convertObjectToMap(payDeviceDTO); -// return LeniuApiUtil.callLeniuApi(api, bodyMap).body(); -// } - - - public AlipayTradeWapPayResponse getPayGoods(AlipayTradeWapPayModel model) { - - try { - - AlipayConfig alipayConfig = new AlipayConfig(); - //设置网关地址 - alipayConfig.setServerUrl(URL); - //设置应用ID - alipayConfig.setAppId(APPID); - //设置应用私钥 - alipayConfig.setPrivateKey(PRIVATE_KEY); - //设置请求格式,固定值json - alipayConfig.setFormat(FORMAT); - //设置字符集 - alipayConfig.setCharset(CHARSET); - //设置签名类型 - alipayConfig.setSignType(SIGN_TYPE); - //设置支付宝公钥 - alipayConfig.setAlipayPublicKey(ALIPAY_PUBLIC_KEY); - AlipayClient alipayClient = new DefaultAlipayClient(alipayConfig); - AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest(); - request.setBizModel(model); - AlipayTradeWapPayResponse response = alipayClient.pageExecute(request, "POST"); - // 如果需要返回GET请求,请使用 - // AlipayTradeWapPayResponse response = alipayClient.pageExecute(request, "GET"); - String pageRedirectionData = response.getBody(); - System.err.println(pageRedirectionData); - return response; - /* if (response.isSuccess()) { - System.out.println("调用成功"); - } else { - System.out.println("调用失败"); - // sdk版本是"4.38.0.ALL"及以上,可以参考下面的示例获取诊断链接 - // String diagnosisUrl = DiagnosisUtils.getDiagnosisUrl(response); - // System.out.println(diagnosisUrl); - }*/ - } catch (AlipayApiException e) { - e.printStackTrace(); - log.info("充值链接支付宝错误信息为: " + e); - return null; - } - } - -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/CustListQueryDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/CustListQueryDTO.java deleted file mode 100644 index 5e506568..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/CustListQueryDTO.java +++ /dev/null @@ -1,43 +0,0 @@ -package net.xnzn.core.pay.domain; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.Max; -import java.time.LocalDateTime; - -@ApiModel("查询人员信息入参") -@Data -public class CustListQueryDTO { - @ApiModelProperty("页号") - private Integer pageNum; - @ApiModelProperty("页长") - private @Max( - value = 200L, - message = "页长最大200" -) Integer pageSize; - @ApiModelProperty("更新时间-起点时间") - private LocalDateTime startDateTime; - @ApiModelProperty("更新时间-终点时间") - private LocalDateTime endDateTime; - @ApiModelProperty("人员id") - private Long custId; - @ApiModelProperty("第三方人员id") - private String custThirdId; - @ApiModelProperty("人员编号") - private String custNum; - @ApiModelProperty("组织编号") - private String orgNum; - @ApiModelProperty("卡物理号") - private String serialNum; - @ApiModelProperty("手机号") - private String mobile; - @ApiModelProperty("身份证号") - private String idCard; - @ApiModelProperty("人员状态") - private Integer custState; - @ApiModelProperty("微信openid") - private String wechatOpenid; - -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/CustQueryDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/CustQueryDTO.java deleted file mode 100644 index 7844aee0..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/CustQueryDTO.java +++ /dev/null @@ -1,53 +0,0 @@ -package net.xnzn.core.pay.domain; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.time.LocalDateTime; - -@Data -public class CustQueryDTO { - @ApiModelProperty("起点时间") - private LocalDateTime startDateTime; - @ApiModelProperty("终点时间") - private LocalDateTime endDateTime; - @ApiModelProperty("页号") - private Integer pageNum; - @ApiModelProperty("页长") - private Integer pageSize; - @ApiModelProperty("第三方人员id") - private String custThirdId; - @ApiModelProperty("人员编号") - private String custNum; - @ApiModelProperty("组织编号") - private String orgNum; - @ApiModelProperty("卡物理号") - private String serialNum; - @ApiModelProperty("手机号") - private String mobile; - @ApiModelProperty("身份证号") - private String idCard; - @ApiModelProperty("人员状态") - private Integer custState; - @ApiModelProperty("微信openid") - private String wechatOpenid; - @ApiModelProperty("custId") - private Long custId; - - public CustListQueryDTO ofCustListQueryDTO(Long custId) { - CustListQueryDTO custListQueryDTO = new CustListQueryDTO(); - custListQueryDTO.setCustId(custId); - custListQueryDTO.setCustState(this.custState); - custListQueryDTO.setCustNum(this.custNum); - custListQueryDTO.setMobile(this.mobile); - custListQueryDTO.setIdCard(this.idCard); - custListQueryDTO.setPageNum(this.pageNum); - custListQueryDTO.setPageSize(this.pageSize); - custListQueryDTO.setStartDateTime(this.startDateTime); - custListQueryDTO.setEndDateTime(this.endDateTime); - custListQueryDTO.setSerialNum(this.serialNum); - custListQueryDTO.setWechatOpenid(this.wechatOpenid); - return custListQueryDTO; - } - -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/OrdDetailDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/OrdDetailDTO.java deleted file mode 100644 index 4e69c292..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/OrdDetailDTO.java +++ /dev/null @@ -1,18 +0,0 @@ -package net.xnzn.core.pay.domain; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -@Data -public class OrdDetailDTO { - - - @ApiModelProperty("商品类型 1菜品 2商品 3套餐 4按键金额") - private Number detailType; - @ApiModelProperty("商品名称") - private String goodsName; - @ApiModelProperty("价格") - private Number price; - @ApiModelProperty("数量/重量") - private Number quantity; -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/PayDeviceDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/PayDeviceDTO.java deleted file mode 100644 index 24296483..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/PayDeviceDTO.java +++ /dev/null @@ -1,50 +0,0 @@ -package net.xnzn.core.pay.domain; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.time.LocalDate; -import java.util.List; - -@Data -public class PayDeviceDTO { - - @ApiModelProperty("订单总金额 单位为分") - private Number amount; - @ApiModelProperty("二维码信息(小牛系统个人身份码) 扫码支付必传") - private String authCode; - @ApiModelProperty("人员id (身份支付二选一必填)") - private Long custId; - @ApiModelProperty("第三方人员id (身份支付二选一必填)") - private String custThirdId; - @ApiModelProperty("乐牛餐次号(默认使用ordTime所在餐次)") - private Number intervalId; - @ApiModelProperty("第三方订单流水号") - private String macOrdId; - @ApiModelProperty("乐牛设备SN码(由该商户管理员在乐牛后台创建供open接口使用的设备(虚拟设备),提供设备sn号,此设备若被删除则无法调用)建议起名【open支付专用设备-xxx对接】") - private String machineSn; - @ApiModelProperty("核身方式 (1刷卡,2身份,3扫码)") - private Number nuClearMode; - @ApiModelProperty("下单时间 yyyy-MM-dd HH:mm:ss") - private String ordTime; - @ApiModelProperty("订单类型 1食堂 2商城,10外部预定(对支付过程不影响,只是记录类型)") - private Number ordType; - @ApiModelProperty("配送方式 1:自取堂食,2:商家配送,5:取餐柜配送,6:自取外带,7:取餐点配送") - private String deliveryType; - @ApiModelProperty("取餐柜id,配送方式为5时必填") - private Number counterId; - @ApiModelProperty("配送费") - private Number deliveryFee; - @ApiModelProperty("支付方式") - private Number payType; - @ApiModelProperty("配送地址") - private String deliveryAddr; - @ApiModelProperty("订单备注") - private String remark; - @ApiModelProperty("预定日期,仅在ordType=10时有效") - private LocalDate reserveDate; - @ApiModelProperty("卡序列号(物理卡号) 刷卡支付必传") - private String serialNum; - @ApiModelProperty("订单详情") - private List ordDetailList; -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/PayResDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/PayResDTO.java deleted file mode 100644 index 8ead9b60..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/PayResDTO.java +++ /dev/null @@ -1,14 +0,0 @@ -package net.xnzn.core.pay.domain; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -@Data -public class PayResDTO { - - @ApiModelProperty("人员id (以此为唯一标识)custId和custThirdId二选一") - private Long custId; - @ApiModelProperty("第三方人员id") - private String custThirdId; - -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/RechargeResDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/RechargeResDTO.java deleted file mode 100644 index 1459499b..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/domain/RechargeResDTO.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.xnzn.core.pay.domain; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -@Data -public class RechargeResDTO { - - /** - * 账户交易类型 和 (支付渠道+支付方式为一组) 二者选择一个 账户交易类型存在值 优先走账户交易类型 - */ - @ApiModelProperty("账户交易类型 8微信扫码充值 9支付宝扫码充值 10现金充值") - private Integer accTradeType; - @ApiModelProperty("钱包类型 1个人钱包2补贴钱包") - private Integer accType; - /** - * custId和custThirdId二选一 - */ - @ApiModelProperty("人员id (以此为唯一标识)") - private Long custId; - /** - * custId和custThirdId二选一 - */ - @ApiModelProperty("第三方人员id (以此为唯一标识)") - private String custThirdId; - - @ApiModelProperty("支付渠道(详情见支付渠道code-名称对照表)") - private Integer payChannel; - - @ApiModelProperty("支付方式(详情见支付方式code-名称对照表)") - private Integer payType; - - @ApiModelProperty("充值金额(单位分)") - private Integer rechargeAmount; - - @ApiModelProperty("充值备注") - private String remark; - @ApiModelProperty("第三方充值订单号") - private String thirdRechargeNum; -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/service/IPayService.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/service/IPayService.java deleted file mode 100644 index cce17898..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/service/IPayService.java +++ /dev/null @@ -1,12 +0,0 @@ -package net.xnzn.core.pay.service; - -/** - * Service接口 - * - * @author xsheng - * @date 2025-01-14 - */ -public interface IPayService { - - public String getOrderQRCode(String sourceType, String paramValue); -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/service/impl/PayServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/service/impl/PayServiceImpl.java deleted file mode 100644 index d06ddf00..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/pay/service/impl/PayServiceImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -package net.xnzn.core.pay.service.impl; - -import net.xnzn.constant.LeCodeUseSceneEnum; -import net.xnzn.core.pay.service.IPayService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * 订单Service业务层处理 - * - * @author xsheng - * @date 2025-01-14 - */ -@Service -public class PayServiceImpl implements IPayService { - - /** - * 支付二维码 - * - * @param sourceType - * @param paramValue - * @return 结果 - */ - @Override - public String getOrderQRCode(String sourceType, String paramValue) { - String stime = String.valueOf(System.currentTimeMillis() / 1000L); - return "xnzn{\"s\":" + sourceType + ",\"y\":" + LeCodeUseSceneEnum.PAY.key() + ",\"p\":\"" + paramValue + "\",\"t\":" + stime + "}"; - } -} diff --git a/bonus.iml b/bonus.iml index 00372004..30466db0 100644 --- a/bonus.iml +++ b/bonus.iml @@ -1,5 +1,5 @@ - +