app更改
This commit is contained in:
@@ -9,6 +9,9 @@ import cn.pluss.platform.annotation.NoRepeatSubmit;
|
||||
import cn.pluss.platform.api.Result;
|
||||
import cn.pluss.platform.api.ResultCode;
|
||||
import cn.pluss.platform.api.ResultGenerator;
|
||||
import cn.pluss.platform.device.MercOrderDetailService;
|
||||
import cn.pluss.platform.device.MercOrderNewService;
|
||||
import cn.pluss.platform.device.MercShopTrolleyService;
|
||||
import cn.pluss.platform.deviceStock.DeviceStockService;
|
||||
import cn.pluss.platform.dto.AccountDTO;
|
||||
import cn.pluss.platform.dto.RealFansDTO;
|
||||
@@ -79,8 +82,10 @@ import com.alipay.api.DefaultAlipayClient;
|
||||
import com.alipay.api.request.AlipayTradeCreateRequest;
|
||||
import com.alipay.api.response.AlipaySystemOauthTokenResponse;
|
||||
import com.alipay.api.response.AlipayTradeCreateResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -89,9 +94,11 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
@@ -204,36 +211,55 @@ public class MerchantController {
|
||||
@Resource
|
||||
private JftReceiptOrderMapper jftReceiptOrderMapper;
|
||||
|
||||
@Resource
|
||||
private MercOrderNewService mercOrderNewService;
|
||||
@Resource
|
||||
private MercOrderDetailService mercOrderDetailService;
|
||||
|
||||
@Autowired
|
||||
private MercShopTrolleyService mercShopTrolleyService;
|
||||
|
||||
|
||||
@Value("${path}")
|
||||
private String path;
|
||||
|
||||
/*@GetMapping("/auth/aKfAirN1hO.txt")
|
||||
@ResponseBody
|
||||
public String aKfAirN1hO() {
|
||||
return "3cdbacb2d4ceefa36ef1c43d0c562fb9";
|
||||
}*/
|
||||
|
||||
@GetMapping("/auth/ODzUwrTrcr.txt")
|
||||
@GetMapping("/auths/{filePath}")
|
||||
@ResponseBody
|
||||
public String aKfAirN1hO() {
|
||||
return "68eb6c8f59bf143e3165aa5198c6905f";
|
||||
public String OeUIoBWT9l(@PathVariable("filePath") String filePath) {
|
||||
|
||||
try {
|
||||
String filecontent=FileUtil.readFile(path.concat(filePath));
|
||||
return filecontent;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@GetMapping("/auth/Hhk6kRGkb7.txt")
|
||||
@ResponseBody
|
||||
public String Hhk6kRGkb7() {
|
||||
return "c9b7ead4b4b0efd96c335aad9d445f04";
|
||||
}
|
||||
|
||||
@GetMapping("/auth/OeUIoBWT9l.txt")
|
||||
@ResponseBody
|
||||
public String OeUIoBWT9l() {
|
||||
return "d8bd54ca68da9a76d473f246c8821ad0";
|
||||
}
|
||||
|
||||
@GetMapping("/OeUIoBWT9l.txt")
|
||||
@GetMapping("/{path}")
|
||||
@ResponseBody
|
||||
public String OeUIoBWT9l1() {
|
||||
return "d8bd54ca68da9a76d473f246c8821ad0";
|
||||
}
|
||||
|
||||
@GetMapping("/Hhk6kRGkb7.txt")
|
||||
@ResponseBody
|
||||
public String HhkGkb7(){return "c9b7ead4b4b0efd96c335aad9d445f04";}
|
||||
|
||||
@GetMapping("/JMLTYEDRru.txt")
|
||||
@ResponseBody
|
||||
public String HhkGkb(){return "6573ac68aee6cf17704526a136b9fb76";}
|
||||
|
||||
@GetMapping("/wVd03mU19R.txt")
|
||||
@ResponseBody
|
||||
public String wVd03mU(){return "6a7620e15818a9e4e7c6b52fecd19788";}
|
||||
|
||||
@GetMapping("/account/auth")
|
||||
public String accountAuth(HttpServletResponse response, HttpServletRequest request) {
|
||||
@@ -2423,6 +2449,51 @@ public class MerchantController {
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping("/aliDeviceCallBack")
|
||||
@ResponseBody
|
||||
public String getaliDeviceCallBack() throws Exception {
|
||||
Map<String, Object> params = HttpUrlConnection.convertRequestParamsToMap(this.request);
|
||||
log.info("===params====" + params);
|
||||
String paramsJson = JSON.toJSONString(params);
|
||||
log.info("zhifubaohuidiao,{}", paramsJson);
|
||||
|
||||
String tradeStatus = (String) params.get("trade_status");
|
||||
log.info("=====tradeStatus=====" + tradeStatus);
|
||||
if ("TRADE_SUCCESS".equals(tradeStatus)) {
|
||||
String orderNumber = (String) params.get("out_trade_no");// 商家订单号
|
||||
String buyer_id = (String) params.get("buyer_id");// 支付宝唯一识别用户码
|
||||
|
||||
UpdateWrapper<MercOrderDetail> updateDetail = new UpdateWrapper<>();
|
||||
updateDetail.eq("orderNo",orderNumber).set("status","01");
|
||||
mercOrderDetailService.update(updateDetail);
|
||||
|
||||
UpdateWrapper<MercOrderNew> updateOrderNew = new UpdateWrapper<>();
|
||||
updateOrderNew.eq("orderNo",orderNumber).set("status","01").set("transNo",buyer_id);
|
||||
mercOrderNewService.update(updateOrderNew);
|
||||
|
||||
|
||||
// 清除购物车的数据
|
||||
LambdaQueryWrapper<MercOrderDetail> qWrapper = Wrappers.lambdaQuery();
|
||||
qWrapper.eq(MercOrderDetail::getOrderNo, orderNumber);
|
||||
List<MercOrderDetail> orderDetailList = mercOrderDetailService.list(qWrapper);
|
||||
|
||||
List<Long> shopTrolleyIdList = new ArrayList<>();
|
||||
for (MercOrderDetail item : orderDetailList) {
|
||||
shopTrolleyIdList.add(item.getShopTrolleyId());
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<MercShopTrolley> qWrapper2 = Wrappers.lambdaQuery();
|
||||
qWrapper2.in(MercShopTrolley::getId, shopTrolleyIdList);
|
||||
mercShopTrolleyService.remove(qWrapper2);
|
||||
|
||||
return "success";
|
||||
}
|
||||
return "failure";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* toUpDateMerchantOrder:(修改订单状态[支付宝发起的] 有bug 必须在用户支付完成之后点右上角的完成才会触发 这里照样保留该方法
|
||||
* 在上面的getaliCallBack()方法也会进行这个修改订单的处理). <br/>
|
||||
|
||||
Reference in New Issue
Block a user