Merge remote-tracking branch 'origin/master'
| | |
| | | import com.stylefeng.guns.modular.account.server.UserWithdrawalService; |
| | | import com.stylefeng.guns.modular.account.util.OssUploadUtil; |
| | | import com.stylefeng.guns.modular.system.model.Driver; |
| | | import com.stylefeng.guns.modular.system.model.TDriverPromotionActivity; |
| | | import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | import com.stylefeng.guns.modular.system.model.UserWithdrawal; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.ISmsrecordService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.service.IVerifiedService; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.WeChatUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.LoginWarpper; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private TDriverPromotionActivityService driverPromotionActivityService; |
| | | |
| | | |
| | | /** |
| | |
| | | @ApiImplicitParam(value = "ip地址", name = "registIp", required = false, dataType = "String"), |
| | | @ApiImplicitParam(value = "登录端口-小程序传Applets", name = "loginType", required = false, dataType = "String"), |
| | | @ApiImplicitParam(value = "当前定位区县行政编号", name = "registAreaCode", required = false, dataType = "String"), |
| | | @ApiImplicitParam(value = "司机id", name = "driverId", required = false, dataType = "int"), |
| | | }) |
| | | public ResultUtil<LoginWarpper> captchaLogin(String phone, String code, String registIp, String registAreaCode,String loginType,String jsCode,Integer driverId){ |
| | | public ResultUtil<LoginWarpper> captchaLogin(String phone, String code, String registIp, String registAreaCode,String loginType,String jsCode){ |
| | | try { |
| | | return userInfoService.captchaLogin(phone, code, registIp, registAreaCode,loginType,driverId); |
| | | return userInfoService.captchaLogin(phone, code, registIp, registAreaCode,loginType); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | /** |
| | | * 设置绑定司机 |
| | | * @param driverId |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/user/bindingDriver") |
| | | @ApiOperation(value = "绑定司机", tags = {"用户端-登录"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "司机id", name = "driverId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<LoginWarpper> bindingDriver(Integer driverId,HttpServletRequest request){ |
| | | try { |
| | | Integer uid = userInfoService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | | |
| | | // 是否需要绑定司机 |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", userInfo.getRegistAreaCode()).ge("startTime", new Date()).lt("endTime", new Date()).last(" limit 1")); |
| | | if(tDriverPromotionActivity!=null){ |
| | | if(userInfo.getBindDriverId()==null || userInfo.getBindExpireDate().getTime()<=System.currentTimeMillis()){ |
| | | Integer bindingDays = tDriverPromotionActivity.getBindingDays(); |
| | | // 当前时间+绑定天数 |
| | | Date endTime = DateUtils.addDays(new Date(), bindingDays); |
| | | userInfo.setBindDriverId(driverId); |
| | | userInfo.setBindExpireDate(endTime); |
| | | userInfoService.updateById(userInfo); |
| | | } |
| | | |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | private Integer responsibilityType; |
| | | |
| | | public Integer getResponsibilityType() { |
| | | return responsibilityType; |
| | | } |
| | | |
| | | public void setResponsibilityType(Integer responsibilityType) { |
| | | this.responsibilityType = responsibilityType; |
| | | } |
| | | public Integer getPromotion() { |
| | | return promotion; |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.specialTrain.server.impl.OrderPrivateCarServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.RegionMapper; |
| | | import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper; |
| | | import com.stylefeng.guns.modular.system.dao.SysIntegralMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserActivityDiscount1Mapper; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.vo.UnPayOrderVO; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | |
| | | @Resource |
| | | private OrderTaxiMapper orderTaxiMapper; |
| | | |
| | | @Resource |
| | | private RegionMapper regionMapper; |
| | | |
| | | @Resource |
| | | private SensitiveWordsMapper sensitiveWordsMapper; |
| | |
| | | private IOrderPrivateCarService orderPrivateCarService; |
| | | |
| | | @Autowired |
| | | private ILineService lineService; |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | @Autowired |
| | |
| | | @Autowired |
| | | private ChinaMobileUtil chinaMobileUtil; |
| | | |
| | | @Autowired |
| | | private GDFalconUtil gdFalconUtil; |
| | | |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | |
| | | private PayMoneyUtil payMoneyUtil; |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | |
| | | @Autowired |
| | | private ITaxiCardPaymentService taxiCardPaymentService; |
| | | |
| | | @Autowired |
| | | private ICompanyService companyService; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private IRegionService regionService; |
| | | |
| | | @Autowired |
| | | private TAbnormalPayOrderMapper abnormalPayOrderMapper; |
| | | |
| | | |
| | | |
| | |
| | | this.baseMapper.updateById(orderCrossCity); |
| | | } |
| | | } |
| | | |
| | | // 是否异常订单 |
| | | if (orderCrossCity.getResponsibilityType() !=null && orderCrossCity.getResponsibilityType() >2) { |
| | | TAbnormalPayOrder tAbnormalPayOrder = abnormalPayOrderMapper.selectList(new EntityWrapper<TAbnormalPayOrder>().eq("type", 3).eq("orderNum", orderCrossCity.getOrderNum())).stream().findFirst().orElse(null); |
| | | if (tAbnormalPayOrder != null) { |
| | | tAbnormalPayOrder.setPayStatus(2); |
| | | tAbnormalPayOrder.setPayTime(new Date()); |
| | | abnormalPayOrderMapper.updateById(tAbnormalPayOrder); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | private Integer responsibilityType; |
| | | |
| | | public Integer getResponsibilityType() { |
| | | return responsibilityType; |
| | | } |
| | | |
| | | public void setResponsibilityType(Integer responsibilityType) { |
| | | this.responsibilityType = responsibilityType; |
| | | } |
| | | |
| | | public Integer getPromotion() { |
| | | return promotion; |
| | | } |
| | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | private TAbnormalPayOrderMapper abnormalPayOrderMapper; |
| | | @Autowired |
| | | private ITaxiCardPaymentService taxiCardPaymentService; |
| | | @Autowired |
| | |
| | | this.baseMapper.updateById(orderPrivateCar); |
| | | } |
| | | } |
| | | |
| | | // 是否异常订单 |
| | | if (orderPrivateCar.getResponsibilityType() !=null && orderPrivateCar.getResponsibilityType() >2) { |
| | | TAbnormalPayOrder tAbnormalPayOrder = abnormalPayOrderMapper.selectList(new EntityWrapper<TAbnormalPayOrder>().eq("type", 1).eq("orderNum", orderPrivateCar.getOrderNum())).stream().findFirst().orElse(null); |
| | | if (tAbnormalPayOrder != null) { |
| | | tAbnormalPayOrder.setPayStatus(2); |
| | | tAbnormalPayOrder.setPayTime(new Date()); |
| | | abnormalPayOrderMapper.updateById(tAbnormalPayOrder); |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.TAbnormalPayOrder; |
| | | |
| | | public interface TAbnormalPayOrderMapper extends BaseMapper<TAbnormalPayOrder> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.TAbnormalPayOrderMapper"> |
| | | |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.Version; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 追偿订单 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-07-21 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_abnormal_pay_order") |
| | | public class TAbnormalPayOrder extends Model<TAbnormalPayOrder> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 1快车 2跨城 3出租车 4顺风车 |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 订单号 |
| | | */ |
| | | private String orderNum; |
| | | private Date createTime; |
| | | /** |
| | | * 下单人id |
| | | */ |
| | | private Integer userId; |
| | | /** |
| | | * 1未支付 2已支付 |
| | | */ |
| | | private Integer payStatus; |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | private Date payTime; |
| | | /** |
| | | * 支付金额 |
| | | */ |
| | | private BigDecimal payMoney; |
| | | /** |
| | | * 乘车人 |
| | | */ |
| | | private String passengers; |
| | | /** |
| | | * 乘车人手机 |
| | | */ |
| | | private String passengersPhone; |
| | | private Date insertTime; |
| | | /** |
| | | * 公司id |
| | | */ |
| | | private Integer companyId; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
| | |
| | | * @param code |
| | | * @return |
| | | */ |
| | | ResultUtil<LoginWarpper> captchaLogin(String phone, String code, String registIp, String registAreaCode,String loginType,Integer driverId) throws Exception; |
| | | ResultUtil<LoginWarpper> captchaLogin(String phone, String code, String registIp, String registAreaCode,String loginType) throws Exception; |
| | | |
| | | /** |
| | | * 手机一键登录 |
| | |
| | | private PayMoneyUtil payMoneyUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private TDriverPromotionActivityService driverPromotionActivityService; |
| | | |
| | | |
| | | @Value("${callbackPath}") |
| | | private String callbackPath; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public synchronized ResultUtil<LoginWarpper> captchaLogin(String phone, String code, String registIp, String registAreaCode,String loginType,Integer driverId) throws Exception { |
| | | public synchronized ResultUtil<LoginWarpper> captchaLogin(String phone, String code, String registIp, String registAreaCode,String loginType) throws Exception { |
| | | UserInfo userInfo = userInfoMapper.queryByPhone(phone); |
| | | String nickName = null; |
| | | if (null == userInfo) { |
| | |
| | | }else { |
| | | userInfo.setCompanyId(1); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 是否需要绑定司机 |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last(" limit 1")); |
| | | if(tDriverPromotionActivity!=null){ |
| | | Integer bindingDays = tDriverPromotionActivity.getBindingDays(); |
| | | // 当前时间+绑定天数 |
| | | Date endTime = DateUtils.addDays(new Date(), bindingDays); |
| | | userInfo.setBindDriverId(driverId); |
| | | userInfo.setBindExpireDate(endTime); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | @Override |
| | | public synchronized ResultUtil<LoginWarpper> captchaLogin(String phone, String code, Integer uid, Integer type, Integer userType,String loginType) throws Exception { |
| | | ResultUtil<LoginWarpper> resultUtil = this.captchaLogin(phone, code, null, null,loginType,null); |
| | | ResultUtil<LoginWarpper> resultUtil = this.captchaLogin(phone, code, null, null,loginType); |
| | | if(resultUtil.getCode() == 200 && null != uid){ |
| | | if(type == 2){//司机分享 |
| | | Driver driver = driverMapper.selectById(uid); |
| | |
| | | if(null == userInfo){ |
| | | return ResultUtil.error("获取用户信息失败"); |
| | | } |
| | | return this.captchaLogin(userInfo.get("phone"), "1234", null, registAreaCode, loginType,null); |
| | | return this.captchaLogin(userInfo.get("phone"), "1234", null, registAreaCode, loginType); |
| | | }else{ |
| | | return ResultUtil.error(jsonObject.getString("msg")); |
| | | } |
| | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | private Integer responsibilityType; |
| | | |
| | | public Integer getResponsibilityType() { |
| | | return responsibilityType; |
| | | } |
| | | |
| | | public void setResponsibilityType(Integer responsibilityType) { |
| | | this.responsibilityType = responsibilityType; |
| | | } |
| | | |
| | | public Integer getPromotionDriverId() { |
| | | return promotionDriverId; |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.specialTrain.dao.OrderPrivateCarMapper; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.dao.RegionMapper; |
| | | import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper; |
| | | import com.stylefeng.guns.modular.system.dao.SysIntegralMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserActivityDiscount1Mapper; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.vo.UnPayOrderVO; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | |
| | | private IDriverServiceService driverServiceService; |
| | | |
| | | @Autowired |
| | | private GDFalconUtil gdFalconUtil; |
| | | private TAbnormalPayOrderMapper abnormalPayOrderMapper; |
| | | |
| | | @Autowired |
| | | private IOrderPrivateCarService orderPrivateCarService; |
| | |
| | | this.baseMapper.updateById(orderTaxi); |
| | | } |
| | | } |
| | | // 是否异常订单 |
| | | if (orderTaxi.getResponsibilityType() !=null && orderTaxi.getResponsibilityType() >2) { |
| | | TAbnormalPayOrder tAbnormalPayOrder = abnormalPayOrderMapper.selectList(new EntityWrapper<TAbnormalPayOrder>().eq("type", 2).eq("orderNum", orderTaxi.getOrderNum())).stream().findFirst().orElse(null); |
| | | if (tAbnormalPayOrder != null) { |
| | | tAbnormalPayOrder.setPayStatus(2); |
| | | tAbnormalPayOrder.setPayTime(new Date()); |
| | | abnormalPayOrderMapper.updateById(tAbnormalPayOrder); |
| | | } |
| | | } |
| | | } |
| | | } |