parent
887306240c
commit
cd5f22f315
@ -0,0 +1,79 @@ |
||||
package com.hfkj.mer; |
||||
|
||||
import com.hfkj.entity.BsMerPayConfig; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
public interface BsMerPayConfigService { |
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name create |
||||
* @Description // 创建
|
||||
* @Date 15:11 2024/4/19 |
||||
* @Param GoodsBrand |
||||
* @return void |
||||
*/ |
||||
void create(BsMerPayConfig merPayConfig); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name update |
||||
* @Description // 修改
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param GoodsBrand |
||||
* @return void |
||||
*/ |
||||
void update(BsMerPayConfig merPayConfig); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name delete |
||||
* @Description // 修改
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param id |
||||
* @return void |
||||
*/ |
||||
void delete(Long id , Boolean fullDelete); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name queryDetail |
||||
* @Description // 根据ID查询产品类型详情
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param id |
||||
* @return com.hfkj.entity.GoodsBrand |
||||
*/ |
||||
BsMerPayConfig queryDetail(Long id); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name findGoodsOrder |
||||
* @Description // 查询详情
|
||||
* @Date 15:44 2023/4/20 |
||||
* @Param [orderNo] |
||||
* @Return com.hai.entity.GoodsOrder |
||||
*/ |
||||
BsMerPayConfig findGoodsOrder(Long merId); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name queryDetailByMap |
||||
* @Description // 根据多条件查询产品类型
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param map |
||||
* @return com.hfkj.entity.GoodsBrand |
||||
*/ |
||||
BsMerPayConfig queryDetailByMap(Map<String , Object> map); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name getList |
||||
* @Description // 根据多条件查询列表
|
||||
* @Date 15:13 2024/4/19 |
||||
* @Param map |
||||
* @return java.util.List<com.hfkj.entity.GoodsBrand> |
||||
*/ |
||||
List<BsMerPayConfig> getList(Map<String , Object> map); |
||||
|
||||
} |
@ -0,0 +1,90 @@ |
||||
package com.hfkj.mer.impl; |
||||
|
||||
import com.hfkj.dao.BsMerPayConfigMapper; |
||||
import com.hfkj.entity.BsMerPayConfig; |
||||
import com.hfkj.entity.BsMerPayConfigExample; |
||||
import com.hfkj.entity.GoodsMsg; |
||||
import com.hfkj.mer.BsMerPayConfigService; |
||||
import org.apache.commons.collections4.MapUtils; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.Collections; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service("BsMerPayConfigService") |
||||
public class BsMerPayConfigServiceImpl implements BsMerPayConfigService { |
||||
|
||||
@Resource |
||||
private BsMerPayConfigMapper bsMerPayConfigMapper; |
||||
|
||||
@Override |
||||
public void create(BsMerPayConfig merPayConfig) { |
||||
bsMerPayConfigMapper.insert(merPayConfig); |
||||
} |
||||
|
||||
@Override |
||||
public void update(BsMerPayConfig merPayConfig) { |
||||
bsMerPayConfigMapper.updateByPrimaryKeySelective(merPayConfig); |
||||
} |
||||
|
||||
@Override |
||||
public void delete(Long id, Boolean fullDelete) { |
||||
if (fullDelete) { |
||||
bsMerPayConfigMapper.deleteByPrimaryKey(id); |
||||
} else { |
||||
BsMerPayConfig merPayConfig = queryDetail(id); |
||||
merPayConfig.setStatus(0); |
||||
merPayConfig.setUpdateTime(new Date()); |
||||
update(merPayConfig); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public BsMerPayConfig queryDetail(Long id) { |
||||
return bsMerPayConfigMapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public BsMerPayConfig findGoodsOrder(Long merId) { |
||||
BsMerPayConfigExample example = new BsMerPayConfigExample(); |
||||
BsMerPayConfigExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
criteria.andMerIdEqualTo(merId); |
||||
|
||||
List<BsMerPayConfig> list = bsMerPayConfigMapper.selectByExample(example); |
||||
if (list != null && !list.isEmpty()) { |
||||
return list.get(0); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public BsMerPayConfig queryDetailByMap(Map<String, Object> map) { |
||||
BsMerPayConfigExample example = new BsMerPayConfigExample(); |
||||
BsMerPayConfigExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
if (MapUtils.getLong(map, "merId") != null) { |
||||
criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId")); |
||||
} |
||||
if (MapUtils.getLong(map, "payPlatform") != null) { |
||||
criteria.andMerIdEqualTo(MapUtils.getLong(map, "payPlatform")); |
||||
} |
||||
|
||||
criteria.andStatusEqualTo(1); |
||||
|
||||
List<BsMerPayConfig> list = bsMerPayConfigMapper.selectByExample(example); |
||||
if (list != null && !list.isEmpty()) { |
||||
return list.get(0); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public List<BsMerPayConfig> getList(Map<String, Object> map) { |
||||
return Collections.emptyList(); |
||||
} |
||||
} |
@ -0,0 +1,29 @@ |
||||
package com.hfkj.sysenum.mer; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
@Getter |
||||
public enum PayPlatformEnum { |
||||
|
||||
/** |
||||
* 菜单 |
||||
*/ |
||||
type1(1, "惠支付"), |
||||
|
||||
/** |
||||
* 按钮 |
||||
*/ |
||||
type2(2, "工会卡"), |
||||
; |
||||
|
||||
private int code; |
||||
|
||||
private String name; |
||||
|
||||
|
||||
PayPlatformEnum(int code, String name) { |
||||
this.code = code; |
||||
this.name = name; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue