fix:十二分制-积分流水
This commit is contained in:
@@ -2,8 +2,14 @@ package com.cool.store.dao.tp;
|
||||
|
||||
import com.cool.store.entity.tp.TpScoreJournalDO;
|
||||
import com.cool.store.mapper.tp.TpScoreJournalMapper;
|
||||
import com.cool.store.request.tp.TpScoreJournalQueryRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -24,4 +30,38 @@ public class TpScoreJournalDAO {
|
||||
public void insertSelective(TpScoreJournalDO record) {
|
||||
tpScoreJournalMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
public List<TpScoreJournalDO> getList(TpScoreJournalQueryRequest request) {
|
||||
Example example = new Example(TpScoreJournalDO.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
if (StringUtils.isNotBlank(request.getStoreNameOrNum())) {
|
||||
criteria.andCondition("store_num LIKE '%" + request.getStoreNameOrNum() + "%' OR store_name LIKE '%" + request.getStoreNameOrNum() + "%'");
|
||||
}
|
||||
if (Objects.nonNull(request.getJoinBrand())) {
|
||||
criteria.andEqualTo("joinBrand", request.getJoinBrand());
|
||||
}
|
||||
if (Objects.nonNull(request.getJoinModel())) {
|
||||
criteria.andEqualTo("joinModel", request.getJoinModel());
|
||||
}
|
||||
if (Objects.nonNull(request.getStoreType())) {
|
||||
criteria.andEqualTo("storeType", request.getStoreType());
|
||||
}
|
||||
if (Objects.nonNull(request.getStartDate())) {
|
||||
criteria.andGreaterThanOrEqualTo("occurDate", request.getStartDate());
|
||||
}
|
||||
if (Objects.nonNull(request.getEndDate())) {
|
||||
criteria.andLessThanOrEqualTo("occurDate", request.getEndDate());
|
||||
}
|
||||
if (Objects.nonNull(request.getApplyType())) {
|
||||
criteria.andEqualTo("applyType", request.getApplyType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(request.getApplyNo())) {
|
||||
criteria.andLike("applyNo", "%" + request.getApplyNo() + "%");
|
||||
}
|
||||
example.setOrderByClause("createTime DESC");
|
||||
return tpScoreJournalMapper.selectByExample(example);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user