@@ -9,7 +9,7 @@ import java.util.List; | |||
public interface IssueCouponDetailRepo extends AbstractJpaRepo<IssueCouponDetail, String>{ | |||
IssueCouponDetail findByCouponId(String couponId); | |||
List<IssueCouponDetail> findByCouponId(String couponId); | |||
@Query(" from IssueCouponDetail where couponId = ?1 and status = ?2 order by insertTime ") | |||
List<IssueCouponDetail> listByCouponIdAndStatus(String couponId, CouponStatus status); |
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
/** | |||
@@ -18,6 +19,7 @@ import javax.validation.constraints.NotNull; | |||
@Data | |||
public class OrderExamineReqDTO extends AbstractStaffBizRequestDTO { | |||
@NotBlank | |||
@ApiModelProperty("订单编号") | |||
private String orderNo; | |||
@ApiModelProperty(value = "审核状态") |
@@ -79,7 +79,7 @@ public class CouponManagerImpl extends RedisCacheManager implements CouponManage | |||
IssueCouponInfo couponInfo = issueCouponInfoRepo.findById(req.getId()).orElse(null); | |||
if (couponInfo == null) return; | |||
//是否有卡券详情 | |||
IssueCouponDetail byCouponId = issueCouponDetailRepo.findByCouponId(req.getId()); | |||
List<IssueCouponDetail> byCouponId = issueCouponDetailRepo.findByCouponId(req.getId()); | |||
if (byCouponId != null) { | |||
throw new ManagerException("该卡券有详情,不可刪除"); | |||
} |
@@ -454,7 +454,8 @@ public class IssueOrderQueryManageImpl extends AbstractManagewManager implements | |||
} else { | |||
msg = "发行换货申请审核失败"; | |||
//订单状态要变更(恢复原状态) | |||
order.setOrderStep(IssueOrderStep.WAITING_ACTIVE); | |||
order.setOrderStep(IssueOrderStep.RETURNFAILED); | |||
order.setOrderStatus(IssueOrderStatus.FAIL); | |||
// order.setShippingStatus(ShippingStatus.RECEIVED); | |||
//变更更换表 | |||
rechange.setRechangeStatus(RechangeStatus.FAIL); | |||
@@ -476,14 +477,14 @@ public class IssueOrderQueryManageImpl extends AbstractManagewManager implements | |||
*/ | |||
private CarObuDetails checkSendCardObu(String card, String obuId) throws ManagerException { | |||
// 查询卡 临时代码 | |||
// InvwCardDetails cardDetails = invwCardDetailsRepo.findByCardIdAndStatus(card, InvDeviceStatus.NEW); | |||
InvwCardDetails cardDetails = invwCardDetailsRepo.findByCardId(card); | |||
InvwCardDetails cardDetails = invwCardDetailsRepo.findByCardIdAndStatus(card, InvDeviceStatus.NEW); | |||
// InvwCardDetails cardDetails = invwCardDetailsRepo.findByCardId(card); | |||
if (cardDetails == null) { | |||
throw new ManagerException("当前ETC卡不在库存中"); | |||
} | |||
// 查询签 临时 | |||
// InvwObuDetails obuDetails = invwObuDetailsRepo.findByObuIdAndStatus(obuId,InvDeviceStatus.NEW); | |||
InvwObuDetails obuDetails = invwObuDetailsRepo.findByObuId(obuId); | |||
InvwObuDetails obuDetails = invwObuDetailsRepo.findByObuIdAndStatus(obuId,InvDeviceStatus.NEW); | |||
// InvwObuDetails obuDetails = invwObuDetailsRepo.findByObuId(obuId); | |||
if (obuDetails == null) { | |||
throw new ManagerException("当前OBU不在库存中"); | |||
} |
@@ -81,7 +81,8 @@ public class IssueOrderExaminePageRequest extends JpaPageableDataRequest<IssueOr | |||
hql.append(" and promotionModes = :promotionModes", promotionModes); | |||
if (pass == 1){//待领取 | |||
hql.append(" and orderStep = :orderStep", IssueOrderStep.WAITING_AUDIT); | |||
hql.append(" and receiveStatus is null "); | |||
hql.append(" and "); | |||
hql.append("(receiveStatus is null or receiveStatus = 0)"); | |||
} | |||
if (pass == 2){//待审核 | |||
hql.append(" and orderStep = :orderStep", IssueOrderStep.WAITING_AUDIT); | |||
@@ -90,7 +91,7 @@ public class IssueOrderExaminePageRequest extends JpaPageableDataRequest<IssueOr | |||
if (pass == 3){//审核不通过 | |||
hql.append(" and orderStep = :orderStep", IssueOrderStep.AUDIT_FAIL); | |||
} | |||
if (!"MANAGER".equals(identityType)){//不是管理员根据自己的机构查询 | |||
if (!agencyId.equals("52010106004") && !"MANAGER".equals(identityType)){//黔通管理员可以查所有 | |||
hql.append(" and agencyId = :agencyId", agencyId); | |||
} | |||
hql.append(" and insertTime >= :startTime", startTime); |
@@ -96,7 +96,7 @@ public class IssueOrderPageRequest extends JpaPageableDataRequest<IssueOrderinfo | |||
hql.append(" and insertTime <= :endTime", endTime); | |||
hql.append(" and orderStep = :orderStep", orderStep); | |||
hql.append(" and orderStatus = :orderStatus", orderStatus); | |||
if (!"MANAGER".equals(identityType)){//不是管理员根据自己的机构查询 | |||
if (!agencyId.equals("52010106004") && !"MANAGER".equals(identityType)){//黔通管理员可以查所有 | |||
hql.append(" and agencyId = :agencyId", agencyId); | |||
} | |||
return hql; |
@@ -49,10 +49,11 @@ public class WxSignChannelConfigManagerImpl extends AbstractManager implements W | |||
@Override | |||
public void add(WxCarAddReqDTO reqDto) throws ManagerException { | |||
reqDto.validate(); | |||
CommonWxSignConfig byAgencyId = commonWxSignConfigRepo.findByAgencyIdAndVersion(reqDto.getAgencyId(),reqDto.getVersion()); | |||
if(byAgencyId != null){ | |||
throw new ManagerException("该渠道版本已配置"); | |||
} | |||
//20250731一个渠道可以配置多个 | |||
// CommonWxSignConfig byAgencyId = commonWxSignConfigRepo.findByAgencyIdAndVersion(reqDto.getAgencyId(),reqDto.getVersion()); | |||
// if(byAgencyId != null){ | |||
// throw new ManagerException("该渠道版本已配置"); | |||
// } | |||
CommonWxSignConfig config = copyProperties(reqDto, new CommonWxSignConfig()); | |||
commonWxSignConfigRepo.persist(config); | |||
} |