Commit e3f81feb by 程裕兵

feat:enum error

parent d1895f33
......@@ -71,16 +71,16 @@ public class StudioCashierRecordRpService extends
wrapper.eq(StudioCashierRecord.BUYER_NAME, query.getBuyerName());
}
if (null != query.getTransState()) {
wrapper.eq(StudioCashierRecord.TRANS_STATE, query.getTransState());
wrapper.eq(StudioCashierRecord.TRANS_STATE, query.getTransState().getCode());
}
if (null != query.getOrderType()) {
wrapper.eq(StudioCashierRecord.ORDER_TYPE, query.getOrderType().getCode());
}
if (null != query.getTransType()) {
wrapper.eq(StudioCashierRecord.TRANS_TYPE, query.getTransType());
wrapper.eq(StudioCashierRecord.TRANS_TYPE, query.getTransType().getCode());
}
if (null != query.getSubChannel()) {
wrapper.eq(StudioCashierRecord.SUB_CHANNEL, query.getSubChannel());
wrapper.eq(StudioCashierRecord.SUB_CHANNEL, query.getSubChannel().getCode());
}
if (null != query.getCreateStartTime()) {
wrapper.ge(StudioCashierRecord.CREATE_TIME, query.getCreateStartTime());
......
......@@ -45,25 +45,32 @@ import org.springframework.stereotype.Service;
public class StudioMerchantApplyRpService extends
MapperRepoService<Long, StudioMerchantApply, StudioMerchantApplyMapper> {
private List<String> convertApplyTypeList(List<ApplyTypeEnum> applyTypeList) {
if (CollectionUtil.isEmpty(applyTypeList)) {
return null;
}
return applyTypeList.stream().map(ApplyTypeEnum::getCode).collect(Collectors.toList());
}
public Page<StudioMerchantApply> page(PageStudioMerchantApplyQuery params) {
QueryWrapper<StudioMerchantApply> wrapper = new QueryWrapper<>();
if (StringUtil.isNotBlank(params.getShortName())) {
wrapper.like(StudioMerchantApply.SHORT_NAME, params.getShortName());
}
if (CollectionUtil.isNotEmpty(params.getApplyTypeList())) {
wrapper.in(StudioMerchantApply.APPLY_TYPE, params.getApplyTypeList());
wrapper.in(StudioMerchantApply.APPLY_TYPE, convertApplyTypeList(params.getApplyTypeList()));
}
if (null != params.getStudioId()) {
wrapper.eq(StudioMerchantApply.STUDIO_ID, params.getStudioId());
}
if (null != params.getCompanyType()) {
wrapper.eq(StudioMerchantApply.COMPANY_TYPE, params.getCompanyType());
wrapper.eq(StudioMerchantApply.COMPANY_TYPE, params.getCompanyType().getCode());
}
if (StringUtil.isNotBlank(params.getMerchantName())) {
wrapper.like(StudioMerchantApply.MERCHANT_NAME, params.getMerchantName());
}
if (null != params.getOpenState()) {
wrapper.eq(StudioMerchantApply.OPEN_STATE, params.getOpenState());
wrapper.eq(StudioMerchantApply.OPEN_STATE, params.getOpenState().getCode());
}
if (StringUtil.isNotBlank(params.getMerchantNo())) {
wrapper.eq(StudioMerchantApply.MERCHANT_NO, params.getMerchantNo());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment