供应商管理

This commit is contained in:
2025-12-17 18:03:36 +08:00
parent 9abc415a8a
commit 18a9fa1bf9
9 changed files with 108 additions and 218 deletions

View File

@ -15,17 +15,10 @@ import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.pictc.datalog.DataOperationContent;
import com.pictc.datalog.DataOperationListener;
import com.pictc.enums.BusinessCode;
import com.pictc.enums.ExceptionCommonCode;
import com.pictc.utils.StringUtils;
import com.xjrsoft.common.exception.BusinessException;
import com.xjrsoft.common.model.result.R;
import com.xjrsoft.common.page.ConventPage;
import com.xjrsoft.common.page.PageOutput;
import com.xjrsoft.common.utils.VoToColumnUtil;
import com.xjrsoft.module.common.db.utils.CommonCallUtils;
import com.xjrsoft.module.datalog.service.DatalogService;
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
import com.xjrsoft.module.sales.dto.LngCustomerPageDto;
@ -33,11 +26,9 @@ import com.xjrsoft.module.sales.dto.UpdateLngCustomerDto;
import com.xjrsoft.module.sales.entity.LngCustomer;
import com.xjrsoft.module.sales.service.ICustomerService;
import com.xjrsoft.module.sales.vo.LngCustomerPageVo;
import com.xjrsoft.module.sales.vo.LngCustomerVo;
import com.xjrsoft.module.system.client.ICodeRuleClient;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -92,12 +83,6 @@ public class CustomerController {
@ApiOperation(value="根据id查询LngCustomer信息")
@SaCheckPermission("customer:detail")
public R info(@RequestParam Long id){
/**
LngCustomer lngCustomer = customerService.getCustomerById(id);
if (lngCustomer == null) {
return R.error("找不到此数据!");
}
return R.ok(BeanUtil.toBean(lngCustomer, LngCustomerVo.class));**/
return R.ok(customerService.getCustomerById(id));
}
@ -150,24 +135,6 @@ public class CustomerController {
public R update(@Valid @RequestBody UpdateLngCustomerDto dto){
return R.ok(dataService.updateById(dto));
/**
return R.ok(dataService.updateById(dto,new DataOperationListener<UpdateLngCustomerDto>() {
@Override
public UpdateLngCustomerDto before(DataOperationContent<UpdateLngCustomerDto> content) {
return content.getObj();
}
@Override
public UpdateLngCustomerDto after(DataOperationContent<UpdateLngCustomerDto> content) {
String msg = CommonCallUtils.saveAfter(content.getTableName(),content.getIdValue());
if (StringUtils.isNotEmpty(msg)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
}
return content.getObj();
}
}));
**/
}
@DeleteMapping