master
parent
9285ee697f
commit
c35581547e
@ -0,0 +1,78 @@ |
||||
package com.hfkj.service.goods; |
||||
|
||||
|
||||
import com.hfkj.entity.BsOrderMember; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
public interface BsOrderMemberService { |
||||
|
||||
/** |
||||
* @MethodName create |
||||
* @Description: 创建 |
||||
* @param orderMember |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/9/5 下午4:18 |
||||
*/ |
||||
void create(BsOrderMember orderMember); |
||||
|
||||
/** |
||||
* @MethodName update |
||||
* @Description: 更新 |
||||
* @param orderMember |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/9/5 下午4:19 |
||||
*/ |
||||
void update(BsOrderMember orderMember); |
||||
|
||||
/** |
||||
* @MethodName delete |
||||
* @Description: 删除 |
||||
* @param id |
||||
* @param fullDelete |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/9/5 下午4:19 |
||||
*/ |
||||
void delete(Long id , Boolean fullDelete); |
||||
|
||||
/** |
||||
* @MethodName queryDetail |
||||
* @Description: 查询详情 |
||||
* @param id |
||||
* @return: com.hfkj.entity.BsOrderMember |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/9/5 下午4:19 |
||||
*/ |
||||
BsOrderMember queryDetail(Long id); |
||||
|
||||
/** |
||||
* @MethodName findGoodsOrder |
||||
* @Description: 根据订单号查询 |
||||
* @param orderNo |
||||
* @return: com.hfkj.entity.BsOrderMember |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/9/5 下午4:22 |
||||
*/ |
||||
BsOrderMember findGoodsOrder(String orderNo); |
||||
|
||||
/** |
||||
* @MethodName queryDetailByMap |
||||
* @Description: 查询订单详情 |
||||
* @param map |
||||
* @return: com.hfkj.entity.BsOrderMember |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/9/5 下午4:27 |
||||
*/ |
||||
BsOrderMember queryDetailByMap(Map<String , Object> map); |
||||
|
||||
/** |
||||
* @MethodName getList |
||||
* @Description: 查询订单列表 |
||||
* @param map |
||||
* @return: java.util.List<com.hfkj.entity.BsOrderMember> |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/9/5 下午4:27 |
||||
*/ |
||||
List<BsOrderMember> getList(Map<String , Object> map); |
||||
} |
@ -0,0 +1,53 @@ |
||||
package com.hfkj.service.goods.impl; |
||||
|
||||
import com.hfkj.dao.BsOrderMemberMapper; |
||||
import com.hfkj.entity.BsOrderMember; |
||||
import com.hfkj.service.goods.BsOrderMemberService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service("bsOrderMemberService") |
||||
public class BsOrderMemberServiceImpl implements BsOrderMemberService { |
||||
|
||||
@Resource |
||||
private BsOrderMemberMapper bsOrderMemberMapper; |
||||
|
||||
@Override |
||||
public void create(BsOrderMember orderMember) { |
||||
bsOrderMemberMapper.insert(orderMember); |
||||
} |
||||
|
||||
@Override |
||||
public void update(BsOrderMember orderMember) { |
||||
bsOrderMemberMapper.updateByPrimaryKey(orderMember); |
||||
} |
||||
|
||||
@Override |
||||
public void delete(Long id, Boolean fullDelete) { |
||||
bsOrderMemberMapper.deleteByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public BsOrderMember queryDetail(Long id) { |
||||
return bsOrderMemberMapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public BsOrderMember findGoodsOrder(String orderNo) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public BsOrderMember queryDetailByMap(Map<String, Object> map) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public List<BsOrderMember> getList(Map<String, Object> map) { |
||||
return Collections.emptyList(); |
||||
} |
||||
} |
@ -0,0 +1,88 @@ |
||||
package com.hfkj.yushang; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hfkj.common.exception.ErrorCode; |
||||
import com.hfkj.common.exception.ErrorHelp; |
||||
import com.hfkj.common.exception.SysCode; |
||||
import com.hfkj.common.utils.HttpsUtils; |
||||
import com.hfkj.common.utils.MD5Util; |
||||
import com.hfkj.config.CommonSysConst; |
||||
import com.hfkj.config.GenerateSign; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
import java.util.Date; |
||||
import java.util.Map; |
||||
|
||||
public class YuShangService { |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(YuShangService.class); |
||||
|
||||
/** |
||||
* @MethodName insertV2 |
||||
* @Description: 直充订单提交接口 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/9/5 下午2:17 |
||||
*/ |
||||
public static JSONObject insertV2(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = request("/Order/InsertV2" , map); |
||||
|
||||
if ( object.getInteger("Code") == 999) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* @MethodName queryV2 |
||||
* @Description: 订单查询接口 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/9/5 下午2:29 |
||||
*/ |
||||
public static JSONObject queryV2(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = request("Order/QueryV2" , map); |
||||
|
||||
if ( object.getInteger("Code") == 999) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 请求 |
||||
* @param postUrl 接口请求地址 |
||||
* @param param 参数 |
||||
* @return |
||||
* @throws Exception |
||||
*/ |
||||
public static JSONObject request(String postUrl, Map<String,Object> param) throws Exception { |
||||
|
||||
log.info("============ 娱尚请求-START ============="); |
||||
param.put("AppKey", CommonSysConst.getSysConfig().getYuShangAppKey()); |
||||
param.put("timestamp", new Date().getTime()); |
||||
param.put("CustomerIP", "127.0.0.1"); |
||||
param.put("sign", MD5Util.encode(GenerateSign.paramSortYuShang(param,CommonSysConst.getSysConfig().getQianZhuSecret()).getBytes()).toLowerCase()); |
||||
|
||||
log.info("请求接口:" + postUrl); |
||||
log.info("请求参数:" + JSONObject.toJSONString(param)); |
||||
|
||||
JSONObject response = HttpsUtils.doPost(CommonSysConst.getSysConfig().getYuShangPostUrl()+ postUrl, JSONObject.toJSONString(param)); |
||||
|
||||
log.info("响应参数:" + response.toJSONString()); |
||||
log.info("============ 娱尚请求-END =============="); |
||||
return response; |
||||
|
||||
} |
||||
|
||||
|
||||
} |
Loading…
Reference in new issue