puzhibing
2026-04-24 fd57d8b98cec959ee82a79fa34cbbdc81a0cb514
修改bug
10个文件已修改
105 ■■■■■ 已修改文件
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpAppUserCouponServiceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/model/account/XpOperationsUser.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/model/maintenance/XpCruiseCheckInRule.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/model/operation/XpActicityStrategy.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/dto/XpCruiseCheckInRuleListPageDto.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/model/vo/AppXpCruiseCheckInLocationVo.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/vo/XpCruiseCheckInRuleListPage.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/resources/mapper/maintenance/XpCruiseCheckInRuleMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserController.java
@@ -11,10 +11,13 @@
import com.xiaopeng.account.model.dto.XpOperationsUserDTO;
import com.xiaopeng.account.model.query.XpOperationsUserPageQuery;
import com.xiaopeng.account.model.query.XpOperationsUserQuery;
import com.xiaopeng.account.service.ISysRoleService;
import com.xiaopeng.account.service.IXpOperationsUserService;
import com.xiaopeng.account.service.IXpQualificationAuditService;
import com.xiaopeng.api.dto.account.XpOperationsUserQueryDTO;
import com.xiaopeng.api.feignClient.vehicleConvoy.XpFleetClient;
import com.xiaopeng.api.model.account.SysRole;
import com.xiaopeng.api.model.account.XpOperationsRole;
import com.xiaopeng.api.model.account.XpOperationsUser;
import com.xiaopeng.api.model.account.XpQualificationAudit;
import com.xiaopeng.api.model.vehicleConvoy.XpFleet;
@@ -64,6 +67,9 @@
    @Resource
    private IXpQualificationAuditService xpQualificationAuditService;
    @Resource
    private ISysRoleService sysRoleService;
    @Autowired
    public XpOperationsUserController(IXpOperationsUserService xpOperationsUserService,
                                      XpOperationsRoleMapper xpOperationsRoleMapper,
@@ -103,7 +109,11 @@
     */
    @GetMapping("/logan/inner/xpOperationsUser/queryById")
    R<XpOperationsUser> queryById(@RequestParam Long id) {
        return R.ok(xpOperationsUserService.getById(id));
        XpOperationsUser operationsUser = xpOperationsUserService.getById(id);
        XpOperationsRole operationsUserId = xpOperationsRoleMapper.selectOne(new QueryWrapper<XpOperationsRole>().eq("operations_user_id", id));
        SysRole sysRole = sysRoleService.getById(operationsUserId.getRoleId());
        operationsUser.setRoleName(sysRole.getRoleName());
        return R.ok();
    }
    /**
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpAppUserCouponServiceImpl.java
@@ -45,6 +45,7 @@
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
@@ -541,19 +542,42 @@
            vo.setCouponName(data.getCouponName());
            vo.setCouponDesc(data.getCouponDescription());
            vo.setEndTime(xpAppUserCoupon.getExpirationTime().toString());
            Integer expireRules = acticityStrategy.getExpireRules();
            vo.setUnavailable("");
            vo.setStackable("");
            Integer stackedUsage = acticityStrategy.getStackedUsage();
            if(1 == stackedUsage){
                vo.setStackable("可叠加:");
            }else{
                vo.setStackable("不可叠加:与其他优惠券互斥,不可同时使用");
            }
            Integer effectiveRules = acticityStrategy.getEffectiveRules();
            if(1 == effectiveRules){
                vo.setEffectAndInvalid("");
                if(1 == expireRules){
                    vo.setEffectAndInvalid("生效失效:领取后立即生效,未使用、次日零点失效。");
                }
                if(2 == expireRules){
                    Integer expireDays = acticityStrategy.getExpireDays();
                    vo.setEffectAndInvalid("生效失效:领取后立即生效,未使用、" + expireDays + "天后失效。");
                }
                if(3 == expireRules){
                    String format1 = acticityStrategy.getExpireDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
                    vo.setEffectAndInvalid("生效失效:领取后立即生效,未使用、" + format1 + "失效。");
                }
            }
            if(2 == effectiveRules){
                String format = acticityStrategy.getEffectiveDays().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
                if(1 == expireRules){
                    vo.setEffectAndInvalid("生效失效:领取后" + format + "生效,未使用、次日零点失效。");
                }
                if(2 == expireRules){
                    Integer expireDays = acticityStrategy.getExpireDays();
                    vo.setEffectAndInvalid("生效失效:领取后" + format + "生效,未使用、" + expireDays + "天后失效。");
                }
                if(3 == expireRules){
                    String format1 = acticityStrategy.getExpireDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
                    vo.setEffectAndInvalid("生效失效:领取后" + format + "生效,未使用、" + format1 + "失效。");
                }
            }
            if(3 == effectiveRules){
            }
            if(orderMoney.compareTo(data.getConditionalAmount()) >= 0){
                usableCouponList.add(vo);
            }else{
xp-robotaxi-api/src/main/java/com/xiaopeng/api/model/account/XpOperationsUser.java
@@ -73,5 +73,8 @@
    @ApiModelProperty(value = "设备类型 1-Android 2-iOS")
    private Integer deviceType;
    @ApiModelProperty(value = "人员角色名称")
    @TableField(exist = false)
    private String roleName;
}
xp-robotaxi-api/src/main/java/com/xiaopeng/api/model/maintenance/XpCruiseCheckInRule.java
@@ -28,6 +28,13 @@
    @TableField("name")
    @ApiModelProperty(value = "规则名称")
    private String name;
    /**
     * 运维人id
     */
    @TableField("operations_user_id")
    @ApiModelProperty(value = "运维人id")
    private Long operationsUserId;
    /**
     * 任务开始时间
     */
xp-robotaxi-api/src/main/java/com/xiaopeng/api/model/operation/XpActicityStrategy.java
@@ -46,7 +46,7 @@
    @ApiModelProperty(value = "发放规则json,[]=本券使用后循环发放, [1,2,3]=指定优惠券使用后发放(优惠券id数组)")
    private String distributionAfterUse;
    @ApiModelProperty(value = "生效规则(1=次日0点失效,2=领取后指定日期生效)")
    @ApiModelProperty(value = "生效规则(1=领取后生效,2=领取后指定日期生效)")
    private Integer effectiveRules;
    @ApiModelProperty(value = "领取后指定日期生效")
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/dto/XpCruiseCheckInRuleListPageDto.java
@@ -17,5 +17,5 @@
    @ApiModelProperty("手机号")
    private String phoneNumber;
    private List<Integer> ids;
    private List<Long> operationsUserIds;
}
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/model/vo/AppXpCruiseCheckInLocationVo.java
@@ -17,8 +17,8 @@
    private String checkInTime;
    @ApiModelProperty("是否已打卡(0=否,1=是)")
    private Integer checkIn;
    @ApiModelProperty("打卡结果(1=正常打卡,2=超时打卡)")
    private Integer checkInResult;
    @ApiModelProperty("打卡结果(1=正常打卡,2=超时打卡,3=未打卡)")
    private Integer checkInResult = 3;
    @ApiModelProperty("经度")
    private BigDecimal lon;
    @ApiModelProperty("纬度")
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
@@ -64,8 +64,6 @@
    @Resource
    private XpOperationUserClient xpOperationsUserClient;
    @Resource
    private XpCruiseCheckInRuleOperationsUserMapper xpCruiseCheckInRuleOperationsUserMapper;
