Commit 2d4ffbb9 authored by neo's avatar neo

[DEL] delete cell template service interface

parent b5a17c2b
......@@ -4,10 +4,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.CellTemplateConfigDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.service.CellTemplateService;
import pwc.taxtech.atms.service.impl.CellTemplateServiceImpl;
import java.util.Collections;
import java.util.List;
......@@ -17,7 +22,7 @@ import java.util.List;
public class CellTemplateController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(AccountController.class);
@Autowired
CellTemplateService cellTemplateService;
CellTemplateServiceImpl cellTemplateService;
@RequestMapping(value = "configList/{templateId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
......@@ -53,9 +58,9 @@ public class CellTemplateController extends BaseController {
return new OperationResultDto<>();
}
@RequestMapping(value = "config",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "config", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
OperationResultDto postConfig(@RequestBody CellTemplateConfigDto cellTemplateConfigDto){
OperationResultDto postConfig(@RequestBody CellTemplateConfigDto cellTemplateConfigDto) {
return cellTemplateService.saveOrEdit(cellTemplateConfigDto);
}
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.CellTemplateConfigDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import java.util.List;
public interface CellTemplateService {
OperationResultDto<List<CellTemplateConfigDto>> getCellConfigList(Long templateId);
OperationResultDto<CellTemplateConfigDto> getCellConfig(Long cellTemplateId);
OperationResultDto saveOrEdit(CellTemplateConfigDto cellTemplateConfig);
}
......@@ -9,8 +9,15 @@ import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.constant.enums.CellDataSourceType;
import pwc.taxtech.atms.dto.CellTemplateConfigDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.service.CellTemplateService;
import pwc.taxtech.atms.entity.CellTemplate;
import pwc.taxtech.atms.entity.CellTemplateConfig;
import pwc.taxtech.atms.entity.CellTemplateConfigExample;
import pwc.taxtech.atms.entity.CellTemplateExample;
import pwc.taxtech.atms.entity.FormulaConfig;
import pwc.taxtech.atms.entity.FormulaConfigExample;
import pwc.taxtech.atms.entity.KeyValueConfig;
import pwc.taxtech.atms.entity.KeyValueConfigExample;
import pwc.taxtech.atms.entity.KeyValueReference;
import java.util.ArrayList;
import java.util.Collections;
......@@ -19,9 +26,8 @@ import java.util.List;
import java.util.stream.Collectors;
@Service
public class CellTemplateServiceImpl extends AbstractService implements CellTemplateService {
public class CellTemplateServiceImpl extends AbstractService {
@Override
public OperationResultDto<List<CellTemplateConfigDto>> getCellConfigList(Long templateId) {
OperationResultDto<List<CellTemplateConfigDto>> result = new OperationResultDto<>();
CellTemplateExample example = new CellTemplateExample();
......@@ -52,7 +58,6 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
return result;
}
@Override
public OperationResultDto<CellTemplateConfigDto> getCellConfig(Long cellTemplateId) {
OperationResultDto<CellTemplateConfigDto> result = new OperationResultDto<>();
CellTemplate config = cellTemplateMapper.selectByPrimaryKey(cellTemplateId);
......@@ -76,7 +81,6 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
return result;
}
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public OperationResultDto saveOrEdit(CellTemplateConfigDto cellTemplateConfig) {
OperationResultDto result = new OperationResultDto();
......@@ -241,7 +245,7 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
sb.append(s).append(",");
}
String tempStr = sb.toString();
return StringUtils.removeEnd(tempStr,",");
return StringUtils.removeEnd(tempStr, ",");
// return tempStr.substring(0, tempStr.length() - 2);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment