修改汇联通distributorId 原参数aNId4A3X修改为orjuOND7

master
袁野 3 weeks ago
parent 518ebce9ca
commit 1452fce850
  1. 39
      bweb/src/main/java/com/bweb/controller/TestController.java
  2. 4
      bweb/src/main/java/com/bweb/controller/goods/GoodsTypeController.java
  3. 17
      cweb/src/main/java/com/cweb/controller/discount/DiscountController.java
  4. 1
      cweb/src/main/java/com/cweb/controller/goods/GoodsController.java
  5. 32
      order/src/main/java/com/order/controller/OrderController.java
  6. 16
      service/src/main/java/com/hfkj/common/utils/DateUtil.java
  7. 12
      service/src/main/java/com/hfkj/dao/GoodsMsgMapperExt.java
  8. 1
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java

@ -30,6 +30,7 @@ import com.hfkj.service.pay.huift.TradeService;
import com.jd.open.api.sdk.domain.vopsp.CategoryInfoGoodsProvider.response.getCategoryInfoList.GetCategoryInfoGoodsResp;
import com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSkuDetailInfo.GetSkuPoolInfoGoodsResp;
import com.jd.open.api.sdk.domain.vopxx.MsgRecordProvider.response.queryTransByVopNormal.VopBizTransMessage;
import com.jd.open.api.sdk.response.vopdd.VopOrderQueryOrderDetailResponse;
import com.jd.open.api.sdk.response.vopdz.VopAddressConvertFourAreaByDetailStrResponse;
import com.jd.open.api.sdk.response.vopxx.VopMessageQueryTransByVopNormalResponse;
import io.swagger.annotations.Api;
@ -170,7 +171,45 @@ public class TestController {
}
}
@RequestMapping(value="/queryOrderDetailByJd",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "queryOrderDetailByJd")
public ResponseData queryOrderDetailByJd(@RequestParam(value = "childOrderNo" , required = true) String childOrderNo,
@RequestParam(value = "thirdOrderNo" , required = true) Long thirdOrderNo) {
try {
VopOrderQueryOrderDetailResponse orderDetailResponse = JdPostService.queryOrderDetail(jdService.getToken(),thirdOrderNo, childOrderNo);
return ResponseMsgUtil.success(orderDetailResponse);
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/sign",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "sign")
public ResponseData sign(@RequestParam(value = "phone" , required = true) String phone,
@RequestParam(value = "appid" , required = true) String appid,
@RequestParam(value = "appSecret" , required = true) String appSecret) {
try {
Map<String , Object> map = new HashMap<>();
map.put("appid" , appid);
map.put("phone" , phone);
String sign = SignatureUtil.createSign(map , appSecret);
return ResponseMsgUtil.success(sign);
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
// 查询上游订单
@RequestMapping(value="/getSkuDetailInfo",method = RequestMethod.GET)
@ResponseBody

@ -87,8 +87,10 @@ public class GoodsTypeController {
public ResponseData getList() {
try {
Map<String , Object> map = new HashMap<>();
map.put("status" , 1);
List<GoodsType> list = goodsTypeService.getList(new HashMap<>());
List<GoodsType> list = goodsTypeService.getList(map);
List<GoodsTypeModel> goodsTypeModels = goodsTypeService.getGoodsTypeModelList(list);

@ -9,6 +9,7 @@ import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.SessionObject;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.*;
import com.hfkj.haioil.HaiOilService;
@ -147,16 +148,21 @@ public class DiscountController {
// 用户session
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
int num = 0;
Map<String , Object> map = new HashMap<>();
if (userSession.getUser().getPhone() != null) {
map.put("status" , 1);
map.put("phone" , userSession.getUser().getPhone());
JSONObject object = HaiOilService.queryListByPhone(map);
int num = 0;
if (object.getString("return_code").equals("000000")) {
JSONArray array = object.getJSONObject("return_data").getJSONArray("dataList");
num += array.size();
}
}
map.put("userId", userSession.getUser().getId());
@ -164,6 +170,15 @@ public class DiscountController {
List<CouponDiscountUserRel> list = discountUserRelService.getList(map);
for (CouponDiscountUserRel discountUserRel : list) {
if (DateUtil.exceedingCurrentTime(discountUserRel.getUseEndTime())) {
num++;
} else {
discountUserRel.setStatus(0);
discountUserRelService.update(discountUserRel);
}
}
num += list.size();
return ResponseMsgUtil.success(num);

@ -71,7 +71,6 @@ public class GoodsController {
try {
Map<String ,Object> map = new HashMap<>();
map.put("status" , 1);
map.put("type" , type);
List<GoodsType> list = goodsTypeService.getList(map);

@ -364,22 +364,22 @@ public class OrderController {
GoodsUserAddress userAddress = goodsUserAddressService.queryDetail(body.getLong("addressId"));
if (userAddress.getProvinceId() == null) {
// VopAddressConvertFourAreaByDetailStrResponse response = JdPostService.convertFourAreaByDetailStr(jdService.getToken() , userAddress.getRegionName() + userAddress.getAddress());
//
// if (response != null && response.getOpenRpcResult().getSuccess()) {
// userAddress.setProvinceId(response.getOpenRpcResult().getResult().getProvinceId());
// userAddress.setProvinceName(response.getOpenRpcResult().getResult().getProvinceName());
// userAddress.setCityId(response.getOpenRpcResult().getResult().getCityId());
// userAddress.setCityName(response.getOpenRpcResult().getResult().getCityName());
// userAddress.setCountyId(response.getOpenRpcResult().getResult().getCountyId());
// userAddress.setCountyName(response.getOpenRpcResult().getResult().getCountyName());
// userAddress.setTownId(response.getOpenRpcResult().getResult().getTownId());
// userAddress.setTownName(response.getOpenRpcResult().getResult().getTownName());
// userAddress.setUpdateTime(new Date());
// deliveryAddressService.update(userAddress);
// } else {
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getOpenRpcResult().getResultMessage());
// }
VopAddressConvertFourAreaByDetailStrResponse response = JdPostService.convertFourAreaByDetailStr(jdService.getToken() , userAddress.getRegionName() + userAddress.getAddress());
if (response != null && response.getOpenRpcResult().getSuccess()) {
userAddress.setProvinceId(response.getOpenRpcResult().getResult().getProvinceId());
userAddress.setProvinceName(response.getOpenRpcResult().getResult().getProvinceName());
userAddress.setCityId(response.getOpenRpcResult().getResult().getCityId());
userAddress.setCityName(response.getOpenRpcResult().getResult().getCityName());
userAddress.setCountyId(response.getOpenRpcResult().getResult().getCountyId());
userAddress.setCountyName(response.getOpenRpcResult().getResult().getCountyName());
userAddress.setTownId(response.getOpenRpcResult().getResult().getTownId());
userAddress.setTownName(response.getOpenRpcResult().getResult().getTownName());
userAddress.setUpdateTime(new Date());
deliveryAddressService.update(userAddress);
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getOpenRpcResult().getResultMessage());
}
}
List<com.jd.open.api.sdk.domain.vopdd.QueryOrderOpenProvider.request.querySkuFreight.SkuInfoOrderOpenReq> skuInfoList = new ArrayList<>();

@ -781,6 +781,22 @@ public class DateUtil {
}
}
public static boolean exceedingCurrentTime(Date time) {
// 获取当前时间
Date currentDate = new Date();
// 判断时间是否大于当前时间
Calendar calendar1 = Calendar.getInstance();
calendar1.setTime(currentDate);
Calendar calendar2 = Calendar.getInstance();
calendar2.setTime(time);
// 时间大于当前时间 为true
return calendar1.compareTo(calendar2) < 0;
}
public static void main(String[] args) throws Exception {
String a = "51130319931105651X";

@ -67,6 +67,7 @@ public interface GoodsMsgMapperExt {
" a.goods_brand_name as goodsBrandName," +
" a.title as title," +
" a.list_img as listImg," +
" a.sale_num as saleNum," +
" b.sale_price as salePrice, " +
" b.sale_price as price, " +
" b.third_price as thirdPrice," +
@ -85,12 +86,13 @@ public interface GoodsMsgMapperExt {
" <if test='param.showType != null'> and a.show_type = #{param.showType} </if>" +
" <if test='param.specsId != null'> and b.id in <foreach collection='param.specsId' item='item' index='index' open='(' separator=',' close=')'>#{item}</foreach> </if>" +
" <if test='param.goodsBrand != null'> and a.goods_brand = #{param.goodsBrand} </if>" +
" <if test='param.price == 1'>b.sale_price asc</if>" +
" <if test='param.price == 2'> b.sale_price desc</if>" +
" <if test='param.saleNum == 2'>, a.sale_num desc</if>" +
" group by a.id) c" +
" <if test='param.time != 1'>ORDER BY c.updateTime desc</if>" +
" <if test='param.time == 1'>ORDER BY c.createtime desc</if>" +
" <if test='param.time == 1'>ORDER BY c.updateTime desc</if>" +
" <if test='param.time == 2'>ORDER BY c.createtime asc</if>" +
" <if test='param.price == 1'>ORDER BY c.salePrice asc</if>" +
" <if test='param.price == 2'>ORDER BY c.salePrice desc</if>" +
" <if test='param.saleNum == 2'>ORDER BY c.saleNum desc</if>" +
" <if test='param.limit != null'>limit #{param.limit}</if>" +
"</script>")
List<JdGoodsModel> getGoodsListCrest(@Param("param") Map<String,Object> param);

@ -706,7 +706,6 @@ public class BsOrderServiceImpl implements BsOrderService {
totalSalePrice = totalSalePrice.add(jsonObject.getBigDecimal("salePrice"));
totalDrawModePrice = totalDrawModePrice.add(jsonObject.getBigDecimal("fastDrawModePrice"));
}
}
}
}

Loading…
Cancel
Save