@@ -73,7 +71,7 @@
    @Override
    public AppXpCruiseCheckInRuleVo getMyXpCruiseCheckInRule(Long uid) {
        List<XpCruiseCheckInRule> list = this.list(new LambdaQueryWrapper<XpCruiseCheckInRule>().eq(XpCruiseCheckInRule::getDeleted, 0)
                .last(" and (now() BETWEEN start_time and end_time or cyclic_mode = 1)"));
                .eq(XpCruiseCheckInRule::getOperationsUserId, uid).last(" and (now() BETWEEN start_time and end_time or cyclic_mode = 1)"));
        if(list.isEmpty()){
            return null;
        }
@@ -284,12 +282,17 @@
            List<XpOperationsUser> data = xpOperationsUserClient.getByPhoneNumber(dto.getPhoneNumber()).getData();
            ids.addAll(data.stream().map(XpOperationsUser::getId).collect(Collectors.toList()));
        }
        if(!ids.isEmpty()){
            List<XpCruiseCheckInRuleOperationsUser> operationsUserId = xpCruiseCheckInRuleOperationsUserMapper.selectList(new QueryWrapper<XpCruiseCheckInRuleOperationsUser>().in("operations_user_id", ids));
            List<Integer> ruleIds = operationsUserId.stream().map(XpCruiseCheckInRuleOperationsUser::getCruiseCheckInRuleId).collect(Collectors.toList());
            dto.setIds(ruleIds);
        }
        dto.setOperationsUserIds(ids);
        List<XpCruiseCheckInRuleListPage> xpCruiseCheckInRuleListPage = this.baseMapper.getXpCruiseCheckInRuleListPage(pageInfo, dto);
        for (XpCruiseCheckInRuleListPage cruiseCheckInRuleListPage : xpCruiseCheckInRuleListPage) {
            long count = xpCruiseCheckInRuleLocationService.count(new LambdaQueryWrapper<XpCruiseCheckInRuleLocation>()
                    .eq(XpCruiseCheckInRuleLocation::getCruiseCheckInRuleId, cruiseCheckInRuleListPage.getId()));
            cruiseCheckInRuleListPage.setPointNum(count);
            XpOperationsUser xpOperationsUser = xpOperationsUserClient.queryById(cruiseCheckInRuleListPage.getOperationsUserId()).getData();
            cruiseCheckInRuleListPage.setUserName(xpOperationsUser.getNickName());
            cruiseCheckInRuleListPage.setPhone(xpOperationsUser.getPhoneNumber());
            cruiseCheckInRuleListPage.setRoleName(xpOperationsUser.getRoleName());
        }
        return xpCruiseCheckInRuleListPage;
    }
