Commit 6f265844 by 彭祥礼

支付成功回调调整

parent 6cbbbb5c
......@@ -49,7 +49,7 @@ public class YxtCardController extends BaseController {
private SysUserMapper sysUserMapper;
@Autowired
private RedisTemplate redisTemplate;
private final double price = 25.0;
private final double price = 0.1;
/**
* 进入院线通兑换券销售界面
* @return
......@@ -289,7 +289,6 @@ public class YxtCardController extends BaseController {
@RequestParam("totalPrice") Double totalPrice,
@RequestParam("openId") String openId){
int totalPrice0 = (int)(totalPrice * 100);
totalPrice0 = 10;
String nonceStr = Sha1Util.getNonceStr();
// 统一下单请求参数
......@@ -450,12 +449,15 @@ public class YxtCardController extends BaseController {
* @return
*/
@RequestMapping("enterPaySuccess")
public ResponseData<Map<String,Object>> enterPaySuccess(@RequestParam("orderNum")String orderNum,@RequestParam("totalPrice")Double totalPrice){
public ResponseData<Map<String,Object>> enterPaySuccess(
HttpServletRequest request,HttpServletResponse response,
@RequestParam("orderNum")String orderNum, @RequestParam("totalPrice")Double totalPrice){
//new YxtWxPayController().payNotify(response,request);
Map<String,Object> objectMap = new HashMap<>();
Wrapper<YxtOrder> orderWrapper = new EntityWrapper<>();
orderWrapper.eq("order_num",orderNum);
orderWrapper.eq("state",3);
orderWrapper.eq("state",2);
List<YxtOrder> orderList = yxtOrderMapper.selectList(orderWrapper);
List<Integer> couponIds = null;
if(orderList.size()>0){
......@@ -485,6 +487,7 @@ public class YxtCardController extends BaseController {
public ResponseData<List<YxtOrder>> getYxtOrderList(@RequestParam("userId") String userId) {
Wrapper<YxtOrder> orderWrapper = new EntityWrapper<>();
orderWrapper.eq(StringUtils.isNotBlank(userId),"user_id",userId);
orderWrapper.orderBy("updateDate",false);
List<YxtOrder> list = yxtOrderMapper.selectList(orderWrapper);
return ResponseData.success(list);
......
......@@ -98,7 +98,7 @@ public class YxtWxPayController extends BaseController {
// 检查该订单号是不是创建
if(list.size()>0){
YxtOrder yxtOrder = list.get(0);
double totalPrice = Double.parseDouble(yxtOrder.getTotalPrice().toString()) * 100;
double totalPrice = yxtOrder.getTotalPrice() * 100;
double totalFee = Double.parseDouble(map.get("total_fee").toString());
if(totalPrice <= totalFee+1){
......@@ -129,7 +129,7 @@ public class YxtWxPayController extends BaseController {
for (YxtCoupon coupon : couponList) {
Wrapper<YxtCoupon> yxtCouponWrapper = new EntityWrapper<>();
yxtCouponWrapper.eq("id",coupon.getId());
yxtCouponWrapper.ne("state",2);
yxtCouponWrapper.ne("state",3);
YxtCoupon coupon1 = new YxtCoupon();
coupon1.setState(2);
yxtCouponMapper.update(coupon1,yxtCouponWrapper);
......@@ -228,7 +228,7 @@ public class YxtWxPayController extends BaseController {
String url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken;
String result = HTTPSClient.sendPosts(url, dataStr);
System.out.println(result);
log.info(result);
content = "";
}else if(i+1 == list.size()){
content += "请在15分钟内在院线通兑换,逾期有误,概不负责。";
......
......@@ -16,7 +16,7 @@ public class WxConfig {
public static final String headUrl = "http://dianyuanjiangli.com";
public static final String KEY = "WINSUN123456xyjl987654wxpay88888";
public static final String MAC_ID = "1498149672";
public static final String NOTIFY_URL = "http://dianyuanjiangli.com/app/ciop/wxpay/payNotify";
public static final String NOTIFY_URL = "http://167460x6b0.51mypc.cn/app/ciop/wxpay/payNotify";
// // 公众号appid 网讯测试服务号
// public static final String APPID = "wxfc18f5186b729d15";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment