| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.applets.model.dtos.IDTO; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; |
| | | import com.panzhihua.common.service.property.PropertyService; |
| | | import com.panzhihua.common.utlis.RSAUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | comPropertyRepairVO.setCreateTime(DateUtil.date()); |
| | | comPropertyRepairVO.setCreateBy(this.getUserId()); |
| | | comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.dcl); |
| | | try { |
| | | comPropertyRepairVO.setRepairName(RSAUtils.decrypt(comPropertyRepairVO.getRepairName(), Constants.PRIVATE_KEY)); |
| | | comPropertyRepairVO.setRepairPhone(RSAUtils.decrypt(comPropertyRepairVO.getRepairPhone(), Constants.PRIVATE_KEY)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return R.fail("密文解密失败"); |
| | | } |
| | | return this.propertyService.comPropertyRepairInsert(comPropertyRepairVO); |
| | | } |
| | | |
| | |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("详情接口") |
| | | @PostMapping("/detail") |
| | | public R selectDetail(@RequestBody IDTO idto) { |
| | | return this.propertyService.comPropertyRepairSelectOne(idto.getId()); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("详情接口") |
| | | @GetMapping("/{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.propertyService.comPropertyRepairSelectOne(id); |
| | | } |
| | | |