@@ -307,17 +310,12 @@
        XpCruiseCheckInRule xpCruiseCheckInRule = new XpCruiseCheckInRule();
        BeanUtils.copyProperties(dto, xpCruiseCheckInRule);
        xpCruiseCheckInRule.setDeleted(false);
        xpCruiseCheckInRule.setOperationsUserId(dto.getRelationId());
        this.save(xpCruiseCheckInRule);
        dto.getPoints().forEach(s->{
            s.setCruiseCheckInRuleId(xpCruiseCheckInRule.getId());
        });
        xpCruiseCheckInRuleLocationService.saveBatch(dto.getPoints());
        Long relationId = dto.getRelationId();
        XpCruiseCheckInRuleOperationsUser xpCruiseCheckInRuleOperationsUser = new XpCruiseCheckInRuleOperationsUser();
        xpCruiseCheckInRuleOperationsUser.setCruiseCheckInRuleId(xpCruiseCheckInRule.getId());
        xpCruiseCheckInRuleOperationsUser.setOperationsUserId(relationId);
        xpCruiseCheckInRuleOperationsUserMapper.insert(xpCruiseCheckInRuleOperationsUser);
    }
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/vo/XpCruiseCheckInRuleListPage.java
@@ -12,11 +12,13 @@
    @ApiModelProperty("打卡规则名称")
    private String name;
    @ApiModelProperty("关联点位数量")
    private Integer pointNum;
    private Long pointNum;
    @ApiModelProperty("执行人员")
    private String userName;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty("人员角色")
    private String roleName;
    private Long operationsUserId;
}
xp-robotaxi-maintenance-boot/src/main/resources/mapper/maintenance/XpCruiseCheckInRuleMapper.xml
@@ -4,12 +4,13 @@
    <select id="getXpCruiseCheckInRuleListPage" resultType="com.xiaopeng.maintenance.vo.XpCruiseCheckInRuleListPage">
        select id,`name` from xp_cruise_check_in_rule where is_deleted = 0
        select id,`name`, operations_user_id AS operationsUserId from xp_cruise_check_in_rule where is_deleted = 0
        <if test="null != dto.name and dto.name != ''">
            and `name` like concat('%', #{dto.name}, '%')
        </if>
        <if test="null != dto.ids and dto.ids.size() > 0">
            <foreach collection="dto.ids" item="id" open="and id in (" separator="," close=")">
        <if test="null != dto.operationsUserIds and dto.operationsUserIds() > 0">
            and operations_user_id in
            <foreach collection="dto.operationsUserIds" item="id" open="and id in (" separator="," close=")">
                #{id}
            </foreach>
        </if>