base基类调整

yun-zuoyi
alwaysfrin 7 years ago
parent a9e6dc069f
commit 972b6bc064

@ -17,32 +17,32 @@ public interface IDataSimpleService {
void saveMachineFactory(MachineFactory machineFactory);
@Transactional
/*@Transactional
void updateMachineFactoryNameById(long id, String factoryName);
@Transactional
void deleteMachineFactoryById(long id);
/**
*//**
*
* @param factoryName
* @return
*/
*//*
@Transactional(readOnly = true)
List<MachineFactory> findMachineFactoryByFactoryName(String factoryName);
/**
*//**
* code
* @param factoryCode
* @return
*/
*//*
@Transactional(readOnly = true)
List<MachineFactory> findMachineFactoryByFactoryCode(String factoryCode);
/**
*//**
*
* @return
*/
*//*
@Transactional(readOnly = true)
List<MachineFactory> findMachineFactorySpecial();
List<MachineFactory> findMachineFactorySpecial();*/
}

@ -2,6 +2,7 @@ package cn.estsh.i3plus.core.apiservice.controller;
import cn.estsh.i3plus.core.api.iservice.base.ISystemLoginService;
import cn.estsh.i3plus.platform.common.tool.EncryptTool;
import cn.estsh.impp.framework.base.controller.CoreBaseController;
import cn.estsh.impp.framework.boot.util.ResultBean;
import cn.estsh.i3plus.pojo.platform.bean.SessionUser;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
@ -30,15 +31,10 @@ import java.util.Map;
**/
@RestController
@Api(description="登陆授权demo")
public class DemoAuthController {
public class DemoAuthController extends CoreBaseController {
public static final Logger LOGGER = LoggerFactory.getLogger(DemoAuthController.class);
@Autowired
private ISystemLoginService systemLoginService;
/**
*
*/
@Resource(name="redisCore")
private ImppRedis imppRedis;
@GetMapping(value="/login")
@ApiOperation(value="登陆",notes="登陆")

@ -1,21 +0,0 @@
package cn.estsh.i3plus.core.apiservice.dao;
import cn.estsh.i3plus.pojo.platform.bean.FactoryStore;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-09-12 14:55
* @Modify:
**/
@Repository
public interface IFactoryStoreDao {
// List<FactoryStore> listFactoryStore();
}

@ -10,17 +10,18 @@ import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Description : crudrepositoryhql
* @Description : hqldemo
* crudrepositoryhql
* @Reference : sql @Query(sql,nativeQuery=true)
* @Author : alwaysfrin
* @CreateDate : 2018-09-05 16:41
* @Modify:
**/
@Repository
//@Repository
public interface IMachineFactoryDao extends CrudRepository<MachineFactory,Long> {
//此处findBy开头会自动根据属性名进行查询
List<MachineFactory> findByFactoryName(String factoryName);
/*List<MachineFactory> findByFactoryName(String factoryName);
@Modifying
@Query("update MachineFactory mf set mf.factoryName = :factoryName where mf.id = :id")
@ -40,5 +41,5 @@ public interface IMachineFactoryDao extends CrudRepository<MachineFactory,Long>
//自定义Hql
@Query("from MachineFactory mf where mf.createDatetime like '2018-01-01%'")
List<MachineFactory> findMachineFactorySpecial();
List<MachineFactory> findMachineFactorySpecial();*/
}

@ -1,32 +0,0 @@
package cn.estsh.i3plus.core.apiservice.daoimpl;
import cn.estsh.i3plus.core.apiservice.dao.IFactoryStoreDao;
import cn.estsh.i3plus.pojo.platform.bean.FactoryStore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.persistence.EntityManager;
import java.util.List;
/**
* @Description : demo
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-09-12 15:35
* @Modify:
**/
@Service
public class FactoryStoreDaoImpl implements IFactoryStoreDao {
@Autowired
private EntityManager entityManager;
/*public List<FactoryStore> listFactoryStore(){
List<FactoryStore> list = entityManager.createQuery("from FactoryStore").getResultList();
for(FactoryStore fs : list){
fs.setStoreCode("");
}
return list;
}*/
}

@ -1,16 +1,11 @@
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.quartz.job.ImppJob;
import cn.estsh.impp.framework.base.schedule.BaseImppScheduleJob;
import cn.estsh.impp.framework.boot.init.ApplicationProperties;
import io.swagger.annotations.ApiOperation;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
/**
* @Description :

@ -32,7 +32,7 @@ public class DataSimpleServiceImpl implements IDataSimpleService {
machineFactory.setId(new SnowflakeIdMaker().nextId());
machineFactoryDao.save(machineFactory);
}
/*
@Override
public void updateMachineFactoryNameById(long id, String factoryName) {
machineFactoryDao.updateMachineFactoryNameById(id,factoryName);
@ -59,5 +59,5 @@ public class DataSimpleServiceImpl implements IDataSimpleService {
@Override
public List<MachineFactory> findMachineFactorySpecial() {
return machineFactoryDao.findMachineFactorySpecial();
}
}*/
}

@ -0,0 +1,34 @@
package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-11-09 10:00
* @Modify:
**/
public class ArraySort implements Runnable {
private String num;
public ArraySort(int num){
this.num = num + "";
}
public static void main(String[] args){
int[] num = {11,3,9,5,1,4,15};
for(int i=0;i<num.length;i++){
new Thread(new ArraySort(num[i])).start();
}
}
@Override
public void run() {
try {
Thread.sleep(Integer.parseInt(num));
System.out.println(num);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
Loading…
Cancel
Save