|
|
@ -7,9 +7,7 @@ import com.ccsens.ptos_open.bean.dto.BusinessDto; |
|
|
import com.ccsens.ptos_open.bean.po.OpenBusiness; |
|
|
import com.ccsens.ptos_open.bean.po.OpenBusiness; |
|
|
import com.ccsens.ptos_open.bean.po.OpenBusinessPlugin; |
|
|
import com.ccsens.ptos_open.bean.po.OpenBusinessPlugin; |
|
|
import com.ccsens.ptos_open.bean.po.OpenBusinessPluginExample; |
|
|
import com.ccsens.ptos_open.bean.po.OpenBusinessPluginExample; |
|
|
import com.ccsens.ptos_open.bean.po.OpenPluginWithBLOBs; |
|
|
|
|
|
import com.ccsens.ptos_open.bean.vo.BusinessVo; |
|
|
import com.ccsens.ptos_open.bean.vo.BusinessVo; |
|
|
import com.ccsens.ptos_open.bean.vo.PluginVo; |
|
|
|
|
|
import com.ccsens.ptos_open.persist.dao.BusinessDao; |
|
|
import com.ccsens.ptos_open.persist.dao.BusinessDao; |
|
|
import com.ccsens.ptos_open.persist.dao.PluginDao; |
|
|
import com.ccsens.ptos_open.persist.dao.PluginDao; |
|
|
import com.ccsens.ptos_open.persist.mapper.OpenBusinessPluginMapper; |
|
|
import com.ccsens.ptos_open.persist.mapper.OpenBusinessPluginMapper; |
|
|
@ -18,7 +16,6 @@ import com.ccsens.ptos_open.util.OpenCodeError; |
|
|
import com.ccsens.util.exception.BaseException; |
|
|
import com.ccsens.util.exception.BaseException; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import lombok.SneakyThrows; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
@ -126,4 +123,27 @@ public class BusinessService implements IBusinessService { |
|
|
businessPlugin.setDebug(param.getDebug()); |
|
|
businessPlugin.setDebug(param.getDebug()); |
|
|
businessPluginMapper.updateByPrimaryKeySelective(businessPlugin); |
|
|
businessPluginMapper.updateByPrimaryKeySelective(businessPlugin); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public BusinessVo.BusinessInfo queryIdBusiness(BusinessDto.QueryIdBusiness param, Long userId) { |
|
|
|
|
|
//检查该id业务是否存在
|
|
|
|
|
|
Boolean b = businessDao.verifyById(param.getBusinessId()); |
|
|
|
|
|
if (b == null || !b) { |
|
|
|
|
|
throw new BaseException(OpenCodeError.NOT_BUSINESS); |
|
|
|
|
|
} |
|
|
|
|
|
//查询业务信息
|
|
|
|
|
|
OpenBusiness openBusiness = businessDao.selectByPrimaryKey(param.getBusinessId()); |
|
|
|
|
|
BusinessVo.BusinessInfo businessInfo = new BusinessVo.BusinessInfo(); |
|
|
|
|
|
businessInfo.setId(openBusiness.getId()); |
|
|
|
|
|
businessInfo.setName(openBusiness.getName()); |
|
|
|
|
|
businessInfo.setSecret(openBusiness.getSecret()); |
|
|
|
|
|
businessInfo.setPub(openBusiness.getPub()); |
|
|
|
|
|
businessInfo.setCreateTime(openBusiness.getCreatedAt().getTime()); |
|
|
|
|
|
businessInfo.setUpdateTime(openBusiness.getUpdatedAt().getTime()); |
|
|
|
|
|
businessInfo.setDescription(openBusiness.getDescription()); |
|
|
|
|
|
businessInfo.setStartUsing(openBusiness.getStartUsing()); |
|
|
|
|
|
businessInfo.setAppId(openBusiness.getAppId()); |
|
|
|
|
|
return businessInfo; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|