| | |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.padApi.dto.PadServiceListDto; |
| | | import com.matrix.system.padApi.dto.PadSignServiceDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.assertj.core.util.Arrays; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取用户所有可用的项目和套餐", notes = "获取用户所有可用的项目和套餐") |
| | | @GetMapping(value = "/getUserProjInfo/{id}") |
| | | @GetMapping(value = "/getUserProjInfo/{vipId}") |
| | | public AjaxResult getUserProjInfo(@PathVariable("vipId")Long vipId) { |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); |
| | | |
| | |
| | | if(ObjectUtil.isNotEmpty(orderListDto.getClosureTime())){ |
| | | projService.setClosureTime(orderListDto.getClosureTime()); |
| | | } |
| | | if(ObjectUtil.isNotEmpty(orderListDto.getVipId())){ |
| | | projService.setVipId(orderListDto.getVipId()); |
| | | } |
| | | if(ObjectUtil.isNotEmpty(orderListDto.getQueryKey())){ |
| | | projService.setQueryKey(orderListDto.getQueryKey()); |
| | | } |
| | | if(StrUtil.isNotEmpty(orderListDto.getState())){ |
| | | projService.setState(orderListDto.getState()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(projService); |
| | | List<SysProjServices> dataList = projServicesSerivce.findInPage(projService, pageVo); |
| | |
| | | } |
| | | SysProjServices newSysProjServices = sysProjServicesService.addSysProjServices(sysProjServices); |
| | | if (newSysProjServices != null) { |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(newSysProjServices)); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("下单成功!"); |
| | | result.putInMap("newSysProjServices", newSysProjServices); |
| | | return result; |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "下单失败!"); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 设置客户签名 |
| | | */ |
| | | @ApiOperation(value = "设置客户签名", notes = "设置客户签名") |
| | | @PostMapping(value = "/signService") |
| | | public AjaxResult signService(@RequestBody PadSignServiceDto padSignServiceDto) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(padSignServiceDto.getId()); |
| | | services.setSignPic(padSignServiceDto.getSignPic()); |
| | | int i = sysProjServicesService.signService(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "签名成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "签名失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 设置服务单划扣成功 |
| | | */ |
| | | @ApiOperation(value = "设置服务单划扣成功", notes = "设置服务单划扣成功") |