wei.peng 7 years ago
commit ffad29d5b9

@ -44,7 +44,7 @@ public class FactoryStoreController {
@GetMapping(value="/list") @GetMapping(value="/list")
@ApiOperation(value="查询服务",notes="返回列表") @ApiOperation(value="查询服务",notes="返回列表")
public ResultBean list(){ public ResultBean list(){
List<FactoryStore> fsList = dataMoreService.listFactoryStore(); List<FactoryStore> fsList = null;
return new ResultBean(true,"查询结果:" + fsList.size(),fsList); return new ResultBean(true,"查询结果:" + fsList.size(),fsList);
} }

@ -15,7 +15,7 @@ import java.util.List;
@Repository @Repository
public interface IFactoryStoreDao { public interface IFactoryStoreDao {
List<FactoryStore> listFactoryStore(); // List<FactoryStore> listFactoryStore();
} }

@ -21,12 +21,12 @@ public class FactoryStoreDaoImpl implements IFactoryStoreDao {
@Autowired @Autowired
private EntityManager entityManager; private EntityManager entityManager;
public List<FactoryStore> listFactoryStore(){ /*public List<FactoryStore> listFactoryStore(){
List<FactoryStore> list = entityManager.createQuery("from FactoryStore").getResultList(); List<FactoryStore> list = entityManager.createQuery("from FactoryStore").getResultList();
for(FactoryStore fs : list){ for(FactoryStore fs : list){
fs.setStoreCode(""); fs.setStoreCode("");
} }
return list; return list;
} }*/
} }

@ -1,7 +1,9 @@
package cn.estsh.i3plus.core.apiservice.schedulejob; package cn.estsh.i3plus.core.apiservice.schedulejob;
import cn.estsh.impp.framework.base.BaseImppScheduleJob;
import cn.estsh.impp.framework.boot.core.ApplicationProperties; import cn.estsh.impp.framework.boot.core.ApplicationProperties;
import cn.estsh.impp.framework.boot.quartz.job.ImppJob; import cn.estsh.impp.framework.boot.quartz.job.ImppJob;
import io.swagger.annotations.ApiOperation;
import org.quartz.Job; import org.quartz.Job;
import org.quartz.JobExecutionContext; import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException; import org.quartz.JobExecutionException;
@ -11,20 +13,22 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
* @Author : alwaysfrin * @Author : alwaysfrin
* @CreateDate : 2018-09-30 13:25 * @CreateDate : 2018-09-30 13:25
* @Modify: * @Modify:
**/ **/
public class DemoJob implements Job { @ApiOperation("定时任务demo")
public class DemoJob extends BaseImppScheduleJob {
public static final Logger LOGGER = LoggerFactory.getLogger(DemoJob.class); public static final Logger LOGGER = LoggerFactory.getLogger(DemoJob.class);
@Autowired public DemoJob() {
public ApplicationProperties applicationProperties; super(DemoJob.class,"定时任务demo");
}
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
@Override
public void executeImppJob(JobExecutionContext context, ApplicationProperties applicationProperties) {
LOGGER.info("projectName{},port:{}",applicationProperties.getApplicationName(),applicationProperties.getServerPort()); LOGGER.info("projectName{},port:{}",applicationProperties.getApplicationName(),applicationProperties.getServerPort());
} }
} }

@ -1,5 +1,5 @@
#项目端口 #项目端口
server.port=8080 server.port=51010
#用户登陆路径 #用户登陆路径
filter.shiro.user.loginuri = /login filter.shiro.user.loginuri = /login
@ -21,7 +21,11 @@ impp.web.cross = false
impp.web.cross.hosts = http://localhost impp.web.cross.hosts = http://localhost
################ log-db据源 ################ ################ log-db据源 ################
spring.data.mongodb.uri=mongodb://sa:i3plus@192.168.1.55:27017/i3plus spring.data.mongodb.database=mongoDBSource
spring.data.mongodb.uri=192.168.1.55:27017
spring.data.mongodb.username=sa
spring.data.mongodb.password=i3plus
spring.data.mongodb.port=27017
################ 主数据源 ################ ################ 主数据源 ################
# mysql # mysql
@ -39,22 +43,22 @@ spring.data.mongodb.uri=mongodb://sa:i3plus@192.168.1.55:27017/i3plus
##主数据源,读写 ##主数据源,读写
#impp.write.datasource.type=com.zaxxer.hikari.HikariDataSource #impp.write.datasource.type=com.zaxxer.hikari.HikariDataSource
impp.write.datasource.driver-class-name=com.mysql.jdbc.Driver impp.write.datasource.driver-class-name=com.mysql.jdbc.Driver
impp.write.datasource.jdbc-url=jdbc:mysql://192.168.1.55:3306/dev_i3_core?autoReconnect=true&useSSL=false&characterEncoding=utf-8 impp.write.datasource.jdbc-url=jdbc:mysql://192.168.1.55:3306/test_i3_core?autoReconnect=true&useSSL=false&characterEncoding=utf-8
impp.write.datasource.username=i3_dev_core impp.write.datasource.username=impp_test_zzm
impp.write.datasource.password=i3_core_pass impp.write.datasource.password=123456
##辅数据源,只读 ##辅数据源,只读
#impp.read.datasource.type=com.zaxxer.hikari.HikariDataSource #impp.read.datasource.type=com.zaxxer.hikari.HikariDataSource
impp.read.datasource.driver-class-name=com.mysql.jdbc.Driver impp.read.datasource.driver-class-name=com.mysql.jdbc.Driver
impp.read.datasource.jdbc-url=jdbc:mysql://192.168.1.55:3306/dev_i3_core?autoReconnect=true&useSSL=false&characterEncoding=utf-8 impp.read.datasource.jdbc-url=jdbc:mysql://192.168.1.55:3306/test_i3_core?autoReconnect=true&useSSL=false&characterEncoding=utf-8
impp.read.datasource.username=i3_dev_core impp.read.datasource.username=impp_test_zzm
impp.read.datasource.password=i3_core_pass impp.read.datasource.password=123456
##############定时任务持久化############## ##############定时任务持久化##############
impp.schedule.datasource.driver-class-name=com.mysql.jdbc.Driver impp.schedule.datasource.driver-class-name=com.mysql.jdbc.Driver
impp.schedule.datasource.jdbc-url=jdbc:mysql://192.168.1.55:3306/dev_i3_schedule?autoReconnect=true&useSSL=false&characterEncoding=utf-8 impp.schedule.datasource.jdbc-url=jdbc:mysql://192.168.1.55:3306/test_i3_schedule?autoReconnect=true&useSSL=false&characterEncoding=utf-8
impp.schedule.datasource.username=i3_dev_schedule impp.schedule.datasource.username=impp_test_zzm
impp.schedule.datasource.password=i3_schedule_pass impp.schedule.datasource.password=123456
impp.schedule.datasource.max-connections=20 impp.schedule.datasource.max-connections=20
#定时任务在服务启动后多少秒执行 #定时任务在服务启动后多少秒执行
impp.schedule.start.after-second=20 impp.schedule.start.after-second=20

Loading…
Cancel
Save