|
|
|
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.CountService;
|
|
|
|
import com.gszc.service.impl.CustomServiceImpl;
|
|
|
|
import io.swagger.annotations.*;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@Api(value = "工商注册 API", tags = {"小程序公司api"})
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/mini/custom")
|
|
|
|
public class MiniCustomController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
CustomServiceImpl customService;
|
|
|
|
|
|
|
|
@PostMapping("/customRegister")
|
|
|
|
@ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header")
|
|
|
|
@ApiOperation(value = "公司注册", notes = "公司注册")
|
|
|
|
@ResponseBody
|
|
|
|
public Result customRegister(@ModelAttribute @Valid Custom custom,@ApiParam(name = "customSupports", value = "股东列表", required = true) @RequestBody List<CustomSupport> customSupports) {
|
|
|
|
customService.customRegister(custom,customSupports);
|
|
|
|
return ResultBuilder.success().build();
|
|
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/invoiceCustomList")
|
|
|
|
@ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header")
|
|
|
|
@ApiOperation(value = "可开票公司列表", notes = "公司注册")
|
|
|
|
public Result invoiceCustomList(String userId) {
|
|
|
|
|
|
|
|
List<Custom> customs = customService.invoiceCustomList(userId);
|
|
|
|
return ResultBuilder.withPayload(customs).build();
|
|
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/customList")
|
|
|
|
@ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header")
|
|
|
|
@ApiOperation(value = "注册公司列表", notes = "公司注册")
|
|
|
|
public Result customList(String userId) {
|
|
|
|
|
|
|
|
List<Custom> customs = customService.customList(userId);
|
|
|
|
return ResultBuilder.withPayload(customs).build();
|
|
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/customDetail")
|
|
|
|
@ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header")
|
|
|
|
@ApiOperation(value = "注册公司详情", notes = "注册公司详情")
|
|
|
|
public Result customDetail(String customId) {
|
|
|
|
|
|
|
|
JSONObject jsonObject = customService.customDetail(customId);
|
|
|
|
return ResultBuilder.withPayload(jsonObject).build();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|