| | |
| | | } |
| | | |
| | | @PostMapping("/v1/api/appUserCoupon/pageList") |
| | | @ApiOperation(value = "用户优惠券列表",tags = {"管理后台-用户优惠券列表"},response = XpAppUserCouponListVo.class) |
| | | @ApiOperation(value = "白名单用户优惠券列表",tags = {"管理后台-白名单-用户优惠券列表"},response = XpAppUserCouponListVo.class) |
| | | public R<PageInfo<XpAppUserCouponListVo>> pageList(@RequestBody XpAppUserCouponPageListQuery query) { |
| | | |
| | | if(StrUtil.isNotBlank(query.getActicityName()) ){ |
| | |
| | | return R.ok(pageList); |
| | | } |
| | | |
| | | @PostMapping("/v1/api/appUserCoupon/deleteByIds") |
| | | @ApiOperation(value = "根据ids删除用户优惠券", tags = {"管理后台-白名单-删除用户优惠券"}) |
| | | public R<Boolean> deleteByIds(@RequestBody List<Long> ids) { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return R.fail("ID列表不能为空"); |
| | | } |
| | | boolean result = xpAppUserCouponService.removeByIds(ids); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @PostMapping("/logan/inner/appUserCoupon/getUserCoupon") |
| | | public R<UserCouponVo> getUserCoupon(@RequestBody GetUserCouponDto dto) { |
| | | // String phone ="18888888888"; |
| | |
| | | <select id="pageList" resultType="com.xiaopeng.account.model.vo.XpAppUserCouponListVo"> |
| | | select a.* |
| | | from xp_app_user_coupon as a |
| | | where a.is_deleted = 0 and a.app_user_id = #{appUserId} |
| | | where a.is_deleted = 0 and a.app_user_id = #{query.appUserId} |
| | | <if test="query.createTimeStart != null "> |
| | | a.create_time >= #{query.createTimeStart} |
| | | </if> |
| | |
| | | @TableId(value = "id", type = IdType.NONE) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "事故类型id") |
| | | private String errorTypeId; |
| | | |
| | | @ApiModelProperty(value = "任务编号") |
| | | private String taskCode; |
| | | |
| | |
| | | //1:车辆检查,2:车辆充电,3:车辆整备,4:整备洗车,5:车辆维修,6:车辆保养,7:车辆保险到期,8:车辆年检到期9:车辆运营资质到期 |
| | | @ApiModelProperty(value = "任务类型id 任务类别为2时对应数据字典,多个逗号分割,为1的时候 枚举1车辆检查 2车辆充电 3车辆整备 4整备洗车 5车辆维修 6车辆保养 7车辆保险到期 8车辆年检到期 9车辆运营资质到期") |
| | | private String taskTypeId; |
| | | |
| | | @ApiModelProperty(value = "事故类型id") |
| | | private String accidentTypeId; |
| | | |
| | | @ApiModelProperty(value = "任务紧急程度 0=P0 1=P1 2=P2 3=P3") |
| | | private Integer taskUrgencyLevel; |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | |
| | | @ApiModelProperty(value = "场站状态 0=草稿 1=待测试 2=测试中 3=测试不通过 4=可运营 5=待生效 6=启用中 7=已停用 8=失效") |
| | | private Integer status; |
| | | |
| | | |
| | | public String getStatusName() { |
| | | if(status != null){ |
| | | if(status == 0){ |
| | | return "草稿"; |
| | | }else if(status == 1){ |
| | | return "待测试"; |
| | | } else if(status == 2){ |
| | | return "测试中"; |
| | | }else if(status == 3){ |
| | | return "测试未通过"; |
| | | }else if(status == 4){ |
| | | return "可运营"; |
| | | }else if(status == 5){ |
| | | return "待生效"; |
| | | }else if(status == 6){ |
| | | return "启用中"; |
| | | }else if(status == 7){ |
| | | return "已停用"; |
| | | }else if(status == 8){ |
| | | return "失效"; |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | @ApiModelProperty(value = "城市code") |
| | | private String cityCode; |
| | | |
| | |
| | | private String cityName; |
| | | |
| | | @ApiModelProperty(value = "所属电子围栏id") |
| | | @NotNull(message = "所属电子围栏id不能为空") |
| | | private Long electronicId; |
| | | |
| | | @ApiModelProperty(value = "所属运营区id") |
| | | @NotNull(message = "所属运营区id不能为空") |
| | | private Long electronicAreaId; |
| | | |
| | | @ApiModelProperty(value = "默认展示点位id") |
| | |
| | | @ApiModelProperty(value = "是否改价标识 0-否 1-是") |
| | | private Boolean changeMoneyFlag=false; |
| | | |
| | | @ApiModelProperty(value = "是否开启试运营(0=否,1=是)") |
| | | private Integer operateFree; |
| | | |
| | | |
| | | } |
| | |
| | | private Integer taskCategory; |
| | | |
| | | @ApiModelProperty(value = "事故类型") |
| | | private Long accidentTypeId; |
| | | private String errorTypeId; |
| | | |
| | | @ApiModelProperty(value = "任务类型") |
| | | private Long taskTypeId; |
| | |
| | | <result column="task_code" property="taskCode"/> |
| | | <result column="task_category" property="taskCategory"/> |
| | | <result column="task_type_id" property="taskTypeId"/> |
| | | <result column="error_type_id" property="errorTypeId"/> |
| | | <result column="task_urgency_level" property="taskUrgencyLevel"/> |
| | | <result column="task_description" property="taskDescription"/> |
| | | <result column="vehicle_location" property="vehicleLocation"/> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id |
| | | , task_code, task_category, end_time, expired_notice_sent, task_type_id, task_image, task_urgency_level, task_description, vehicle_location, vehicle_id, vehicle_lon, vehicle_lat, handle_user_id, handle_time, assignee_user_id, assignee_time, report_user_id, report_time, status, is_deleted, create_time, update_time, create_by, update_by |
| | | id, task_code, task_category, error_type_id ,end_time, expired_notice_sent, task_type_id, task_image, task_urgency_level, task_description, vehicle_location, vehicle_id, vehicle_lon, vehicle_lat, handle_user_id, handle_time, assignee_user_id, assignee_time, report_user_id, report_time, status, is_deleted, create_time, update_time, create_by, update_by |
| | | </sql> |
| | | <select id="workbench" resultType="com.xiaopeng.maintenance.model.vo.WorkBenchVO"> |
| | | select t1.*, |
| | |
| | | t.task_code AS taskCode, |
| | | t.task_category AS taskCategory, |
| | | t.task_type_id AS taskTypeId, |
| | | t.accident_type_id AS accidentTypeId, |
| | | t.error_type_id AS errorTypeId, |
| | | t.task_urgency_level AS taskUrgencyLevel, |
| | | t.task_description AS taskDescription, |
| | | t.vehicle_id AS vehicleId, |
| | |
| | | et.error_name AS accidentTypeName |
| | | FROM xp_task t |
| | | LEFT JOIN xp_vehicle v ON t.vehicle_id = v.id AND v.is_deleted = 0 |
| | | LEFT JOIN xp_error_type et ON t.accident_type_id = et.id |
| | | LEFT JOIN xp_error_type et ON t.error_type_id = et.id |
| | | WHERE t.is_deleted = 0 |
| | | AND t.reassignment_status = 1 |
| | | <if test="query.taskCategory != null"> |
| | | AND t.task_category = #{query.taskCategory} |
| | | </if> |
| | | <if test="query.accidentTypeId != null"> |
| | | AND t.accident_type_id = #{query.accidentTypeId} |
| | | <if test="query.errorTypeId != null"> |
| | | AND t.error_type_id = #{query.errorTypeId} |
| | | </if> |
| | | <if test="query.taskTypeId != null"> |
| | | AND t.task_type_id = #{query.taskTypeId} |
| | |
| | | public R<FileUploadVO> uploadOSS(@RequestParam("file") MultipartFile file) { |
| | | try { |
| | | // 上传并返回访问地址 |
| | | String fileName = file.getOriginalFilename(); |
| | | String prefix = fileName.substring(fileName.lastIndexOf(".")); |
| | | long fileSize = file.getSize(); |
| | | String fileId = UUID.randomUUID().toString(); |
| | | //上传文件 |
| | | aliOssService.uploadFile(file.getBytes(), fileId); |
| | | String downloadUrl = aliOssService.getDownloadUrl(fileId, fileName,true); |
| | | FileUploadVO fileUploadVO = new FileUploadVO(); |
| | | fileUploadVO.setId(fileId); |
| | | fileUploadVO.setName(fileName); |
| | | fileUploadVO.setUrl(downloadUrl); |
| | | |
| | | // String fileName = file.getOriginalFilename(); |
| | | // String prefix = fileName.substring(fileName.lastIndexOf(".")); |
| | | // long fileSize = file.getSize(); |
| | | // String fileId = UUID.randomUUID().toString(); |
| | | // //上传文件 |
| | | // aliOssService.uploadFile(file.getBytes(), fileId); |
| | | // String downloadUrl = aliOssService.getDownloadUrl(fileId, fileName,true); |
| | | // FileUploadVO fileUploadVO = new FileUploadVO(); |
| | | // fileUploadVO.setId(UUID.randomUUID().toString()); |
| | | // fileUploadVO.setName("测试.jpg"); |
| | | // fileUploadVO.setUrl("https://huishou-1323682843.cos.ap-nanjing.myqcloud.com/images/552a3a31-e4dd-4a28-8748-fd8b87dd3055.png"); |
| | | // fileUploadVO.setId(fileId); |
| | | // fileUploadVO.setName(fileName); |
| | | // fileUploadVO.setUrl(downloadUrl); |
| | | |
| | | FileUploadVO fileUploadVO = new FileUploadVO(); |
| | | fileUploadVO.setId(UUID.randomUUID().toString()); |
| | | fileUploadVO.setName("测试.jpg"); |
| | | fileUploadVO.setUrl("https://huishou-1323682843.cos.ap-nanjing.myqcloud.com/images/552a3a31-e4dd-4a28-8748-fd8b87dd3055.png"); |
| | | return R.ok(fileUploadVO); |
| | | } catch (Exception e) { |
| | | System.err.println("上传文件失败"+e); |
| | |
| | | public R<FileUploadVO> uploadOSS1(@RequestParam("file") MultipartFile file) { |
| | | try { |
| | | // 上传并返回访问地址 |
| | | String fileName = file.getOriginalFilename(); |
| | | String prefix = fileName.substring(fileName.lastIndexOf(".")); |
| | | long fileSize = file.getSize(); |
| | | String fileId = UUID.randomUUID().toString(); |
| | | //上传文件 |
| | | aliOssService.uploadFile(file.getBytes(), fileId); |
| | | String downloadUrl = aliOssService.getDownloadUrl(fileId, fileName,true); |
| | | FileUploadVO fileUploadVO = new FileUploadVO(); |
| | | fileUploadVO.setId(fileId); |
| | | fileUploadVO.setName(fileName); |
| | | fileUploadVO.setUrl(downloadUrl); |
| | | |
| | | // String fileName = file.getOriginalFilename(); |
| | | // String prefix = fileName.substring(fileName.lastIndexOf(".")); |
| | | // long fileSize = file.getSize(); |
| | | // String fileId = UUID.randomUUID().toString(); |
| | | // //上传文件 |
| | | // aliOssService.uploadFile(file.getBytes(), fileId); |
| | | // String downloadUrl = aliOssService.getDownloadUrl(fileId, fileName,true); |
| | | // FileUploadVO fileUploadVO = new FileUploadVO(); |
| | | // fileUploadVO.setId(UUID.randomUUID().toString()); |
| | | // fileUploadVO.setName("测试.jpg"); |
| | | // fileUploadVO.setUrl("https://huishou-1323682843.cos.ap-nanjing.myqcloud.com/images/552a3a31-e4dd-4a28-8748-fd8b87dd3055.png"); |
| | | // fileUploadVO.setId(fileId); |
| | | // fileUploadVO.setName(fileName); |
| | | // fileUploadVO.setUrl(downloadUrl); |
| | | |
| | | FileUploadVO fileUploadVO = new FileUploadVO(); |
| | | fileUploadVO.setId(UUID.randomUUID().toString()); |
| | | fileUploadVO.setName("测试.jpg"); |
| | | fileUploadVO.setUrl("https://huishou-1323682843.cos.ap-nanjing.myqcloud.com/images/552a3a31-e4dd-4a28-8748-fd8b87dd3055.png"); |
| | | return R.ok(fileUploadVO); |
| | | } catch (Exception e) { |
| | | System.err.println("上传文件失败"+e); |
| | |
| | | this.updateById(order); |
| | | } |
| | | res.setTime(new BigDecimal(order.getDuration() == null ? 0 : order.getDuration()).multiply(new BigDecimal(60)).setScale(0, RoundingMode.HALF_UP)); |
| | | XpSystemSetting xpSystemSetting = xpSystemSettingClient.getSystemSettingOne().getData(); |
| | | if(null != xpSystemSetting){ |
| | | res.setOperateFree(xpSystemSetting.getOperateFree()); |
| | | } |
| | | return R.ok(res); |
| | | } |
| | | |