udpate
This commit is contained in:
@ -88,7 +88,7 @@ public class BankController {
|
|||||||
@ApiOperation(value="根据id查询LngBBank数据详细日志")
|
@ApiOperation(value="根据id查询LngBBank数据详细日志")
|
||||||
@SaCheckPermission("bank:datalog")
|
@SaCheckPermission("bank:datalog")
|
||||||
public R datalog(@RequestParam Long id){
|
public R datalog(@RequestParam Long id){
|
||||||
List<DataChangeLog> logs = dataService.findLogsByEntityId(UpdateLngBBankDto.class,id);
|
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBBankDto.class,id);
|
||||||
return R.ok(logs);
|
return R.ok(logs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,9 +21,11 @@ import com.xjrsoft.common.page.PageOutput;
|
|||||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||||
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.datalog.vo.DataChangeLogVo;
|
||||||
import com.xjrsoft.module.mdm.dto.LngBRegionPageDto;
|
import com.xjrsoft.module.mdm.dto.LngBRegionPageDto;
|
||||||
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.service.ICountryRegionService;
|
import com.xjrsoft.module.mdm.service.ICountryRegionService;
|
||||||
import com.xjrsoft.module.mdm.vo.LngBRegionPageVo;
|
import com.xjrsoft.module.mdm.vo.LngBRegionPageVo;
|
||||||
import com.xjrsoft.module.mdm.vo.LngBRegionVo;
|
import com.xjrsoft.module.mdm.vo.LngBRegionVo;
|
||||||
@ -88,7 +90,7 @@ public class CountryRegionController {
|
|||||||
@ApiOperation(value="根据id查询LngBRegion数据详细日志")
|
@ApiOperation(value="根据id查询LngBRegion数据详细日志")
|
||||||
@SaCheckPermission("countryRegion:datalog")
|
@SaCheckPermission("countryRegion:datalog")
|
||||||
public R datalog(@RequestParam Long id){
|
public R datalog(@RequestParam Long id){
|
||||||
List<DataChangeLog> logs = dataService.findLogsByEntityId(UpdateLngBRegionDto.class,id);
|
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBRegionDto.class,id);
|
||||||
return R.ok(logs);
|
return R.ok(logs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,6 +99,16 @@ 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());
|
||||||
|
}
|
||||||
UpdateLngBRegionDto res = dataService.insert(dto);
|
UpdateLngBRegionDto res = dataService.insert(dto);
|
||||||
return R.ok(res.getId());
|
return R.ok(res.getId());
|
||||||
}
|
}
|
||||||
@ -105,6 +117,16 @@ 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) {
|
||||||
|
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));
|
return R.ok(dataService.updateById(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -83,7 +83,7 @@ public class CurrencyController {
|
|||||||
@ApiOperation(value="根据id查询LngBCurrency数据详细日志")
|
@ApiOperation(value="根据id查询LngBCurrency数据详细日志")
|
||||||
@SaCheckPermission("currency:datalog")
|
@SaCheckPermission("currency:datalog")
|
||||||
public R datalog(@RequestParam Long id){
|
public R datalog(@RequestParam Long id){
|
||||||
List<DataChangeLog> logs = dataService.findLogsByEntityId(UpdateLngBCurrencyDto.class,id);
|
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBCurrencyDto.class,id);
|
||||||
return R.ok(logs);
|
return R.ok(logs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public class PriceTermsController {
|
|||||||
@ApiOperation(value="根据id查询LngBPriceTerm数据详细日志")
|
@ApiOperation(value="根据id查询LngBPriceTerm数据详细日志")
|
||||||
@SaCheckPermission("priceTerms:datalog")
|
@SaCheckPermission("priceTerms:datalog")
|
||||||
public R datalog(@RequestParam Long id){
|
public R datalog(@RequestParam Long id){
|
||||||
List<DataChangeLog> logs = dataService.findLogsByEntityId(UpdateLngBPriceTermDto.class,id);
|
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBPriceTermDto.class,id);
|
||||||
return R.ok(logs);
|
return R.ok(logs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user