parent
161e272ee9
commit
65cb50c39d
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,57 @@ |
||||
package com.hai.service; |
||||
|
||||
import com.hai.entity.BsRechargeCode; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @serviceName BsRechargeCodeService.java |
||||
* @author Sum1Dream |
||||
* @version 1.0.0 |
||||
* @Description // 充值编码接口
|
||||
* @createTime 10:38 2022/7/20 |
||||
**/ |
||||
public interface BsRechargeCodeService { |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @name insertRechargeCode.java |
||||
* @Description // 新增充值编码
|
||||
* @Date 10:39 2022/7/20 |
||||
* @Param [com.hai.entity.BsRechargeCode] |
||||
* @return void |
||||
*/ |
||||
void insertRechargeCode(BsRechargeCode rechargeCode); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @name updateRechargeCode.java |
||||
* @Description // 修改充值编码
|
||||
* @Date 10:39 2022/7/20 |
||||
* @Param [com.hai.entity.BsRechargeCode] |
||||
* @return void |
||||
*/ |
||||
void updateRechargeCode(BsRechargeCode rechargeCode); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @name getListRechargeCode.java |
||||
* @Description //TODO
|
||||
* @Date 10:40 2022/7/20 |
||||
* @Param [java.util.Map<java.lang.String,java.lang.Object>] |
||||
* @return java.util.List<com.hai.entity.BsRechargeCode> |
||||
*/ |
||||
List<BsRechargeCode> getListRechargeCode(Map<String, Object> map); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @name findByMap.java |
||||
* @Description // 查询详情
|
||||
* @Date 13:58 2022/7/20 |
||||
* @Param [java.util.Map<java.lang.String,java.lang.Object>] |
||||
* @return com.hai.entity.BsRechargeCode |
||||
*/ |
||||
BsRechargeCode findByMap(Map<String, Object> map); |
||||
|
||||
} |
@ -0,0 +1,63 @@ |
||||
package com.hai.service.impl; |
||||
|
||||
import com.hai.dao.BsRechargeCodeMapper; |
||||
import com.hai.entity.BsRechargeCode; |
||||
import com.hai.entity.BsRechargeCodeExample; |
||||
import com.hai.service.BsRechargeCodeService; |
||||
import org.apache.commons.collections4.MapUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service("bsRechargeCodeService") |
||||
public class BsRechargeCodeServiceImpl implements BsRechargeCodeService { |
||||
|
||||
|
||||
@Resource |
||||
private BsRechargeCodeMapper rechargeCodeMapper; |
||||
|
||||
@Override |
||||
public void insertRechargeCode(BsRechargeCode rechargeCode) { |
||||
rechargeCodeMapper.insert(rechargeCode); |
||||
} |
||||
|
||||
@Override |
||||
public void updateRechargeCode(BsRechargeCode rechargeCode) { |
||||
rechargeCodeMapper.updateByPrimaryKey(rechargeCode); |
||||
} |
||||
|
||||
@Override |
||||
public List<BsRechargeCode> getListRechargeCode(Map<String, Object> map) { |
||||
|
||||
BsRechargeCodeExample example = new BsRechargeCodeExample(); |
||||
BsRechargeCodeExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
return rechargeCodeMapper.selectByExample(example); |
||||
} |
||||
|
||||
@Override |
||||
public BsRechargeCode findByMap(Map<String, Object> map) { |
||||
BsRechargeCodeExample example = new BsRechargeCodeExample(); |
||||
BsRechargeCodeExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
if (MapUtils.getInteger(map, "type") != null) { |
||||
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type")); |
||||
} |
||||
if (MapUtils.getString(map, "sourceId") != null) { |
||||
criteria.andSourceIdEqualTo(MapUtils.getString(map, "SourceId")); |
||||
} |
||||
if (MapUtils.getInteger(map, "rechargePlatform") != null) { |
||||
criteria.andRechargePlatformEqualTo(MapUtils.getInteger(map, "rechargePlatform")); |
||||
} |
||||
|
||||
List<BsRechargeCode> list = rechargeCodeMapper.selectByExample(example); |
||||
|
||||
if (list.size() > 0) { |
||||
list.get(0); |
||||
} |
||||
|
||||
return null; |
||||
} |
||||
} |
Loading…
Reference in new issue