|
@ -1,10 +1,14 @@ |
|
|
package com.ccsens.tall.service; |
|
|
package com.ccsens.tall.service; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
import com.ccsens.tall.bean.po.ProShow; |
|
|
import com.ccsens.tall.bean.po.ProShow; |
|
|
|
|
|
import com.ccsens.tall.bean.po.ProShowExample; |
|
|
import com.ccsens.tall.persist.dao.ProShowDao; |
|
|
import com.ccsens.tall.persist.dao.ProShowDao; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
@Service |
|
|
@Service |
|
|
public class ProShowService implements IProShowService{ |
|
|
public class ProShowService implements IProShowService{ |
|
|
@Autowired |
|
|
@Autowired |
|
@ -14,4 +18,17 @@ public class ProShowService implements IProShowService{ |
|
|
public void saveProShow(ProShow proShow) { |
|
|
public void saveProShow(ProShow proShow) { |
|
|
proShowDao.insertSelective(proShow); |
|
|
proShowDao.insertSelective(proShow); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public ProShow selectByProjectId(Long projectId) throws Exception { |
|
|
|
|
|
ProShow proShow = null; |
|
|
|
|
|
|
|
|
|
|
|
ProShowExample proShowExample = new ProShowExample(); |
|
|
|
|
|
proShowExample.createCriteria().andProjectIdEqualTo(projectId); |
|
|
|
|
|
List<ProShow> proShowList = proShowDao.selectByExample(proShowExample); |
|
|
|
|
|
if(CollectionUtil.isNotEmpty(proShowList)){ |
|
|
|
|
|
proShow = proShowList.get(0); |
|
|
|
|
|
} |
|
|
|
|
|
return proShow; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|