|
|
|
@ -4,6 +4,7 @@ import java.util.List; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
import com.jianshui.common.core.domain.entity.Companyservice; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
@ -78,6 +79,12 @@ public class CompanyserviceController extends BaseController |
|
|
|
|
@PostMapping |
|
|
|
|
public AjaxResult add(@RequestBody Companyservice companyservice) |
|
|
|
|
{ |
|
|
|
|
if (StringUtils.isBlank(companyservice.getSellertax())){ |
|
|
|
|
return toAjax("企业税号不能为空",false); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isBlank(companyservice.getSellername())){ |
|
|
|
|
return toAjax("企业名称不能为空",false); |
|
|
|
|
} |
|
|
|
|
return toAjax(companyserviceService.insertCompanyservice(companyservice)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -89,6 +96,13 @@ public class CompanyserviceController extends BaseController |
|
|
|
|
@PutMapping |
|
|
|
|
public AjaxResult edit(@RequestBody Companyservice companyservice) |
|
|
|
|
{ |
|
|
|
|
if (StringUtils.isBlank(companyservice.getSellertax())){ |
|
|
|
|
return toAjax("企业税号不能为空",false); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isBlank(companyservice.getSellername())){ |
|
|
|
|
return toAjax("企业名称不能为空",false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return toAjax(companyserviceService.updateCompanyservice(companyservice)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|