Commit 7d9aa4d2 authored by frank.xa.zhang's avatar frank.xa.zhang

fixed SQL issue

parent a391b98a
......@@ -156,9 +156,9 @@ public class TemplateController extends BaseController {
}
@RequestMapping(value = "getGroupTemplateByGroupId", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "getGroupTemplateByGroupID", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
OperationResultDto<List<TemplateByGroupDto>> getGroupTemplateByGroupId(@RequestParam Long templateGroupId, @RequestParam String projectId) {
OperationResultDto<List<TemplateByGroupDto>> getGroupTemplateByGroupId(@RequestParam(name="templateGroupID") Long templateGroupId, @RequestParam(name="projectID") String projectId) {
OperationResultDto resultDto = new OperationResultDto();
if (templateGroupId == null || templateGroupId.equals("undefined") || StringUtils.isBlank(projectId) || projectId.equals("undefined")) {
resultDto.setResult(false);
......
......@@ -238,7 +238,9 @@ public class TemplateServiceImpl extends AbstractService implements TemplateServ
TemplateExample example = new TemplateExample();
List<Long> ids = new ArrayList<>();
ids.add(templateGroupId);
ids.add(bspl);
if(!bspl.equals(null)) {
ids.add(bspl);
}
example.createCriteria().andTemplateGroupIdIn(ids);
example.setOrderByClause(" order_index");
List<Template> templates = templateMapper.selectByExample(example);
......
......@@ -122,7 +122,7 @@
A.NAME,
A.CODE
FROM
TAX_ADMIN.TEMPLATE A
TEMPLATE A
WHERE
A.TEMPLATE_GROUP_ID = #{templateGroupID,jdbcType=VARCHAR}
AND A.IS_ACTIVE_ASSOCIATION = 1
......@@ -137,7 +137,7 @@
B.PERIOD,
B.TEMPLATE_ID
FROM
REPORT b
PERIOD_REPORT b
WHERE
b.PERIOD = #{period,jdbcType=INTEGER}
AND B.PROJECT_ID = #{projectId,jdbcType=VARCHAR}
......
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