| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.panzhihua.applets.umf.MyAESUtil; |
| | | import com.panzhihua.applets.umf.UmfPayUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.HttpClientUtil; |
| | | import com.umf.api.service.UmfService; |
| | |
| | | private UmfPayUtil umfPayUtil; |
| | | @Value("${umf.file}") |
| | | private String file; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @PostMapping("wxNotify") |
| | | public void payCallback(HttpServletRequest request, HttpServletResponse response) { |
| | |
| | | out.close(); |
| | | } |
| | | @ApiOperation("uu洗车退款接口") |
| | | @GetMapping("/uuRepay") |
| | | public R uuRepay(@RequestParam("orderid") String orderid, @RequestParam("merdate") String merdate, @RequestParam("refundAmount")String refundAmount, @RequestParam("orgAmount")String orgAmount){ |
| | | Map map=umfPayUtil.repay(orderid,merdate, DateUtils.getDateFormatString(new Date(),"yyMMddHHmmss")+"0001",refundAmount,orgAmount); |
| | | return R.ok(map); |
| | | @PostMapping("/uuRepay") |
| | | public R uuRepay(@RequestBody String aesString){ |
| | | try { |
| | | Map<String, String> aesMap= (Map<String, String>) JSON.parse(aesString); |
| | | String desString=MyAESUtil.Decrypt(aesMap.get("aesString"),"Ryo7M3n8loC5Abcd"); |
| | | Map<String,String> desMap= (Map) JSON.parse(desString); |
| | | Map map=umfPayUtil.repay(desMap.get("orderId"),desMap.get("merdate"), DateUtils.getDateFormatString(new Date(),"yyMMddHHmmss")+"0001",desMap.get("refundAmount"),desMap.get("orgAmount")); |
| | | return R.ok(map); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return R.fail("加密验证失败"); |
| | | } |
| | | |
| | | } |
| | | @ApiOperation("uu洗车推送") |
| | | @PostMapping("/uuPush") |
| | | public R uuPush(@RequestBody String aesString){ |
| | | try { |
| | | Map<String, String> aesMap= (Map<String, String>) JSON.parse(aesString); |
| | | String desString=MyAESUtil.Decrypt(aesMap.get("aesString"),"Ryo7M3n8loC5Abcd"); |
| | | Map<String,String> desMap= (Map) JSON.parse(desString); |
| | | return userService.uuPush(desMap.get("washer_mobile"),desMap.get("phone"),desMap.get("washer_name"),Integer.parseInt(desMap.get("order_status"))); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return R.fail("推送失败"); |
| | | } |
| | | |
| | | } |
| | | } |