提交代码

yy_dev
胡锐 1 year ago
parent 36f33c9963
commit 4cbae79bf0
  1. 8
      bweb/src/main/java/com/bweb/controller/BsTradeOrderController.java
  2. 2
      bweb/src/main/java/com/bweb/controller/TestController.java
  3. 2
      bweb/src/main/java/com/bweb/excel/model/ExportTradeOrderModel.java
  4. 4
      cweb/src/main/java/com/cweb/controller/TestController.java
  5. 9
      schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java
  6. 1
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeService.java
  7. 2
      service/src/main/java/com/hfkj/dao/BsTradeOrderMapperExt.java
  8. 11
      service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java
  9. 4
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java

@ -72,6 +72,7 @@ public class BsTradeOrderController {
@RequestParam(value = "payTimeS" , required = false) Long payTimeS,
@RequestParam(value = "payTimeE" , required = false) Long payTimeE,
@RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "specialField" , required = false) String specialField,
@RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try {
@ -132,6 +133,7 @@ public class BsTradeOrderController {
param.put("payTimeS", payTimeS);
param.put("payTimeE", payTimeE);
param.put("status", status);
param.put("specialField", specialField);
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(tradeOrderService.getTradeOrderList(param)));
@ -159,7 +161,9 @@ public class BsTradeOrderController {
@RequestParam(value = "accTradeNo" , required = false) String accTradeNo,
@RequestParam(value = "payTimeS" , required = false) Long payTimeS,
@RequestParam(value = "payTimeE" , required = false) Long payTimeE,
@RequestParam(value = "status" , required = false) Integer status) {
@RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "specialField" , required = false) String specialField
) {
try {
Map<String, Object> param = new HashMap<>();
UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class);
@ -218,7 +222,7 @@ public class BsTradeOrderController {
param.put("payTimeS", payTimeS);
param.put("payTimeE", payTimeE);
param.put("status", status);
param.put("specialField", specialField);
List<ExportTradeOrderModel> dataList = new ArrayList<>();
ExportTradeOrderModel data;

@ -104,7 +104,7 @@ public class TestController {
try {
JSONObject queryTrade = laKaLaTradeService.queryTrade(order.getOutTradeNo());
if (queryTrade != null) {
order.setTradeActualAmount(queryTrade.getBigDecimal("total_amount"));
order.setTradeActualAmount(queryTrade.getBigDecimal("total_amount").divide(new BigDecimal("100")));
order.setAccSettleAmount(
StringUtils.isNotBlank(queryTrade.getString("acc_settle_amount"))
?queryTrade.getBigDecimal("acc_settle_amount").divide(new BigDecimal("100"))

@ -78,7 +78,7 @@ public class ExportTradeOrderModel {
private Date createTime;
@ColumnWidth(25)
@ExcelProperty(value = "支付时间")
@ExcelProperty(value = "交易时间")
private Date payTime;
@ColumnWidth(25)

@ -260,8 +260,8 @@ public class TestController {
//return ResponseMsgUtil.success(saasMerService.merchantInfo("123364703"));
// return ResponseMsgUtil.success(saasCommon.getCategory(null));
// return ResponseMsgUtil.success(laKaLaLedgerService.queryLedgerMer(code));
// return ResponseMsgUtil.success(laKaLaTradeService.queryTrans(code));
return ResponseMsgUtil.success(laKaLaTradeService.queryTrade(code));
return ResponseMsgUtil.success(laKaLaTradeService.queryTrans(code));
// return ResponseMsgUtil.success(laKaLaTradeService.queryTrade(code));
// return ResponseMsgUtil.success("");
// 1200
// return ResponseMsgUtil.success(saasCommon.fileUpload(new HashMap<>()));

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.lakala.LaKaLaTradeSeparateService;
import com.hfkj.channel.lakala.LaKaLaTradeService;
import com.hfkj.channel.weixin.utils.WxOrderConfig;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.entity.BsTradeOrder;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiver;
@ -21,6 +22,7 @@ import org.springframework.scheduling.annotation.Scheduled;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
/**
* 交易订单定时任务
@ -257,12 +259,17 @@ public class TradeOrderSchedule {
/**
* 交易结算
* 每分钟扫描一次
*/
*/
@Scheduled(cron="0 0/1 * * * ?")
public void tradeOrderSettle() {
Map<String, Object> param = new HashMap<>();
param.put("status", "3");
param.put("settleAmountIsNull", true);
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_MONTH, -2);
param.put("payTimeS", calendar.getTimeInMillis());
List<BsTradeOrder> tradeOrderList = tradeOrderService.getTradeOrderList(param);
for (BsTradeOrder tradeOrder : tradeOrderList) {
try {

@ -364,7 +364,6 @@ public class LaKaLaTradeService {
Map<String, Object> commonParam = new HashMap<>();
commonParam.put("req_time", DateUtil.format(new Date(), "yyyyMMddHHmmss"));
commonParam.put("version", "3.0");
commonParam.put("out_org_code", CommonSysConst.getSysConfig().getLkl_v3_appid());
Map<String, Object> map = new HashMap<>();
map.put("merchant_no", platformNo.getCupNo());

@ -48,7 +48,7 @@ public interface BsTradeOrderMapperExt {
" LEFT JOIN (select " +
" settle_date, " +
" count(1) tradeNum, " +
" sum(income_amount) tradeAmount, " +
" sum(trade_actual_amount) tradeAmount, " +
" sum(settle_amount) settleAmount, " +
" sum(shd_fee_amt) shdFeeAmount " +
" from bs_trade_order " +

@ -82,16 +82,15 @@ public class SignatureUtil {
public static void main(String[] args) throws Exception {
String paramStr = "{\n" +
" \"merchantNo\": \"2023053014484290706\",\n" +
" \"outTradeNo\": \"ZF1130202305051459532538971005\",\n" +
" \"merchantNo\": \"2023041916292112804\",\n" +
" \"outTradeNo\": \"ZF1130202305051459532538970005\",\n" +
" \"payMode\": \"WECHAT\",\n" +
" \"totalAmount\": 0.01,\n" +
" \"transType\": \"JSAPI\",\n" +
" \"subAppid\":\"wxc1d482cb439d570d\",\n" +
" \"userId\": \"o4Jwb42CBpXgAZJaF985MViTBIaI\",\n" +
" \"profitSharing\": 0\n" +
" \"userId\": \"od8qG06bHnTsDWklsB2VsssLZYcQ\",\n" +
" \"profitSharing\": 0" +
"}";
String sign = createSign(JSONObject.parseObject(paramStr), "2sKRbwGqRoejsqn9HFJL9p5T0GqDOONp");
String sign = createSign(JSONObject.parseObject(paramStr), "2jLO2WjXcSRSzTCaca0Kmv0OFrfYBbrA");
System.out.println(sign);
}
}

@ -402,6 +402,10 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
criteria.andSettleAmountIsNull();
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "specialField"))) {
criteria.andSpecialFieldLike("%"+MapUtils.getString(param, "specialField")+"%");
}
example.setOrderByClause("create_time desc");
return tradeOrderMapper.selectByExample(example);
}

Loading…
Cancel
Save