kongdeqiang
2023-03-30 5d7c58dfa04648e5831a66a87597ccb5581a7f16
默认变更列表
4个文件已修改
36 ■■■■■ 已修改文件
src/main/java/com/boying/controller/WhiteListController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/car/PlateServlet3.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/phone/YCPayController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/service/impl/BarrierServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/WhiteListController.java
@@ -45,7 +45,7 @@
                .eq(StringUtils.isNotBlank(carNo),WhiteList::getCarNo,carNo);
        Page<WhiteList> page1 = whiteListService.page(page, wrapper);
        for (WhiteList record : page1.getRecords()) {
            if(record.getParkIds() != null){
            if(StringUtils.isNotBlank(record.getParkIds())){
                String s = "";
                String parkIds = record.getParkIds();
                String[] split = parkIds.split(",");
src/main/java/com/boying/controller/car/PlateServlet3.java
@@ -558,6 +558,7 @@
    public void outLedShow(String ledId,String carNo,Double price,String timeStamp,Integer parkId,HttpServletRequest request, HttpServletResponse response,int type) throws ServletException, IOException {
        String redisnum = redisTemplate.opsForValue().get("car_park_" + parkId);
        Park park = parkService.getById(parkId);
        LedBean ledBean = new LedBean();
        ledBean.setcolor1(0);
        ledBean.setcolor2(0);
@@ -580,6 +581,7 @@
        if(type == 0){
            //开闸
            open(request,response,data1);
            redisTemplate.opsForValue().set("park_change_in_"+parkId,"true",1, TimeUnit.DAYS);
            int i = Integer.parseInt(redisnum);
            i--;
            if(i<0){
@@ -619,6 +621,7 @@
        if(type == 0){
            //开闸
            open(request,response,data1);
            redisTemplate.opsForValue().set("park_change_in_"+parkId,"true",1, TimeUnit.DAYS);
            int i = Integer.parseInt(redisnum);
            i--;
            if(i<0){
src/main/java/com/boying/controller/phone/YCPayController.java
@@ -6,6 +6,7 @@
import com.boying.common.SystemConfigProperties;
import com.boying.entity.*;
import com.boying.service.*;
import com.boying.util.DateUtilOther;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -44,7 +45,13 @@
     */
    @GetMapping("/getByQueryId")
    public Object getByQueryId(Long queryId){
        if(queryId == null){
            return R.failed("参数为空");
        }
        OutPark byId = outParkService.getById(queryId);
        if(byId.getTime() > 0){
            byId.setTimeStr(DateUtilOther.millisToDayHrMinSec(new Double(byId.getTime()).longValue()));
        }
        return R.ok(byId,"请求成功");
    }
@@ -80,7 +87,10 @@
            }
        }
        if(outPark.getStatus() == 0){
            return R.ok("跳转邮储支付", "https://hbfs.govpay.ccb.com/online/fssm?fee=130000000001&PyfScnCgycd=01&pyfTpcd=3&BNo="+outPark.getPayCode());
//            return R.ok("跳转邮储支付", "https://hbfs.govpay.ccb.com/online/fssm?fee=130000000001&PyfScnCgycd=01&pyfTpcd=3&BNo="+outPark.getPayCode());
           // return R.ok("跳转邮储支付", "http://wxtest.smeia.cn/h5/?appid=CUP11234601101&params={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}");
            return R.ok("跳转邮储支付", "http://wxtest.smeia.cn/h5/static/router.html?rurl=router&router=psbc&appid=CUP16522400671&params={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}");
        }else if(outPark.getStatus() == 1){
            return R.failed("已缴费");
        }else {
@@ -102,7 +112,7 @@
            //修改订单状态 0成功
            if(success==0){
                updateOrderRecord(queryId,"03");
                return R.ok(null,"请求成功");
                return R.ok(null,"回调成功");
            }else {
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss");
                String logs = sdf.format(new Date())+" 出场id为:"+queryId+",缴费失败------》\n";
@@ -110,7 +120,7 @@
                writeTxt(logs);
            }
        }
        return R.ok(byId,"请求成功");
        return R.ok(byId,"回调成功");
    }
    /**
src/main/java/com/boying/service/impl/BarrierServiceImpl.java
@@ -21,6 +21,7 @@
import java.time.ZoneId;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
 * @author kdq
@@ -62,16 +63,12 @@
            return true;
        }else {
            //判断停车场是否有了车位
            String num = redisTemplate.opsForValue().get("car_park_" +  enterPark.getParkId());
            if(num == null){
                num = "0";
            }
            Park byId = parkMapper.selectById(enterPark.getParkId());
            int i = byId.getNum() - Integer.parseInt(num);
            if(i<=0){
                return false;
            }else {
            String s = redisTemplate.opsForValue().get("park_change_in_" + enterPark.getParkId());
            if("true".equals(s)){
                redisTemplate.opsForValue().set("park_change_in_"+enterPark.getParkId(),"false",1, TimeUnit.DAYS);
                return true;
            }else {
                return false;
            }
        }