parent
a28cbf77be
commit
16ceac2b98
@ -0,0 +1,29 @@ |
|||||||
|
package com.hai.service; |
||||||
|
|
||||||
|
import com.hai.entity.HighCouponRecycle; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: 胡锐 |
||||||
|
* @Description: 归库记录 |
||||||
|
* @Date: 2021/4/2 21:25 |
||||||
|
*/ |
||||||
|
public interface HighCouponRecycleService { |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author 胡锐 |
||||||
|
* @Description 增加 |
||||||
|
* @Date 2021/4/2 21:26 |
||||||
|
**/ |
||||||
|
void insertCouponRecycle(HighCouponRecycle highCouponRecycle); |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author 胡锐 |
||||||
|
* @Description 查询 |
||||||
|
* @Date 2021/4/2 21:26 |
||||||
|
**/ |
||||||
|
List<HighCouponRecycle> getRecycleList(Map<String,Object> map); |
||||||
|
|
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
package com.hai.service.impl; |
||||||
|
|
||||||
|
import com.hai.dao.HighCouponRecycleMapper; |
||||||
|
import com.hai.entity.HighCouponRecycle; |
||||||
|
import com.hai.entity.HighCouponRecycleExample; |
||||||
|
import com.hai.service.HighCouponRecycleService; |
||||||
|
import org.apache.commons.collections4.MapUtils; |
||||||
|
import org.apache.commons.lang3.StringUtils; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import javax.annotation.Resource; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: 胡锐 |
||||||
|
* @Description: |
||||||
|
* @Date: 2021/4/2 21:27 |
||||||
|
*/ |
||||||
|
@Service("highCouponRecycleService") |
||||||
|
public class HighCouponRecycleServiceImpl implements HighCouponRecycleService { |
||||||
|
|
||||||
|
@Resource |
||||||
|
private HighCouponRecycleMapper highCouponRecycleMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public void insertCouponRecycle(HighCouponRecycle highCouponRecycle) { |
||||||
|
highCouponRecycleMapper.insert(highCouponRecycle); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<HighCouponRecycle> getRecycleList(Map<String, Object> map) { |
||||||
|
HighCouponRecycleExample example = new HighCouponRecycleExample(); |
||||||
|
HighCouponRecycleExample.Criteria criteria = example.createCriteria(); |
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(MapUtils.getString(map, "userPhone"))) { |
||||||
|
criteria.andUserPhoneEqualTo(MapUtils.getString(map, "userPhone")); |
||||||
|
} |
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(MapUtils.getString(map, "orderNo"))) { |
||||||
|
criteria.andOrderNoLike("%" + MapUtils.getString(map, "orderNo") + "%"); |
||||||
|
} |
||||||
|
|
||||||
|
example.setOrderByClause("create_time desc"); |
||||||
|
return highCouponRecycleMapper.selectByExample(example); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue