update
This commit is contained in:
@ -15,6 +15,8 @@ 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.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
@ -24,12 +26,10 @@ import com.xjrsoft.module.contract.dto.UpdateLngContractPurDto;
|
||||
import com.xjrsoft.module.contract.entity.LngContractPur;
|
||||
import com.xjrsoft.module.contract.service.IContractPurPngService;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPurPageVo;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPurVo;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -97,15 +97,39 @@ public class ContractPurPngController {
|
||||
@ApiOperation(value = "新增LngContract")
|
||||
@SaCheckPermission("contractPurPng:add")
|
||||
public R add(@Valid @RequestBody UpdateLngContractPurDto dto){
|
||||
UpdateLngContractPurDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
//UpdateLngContractPurDto res = dataService.insert(dto);
|
||||
UpdateLngContractPurDto res = dataService.insert(dto, new DataOperationListener<UpdateLngContractPurDto>() {
|
||||
@Override
|
||||
public UpdateLngContractPurDto before(DataOperationContent<UpdateLngContractPurDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngContractPurDto after(DataOperationContent<UpdateLngContractPurDto> content) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngContract")
|
||||
@SaCheckPermission("contractPurPng:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngContractPurDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
//return R.ok(dataService.updateById(dto));
|
||||
UpdateLngContractPurDto res = dataService.insert(dto, new DataOperationListener<UpdateLngContractPurDto>() {
|
||||
@Override
|
||||
public UpdateLngContractPurDto before(DataOperationContent<UpdateLngContractPurDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngContractPurDto after(DataOperationContent<UpdateLngContractPurDto> content) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
|
||||
Reference in New Issue
Block a user