袁野 2 weeks ago
parent 3b65e9fae8
commit c123f99bd2
  1. 84
      order/src/main/java/com/order/controller/business/BsOrderMemberController.java
  2. 19
      schedule/src/main/java/com/hfkj/schedule/OrderGoodsSchedule.java
  3. 2
      service/src/main/java/com/hfkj/service/goods/impl/BsOrderMeiTuanServiceImpl.java
  4. 40
      service/src/main/java/com/hfkj/service/goods/impl/BsOrderMemberServiceImpl.java
  5. 4
      service/src/main/resources/dev/commonConfig.properties

@ -0,0 +1,84 @@
package com.order.controller.business;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsOrderMeituan;
import com.hfkj.entity.SecConfig;
import com.hfkj.model.ResponseData;
import com.hfkj.service.SecConfigService;
import com.hfkj.service.goods.BsOrderMeiTuanService;
import com.hfkj.service.goods.BsOrderMemberService;
import com.hfkj.service.goods.impl.BsOrderMeiTuanServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping(value="/orderMember")
@Api(value="会员订单管理")
public class BsOrderMemberController {
@Resource
private BsOrderMemberService bsOrderMemberService;
private static final Logger log = LoggerFactory.getLogger(BsOrderGoodsController.class);
@RequestMapping(value="/getListMember",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询列表")
public ResponseData getListMember(
@RequestParam(value = "orderNo" , required = false) String orderNo,
@RequestParam(value = "childOrderNo" , required = false) String childOrderNo,
@RequestParam(value = "userPhone" , required = false) String userPhone,
@RequestParam(value = "goodsName" , required = false) String goodsName,
@RequestParam(value = "payType" , required = false) Integer payType,
@RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "createTimeS" , required = false) Long createTimeS,
@RequestParam(value = "createTimeE" , required = false) Long createTimeE,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE,
@RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try {
Map<String , Object> map = new HashMap<>();
map.put("orderNo", orderNo);
map.put("childOrderNo", childOrderNo);
map.put("userPhone", userPhone);
map.put("goodsName", goodsName);
map.put("payType", payType);
map.put("createTimeS", createTimeS);
map.put("createTimeE", createTimeE);
map.put("finishTimeS", finishTimeS);
map.put("finishTimeE", finishTimeE);
map.put("status", status);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(bsOrderMemberService.getList(map)));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -70,6 +70,25 @@ public class OrderGoodsSchedule {
} }
} }
@Scheduled(cron = "5 0 0 * * ?")
public void orderGoodsConfirmReceiptAgent() {
Map<String , Object> map = new HashMap<>();
map.put("logisticsStatus" , "AGENT_SIGN");
map.put("status" , 2);
List<BsOrderGoods> orderGoodsList = orderGoodsService.getList(map);
for (BsOrderGoods goods : orderGoodsList) {
// 判断时间是否是十天前
if (DateUtil.differentDays(goods.getCreateTime() , new Date()) > 10) {
orderGoodsService.confirmReceipt(goods.getId());
}
}
}
@Scheduled(cron = "5 0 0 * * ?") @Scheduled(cron = "5 0 0 * * ?")
public void getLogisticsMsg() { public void getLogisticsMsg() {
Map<String , Object> objectMap = new HashMap<>(); Map<String , Object> objectMap = new HashMap<>();

@ -103,7 +103,7 @@ public class BsOrderMeiTuanServiceImpl implements BsOrderMeiTuanService {
criteria.andChildOrderNoEqualTo(MapUtils.getString(map, "childOrderNo")); criteria.andChildOrderNoEqualTo(MapUtils.getString(map, "childOrderNo"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(map, "tradeNo"))) { if (StringUtils.isNotBlank(MapUtils.getString(map, "tradeNo"))) {
criteria.andChildOrderNoEqualTo(MapUtils.getString(map, "tradeNo")); criteria.andTradeNoEqualTo(MapUtils.getString(map, "tradeNo"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(map, "userPhone"))) { if (StringUtils.isNotBlank(MapUtils.getString(map, "userPhone"))) {

@ -68,7 +68,45 @@ public class BsOrderMemberServiceImpl implements BsOrderMemberService {
@Override @Override
public List<BsOrderMember> getList(Map<String, Object> map) { public List<BsOrderMember> getList(Map<String, Object> map) {
return Collections.emptyList(); BsOrderMemberExample example = new BsOrderMemberExample();
BsOrderMemberExample.Criteria criteria = example.createCriteria();
if (StringUtils.isNotBlank(MapUtils.getString(map, "orderNo"))) {
criteria.andOrderNoEqualTo(MapUtils.getString(map, "orderNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "childOrderNo"))) {
criteria.andChildOrderNoEqualTo(MapUtils.getString(map, "childOrderNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "userPhone"))) {
criteria.andUserPhoneEqualTo(MapUtils.getString(map, "userPhone"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "goodsName"))) {
criteria.andGoodsNameLike("%"+MapUtils.getString(map, "goodsName")+"%");
}
if (MapUtils.getInteger(map, "payType") != null) {
criteria.andPayTypeEqualTo(MapUtils.getInteger(map, "payType"));
}
if (MapUtils.getLong(map, "createTimeS") != null) {
criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "createTimeS")));
}
if (MapUtils.getLong(map, "createTimeE") != null) {
criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(map, "createTimeE")));
}
if (MapUtils.getLong(map, "finishTimeS") != null) {
criteria.andFinishTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "finishTimeS")));
}
if (MapUtils.getLong(map, "finishTimeE") != null) {
criteria.andFinishTimeLessThan(new Date(MapUtils.getLong(map, "finishTimeE")));
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
}
example.setOrderByClause("create_time desc");
return bsOrderMemberMapper.selectByExample(example);
} }
@Override @Override

@ -90,3 +90,7 @@ haiOilAppSecret = 8aef995ff71485dc19b36e35f04c4016
jDPostUrl = https://test-oil.dctpay.com jDPostUrl = https://test-oil.dctpay.com
jDAppKey = C4FF710550C43FE76D4114E1C9C6A0C9 jDAppKey = C4FF710550C43FE76D4114E1C9C6A0C9
jDAppSecret = 873bcbc1d8d64f36832270c2ff59c194 jDAppSecret = 873bcbc1d8d64f36832270c2ff59c194
ytAccessKey=DVNKSHSDHHJ6-TK
ytSecretKey=lj2YDjGnqroY1OuR5zriWg==
ytPostUrl=https://waimai-openapi.apigw.test.meituan.com/api/sqt/open/login/h5/loginFree/redirection?test_open_swimlane=test-open

Loading…
Cancel
Save