huminghao пре 1 недеља
родитељ
комит
828f2a539c

+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/api/AgencyController.java Прегледај датотеку

@@ -83,7 +83,7 @@ public class AgencyController extends MyValidController {

@ApiOperation(value = "查询所有启用渠道信息")
@PostMapping(value = "/agencyqueryall")
public ApiResponse<List<AgencyQueryAllModel> > agencyqueryall(@RequestBody @Valid AgencyQueryAllReqDTO reqDTO){
public ApiResponse<List<AgencyQueryAllModel> > agencyqueryall(@RequestBody @Valid AgencyQueryAllReqDTO reqDTO) throws ManagerException {
return ApiResponse.of(agencyManager.queryAll(reqDTO));
}


+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/agency/AgencyManager.java Прегледај датотеку

@@ -31,7 +31,7 @@ public interface AgencyManager {

List<StringKeyValue> listByNameLike(AgencyLikeNameReqDTO req);

List<AgencyQueryAllModel> queryAll(AgencyQueryAllReqDTO reqDTO);
List<AgencyQueryAllModel> queryAll(AgencyQueryAllReqDTO reqDTO) throws ManagerException;

CommExportExcelResponse export(AgencyPageRequestDTO reqDto) throws ManagerException;
}

+ 8
- 4
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/agency/AgencyManagerImpl.java Прегледај датотеку

@@ -8,7 +8,6 @@ import cn.com.taiji.common.pub.StringTools;
import cn.com.taiji.core.entity.basic.QtkAgency;
import cn.com.taiji.core.entity.basic.QtkAgencyMap;
import cn.com.taiji.core.entity.basic.QtkAgencyModel;
import cn.com.taiji.core.entity.basic.QtkServiceHall;
import cn.com.taiji.core.entity.dict.BucketFileBus;
import cn.com.taiji.core.entity.dict.EnableStatus;
import cn.com.taiji.core.entity.dict.log.OperateType;
@@ -20,16 +19,15 @@ import cn.com.taiji.core.repo.jpa.basic.QtkAgencyRepo;
import cn.com.taiji.core.repo.jpa.user.StaffRepo;
import cn.com.taiji.userw.dto.agency.*;
import cn.com.taiji.userw.manager.AbstractUserwManager;
import cn.com.taiji.userw.model.MyFinals;
import cn.com.taiji.userw.model.agency.AgencyExcelModel;
import cn.com.taiji.userw.model.agency.AgencyQueryAllModel;
import cn.com.taiji.userw.model.agency.QtkAgencyBkModel;
import cn.com.taiji.userw.model.agency.QtkAgencyModelDetails;
import cn.com.taiji.userw.model.comm.CommExportExcelResponse;
import cn.com.taiji.userw.model.serviceHall.ServiceHallExcelModel;
import cn.com.taiji.userw.repo.jpa.request.AgencyPageRequest;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.excel.EasyExcel;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -260,9 +258,15 @@ public class AgencyManagerImpl extends AbstractUserwManager implements AgencyMan
}

@Override
public List<AgencyQueryAllModel> queryAll(AgencyQueryAllReqDTO reqDTO) {
public List<AgencyQueryAllModel> queryAll(AgencyQueryAllReqDTO reqDTO) throws ManagerException{
List<QtkAgency> allEnable = qtkAgencyRepo.findAllEnable();

String agencyIdByToken = findAgencyIdByToken(reqDTO.getAccessToken());
//非黔通只查当前渠道的数据
if (!MyFinals.QTZL_AGENCY_ID.equals(agencyIdByToken)){
allEnable = allEnable.stream().filter(t -> t.getAgencyId().equals(agencyIdByToken)).collect(Collectors.toList());
}

if (StringTools.hasText(reqDTO.getAgencyType())){
allEnable = allEnable.stream().filter(t -> t.getType().equals(reqDTO.getAgencyType())).collect(Collectors.toList());
}

+ 2
- 0
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/model/MyFinals.java Прегледај датотеку

@@ -17,4 +17,6 @@ public class MyFinals extends SysFinals {
public final static int LOGIN_FAILED_EXPIRE = 5;// 分钟
public static final String TOKEN_HEADER = "Authorization";
public static final int EXPIRE_TIME_SECOND = 60;
public static String QTZL_AGENCY_ID = "52010106004";

}

Loading…
Откажи
Сачувај