Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/JiaDianHuiShou
| | |
| | | @ApiModelProperty("订单完成结束时间") |
| | | private String completeTimeEnd; |
| | | private String[] siteIds; |
| | | |
| | | @ApiModelProperty(value = "完工时间排序 1=升序 2=降序") |
| | | private Integer completeType ; |
| | | |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @ApiOperation(value = "根据类型获取注册协议、隐私政策、司机操作指南", tags = {"后台-隐私政策/司机操作指南"}) |
| | | @GetMapping(value = "/dataInfo") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "查询类型(0注册协议;1:隐私政策;2:司机操作指导)", name = "type", dataType = "Integer", required = true) |
| | | @ApiImplicitParam(value = "查询类型(0注册协议;1:隐私政策;2:司机操作指导;3:服务规则管理)", name = "type", dataType = "Integer", required = true) |
| | | }) |
| | | public R<Agreement> dataInfo(@RequestParam("type") Integer type) { |
| | | return agreementService.dataInfo(type); |
| | |
| | | return agreementService.saveData(agreement); |
| | | } |
| | | |
| | | /** |
| | | * 修改服务规则管理 |
| | | * |
| | | * @param agreement 修改服务规则管理 |
| | | */ |
| | | @RequiresPermissions(value = {"advantage_update", "operate_save"}, logical = Logical.OR) |
| | | @ApiOperation(value = "修改服务规则管理", tags = {"后台-修改服务规则管理[2.0]"}) |
| | | @PostMapping(value = "/updateAgree") |
| | | public R<String> updateAgree(@RequestBody Agreement agreement) { |
| | | if(Objects.isNull(agreement.getContentType()) || agreement.getContentType()!=3){ |
| | | return R.fail("服务规则管理类型异常"); |
| | | } |
| | | agreementService.updateById(agreement); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.admin.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.admin.entity.Cover; |
| | | import com.ruoyi.admin.entity.Problem; |
| | | import com.ruoyi.admin.service.CoverService; |
| | | import com.ruoyi.admin.service.ProblemService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 背景图管理 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-05-29 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/cover") |
| | | @Api(tags = {"后台-系统设置-背景图管理"}) |
| | | public class CoverController { |
| | | |
| | | @Resource |
| | | private CoverService coverService; |
| | | |
| | | /** |
| | | * 背景图管理查询 |
| | | */ |
| | | @RequiresPermissions("system_cover") |
| | | @ApiOperation(value = "背景图管理查询", tags = {"后台-系统设置-背景图管理查询[2.0]","小程序-背景图管理查询[2.0]"}) |
| | | @GetMapping(value = "/getCoverDetail") |
| | | public R<Cover> getCoverDetail() { |
| | | return R.ok(coverService.getById(1)); |
| | | } |
| | | |
| | | /** |
| | | * 背景图管理修改 |
| | | */ |
| | | @RequiresPermissions("system_cover_update") |
| | | @ApiOperation(value = "背景图管理修改", tags = {"后台-系统设置-背景图管理修改[2.0]"}) |
| | | @PostMapping(value = "/updateCover") |
| | | public R<String> updateCover(@RequestBody Cover cover) { |
| | | coverService.updateById(cover); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | @ApiOperation(value = "地图统计", tags = {"后台-订单管理-地图统计"}) |
| | | @ApiOperation(value = "地图统计", tags = {"后台-订单管理-地图统计[2.0]"}) |
| | | @PostMapping(value = "/map/works") |
| | | public R<List<MasterWorker>> map(String cityCode,String name) { |
| | | |
| | |
| | | @NotBlank |
| | | private String content; |
| | | |
| | | @ApiModelProperty("0注册协议;1:隐私政策;2:司机操作指导") |
| | | @ApiModelProperty("0注册协议;1:隐私政策;2:司机操作指导;3:服务规则管理") |
| | | @TableField("content_type") |
| | | private Integer contentType; |
| | | |
New file |
| | |
| | | package com.ruoyi.admin.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.constant.Constants; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 背景图管理 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-05-29 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("t_cover") |
| | | @ApiModel(value = "Cover对象", description = "背景图表") |
| | | public class Cover extends BaseEntity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id",type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("海报封面") |
| | | @TableField("poster_cover") |
| | | private String posterCover; |
| | | |
| | | @ApiModelProperty("抽奖封面") |
| | | @TableField("prize_draw_cover") |
| | | private String prizeDrawCover; |
| | | |
| | | } |
| | |
| | | @TableField("rotate") |
| | | private String rotate; |
| | | |
| | | @ApiModelProperty("回收补贴价") |
| | | @TableField("sys_recovery_serve") |
| | | private BigDecimal sysRecoveryServe; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.admin.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.admin.entity.Cover; |
| | | import com.ruoyi.admin.entity.User; |
| | | import com.ruoyi.admin.vo.UserTrendsVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 背景图管理 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-05-29 |
| | | */ |
| | | @Mapper |
| | | public interface CoverMapper extends BaseMapper<Cover> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.admin.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.admin.entity.Cover; |
| | | import com.ruoyi.admin.entity.Problem; |
| | | |
| | | /** |
| | | * <p> |
| | | * 背景图管理 服务类 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-05-29 |
| | | */ |
| | | public interface CoverService extends IService<Cover> { |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | public R<Agreement> dataInfo(Integer type) { |
| | | if (!Constants.ZERO.equals(type) && !Constants.ONE.equals(type) && !Constants.TWO.equals(type)) { |
| | | return R.fail("查询类型异常!(0注册协议;1:隐私政策;2:司机操作指导)"); |
| | | if (!Constants.ZERO.equals(type) && !Constants.ONE.equals(type) && !Constants.TWO.equals(type) && !Constants.THREE.equals(type)) { |
| | | return R.fail("查询类型异常!(0注册协议;1:隐私政策;2:司机操作指导;3:服务规则管理)"); |
| | | } |
| | | return R.ok(lambdaQuery().eq(Agreement::getContentType, type).one()); |
| | | } |
New file |
| | |
| | | package com.ruoyi.admin.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.admin.entity.Cover; |
| | | import com.ruoyi.admin.entity.DataAddress; |
| | | import com.ruoyi.admin.mapper.CoverMapper; |
| | | import com.ruoyi.admin.mapper.DataAddressMapper; |
| | | import com.ruoyi.admin.service.CoverService; |
| | | import com.ruoyi.admin.service.DataAddressService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 背景图管理 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-07-02 |
| | | */ |
| | | @Service |
| | | public class CoverServiceImpl extends ServiceImpl<CoverMapper, Cover> implements CoverService { |
| | | |
| | | } |
| | |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | return R.ok(orderService.updateById(order)); |
| | | } |
| | | |
| | | /** |
| | | * 批量修改订单时间 |
| | | * @param ids 站点多条id拼接 |
| | | */ |
| | | @ApiOperation(value = "订单列表-批量修改订单时间", tags = {"后台-订单管理[2.0]"}) |
| | | @GetMapping(value = "/batchUpdateTime") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "多个id ',' 拼接", name = "ids", dataType = "String", required = true), |
| | | @ApiImplicitParam(value = "修改上门时间", name = "time", dataType = "String", required = true), |
| | | }) |
| | | public R<Boolean> batchUpdateTime(@RequestParam("ids") String ids, @RequestParam("time") String time) { |
| | | List<String> idList = Arrays.stream(ids.split(",")).collect(Collectors.toList()); |
| | | List<Order> list = orderService.lambdaQuery().in(Order::getId, idList).list(); |
| | | if (!CollectionUtils.isEmpty(list)) { |
| | | list.forEach(data -> data.setTime(time)); |
| | | orderService.updateBatchById(list); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id批量删除站点 |
| | |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by o.createTime desc |
| | | <if test="data.completeType != null and data.completeType == 1"> |
| | | order by o.complete_time |
| | | </if> |
| | | <if test="data.completeType != null and data.completeType == 2"> |
| | | order by o.complete_time desc |
| | | </if> |
| | | <if test="data.completeType == null"> |
| | | order by o.createTime desc |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | return update ? R.ok("修改成功!") : R.fail("修改失败!"); |
| | | } |
| | | |
| | | /** |
| | | * 师傅端-修改性别 |
| | | */ |
| | | @ApiOperation(value = "修改师傅实时位置", tags = {"师傅端-个人中心[2.0]"}) |
| | | @GetMapping(value = "/updateLonLat") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "经度", name = "workerLon", dataType = "String", required = true), |
| | | @ApiImplicitParam(value = "纬度", name = "workerLat", dataType = "String", required = true), |
| | | }) |
| | | public R<String> updateLonLat(@RequestParam("workerLon") String workerLon, @RequestParam("workerLat") String workerLat) { |
| | | LoginUserInfo loginWorker = tokenService.getLoginUserByWorker(); |
| | | if (null == loginWorker) { |
| | | return R.loginExpire("登录已失效!"); |
| | | } |
| | | boolean update = masterWorkerService.lambdaUpdate() |
| | | .set(MasterWorker::getWorkerLon, workerLon) |
| | | .set(MasterWorker::getWorkerLat, workerLat) |
| | | .eq(MasterWorker::getId, loginWorker.getUserid()) |
| | | .eq(MasterWorker::getIsDelete, 0).update(); |
| | | return update ? R.ok("修改成功!") : R.fail("修改失败!"); |
| | | } |
| | | |
| | | } |
| | |
| | | // |
| | | // } |
| | | |
| | | @ApiOperation(value = "上传经纬度", tags = {"师傅端-首页"}) |
| | | @ApiOperation(value = "上传经纬度", tags = {"师傅端-首页[2.0]"}) |
| | | @GetMapping(value = "/putLocation") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "workId", name = "workId", dataType = "int", required = true), |
| | |
| | | public R<Object> orderNavigation(@RequestParam Integer workId, @RequestParam String longitude, |
| | | @RequestParam String latitude) { |
| | | Result<String> address = GaoDeMapUtil.getCityCode(longitude, latitude); |
| | | System.err.println(address.getDatas()); |
| | | String cityCode = address.getDatas(); |
| | | System.err.println("城市code"+cityCode); |
| | | String provinceCode = cityCode.substring(0, 2) + "0000"; |
| | | System.err.println("省份code"+provinceCode); |
| | | Set<Integer> strings = new HashSet<>(); |
| | | strings.add(workId); |
| | | redisService.setCacheSet("workerLocation:"+address.getDatas()+":", strings); |
| | | redisService.setCacheSet("workerLocation:"+cityCode+":", strings); |
| | | redisService.setCacheSet("workerLocation:"+provinceCode+":", strings); |
| | | redisService.setCacheObject("work:"+workId+":", longitude+","+latitude); |
| | | return R.ok(); |
| | | |
| | |
| | | @ApiModelProperty("是否启用 0未启用;1已启用") |
| | | @TableField("is_enable") |
| | | private Integer isEnable; |
| | | |
| | | @ApiModelProperty("经度") |
| | | @TableField("worker_lon") |
| | | private String workerLon; |
| | | @ApiModelProperty("纬度") |
| | | @TableField("worker_lat") |
| | | private String workerLat; |
| | | } |