正在使用的商户状态
This commit is contained in:
parent
dd1a564f60
commit
24716f59be
@ -18,6 +18,8 @@ import com.fuint.business.order.entity.*;
|
||||
import com.fuint.business.order.service.*;
|
||||
import com.fuint.business.userManager.service.LJUserService;
|
||||
import com.fuint.business.userManager.vo.LJUserVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -114,6 +116,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
|
||||
@Override
|
||||
public Map<String, String> queryOrder(Map<String, String> map1) throws Exception {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Map<String, String> resMap =new HashMap<>();
|
||||
resMap.put("msg","error");
|
||||
try {
|
||||
@ -148,7 +151,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
List<OilOrder> list = oilOrderService.selectOilOrder(orderNo);
|
||||
LJOrder goodsOrder = goodsOrderService.selectGoodsOrder(orderNo);
|
||||
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIsUse("1");
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(nowAccountInfo.getStoreId());
|
||||
List<ReturnRecord> returnRecords = returnRecordService.selectReturnRecordByOrderNo(orderNo);
|
||||
Date date = new Date();
|
||||
if (reqMap.get("trans_stat").equals("SUCCESS")){
|
||||
|
@ -204,7 +204,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
// Integer allAmount = (int) (integralOrdersList.getAllAmout()*100);
|
||||
System.out.println("金额"+(int) (integralOrdersList.getAllAmout()*100));
|
||||
Integer allAmount = (int) (0.01*100);
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIsUse("1");
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(nowAccountInfo.getStoreId());
|
||||
// 处理支付需要的数据
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("authCode",integralOrdersList.getAuthCode());
|
||||
|
@ -179,7 +179,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
|
||||
Integer allAmount = (int) (0.01 * 100);
|
||||
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIsUse("1");
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(nowAccountInfo.getStoreId());
|
||||
// 处理支付需要的数据
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("authCode", cardFuelRecordDTO.getAuthCode());
|
||||
|
@ -114,7 +114,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
pay = cardValueOrdersService.save(cardValueOrders);
|
||||
|
||||
//生成订单之后调用支付接口
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIsUse("1");
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(nowAccountInfo.getStoreId());
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("authCode",cardValueRecordDTO.getAuthCode());
|
||||
map.put("allAmount",cardValueOrders.getAmount().toString());
|
||||
@ -205,7 +205,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
System.out.println("allAmount1:"+allAmount1);
|
||||
Integer allAmount = (int) (0.01*100);
|
||||
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIsUse("1");
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(nowAccountInfo.getStoreId());
|
||||
// 处理支付需要的数据
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("authCode",cardValueRecordDTO.getAuthCode());
|
||||
|
@ -24,6 +24,7 @@
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by pay_time desc
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCashierOrderById" resultType="com.fuint.business.order.vo.CashierOrderVo"
|
||||
|
@ -27,6 +27,7 @@
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by pay_time desc
|
||||
</where>
|
||||
</select>
|
||||
<select id="getMtOrderList" resultType="com.fuint.business.order.vo.LJOrderVo">
|
||||
|
@ -176,13 +176,14 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
String orderNo = returnRecordService.insertReturnRecord(returnRecord);
|
||||
|
||||
// 调用支付接口
|
||||
this.pay(map,orderNo);
|
||||
this.pay(map,orderNo,Integer.valueOf(map.get("storeId")));
|
||||
|
||||
return orderNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String batchUpdate(Map<String, String> map) {
|
||||
AccountInfo accountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<JSONObject> jsonObjects = JSONArray.parseArray(map.get("list"), JSONObject.class);
|
||||
// 根据日期生成归还订单号
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
@ -216,7 +217,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
returnRecordService.insertReturnRecord(returnRecord);
|
||||
}
|
||||
// 调用支付接口
|
||||
this.pay(map,orderNo);
|
||||
this.pay(map,orderNo,accountInfo.getStoreId());
|
||||
|
||||
return orderNo;
|
||||
}
|
||||
@ -233,7 +234,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
* 调用支付接口
|
||||
* @param map
|
||||
*/
|
||||
private void pay(Map<String,String> map,String orderNo){
|
||||
private void pay(Map<String,String> map,String orderNo,int storeId){
|
||||
// 先将支付状态改为未支付
|
||||
String payType = map.get("payType");
|
||||
if (!map.get("repaidAmount").equals("0") && !payType.equals("CASH")){
|
||||
@ -244,7 +245,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
oilConfigService.oilRule();
|
||||
}
|
||||
// 根据店铺id查询商户配置信息
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIsUse("1");
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId);
|
||||
// 处理支付需要的数据
|
||||
Map<String,String> map1 = new HashMap<>();
|
||||
map1.put("authCode",map.get("authCode"));
|
||||
|
Loading…
Reference in New Issue
Block a user