提交 8c9b6d94 作者: xiaowang

充值订单的生成

上级 959de3c7
......@@ -30,7 +30,7 @@
<artifactId>java-emoji-converter</artifactId>
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
......@@ -51,6 +51,18 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- RabbitMQ -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>5.5.0</version> <!-- 支持开源所有版本 -->
</dependency>
<!-- 使用okhttp-feign-连接池技术 -->
<dependency>
<groupId>io.github.openfeign</groupId>
......
......@@ -15,6 +15,7 @@ public class TDateUtil {
public static final String THREE_MONTH = "threemonth";
public static final String SIX_MONTH = "sixmonth";
public static final String ONE_YEAR = "oneyear";
public static final String TYPE = "yyyyMMddHHmmss";
public static String getCurrentDate() {
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm");// 设置日期格式
......
package com.mmc.oms.dao.topup;
import com.mmc.oms.entity.topup.TopUpOrderDO;
import org.apache.ibatis.annotations.Mapper;
/**
* @Author LW
* @date 2023/8/23 14:22
* 概要:
*/
@Mapper
public interface TopUpOrderDao {
void insertTopUpOrder(TopUpOrderDO topUpOrderDO);
void updateTopUpOrderInfo(TopUpOrderDO topUpOrderDO);
}
package com.mmc.oms.entity.topup;
import com.mmc.oms.model.vo.demand.OrderRequestParamsVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author LW
* @date 2023/8/19 13:38
* 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TopUpOrderDO {
private Integer id;
private Integer version;
private Integer userAccountId;
private String orderNo;
private Integer amount;
private String tradeState;
private String tradeStateDesc;
private String description;
private Date createTime;
private Date updateTime;
public TopUpOrderDO(OrderRequestParamsVO orderRequestParamsVO, Integer userAccountId) {
this.userAccountId = userAccountId;
this.orderNo = orderRequestParamsVO.getOrderNo();
this.amount = orderRequestParamsVO.getAmount();
}
}
package com.mmc.oms.feign;
import com.mmc.oms.model.dto.mall.CooperationTagVO;
import com.mmc.oms.model.dto.user.UserAccountSimpleDTO;
import com.mmc.oms.model.qo.mall.BUserAccountQO;
//import io.swagger.annotations.ApiParam;
//import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.feign.hystrix.UserAppApiHystrix;
import com.mmc.oms.model.vo.wallet.TopUpOrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @author: zj
* @Date: 2023/5/18 17:06
*/
//@FeignClient(url = "${userapp.url}", name = "cms-svc", fallback = UserAppApiHystrix.class)
@FeignClient(url = "${userapp.url}", name = "cms-svc", fallback = UserAppApiHystrix.class)
public interface UserAppApi {
/**
* 根据用户id获取基本信息
* @param userAccountId
* @return
*/
@RequestMapping(value = "user-account/feignGetUserSimpleInfo", method = RequestMethod.GET)
public UserAccountSimpleDTO feignGetUserSimpleInfo(@RequestParam Integer userAccountId, @RequestHeader("token") String token);
/**
* 根据地区信息查询用户id
* @param provinceCode
* @param cityCode
* @param districtCode
* @return
*/
@GetMapping("user-account/feignListUserAccountIds")
List<Integer> feignListUserAccountIds(@RequestParam Integer provinceCode, @RequestParam(required = false) Integer cityCode,
@RequestParam(required = false) Integer districtCode, @RequestHeader(value = "token", required = false) String token);
/**
* 获取用户集合列表页面
*
* @param bUserAccountQO 问:b用户帐户
* @return {@link List}<{@link UserAccountSimpleDTO}>
*/
@PostMapping("back-user/feignListBAccountPage")
List<UserAccountSimpleDTO> feignListBAccountPage( @RequestBody BUserAccountQO bUserAccountQO, @RequestHeader("token") String token);
/**
* 根据用户id查询用户信息
* @param ids
* @param token
* @return
*/
@PostMapping("user-account/feignListUserAccountByIds")
List<UserAccountSimpleDTO> feignListUserAccountByIds(@RequestBody List<Integer> ids, @RequestHeader("token") String token);
/**
* 查询推荐人信息
* @param userIds
* @return
*/
@PostMapping("user-account/feignListRcdUserInfo")
List<UserAccountSimpleDTO> feignListRcdUserInfo(@RequestBody List<Integer> userIds);
/**
* 查询上级id
* @param userAccountId
* @return
*/
@GetMapping("user-account/feignGetSuperiorRef")
Integer feignGetSuperiorRef(@RequestParam Integer userAccountId);
/**
* 查询上级推荐人信息
* @param userAccountId
* @return
*/
@GetMapping("user-account/feignGetUserRcdInfo")
UserAccountSimpleDTO feignGetUserRcdInfo(@RequestParam Integer userAccountId);
/**
* 用户合作标签
* @return
*/
@GetMapping("cooperation/feignListCooperationTag")
List<CooperationTagVO> feignListCooperationTag();
@GetMapping("pay/feignTopUpCash")
public ResultBody feignTopUpCash(@RequestBody TopUpOrderVO topUpOrderVO);
}
package com.mmc.oms.feign.config;
import com.mmc.oms.feign.hystrix.PmsAppApiHystrix;
import com.mmc.oms.feign.hystrix.UserAppApiHystrix;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
......@@ -14,8 +15,13 @@ import org.springframework.context.annotation.Configuration;
public class FeignConfiguration {
@Bean(name = "pmsAppApiHystrix")
public PmsAppApiHystrix PmsAppApi() {
public PmsAppApiHystrix pmsAppApi() {
return new PmsAppApiHystrix();
}
@Bean(name = "userAppApiHystrix")
public UserAppApiHystrix userApp() {
return new UserAppApiHystrix();
}
}
package com.mmc.oms.feign.hystrix;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.feign.UserAppApi;
import com.mmc.oms.model.dto.mall.CooperationTagVO;
import com.mmc.oms.model.dto.user.UserAccountSimpleDTO;
import com.mmc.oms.model.qo.mall.BUserAccountQO;
import com.mmc.oms.model.vo.wallet.TopUpOrderVO;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
/**
* @author: zj
* @Date: 2023/5/18 17:08
*/
@Slf4j
public class UserAppApiHystrix implements UserAppApi {
@Override
public UserAccountSimpleDTO feignGetUserSimpleInfo(Integer userAccountId, String token) {
log.error("熔断:feignGetUserSimpleInfo:{}", userAccountId);
return null;
}
@Override
public List<Integer> feignListUserAccountIds(Integer provinceCode, Integer cityCode, Integer districtCode, String token) {
log.error("熔断:feignListUserAccountIds:{}, {}, {}", provinceCode, cityCode, districtCode);
return null;
}
@Override
public List<UserAccountSimpleDTO> feignListBAccountPage(BUserAccountQO bUserAccountQO, String token) {
log.error("熔断:feignListBAccountPage:{}", bUserAccountQO);
return null;
}
@Override
public List<UserAccountSimpleDTO> feignListUserAccountByIds(List<Integer> ids, String token) {
log.error("熔断:feignListUserAccountByIds:{}", ids);
return null;
}
@Override
public List<UserAccountSimpleDTO> feignListRcdUserInfo(List<Integer> userIds) {
log.error("熔断:feignListRcdUserInfo:{}", userIds);
return null;
}
@Override
public Integer feignGetSuperiorRef(Integer userAccountId) {
log.error("熔断:feignGetSuperiorRef:{}", userAccountId);
return null;
}
@Override
public UserAccountSimpleDTO feignGetUserRcdInfo(Integer userAccountId) {
log.error("熔断:feignGetUserRcdInfo:{}", userAccountId);
return null;
}
@Override
public List<CooperationTagVO> feignListCooperationTag() {
log.error("熔断:feignListCooperationTag:{}");
return null;
public ResultBody feignTopUpCash(TopUpOrderVO topUpOrderVO) {
log.error("熔断:UserAppApiHystrix.feignTopUpCash==error==>param:{}", topUpOrderVO);
return ResultBody.error("-1", "远程调用失败");
}
}
......@@ -18,10 +18,13 @@ import lombok.NoArgsConstructor;
public class CommonPaymentVO {
@ApiModelProperty(value = "订单编号",example = "R202307251459553408130")
@ApiModelProperty(value = "订单编号", example = "R202307251459553408130")
private String orderNumber;
@ApiModelProperty(value = "订单来源 0:产品商城 1:租赁订单 2:培训订单 3发布需求 4服务需求发布 ...其他后续加")
@ApiModelProperty(value = "订单来源 0:产品商城 1:租赁订单 2:培训订单 3发布需求 4服务需求发布 5充值 ...其他后续加")
private Integer orderPort;
@ApiModelProperty(value = "金额:单位(分)")
private Integer amount;
}
......@@ -26,4 +26,6 @@ public class OrderRequestParamsVO implements Serializable {
private Integer amount;
@ApiModelProperty(value = "订单来源 0:产品商城 1:租赁订单 2:培训订单 ...其他后续加")
private Integer orderPort;
@ApiModelProperty(value = "附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用,实际情况下只有支付完成状态才会返回该字段。")
private String attach;
}
package com.mmc.oms.model.vo.wallet;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author LW
* @date 2023/8/23 13:37
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TopUpOrderVO {
@ApiModelProperty(value = "支付用户的openid")
private String openid;
@ApiModelProperty(value = "订单编号")
private String orderNo;
@ApiModelProperty(value = "金额(分)")
private Integer amount;
@ApiModelProperty(value = "订单状态")
private String tradeState;
@ApiModelProperty(value = "交易状态描述")
private String tradeStateDesc;
}
package com.mmc.oms.mq.constant;
/**
* @author: lw
* @Date: 2023/8/23 11:26
*/
public class RabbitmqConstant {
public final static String USER_TOP_UP_DIRECT_EXCHANGE = "USER_TOP_UP_DIRECT_EXCHANGE";
public final static String USER_TOP_UP_DIRECT_QUEUE = "USER_TOP_UP_DIRECT_QUEUE";
public final static String USER_TOP_UP_ROUTING_KEY = "USER_TOP_UP_ROUTING_KEY";
}
package com.mmc.oms.mq.listener;
import com.alibaba.fastjson.JSONObject;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.dao.topup.TopUpOrderDao;
import com.mmc.oms.entity.topup.TopUpOrderDO;
import com.mmc.oms.feign.UserAppApi;
import com.mmc.oms.model.vo.wallet.TopUpOrderVO;
import com.mmc.oms.mq.constant.RabbitmqConstant;
import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* @Author LW
* @date 2023/6/29 10:35 概要:
*/
@Slf4j
@Component
public class MqConsumer {
@Resource
TopUpOrderDao topUpOrderDao;
@Resource
UserAppApi userAppApi;
@RabbitListener(queues = RabbitmqConstant.USER_TOP_UP_DIRECT_QUEUE)
public void subscribeFanoutQueue(@Payload String topUpOrder, Channel channel, Message message) {
TopUpOrderVO topUpOrderVO = JSONObject.parseObject(topUpOrder, TopUpOrderVO.class);
log.info("==========用户充值====>用户充值消费者消费开始:订单信息是---->{}", topUpOrderVO);
// 根据消费的消息修改充值订单的信息
TopUpOrderDO topUpOrderDO = new TopUpOrderDO();
topUpOrderDO.setTradeState(topUpOrderVO.getTradeState());
topUpOrderDO.setTradeStateDesc(topUpOrderVO.getTradeStateDesc());
topUpOrderDO.setOrderNo(topUpOrderVO.getOrderNo());
topUpOrderDao.updateTopUpOrderInfo(topUpOrderDO);
if ("SUCCESS".equals(topUpOrderVO.getTradeState())) {
// 远程调用用户钱包信息进行云享金增加操作
ResultBody resultBody = userAppApi.feignTopUpCash(topUpOrderVO);
if ("-1".equals(resultBody.getCode())) {
log.error("===========用户支付成功,但由于远程调用失败,导致用户充值未到账,请手动处理该事件!param:{}=======>", topUpOrderVO);
}
}
log.info("=========用户充值====>用户充值消费者消费结束。");
}
}
......@@ -4,12 +4,16 @@ import com.alibaba.fastjson.JSONObject;
import com.mmc.oms.common.ResultEnum;
import com.mmc.oms.common.json.JsonUtil;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.common.util.CodeUtil;
import com.mmc.oms.common.util.TDateUtil;
import com.mmc.oms.controller.demand.util.EmojiUtils;
import com.mmc.oms.dao.demand.DemandReleaseOrderDao;
import com.mmc.oms.dao.demand.PublishServiceOrderDao;
import com.mmc.oms.dao.topup.TopUpOrderDao;
import com.mmc.oms.entity.demand.DemandReleaseOrderDO;
import com.mmc.oms.entity.demand.GetOrderNumberDO;
import com.mmc.oms.entity.demand.GetOrderNumberDTO;
import com.mmc.oms.entity.topup.TopUpOrderDO;
import com.mmc.oms.model.vo.demand.CommonPaymentVO;
import com.mmc.oms.model.vo.demand.DemandReleaseOrderVO;
import com.mmc.oms.model.vo.demand.OrderRequestParamsVO;
......@@ -23,8 +27,10 @@ import org.springframework.stereotype.Service;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
......@@ -53,6 +59,9 @@ public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService
@Autowired
private StringRedisTemplate stringRedisTemplate;
@Resource
private TopUpOrderDao topUpOrderDao;
@Override
public ResultBody publish(DemandReleaseOrderVO demandReleaseOrderVO, HttpServletRequest request) {
DemandReleaseOrderDO requirementsInfoDO = new DemandReleaseOrderDO(demandReleaseOrderVO);
......@@ -63,31 +72,46 @@ public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService
@Override
public ResultBody orderPayment(CommonPaymentVO commonPaymentVO, HttpServletRequest request, Integer userAccountId) {
String token = request.getHeader("token");
if ("3".equals(commonPaymentVO.getOrderPort().toString())){
ResultBody resultBody = orderPost(commonPaymentVO, token);
return resultBody;
switch (commonPaymentVO.getOrderPort().toString()) {
case "3":
return orderPost(commonPaymentVO, token);
case "4":
//发布服务需求支付
return publishServicePay(commonPaymentVO, token, userAccountId);
case "5":
return topUpOrder(commonPaymentVO, token, userAccountId);
default:
return ResultBody.error("无效的订单类型操作!");
}
if ("4".equals(commonPaymentVO.getOrderPort().toString())){
//发布服务需求支付
ResultBody resultBody = publishServicePay(commonPaymentVO, token, userAccountId);
return resultBody;
}
}
return ResultBody.success();
private ResultBody topUpOrder(CommonPaymentVO commonPaymentVO, String token, Integer userAccountId) {
// 生成充值订单编号 规则T加时间戳加用户id加随机数4位
String TOrderNo = "T" + TDateUtil.getDateStr(new Date(), TDateUtil.TYPE) + userAccountId + CodeUtil.getRandomNum(4);
OrderRequestParamsVO orderRequestParamsVO = new OrderRequestParamsVO();
orderRequestParamsVO.setAmount(commonPaymentVO.getAmount());
orderRequestParamsVO.setOrderNo(TOrderNo);
orderRequestParamsVO.setDescription("云享金充值");
orderRequestParamsVO.setAttach("TOP_UP");
TopUpOrderDO topUpOrderDO = new TopUpOrderDO(orderRequestParamsVO, userAccountId);
topUpOrderDO.setTradeState("WAIT");
topUpOrderDO.setDescription("充值云享金");
// 充值订单记录至充值订单表
topUpOrderDao.insertTopUpOrder(topUpOrderDO);
return releaseOrder(orderRequestParamsVO, token);
}
/**
* 服务需求发布
*
* @param commonPaymentVO
* @param token
* @param userAccountId
* @return
*/
private ResultBody publishServicePay(CommonPaymentVO commonPaymentVO, String token,Integer userAccountId) {
private ResultBody publishServicePay(CommonPaymentVO commonPaymentVO, String token, Integer userAccountId) {
if ("4".equals(commonPaymentVO.getOrderPort().toString())){
if ("4".equals(commonPaymentVO.getOrderPort().toString())) {
String orderNumber = commonPaymentVO.getOrderNumber();
String json = stringRedisTemplate.opsForValue().get(orderNumber);
GetOrderNumberDTO getOrderNumberDTO = JSONObject.parseObject(json, GetOrderNumberDTO.class);
......@@ -99,14 +123,14 @@ public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService
OrderRequestParamsVO orderRequestParamsVO = getOrderNumberDO.orderRequestParamsVO();
orderRequestParamsVO.setAmount(i);
ResultBody resultBody = releaseOrder(orderRequestParamsVO, token);
stringRedisTemplate.opsForValue().set(getOrderNumberDO.getPaymentOrderNumber()+getOrderNumberDO.getUserAccountId(), JsonUtil.parseObjToJson(getOrderNumberDO));
stringRedisTemplate.opsForValue().set(getOrderNumberDO.getPaymentOrderNumber() + getOrderNumberDO.getUserAccountId(), JsonUtil.parseObjToJson(getOrderNumberDO));
return resultBody;
}
return ResultBody.success();
return ResultBody.success();
}
private ResultBody orderPost(CommonPaymentVO commonPaymentVO, String token) {
if ("3".equals(commonPaymentVO.getOrderPort().toString())){
if ("3".equals(commonPaymentVO.getOrderPort().toString())) {
DemandReleaseOrderDO demandReleaseOrderDO = releaseOrderDao.orderPayment(commonPaymentVO.getOrderNumber());
BigDecimal paramMoney = demandReleaseOrderDO.getParamMoney();
BigDecimal multiply = paramMoney.multiply(new BigDecimal(100));
......@@ -114,21 +138,22 @@ public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService
OrderRequestParamsVO orderRequestParamsVO = demandReleaseOrderDO.buildOrderRequestParamsVO();
orderRequestParamsVO.setAmount(i);
BigDecimal practicalMoney = demandReleaseOrderDO.getPracticalMoney();
if (practicalMoney!=null){
return ResultBody.error(ResultEnum.THE_CURRENT_DEMAND_IS_PAID);
if (practicalMoney != null) {
return ResultBody.error(ResultEnum.THE_CURRENT_DEMAND_IS_PAID);
}
if (i!=0){
if (i != 0) {
return releaseOrder(orderRequestParamsVO, token);
}else if(i==0){
return ResultBody.error(ResultEnum.NO_PAYMENT_REQUIRED);
} else if (i == 0) {
return ResultBody.error(ResultEnum.NO_PAYMENT_REQUIRED);
}
}
return ResultBody.success();
return ResultBody.success();
}
@Override
public ResultBody getPublishPhone(CommonPaymentVO commonPaymentVO, HttpServletRequest request, Integer userAccountId) {
public ResultBody getPublishPhone(CommonPaymentVO commonPaymentVO, HttpServletRequest request, Integer
userAccountId) {
String token = request.getHeader("token");
HttpHeaders headers = new HttpHeaders();
headers.add("token", token);
......@@ -136,20 +161,20 @@ public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService
ResponseEntity<UserPayInfoVO> exchange = restTemplate.exchange(paymentUrl + "/wechat/queryUserPayInfo" + "?orderNo=" + commonPaymentVO.getOrderNumber(), HttpMethod.GET, entity, UserPayInfoVO.class);
UserPayInfoVO body = exchange.getBody();
if ( body.getWxNotifyPayerTotal()!=null){
if (body.getWxNotifyPayerTotal() != null) {
BigDecimal divide = BigDecimal.valueOf(Long.valueOf(body.getWxNotifyPayerTotal())).divide(new BigDecimal(100));
DemandReleaseOrderDO requirementsInfoDO = new DemandReleaseOrderDO(body,divide);
DemandReleaseOrderDO requirementsInfoDO = new DemandReleaseOrderDO(body, divide);
releaseOrderDao.updateOrderDemand(requirementsInfoDO);
DemandReleaseOrderDO demandReleaseOrderDO = releaseOrderDao.selectPhone(requirementsInfoDO.getOrderNumber());
stringRedisTemplate.opsForValue().set(demandReleaseOrderDO.getRequirementsInfoId().toString(), JsonUtil.parseObjToJson(demandReleaseOrderDO));
return ResultBody.success(demandReleaseOrderDO.getPublishPhone());
return ResultBody.success(demandReleaseOrderDO.getPublishPhone());
}
return ResultBody.success();
}
public ResultBody releaseOrder(OrderRequestParamsVO orderRequestParamsVO, String token) {
boolean emoji = EmojiUtils.containsEmoji(orderRequestParamsVO.getDescription());
if (emoji==true){
boolean emoji = EmojiUtils.containsEmoji(orderRequestParamsVO.getDescription());
if (emoji == true) {
orderRequestParamsVO.setDescription(EmojiUtils.emojiConverter2Html(orderRequestParamsVO.getDescription()));
}
HttpHeaders headers = new HttpHeaders();
......@@ -157,10 +182,10 @@ public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(orderRequestParamsVO), headers);
ResponseEntity<Object> exchange = null;
Map<String , Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<>();
try {
exchange = restTemplate.exchange(paymentUrl + "wechat/pay", HttpMethod.POST, entity, Object.class);
map.put("Ok", exchange.getBody());
map.put("Ok", exchange.getBody());
} catch (RestClientException e) {
return ResultBody.error(ResultEnum.THIRD_PARTY_ERRORS);
}
......
......@@ -13,6 +13,13 @@ spring:
jedis:
pool:
max-active: 2
#rabbitMQ
rabbitmq:
host: amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.vpc.mq.amqp.aliyuncs.com
port: 5672
username: MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
password: ${RABBITMQ_PASSWORD}
virtual-host: dev
main:
allow-circular-references: true
......
......@@ -16,6 +16,14 @@ spring:
main:
allow-circular-references: true
#rabbitMQ
rabbitmq:
host: amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.vpc.mq.amqp.aliyuncs.com
port: 5672
username: MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
password: ${RABBITMQ_PASSWORD}
virtual-host: prod
springfox:
documentation:
swagger-ui:
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mmc.oms.dao.topup.TopUpOrderDao">
<insert id="insertTopUpOrder">
insert into top_up_order (user_account_id,
order_no,
amount,
trade_state,
description)
values (#{userAccountId}, #{orderNo}, #{amount}, #{tradeState}, #{description})
</insert>
<update id="updateTopUpOrderInfo">
update top_up_order
set trade_state = #{tradeState},
trade_state_desc = #{tradeStateDesc}
where order_no = #{orderNo}
</update>
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论