You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.4 KiB
Java
41 lines
1.4 KiB
Java
package com.glxp.api.controller.system;
|
|
|
|
import com.glxp.api.annotation.Log;
|
|
import com.glxp.api.constant.BusinessType;
|
|
import com.glxp.api.entity.system.CompanyEntity;
|
|
import com.glxp.api.req.system.CompanyRequest;
|
|
import com.glxp.api.service.system.CompanyService;
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
@RestController
|
|
public class CompanyController {
|
|
|
|
@Resource
|
|
private CompanyService companyService;
|
|
|
|
@GetMapping("/warehouse/info/company")
|
|
public BaseResponse getCompanyInfo(CompanyRequest companyRequest) {
|
|
CompanyEntity companyEntity = companyService.findCompany(companyRequest.getCustomerId());
|
|
if (companyEntity != null) {
|
|
return ResultVOUtils.success(companyEntity);
|
|
}
|
|
return ResultVOUtils.error(500, "企业信息为空");
|
|
}
|
|
|
|
@PostMapping("/warehouse/info/modifyCompany")
|
|
@Log(title = "企业信息", businessType = BusinessType.UPDATE)
|
|
public BaseResponse modifyCompany(@RequestBody CompanyEntity companyEntity) {
|
|
|
|
boolean b = companyService.modifyCompany(companyEntity);
|
|
|
|
return ResultVOUtils.success("修改成功");
|
|
}
|
|
}
|