diff --git a/src/main/java/com/gszc/controller/PcCustomV2Controller.java b/src/main/java/com/gszc/controller/PcCustomV2Controller.java index c370c2a..a9a23f5 100644 --- a/src/main/java/com/gszc/controller/PcCustomV2Controller.java +++ b/src/main/java/com/gszc/controller/PcCustomV2Controller.java @@ -3,15 +3,19 @@ package com.gszc.controller; import com.alibaba.fastjson.JSONObject; import com.gszc.build.Result; import com.gszc.build.ResultBuilder; +import com.gszc.entity.Custom; +import com.gszc.entity.CustomSupport; import com.gszc.service.impl.CustomServiceImpl; import com.gszc.service.impl.PcUserServiceImpl; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; @Api(value = "工商注册 API", tags = {"后台公司api 2.0"}) @RestController @@ -59,4 +63,13 @@ public class PcCustomV2Controller { customService.revertCustom(customId); return ResultBuilder.success().build(); } + + @PostMapping("/updateCustom") + @ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header") + @ApiOperation(value = "公司编辑", notes = "公司编辑") + @ResponseBody + public Result updateCustom(@ModelAttribute @Valid Custom custom) { + customService.updateCustom(custom); + return ResultBuilder.success().build(); + } } diff --git a/src/main/java/com/gszc/service/impl/CustomServiceImpl.java b/src/main/java/com/gszc/service/impl/CustomServiceImpl.java index b0f3225..bb8499d 100644 --- a/src/main/java/com/gszc/service/impl/CustomServiceImpl.java +++ b/src/main/java/com/gszc/service/impl/CustomServiceImpl.java @@ -446,4 +446,9 @@ public class CustomServiceImpl extends ServiceImpl impleme custom.setStatusCode("todo"); customMapper.updateById(custom); } + + public void updateCustom(Custom custom){ + custom.setModifyDate(new Date()); + customMapper.updateById(custom); + } }