收货地址

This commit is contained in:
sxu 2024-12-16 11:01:41 +08:00
parent 19ff2c9619
commit 8c037dd262
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package com.bonus.material.basic.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
import com.bonus.common.security.utils.SecurityUtils;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -45,6 +46,7 @@ public class BmCompanyAddressController extends BaseController {
@GetMapping("/list")
public TableDataInfo list(BmCompanyAddress bmCompanyAddress) {
startPage();
bmCompanyAddress.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
List<BmCompanyAddress> list = bmCompanyAddressService.selectBmCompanyAddressList(bmCompanyAddress);
return getDataTable(list);
}
@ -83,6 +85,7 @@ public class BmCompanyAddressController extends BaseController {
@PostMapping
public AjaxResult add(@RequestBody BmCompanyAddress bmCompanyAddress) {
try {
bmCompanyAddress.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
return toAjax(bmCompanyAddressService.insertBmCompanyAddress(bmCompanyAddress));
} catch (Exception e) {
return error("系统错误, " + e.getMessage());
@ -99,6 +102,7 @@ public class BmCompanyAddressController extends BaseController {
@PostMapping("/edit")
public AjaxResult edit(@RequestBody BmCompanyAddress bmCompanyAddress) {
try {
bmCompanyAddress.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
return toAjax(bmCompanyAddressService.updateBmCompanyAddress(bmCompanyAddress));
} catch (Exception e) {
return error("系统错误, " + e.getMessage());