Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-pcitc into dev
This commit is contained in:
@ -17,5 +17,8 @@ public interface FieldNameConstants {
|
|||||||
*/
|
*/
|
||||||
String FULL_NAME = "名称";
|
String FULL_NAME = "名称";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本币
|
||||||
|
*/
|
||||||
|
String LOCAL_SIGN = "本币";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,7 +107,7 @@ public class BankController {
|
|||||||
@ApiOperation(value = "修改LngBBank")
|
@ApiOperation(value = "修改LngBBank")
|
||||||
@SaCheckPermission("bank:edit")
|
@SaCheckPermission("bank:edit")
|
||||||
public R update(@Valid @RequestBody UpdateLngBBankDto dto){
|
public R update(@Valid @RequestBody UpdateLngBBankDto dto){
|
||||||
return R.ok(dataService.updateById(dto));
|
return R.ok(bankService.update(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
|
|||||||
@ -102,16 +102,7 @@ public class CountryRegionController {
|
|||||||
@ApiOperation(value = "新增LngBRegion")
|
@ApiOperation(value = "新增LngBRegion")
|
||||||
@SaCheckPermission("countryRegion:add")
|
@SaCheckPermission("countryRegion:add")
|
||||||
public R add(@Valid @RequestBody UpdateLngBRegionDto dto){
|
public R add(@Valid @RequestBody UpdateLngBRegionDto dto){
|
||||||
if(!CountryRegionEnum.CONTINENT.getCode().equals(dto.getRegionTypeCode()) ) {
|
|
||||||
if(dto.getPid() != null && dto.getPid() != 0) {
|
|
||||||
LngBRegion parentRegion = countryRegionService.getById(dto.getPid());
|
|
||||||
if(parentRegion != null) {
|
|
||||||
dto.setFullPath(parentRegion.getFullPath()+dto.getFullName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
dto.setFullPath(dto.getFullName());
|
|
||||||
}
|
|
||||||
Long res = countryRegionService.add(dto);
|
Long res = countryRegionService.add(dto);
|
||||||
return R.ok(res);
|
return R.ok(res);
|
||||||
}
|
}
|
||||||
@ -120,17 +111,8 @@ public class CountryRegionController {
|
|||||||
@ApiOperation(value = "修改LngBRegion")
|
@ApiOperation(value = "修改LngBRegion")
|
||||||
@SaCheckPermission("countryRegion:edit")
|
@SaCheckPermission("countryRegion:edit")
|
||||||
public R update(@Valid @RequestBody UpdateLngBRegionDto dto){
|
public R update(@Valid @RequestBody UpdateLngBRegionDto dto){
|
||||||
if(!CountryRegionEnum.CONTINENT.getCode().equals(dto.getRegionTypeCode()) ) {
|
|
||||||
if(dto.getPid() != null && dto.getPid() != 0) {
|
return R.ok(countryRegionService.update(dto));
|
||||||
LngBRegion parentRegion = countryRegionService.getById(dto.getPid());
|
|
||||||
if(parentRegion != null) {
|
|
||||||
dto.setFullPath(parentRegion.getFullPath()+dto.getFullName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
dto.setFullPath(dto.getFullName());
|
|
||||||
}
|
|
||||||
return R.ok(dataService.updateById(dto));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
|
|||||||
@ -12,18 +12,19 @@ import com.xjrsoft.common.page.ConventPage;
|
|||||||
import com.xjrsoft.common.page.PageOutput;
|
import com.xjrsoft.common.page.PageOutput;
|
||||||
import com.xjrsoft.common.model.result.R;
|
import com.xjrsoft.common.model.result.R;
|
||||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||||
import com.xjrsoft.module.mdm.dto.AddLngBCurrencyDto;
|
import com.xjrsoft.module.mdm.dto.*;
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBCurrencyDto;
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
|
||||||
import com.xjrsoft.module.mdm.dto.LngBCurrencyPageDto;
|
|
||||||
import com.xjrsoft.module.mdm.entity.LngBCurrency;
|
import com.xjrsoft.module.mdm.entity.LngBCurrency;
|
||||||
|
import com.xjrsoft.module.mdm.entity.LngBPriceTerm;
|
||||||
import com.xjrsoft.module.mdm.service.ICurrencyService;
|
import com.xjrsoft.module.mdm.service.ICurrencyService;
|
||||||
import com.xjrsoft.module.mdm.vo.LngBCurrencyPageVo;
|
import com.xjrsoft.module.mdm.vo.LngBCurrencyPageVo;
|
||||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||||
import com.xjrsoft.module.datalog.entity.DataChangeLog;
|
import com.xjrsoft.module.datalog.entity.DataChangeLog;
|
||||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||||
import com.xjrsoft.module.mdm.vo.LngBCurrencyVo;
|
import com.xjrsoft.module.mdm.vo.LngBCurrencyVo;
|
||||||
|
import com.xjrsoft.module.mdm.vo.LngBPriceTermPageVo;
|
||||||
|
import com.xjrsoft.module.mdm.vo.LngBPriceTermVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@ -53,15 +54,14 @@ public class CurrencyController {
|
|||||||
@ApiOperation(value="LngBCurrency列表(分页)")
|
@ApiOperation(value="LngBCurrency列表(分页)")
|
||||||
@SaCheckPermission("currency:list")
|
@SaCheckPermission("currency:list")
|
||||||
public R page(@Valid LngBCurrencyPageDto dto){
|
public R page(@Valid LngBCurrencyPageDto dto){
|
||||||
|
|
||||||
LambdaQueryWrapper<LngBCurrency> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<LngBCurrency> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper
|
queryWrapper
|
||||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBCurrency::getFullName,dto.getFullName())
|
.and(StrUtil.isNotBlank(dto.getFullName()), r ->
|
||||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBCurrency::getValid,dto.getValid())
|
r.like(LngBCurrency::getCode, dto.getFullName())
|
||||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBCurrency::getCode,dto.getCode())
|
.or()
|
||||||
.like(StrUtil.isNotBlank(dto.getLocalSign()),LngBCurrency::getLocalSign,dto.getLocalSign())
|
.like(LngBCurrency::getFullName, dto.getFullName()))
|
||||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBCurrency::getNote,dto.getNote())
|
.eq(StrUtil.isNotBlank(dto.getValid()),LngBCurrency::getValid,dto.getValid())
|
||||||
.orderByDesc(LngBCurrency::getId)
|
.orderByAsc(LngBCurrency::getSort, LngBCurrency::getCode)
|
||||||
.select(LngBCurrency.class,x -> VoToColumnUtil.fieldsToColumns(LngBCurrencyPageVo.class).contains(x.getProperty()));
|
.select(LngBCurrency.class,x -> VoToColumnUtil.fieldsToColumns(LngBCurrencyPageVo.class).contains(x.getProperty()));
|
||||||
IPage<LngBCurrency> page = currencyService.page(ConventPage.getPage(dto), queryWrapper);
|
IPage<LngBCurrency> page = currencyService.page(ConventPage.getPage(dto), queryWrapper);
|
||||||
PageOutput<LngBCurrencyPageVo> pageOutput = ConventPage.getPageOutput(page, LngBCurrencyPageVo.class);
|
PageOutput<LngBCurrencyPageVo> pageOutput = ConventPage.getPageOutput(page, LngBCurrencyPageVo.class);
|
||||||
@ -79,28 +79,18 @@ public class CurrencyController {
|
|||||||
return R.ok(BeanUtil.toBean(lngBCurrency, LngBCurrencyVo.class));
|
return R.ok(BeanUtil.toBean(lngBCurrency, LngBCurrencyVo.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/datalog")
|
|
||||||
@ApiOperation(value="根据id查询LngBCurrency数据详细日志")
|
|
||||||
@SaCheckPermission("currency:datalog")
|
|
||||||
public R datalog(@RequestParam Long id){
|
|
||||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBCurrencyDto.class,id);
|
|
||||||
return R.ok(logs);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation(value = "新增LngBCurrency")
|
@ApiOperation(value = "新增LngBCurrency")
|
||||||
@SaCheckPermission("currency:add")
|
@SaCheckPermission("currency:add")
|
||||||
public R add(@Valid @RequestBody UpdateLngBCurrencyDto dto){
|
public R add(@Valid @RequestBody UpdateLngBCurrencyDto dto){
|
||||||
UpdateLngBCurrencyDto res = dataService.insert(dto);
|
return R.ok(currencyService.add(dto));
|
||||||
return R.ok(res.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation(value = "修改LngBCurrency")
|
@ApiOperation(value = "修改LngBCurrency")
|
||||||
@SaCheckPermission("currency:edit")
|
@SaCheckPermission("currency:edit")
|
||||||
public R update(@Valid @RequestBody UpdateLngBCurrencyDto dto){
|
public R update(@Valid @RequestBody UpdateLngBCurrencyDto dto){
|
||||||
return R.ok(dataService.updateById(dto));
|
return R.ok(currencyService.updateByDTO(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
@ -111,5 +101,17 @@ public class CurrencyController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/enable")
|
||||||
|
@ApiOperation(value = "启用LngBCurrency")
|
||||||
|
@SaCheckPermission("currency:enable")
|
||||||
|
public R enable(@Valid @RequestBody List<Long> ids){
|
||||||
|
return R.ok(currencyService.enable(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/disable")
|
||||||
|
@ApiOperation(value = "禁用LngBCurrency")
|
||||||
|
@SaCheckPermission("currency:disable")
|
||||||
|
public R disable(@Valid @RequestBody List<Long> ids){
|
||||||
|
return R.ok(currencyService.disable(ids));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -1,30 +1,20 @@
|
|||||||
package com.xjrsoft.module.mdm.controller;
|
package com.xjrsoft.module.mdm.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.xjrsoft.common.model.result.R;
|
||||||
import com.pictc.utils.DataLogTools;
|
|
||||||
import com.xjrsoft.common.constant.GlobalConstant;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.xjrsoft.common.page.ConventPage;
|
import com.xjrsoft.common.page.ConventPage;
|
||||||
import com.xjrsoft.common.page.PageOutput;
|
import com.xjrsoft.common.page.PageOutput;
|
||||||
import com.xjrsoft.common.model.result.R;
|
|
||||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||||
import com.xjrsoft.module.common.db.service.CommonCallService;
|
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||||
import com.xjrsoft.module.mdm.dto.AddLngBPriceTermDto;
|
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBCurrencyDto;
|
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBPriceTermDto;
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
|
|
||||||
import com.xjrsoft.module.mdm.dto.LngBPriceTermPageDto;
|
import com.xjrsoft.module.mdm.dto.LngBPriceTermPageDto;
|
||||||
|
import com.xjrsoft.module.mdm.dto.UpdateLngBPriceTermDto;
|
||||||
import com.xjrsoft.module.mdm.entity.LngBPriceTerm;
|
import com.xjrsoft.module.mdm.entity.LngBPriceTerm;
|
||||||
import com.xjrsoft.module.mdm.service.IPriceTermsService;
|
import com.xjrsoft.module.mdm.service.IPriceTermsService;
|
||||||
import com.xjrsoft.module.mdm.vo.LngBPriceTermPageVo;
|
import com.xjrsoft.module.mdm.vo.LngBPriceTermPageVo;
|
||||||
|
|
||||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
|
||||||
import com.xjrsoft.module.mdm.vo.LngBPriceTermVo;
|
import com.xjrsoft.module.mdm.vo.LngBPriceTermVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -32,7 +22,6 @@ import lombok.AllArgsConstructor;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -55,7 +44,6 @@ public class PriceTermsController {
|
|||||||
@ApiOperation(value="LngBPriceTerm列表(分页)")
|
@ApiOperation(value="LngBPriceTerm列表(分页)")
|
||||||
@SaCheckPermission("priceTerms:list")
|
@SaCheckPermission("priceTerms:list")
|
||||||
public R page(@Valid LngBPriceTermPageDto dto){
|
public R page(@Valid LngBPriceTermPageDto dto){
|
||||||
|
|
||||||
LambdaQueryWrapper<LngBPriceTerm> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<LngBPriceTerm> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper
|
queryWrapper
|
||||||
.and(StrUtil.isNotBlank(dto.getFullName()), r ->
|
.and(StrUtil.isNotBlank(dto.getFullName()), r ->
|
||||||
@ -81,7 +69,6 @@ public class PriceTermsController {
|
|||||||
return R.ok(BeanUtil.toBean(lngBPriceTerm, LngBPriceTermVo.class));
|
return R.ok(BeanUtil.toBean(lngBPriceTerm, LngBPriceTermVo.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation(value = "新增LngBPriceTerm")
|
@ApiOperation(value = "新增LngBPriceTerm")
|
||||||
@SaCheckPermission("priceTerms:add")
|
@SaCheckPermission("priceTerms:add")
|
||||||
@ -104,16 +91,16 @@ public class PriceTermsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/enable")
|
@PostMapping("/enable")
|
||||||
@ApiOperation(value = "启用")
|
@ApiOperation(value = "启用LngBPriceTerm")
|
||||||
@SaCheckPermission("priceTerms:enable")
|
@SaCheckPermission("priceTerms:enable")
|
||||||
public R enable(@Valid @RequestParam Long id){
|
public R enable(@Valid @RequestBody List<Long> ids){
|
||||||
return R.ok(priceTermsService.enable(id));
|
return R.ok(priceTermsService.enable(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/disable")
|
@PostMapping("/disable")
|
||||||
@ApiOperation(value = "停用")
|
@ApiOperation(value = "禁用LngBPriceTerm")
|
||||||
@SaCheckPermission("priceTerms:disable")
|
@SaCheckPermission("priceTerms:disable")
|
||||||
public R disable(@Valid @RequestParam Long id){
|
public R disable(@Valid @RequestBody List<Long> ids){
|
||||||
return R.ok(priceTermsService.disable(id));
|
return R.ok(priceTermsService.disable(ids));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -20,4 +20,6 @@ public interface IBankService extends IService<LngBBank> {
|
|||||||
boolean enable(List<Long> ids);
|
boolean enable(List<Long> ids);
|
||||||
|
|
||||||
boolean disable(List<Long> ids);
|
boolean disable(List<Long> ids);
|
||||||
|
|
||||||
|
Long update(UpdateLngBBankDto dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,8 @@ package com.xjrsoft.module.mdm.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBRegionDto;
|
import com.xjrsoft.module.mdm.dto.UpdateLngBRegionDto;
|
||||||
import com.xjrsoft.module.mdm.entity.LngBRegion;
|
import com.xjrsoft.module.mdm.entity.LngBRegion;
|
||||||
@ -20,4 +22,6 @@ public interface ICountryRegionService extends IService<LngBRegion> {
|
|||||||
boolean enable(List<Long> ids);
|
boolean enable(List<Long> ids);
|
||||||
|
|
||||||
boolean disable(List<Long> ids);
|
boolean disable(List<Long> ids);
|
||||||
|
|
||||||
|
Long update(UpdateLngBRegionDto dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
package com.xjrsoft.module.mdm.service;
|
package com.xjrsoft.module.mdm.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.github.yulichang.base.MPJBaseService;
|
import com.xjrsoft.module.mdm.dto.UpdateLngBCurrencyDto;
|
||||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
|
||||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
|
||||||
import com.xjrsoft.module.mdm.entity.LngBCurrency;
|
import com.xjrsoft.module.mdm.entity.LngBCurrency;
|
||||||
import lombok.Data;
|
|
||||||
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,4 +15,11 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public interface ICurrencyService extends IService<LngBCurrency> {
|
public interface ICurrencyService extends IService<LngBCurrency> {
|
||||||
|
Long add(@Valid UpdateLngBCurrencyDto dto);
|
||||||
|
|
||||||
|
boolean updateByDTO(@Valid UpdateLngBCurrencyDto dto);
|
||||||
|
|
||||||
|
boolean enable(@Valid List<Long> ids);
|
||||||
|
|
||||||
|
boolean disable(@Valid List<Long> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,8 @@
|
|||||||
package com.xjrsoft.module.mdm.service;
|
package com.xjrsoft.module.mdm.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.github.yulichang.base.MPJBaseService;
|
|
||||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
|
||||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBPriceTermDto;
|
import com.xjrsoft.module.mdm.dto.UpdateLngBPriceTermDto;
|
||||||
import com.xjrsoft.module.mdm.entity.LngBPriceTerm;
|
import com.xjrsoft.module.mdm.entity.LngBPriceTerm;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -24,7 +20,7 @@ public interface IPriceTermsService extends IService<LngBPriceTerm> {
|
|||||||
|
|
||||||
boolean updateByDTO(@Valid UpdateLngBPriceTermDto dto);
|
boolean updateByDTO(@Valid UpdateLngBPriceTermDto dto);
|
||||||
|
|
||||||
boolean enable(@Valid Long id);
|
boolean enable(@Valid List<Long> ids);
|
||||||
|
|
||||||
boolean disable(@Valid Long id);
|
boolean disable(@Valid List<Long> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import com.xjrsoft.module.common.db.service.CommonCallService;
|
|||||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto;
|
import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto;
|
||||||
import com.xjrsoft.module.mdm.entity.LngBBank;
|
import com.xjrsoft.module.mdm.entity.LngBBank;
|
||||||
|
import com.xjrsoft.module.mdm.entity.LngBRegion;
|
||||||
import com.xjrsoft.module.mdm.mapper.LngBBankMapper;
|
import com.xjrsoft.module.mdm.mapper.LngBBankMapper;
|
||||||
import com.xjrsoft.module.mdm.service.IBankService;
|
import com.xjrsoft.module.mdm.service.IBankService;
|
||||||
import com.xjrsoft.module.system.client.ICodeRuleClient;
|
import com.xjrsoft.module.system.client.ICodeRuleClient;
|
||||||
@ -51,6 +52,15 @@ public class BankServiceImpl extends ServiceImpl<LngBBankMapper, LngBBank> imple
|
|||||||
return res.getId();
|
return res.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Long update(UpdateLngBBankDto dto) {
|
||||||
|
this.checkParams(dto);
|
||||||
|
UpdateLngBBankDto res = DataLogTools.update(dto);
|
||||||
|
//this.addOrUpdateAfter(res.getId());
|
||||||
|
return res.getId();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean enable(List<Long> ids) {
|
public boolean enable(List<Long> ids) {
|
||||||
return dataService.disable(UpdateLngBBankDto.class,ids);
|
return dataService.disable(UpdateLngBBankDto.class,ids);
|
||||||
@ -64,13 +74,13 @@ public class BankServiceImpl extends ServiceImpl<LngBBankMapper, LngBBank> imple
|
|||||||
|
|
||||||
private void checkParams(UpdateLngBBankDto dto) {
|
private void checkParams(UpdateLngBBankDto dto) {
|
||||||
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBBank>()
|
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBBank>()
|
||||||
.eq(LngBBank::getCode, dto.getCode()));
|
.eq(LngBBank::getCode, dto.getCode()).ne(dto.getId() != null, LngBBank::getId, dto.getId()));
|
||||||
if (codeCount > 0) {
|
if (codeCount > 0) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
FieldNameConstants.CODE));
|
FieldNameConstants.CODE));
|
||||||
}
|
}
|
||||||
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBBank>()
|
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBBank>()
|
||||||
.eq(LngBBank::getFullName, dto.getFullName()));
|
.eq(LngBBank::getFullName, dto.getFullName()).ne(dto.getId() != null, LngBBank::getId, dto.getId()));
|
||||||
if (nameCount > 0) {
|
if (nameCount > 0) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
FieldNameConstants.FULL_NAME));
|
FieldNameConstants.FULL_NAME));
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import com.xjrsoft.module.common.db.service.CommonCallService;
|
|||||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBRegionDto;
|
import com.xjrsoft.module.mdm.dto.UpdateLngBRegionDto;
|
||||||
import com.xjrsoft.module.mdm.entity.LngBRegion;
|
import com.xjrsoft.module.mdm.entity.LngBRegion;
|
||||||
|
import com.xjrsoft.module.mdm.enums.CountryRegionEnum;
|
||||||
import com.xjrsoft.module.mdm.mapper.LngBRegionMapper;
|
import com.xjrsoft.module.mdm.mapper.LngBRegionMapper;
|
||||||
import com.xjrsoft.module.mdm.service.ICountryRegionService;
|
import com.xjrsoft.module.mdm.service.ICountryRegionService;
|
||||||
|
|
||||||
@ -40,6 +41,16 @@ public class CountryRegionServiceImpl extends ServiceImpl<LngBRegionMapper, LngB
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long add(UpdateLngBRegionDto dto) {
|
public Long add(UpdateLngBRegionDto dto) {
|
||||||
|
if(!CountryRegionEnum.CONTINENT.getCode().equals(dto.getRegionTypeCode()) ) {
|
||||||
|
if(dto.getPid() != null && dto.getPid() != 0) {
|
||||||
|
LngBRegion parentRegion = this.getById(dto.getPid());
|
||||||
|
if(parentRegion != null) {
|
||||||
|
dto.setFullPath(parentRegion.getFullPath()+dto.getFullName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
dto.setFullPath(dto.getFullName());
|
||||||
|
}
|
||||||
this.checkParams(dto);
|
this.checkParams(dto);
|
||||||
UpdateLngBRegionDto res = DataLogTools.insert(dto);
|
UpdateLngBRegionDto res = DataLogTools.insert(dto);
|
||||||
//this.addOrUpdateAfter(res.getId());
|
//this.addOrUpdateAfter(res.getId());
|
||||||
@ -57,15 +68,35 @@ public class CountryRegionServiceImpl extends ServiceImpl<LngBRegionMapper, LngB
|
|||||||
return dataService.disable(UpdateLngBRegionDto.class,ids);
|
return dataService.disable(UpdateLngBRegionDto.class,ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long update(UpdateLngBRegionDto dto) {
|
||||||
|
if(!CountryRegionEnum.CONTINENT.getCode().equals(dto.getRegionTypeCode()) ) {
|
||||||
|
if(dto.getPid() != null && dto.getPid() != 0) {
|
||||||
|
LngBRegion parentRegion = this.getById(dto.getPid());
|
||||||
|
if(parentRegion != null) {
|
||||||
|
dto.setFullPath(parentRegion.getFullPath()+dto.getFullName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
dto.setFullPath(dto.getFullName());
|
||||||
|
}
|
||||||
|
this.checkParams(dto);
|
||||||
|
UpdateLngBRegionDto res = DataLogTools.update(dto);
|
||||||
|
//this.addOrUpdateAfter(res.getId());
|
||||||
|
return res.getId();
|
||||||
|
}
|
||||||
|
|
||||||
private void checkParams(UpdateLngBRegionDto dto) {
|
private void checkParams(UpdateLngBRegionDto dto) {
|
||||||
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBRegion>()
|
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBRegion>()
|
||||||
.eq(LngBRegion::getCode, dto.getCode()));
|
.eq(LngBRegion::getCode, dto.getCode()).ne(dto.getId() != null, LngBRegion::getId, dto.getId()));
|
||||||
if (codeCount > 0) {
|
if (codeCount > 0) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
FieldNameConstants.CODE));
|
FieldNameConstants.CODE));
|
||||||
}
|
}
|
||||||
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBRegion>()
|
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBRegion>()
|
||||||
.eq(LngBRegion::getFullName, dto.getFullName()));
|
.eq(LngBRegion::getFullName, dto.getFullName()).ne(dto.getId() != null, LngBRegion::getId, dto.getId()));
|
||||||
if (nameCount > 0) {
|
if (nameCount > 0) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
FieldNameConstants.FULL_NAME));
|
FieldNameConstants.FULL_NAME));
|
||||||
|
|||||||
@ -1,17 +1,27 @@
|
|||||||
package com.xjrsoft.module.mdm.service.impl;
|
package com.xjrsoft.module.mdm.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
import com.pictc.constant.FieldNameConstants;
|
||||||
|
import com.pictc.constant.TableNameConstants;
|
||||||
|
import com.pictc.enums.BusinessCode;
|
||||||
|
import com.pictc.enums.ExceptionCommonCode;
|
||||||
|
import com.pictc.enums.ValidEnum;
|
||||||
|
import com.pictc.utils.DataLogTools;
|
||||||
|
import com.xjrsoft.common.enums.YesOrNoEnum;
|
||||||
|
import com.xjrsoft.common.exception.BusinessException;
|
||||||
|
import com.xjrsoft.module.common.db.service.CommonCallService;
|
||||||
|
import com.xjrsoft.module.mdm.dto.UpdateLngBCurrencyDto;
|
||||||
import com.xjrsoft.module.mdm.entity.LngBCurrency;
|
import com.xjrsoft.module.mdm.entity.LngBCurrency;
|
||||||
import com.xjrsoft.module.mdm.mapper.LngBCurrencyMapper;
|
import com.xjrsoft.module.mdm.mapper.LngBCurrencyMapper;
|
||||||
import com.xjrsoft.module.mdm.service.ICurrencyService;
|
import com.xjrsoft.module.mdm.service.ICurrencyService;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title: service
|
* @title: service
|
||||||
@ -22,4 +32,84 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class CurrencyServiceImpl extends ServiceImpl<LngBCurrencyMapper, LngBCurrency> implements ICurrencyService {
|
public class CurrencyServiceImpl extends ServiceImpl<LngBCurrencyMapper, LngBCurrency> implements ICurrencyService {
|
||||||
|
|
||||||
|
private final CommonCallService commonCallService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Long add(UpdateLngBCurrencyDto dto) {
|
||||||
|
this.checkParams(dto);
|
||||||
|
UpdateLngBCurrencyDto res = DataLogTools.insert(dto);
|
||||||
|
this.addOrUpdateAfter(res.getId());
|
||||||
|
return res.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkParams(UpdateLngBCurrencyDto dto) {
|
||||||
|
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBCurrency>()
|
||||||
|
.eq(LngBCurrency::getCode, dto.getCode())
|
||||||
|
.ne(!Objects.isNull(dto.getId()), LngBCurrency::getId, dto.getId()));
|
||||||
|
if (codeCount > 0) {
|
||||||
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
|
FieldNameConstants.CODE));
|
||||||
|
}
|
||||||
|
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBCurrency>()
|
||||||
|
.eq(LngBCurrency::getFullName, dto.getFullName())
|
||||||
|
.ne(!Objects.isNull(dto.getId()), LngBCurrency::getId, dto.getId()));
|
||||||
|
if (nameCount > 0) {
|
||||||
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
|
FieldNameConstants.FULL_NAME));
|
||||||
|
}
|
||||||
|
if (YesOrNoEnum.YES.getTextCode().equals(dto.getLocalSign())) {
|
||||||
|
Long validCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBCurrency>()
|
||||||
|
.eq(LngBCurrency::getLocalSign, YesOrNoEnum.YES.getTextCode())
|
||||||
|
.eq(LngBCurrency::getValid, ValidEnum.ENABLE.getCode())
|
||||||
|
.ne(!Objects.isNull(dto.getId()), LngBCurrency::getId, dto.getId()));
|
||||||
|
if (validCount > 0) {
|
||||||
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
|
FieldNameConstants.LOCAL_SIGN));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addOrUpdateAfter(Long id) {
|
||||||
|
String msg = commonCallService.saveAfter(TableNameConstants.LNG_B_CURRENCY, id);
|
||||||
|
if (StringUtils.isNotBlank(msg)) {
|
||||||
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean updateByDTO(UpdateLngBCurrencyDto dto) {
|
||||||
|
this.checkParams(dto);
|
||||||
|
DataLogTools.update(dto);
|
||||||
|
this.addOrUpdateAfter(dto.getId());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean enable(List<Long> ids) {
|
||||||
|
DataLogTools.enable(UpdateLngBCurrencyDto.class, ids);
|
||||||
|
for (Long id : ids) {
|
||||||
|
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_CURRENCY, id);
|
||||||
|
if (StringUtils.isNotBlank(msg)) {
|
||||||
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean disable(List<Long> ids) {
|
||||||
|
DataLogTools.disable(UpdateLngBCurrencyDto.class, ids);
|
||||||
|
for (Long id : ids) {
|
||||||
|
String msg = commonCallService.disableBefore(TableNameConstants.LNG_B_CURRENCY, id);
|
||||||
|
if (StringUtils.isNotBlank(msg)) {
|
||||||
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,16 +2,13 @@ package com.xjrsoft.module.mdm.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
||||||
import com.pictc.constant.FieldNameConstants;
|
import com.pictc.constant.FieldNameConstants;
|
||||||
import com.pictc.constant.TableNameConstants;
|
import com.pictc.constant.TableNameConstants;
|
||||||
import com.pictc.enums.BusinessCode;
|
import com.pictc.enums.BusinessCode;
|
||||||
import com.pictc.enums.ExceptionCommonCode;
|
import com.pictc.enums.ExceptionCommonCode;
|
||||||
import com.pictc.enums.ValidEnum;
|
|
||||||
import com.pictc.utils.DataLogTools;
|
import com.pictc.utils.DataLogTools;
|
||||||
import com.xjrsoft.common.exception.BusinessException;
|
import com.xjrsoft.common.exception.BusinessException;
|
||||||
import com.xjrsoft.module.common.db.service.CommonCallService;
|
import com.xjrsoft.module.common.db.service.CommonCallService;
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBCurrencyDto;
|
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBPriceTermDto;
|
import com.xjrsoft.module.mdm.dto.UpdateLngBPriceTermDto;
|
||||||
import com.xjrsoft.module.mdm.entity.LngBPriceTerm;
|
import com.xjrsoft.module.mdm.entity.LngBPriceTerm;
|
||||||
import com.xjrsoft.module.mdm.mapper.LngBPriceTermMapper;
|
import com.xjrsoft.module.mdm.mapper.LngBPriceTermMapper;
|
||||||
@ -20,12 +17,9 @@ import lombok.AllArgsConstructor;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
|
|
||||||
import static microsoft.exchange.webservices.data.core.XmlElementNames.ResponseCode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title: service
|
* @title: service
|
||||||
@ -50,13 +44,15 @@ public class PriceTermsServiceImpl extends ServiceImpl<LngBPriceTermMapper, LngB
|
|||||||
|
|
||||||
private void checkParams(UpdateLngBPriceTermDto dto) {
|
private void checkParams(UpdateLngBPriceTermDto dto) {
|
||||||
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBPriceTerm>()
|
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBPriceTerm>()
|
||||||
.eq(LngBPriceTerm::getCode, dto.getCode()));
|
.eq(LngBPriceTerm::getCode, dto.getCode())
|
||||||
|
.ne(!Objects.isNull(dto.getId()), LngBPriceTerm::getId, dto.getId()));
|
||||||
if (codeCount > 0) {
|
if (codeCount > 0) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
FieldNameConstants.CODE));
|
FieldNameConstants.CODE));
|
||||||
}
|
}
|
||||||
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBPriceTerm>()
|
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBPriceTerm>()
|
||||||
.eq(LngBPriceTerm::getFullName, dto.getFullName()));
|
.eq(LngBPriceTerm::getFullName, dto.getFullName())
|
||||||
|
.ne(!Objects.isNull(dto.getId()), LngBPriceTerm::getId, dto.getId()));
|
||||||
if (nameCount > 0) {
|
if (nameCount > 0) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
FieldNameConstants.FULL_NAME));
|
FieldNameConstants.FULL_NAME));
|
||||||
@ -80,29 +76,28 @@ public class PriceTermsServiceImpl extends ServiceImpl<LngBPriceTermMapper, LngB
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean enable(Long id) {
|
@Transactional(rollbackFor = Exception.class)
|
||||||
this.updateValid(id, ValidEnum.ENABLE.getCode());
|
public boolean enable(List<Long> ids) {
|
||||||
|
DataLogTools.enable(UpdateLngBPriceTermDto.class, ids);
|
||||||
|
for (Long id : ids) {
|
||||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_PRICE_TERM, id);
|
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_PRICE_TERM, id);
|
||||||
if (StringUtils.isNotBlank(msg)) {
|
if (StringUtils.isNotBlank(msg)) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateValid(Long id, String valid) {
|
|
||||||
UpdateLngBPriceTermDto dto = new UpdateLngBPriceTermDto();
|
|
||||||
dto.setId(id);
|
|
||||||
dto.setValid(valid);
|
|
||||||
DataLogTools.update(dto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean disable(Long id) {
|
@Transactional(rollbackFor = Exception.class)
|
||||||
this.updateValid(id, ValidEnum.DISABLE.getCode());
|
public boolean disable(List<Long> ids) {
|
||||||
|
DataLogTools.disable(UpdateLngBPriceTermDto.class, ids);
|
||||||
|
for (Long id : ids) {
|
||||||
String msg = commonCallService.disableBefore(TableNameConstants.LNG_B_PRICE_TERM, id);
|
String msg = commonCallService.disableBefore(TableNameConstants.LNG_B_PRICE_TERM, id);
|
||||||
if (StringUtils.isNotBlank(msg)) {
|
if (StringUtils.isNotBlank(msg)) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user