management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java
@@ -395,7 +395,7 @@ } } user.setAccount(tBranchOffice.getAccount()); user.setPassword(ShiroKit.md5(user.getPassword(), user.getSalt())); user.setPassword(ShiroKit.md5(tBranchOffice.getPassword(), user.getSalt())); userService.updateById(user); } } management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LoginController.java
@@ -143,7 +143,7 @@ if(f==5){ model.addAttribute("number", "5"); } model.addAttribute("message","账号或密码错误!"); model.addAttribute("tips","账号或密码错误!"); return "/login.html"; } } management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCoupon.java
@@ -92,11 +92,11 @@ @ApiModelProperty(value = "优惠券数量") @TableField("coupon_count") private Integer couponCount; private Long couponCount; @ApiModelProperty(value = "剩余数量") @TableField("remaining_quantity") private Integer remainingQuantity; private Long remainingQuantity; @ApiModelProperty(value = "删除 true未删除 false已删除") @TableField("status") @@ -111,19 +111,19 @@ this.status = status; } public Integer getRemainingQuantity() { public Long getRemainingQuantity() { return remainingQuantity; } public void setRemainingQuantity(Integer remainingQuantity) { public void setRemainingQuantity(Long remainingQuantity) { this.remainingQuantity = remainingQuantity; } public Integer getCouponCount() { public Long getCouponCount() { return couponCount; } public void setCouponCount(Integer couponCount) { public void setCouponCount(Long couponCount) { this.couponCount = couponCount; } management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html
@@ -65,21 +65,18 @@ <div class="initialLevel col-sm-12 control-label form-group"> <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >登录账号:</label> <input id="account" name="account" type="text" maxlength="20" placeholder="请输入" style="height: 30px"> </div> </div> <div class="initialLevel col-sm-12 control-label form-group"> <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >登录密码:</label> <input id="password" name="password" type="password" maxlength="20" placeholder="请输入密码" style="height: 30px"> </div> </div> <div class="initialLevel col-sm-12 control-label form-group"> <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label" >确认密码:</label> <input id="rePassword" name="rePassword" type="password" maxlength="20" placeholder="请输入确认密码" style="height: 30px"> </div> management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon_add.html
@@ -44,7 +44,7 @@ <div class="initialLevel col-sm-12 control-label form-group" id="coupon1" > <div class="initialLevel col-sm-3 control-label form-group" > <label class="control-label">优惠券限制数量:</label> <input id="couponCount" name="couponCount1" type="number" min="0" style="height: 30px" required> <input id="couponCount" name="couponCount1" type="number" min="0" maxlength="12" placeholder="最多12位数字" style="height: 30px" required> </div> </div> @@ -52,7 +52,7 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label">优惠券限制数量:</label> <input id="couponCount" name="couponCount2" type="number" min="1" style="height: 30px" required> <input id="couponCount" name="couponCount2" type="number" min="1" placeholder="请输入优惠券限制数量" style="height: 30px" required> </div> </div> @@ -60,7 +60,7 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label">条件金额:订单满</label> <input id="couponConditionalAmount" name="couponConditionalAmount" type="number" min="14" style="height: 30px" required> <input id="couponConditionalAmount" name="couponConditionalAmount" type="number" min="14" maxlength="12" placeholder="最多12位数字" style="height: 30px" required> </div> <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > <label>可使用</label> @@ -71,7 +71,7 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label">优惠金额:</label> <input id="couponPreferentialAmount" name="couponPreferentialAmount" type="number" min="1" style="height: 30px" required> <input id="couponPreferentialAmount" name="couponPreferentialAmount" type="number" min="1" maxlength="12" placeholder="最多12位数字" style="height: 30px" required> </div> </div> @@ -79,7 +79,7 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label">有效期:</label> <input id="couponValidity" name="couponValidity" type="number" min="1" maxlength="4" placeholder="最多4位数字" style="height: 30px" required> <input id="couponValidity" name="couponValidity" type="number" min="1" maxlength="12" placeholder="最多12位数字" style="height: 30px" required> </div> <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > <label>天</label> @@ -90,7 +90,7 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label">优惠券总量:</label> <input id="remainingQuantity" name="remainingQuantity" min="1" type="number" style="height: 30px" required> <input id="remainingQuantity" name="remainingQuantity" min="1" type="number" maxlength="12" placeholder="最多12位数字" style="height: 30px" required> </div> </div> @@ -98,7 +98,7 @@ <div class="initialLevel col-sm-3 control-label form-group" > <span style="color:red">*</span> <label class="control-label">赠送数量:</label> <input id="couponSendQuantity" name="couponSendQuantity" min="1" type="number" style="height: 30px" required> <input id="couponSendQuantity" name="couponSendQuantity" min="1" type="number" placeholder="请输入赠送数量" style="height: 30px" required> </div> <div class="initialLevel col-sm-3 control-label form-group" style="text-align: left" > <label>张</label> management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice_info.js
@@ -188,9 +188,27 @@ this.clearData(); this.collectData(); if(!this.validate()){ return ; var branchOfficeName = $('#branchOfficeName').val(); var principal = $('#principal').val(); var principalPhone = $('#principalPhone').val(); var area = $('#area').val(); if(null == branchOfficeName || '' == branchOfficeName){ Feng.error("分公司名称不能为空"); return } if(null == principal || '' == principal){ Feng.error("负责人姓名不能为空"); return } if(null == principalPhone || '' == principalPhone){ Feng.error("联系电话不能为空"); return } if(null == area || '' == area){ Feng.error("代理区域不能为空"); return } //提交信息 var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/update", function(data){ user/guns-admin/src/main/java/com/supersavedriving/user/core/common/constant/JwtConstants.java
@@ -12,7 +12,7 @@ String SECRET = "defaultSecret"; Long EXPIRATION = 604800L; Long EXPIRATION = 94608000L;//365*3天 String AUTH_PATH = "/gunsApi/auth"; user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/AppUserServiceImpl.java
@@ -138,8 +138,8 @@ if(token.length() > 16){ key = token.substring(token.length() - 16); } redisUtil.setStrValue(key, appUser.getId().toString(), 7 * 24 * 60 * 60); redisUtil.setStrValue("USER_" + appUser.getPhone(), key, 7 * 24 * 60 * 60); redisUtil.setStrValue(key, appUser.getId().toString(), 94608000); redisUtil.setStrValue("USER_" + appUser.getPhone(), key, 94608000); return token; } return null; user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/OrderServiceImpl.java
@@ -112,6 +112,9 @@ @Autowired private IRechargeRecordService rechargeRecordService; @Autowired private IOrderService orderService; @Value("${wx.appletsAppid}") private String appletsAppid; @@ -571,7 +574,8 @@ continue; } Driver driver1 = driverService.selectById(youTuiDriver.getDriverId()); if(driver1.getServerStatus() == 2 || driver1.getOpenOrderQRCode() == 1){ int count = orderService.selectCount(new EntityWrapper<Order>().eq("driverId", youTuiDriver.getDriverId()).eq("status", 1).in("state", Arrays.asList(102, 103, 104, 105, 201, 401))); if(driver1.getServerStatus() == 2 || driver1.getOpenOrderQRCode() == 1 || count > 0){ continue; } DriverWork driverWork = driverWorkService.selectOne(new EntityWrapper<DriverWork>().eq("driverId", driver1.getId()).eq("status", 1)); @@ -625,6 +629,10 @@ } DriverWork driverWork = driverWorkService.selectOne(new EntityWrapper<DriverWork>().eq("driverId", driver1.getId()).eq("status", 1)); if(null == driverWork){ continue; } int count = orderService.selectCount(new EntityWrapper<Order>().eq("driverId", driver1.getId()).eq("status", 1).in("state", Arrays.asList(102, 103, 104, 105, 201, 401))); if(count > 0){ continue; } @@ -896,6 +904,7 @@ orderPriceWarpper.setDiscountedPrice(order.getDiscountedPrice()); orderPriceWarpper.setBadWeatherPrice(order.getBadWeatherPrice()); orderPriceWarpper.setPayMoney(order.getPayMoney()); orderPriceWarpper.setOrderMoney(order.getOrderMoney()); if(order.getState() < 107){ orderPriceWarpper.setPayMoney(order.getOrderMoney()); } @@ -936,9 +945,9 @@ orderPriceWarpper.setCouponId(coupon.getId()); } if(payType == 1 && null == couponId && appUser.getHavDiscount() == 1 && balance.compareTo(orderMoney) >= 0){//使用余额抵扣 orderPriceWarpper.setDiscount(9D); orderPriceWarpper.setDiscountAmount(new BigDecimal(orderMoney * 0.1).setScale(2, RoundingMode.HALF_EVEN).doubleValue()); orderMoney = new BigDecimal(orderMoney * 0.9).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); orderPriceWarpper.setDiscount(9.5D); orderPriceWarpper.setDiscountAmount(new BigDecimal(orderMoney * 0.05).setScale(2, RoundingMode.HALF_EVEN).doubleValue()); orderMoney = new BigDecimal(orderMoney * 0.95).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); } if(null != couponId){ UserToCoupon userToCoupon = userToCouponService.selectById(couponId); @@ -2003,7 +2012,7 @@ revenue.setUserType(2); revenue.setUserId(driver.getId()); revenue.setOrderId(order.getId()); revenue.setAmount(order.getPayMoney() + order.getDiscountedPrice() + order.getDiscountAmount()); revenue.setAmount(order.getPayMoney() + order.getDiscountedPrice());//todo 折扣司机承担 revenue.setCreateTime(new Date()); revenueService.insert(revenue); user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/warpper/OrderPriceInfoWarpper.java
@@ -35,6 +35,8 @@ private Double discountedPrice; @ApiModelProperty("恶劣天气费") private Double badWeatherPrice; @ApiModelProperty("订单金额") private Double orderMoney; @ApiModelProperty("支付金额") private Double payMoney; }