Commit 731869df authored by frank's avatar frank

Merge branch 'dev_frank' into 'dev'

add tomcat maven config

See merge request root/atms!5
parents f5390c49 3e43fdfb
......@@ -455,7 +455,19 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<!-- tomcat7的插件, 不同tomcat版本这个也不一样 -->
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<!-- 通过maven tomcat7:run运行项目时,访问项目的端口号 -->
<port>8180</port>
<!-- 项目访问路径 本例:localhost:9090, 如果配置的aa, 则访问路径为localhost:9090/aa-->
<path>/</path>
<uriEncoding>UTF-8</uriEncoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
package pwc.taxtech.atms.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
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.entitiy.Industry;
import pwc.taxtech.atms.service.ProjectIndustryService;
@RestController
@RequestMapping(value = "api/v1/industry")
public class IndustryController {
@Autowired
ProjectIndustryService projectIndustryService;
@RequestMapping(value = "getAllAvailableIndustry", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody List<Industry> GetAllAvailableIndustry() {
return projectIndustryService.GetAllAvailableIndustry();
}
}
package pwc.taxtech.atms.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.ModelProfileDto;
import pwc.taxtech.atms.service.ModelConfigurationService;
@RestController
@RequestMapping(value = "api/v1/modelConfiguration")
public class ModelConfigurationController {
@Autowired
ModelConfigurationService modelConfigurationService;
@RequestMapping(value = "/model/byIndustry", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody List<ModelProfileDto> GetModelListByIndustry(@RequestParam String industryID,
@RequestParam String serviceTypeID) {
return modelConfigurationService.GetModelListByIndustry(serviceTypeID, industryID);
}
}
......@@ -105,4 +105,6 @@ public interface IndustryMapper extends MyMapper {
* @mbg.generated
*/
int updateByPrimaryKey(Industry record);
List<Industry> GetAllAvailableIndustry();
}
\ No newline at end of file
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.dto.ModelProfileDto;
public interface ModelConfigurationService {
List<ModelProfileDto> GetModelListByIndustry(String serviceTypeID, String industryID);
}
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.entitiy.Industry;
public interface ProjectIndustryService {
List<Industry> GetAllAvailableIndustry();
}
......@@ -24,6 +24,7 @@ import pwc.taxtech.atms.dao.KeyValueConfigMapper;
import pwc.taxtech.atms.dao.KeyValueReferenceMapper;
import pwc.taxtech.atms.dao.MailQueueMapper;
import pwc.taxtech.atms.dao.MenuMapper;
import pwc.taxtech.atms.dao.ModelConfigMapper;
import pwc.taxtech.atms.dao.MyStatisticAttributeMapper;
import pwc.taxtech.atms.dao.MyUserMapper;
import pwc.taxtech.atms.dao.OperationLogBasicDataMapper;
......@@ -156,4 +157,6 @@ public class AbstractService {
protected KeyValueConfigMapper keyValueConfigMapper;
@Autowired
protected KeyValueReferenceMapper keyValueReferenceMapper;
@Autowired
protected ModelConfigMapper modelConfigMapper;
}
package pwc.taxtech.atms.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dto.ModelProfileDto;
import pwc.taxtech.atms.service.ModelConfigurationService;
@Service
public class ModelConfigurationServiceImpl extends AbstractService implements ModelConfigurationService {
@Override
public List<ModelProfileDto> GetModelListByIndustry(String serviceTypeID, String industryID) {
return modelConfigMapper.GetModelListByIndustry(serviceTypeID, industryID);
}
}
package pwc.taxtech.atms.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.entitiy.Industry;
import pwc.taxtech.atms.service.ProjectIndustryService;
@Service
public class ProjectIndustryServiceImpl extends AbstractService implements ProjectIndustryService {
@Override
public List<Industry> GetAllAvailableIndustry() {
return industryMapper.GetAllAvailableIndustry();
}
}
......@@ -326,7 +326,7 @@
ServiceType st ON msc.ServiceTypeID = st.ID
JOIN
Industry i ON org.IndustryID = i.ID
WHERE org.IndustryID=#{industryID} and st.ID = #{serviceTypeID}
WHERE org.IndustryID=#{industryID,jdbcType=VARCHAR} and st.ID = #{serviceTypeID,jdbcType=VARCHAR}
ORDER BY m.code
</select>
</mapper>
\ No newline at end of file
......@@ -244,7 +244,20 @@
</webResources>
</configuration>
</plugin>
</plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<!-- tomcat7的插件, 不同tomcat版本这个也不一样 -->
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<!-- 通过maven tomcat7:run运行项目时,访问项目的端口号 -->
<port>8080</port>
<!-- 项目访问路径 本例:localhost:9090, 如果配置的aa, 则访问路径为localhost:9090/aa-->
<path>/</path>
<uriEncoding>UTF-8</uriEncoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
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