diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index 60f2632..f3374fb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -20,7 +20,7 @@ public class RuoYiApplication ConfigurableApplicationContext context = SpringApplication.run(RuoYiApplication.class, args); Environment env =context.getEnvironment(); System.out.println("实际加载的端口:" + env.getProperty("server.port")); - System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n"); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/OrderRowsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/OrderRowsController.java index 97691a6..ab25c40 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/OrderRowsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/OrderRowsController.java @@ -1,12 +1,11 @@ package com.ruoyi.web.controller.jarvis; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.io.IOException; +import java.util.*; import javax.servlet.http.HttpServletResponse; -import com.ruoyi.common.core.page.PageDomain; -import com.ruoyi.common.core.page.TableSupport; +import com.ruoyi.jarvis.domain.SuperAdmin; +import com.ruoyi.jarvis.service.SuperAdminService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; @@ -31,6 +30,9 @@ public class OrderRowsController extends BaseController @Autowired private IOrderRowsService orderRowsService; + @Autowired + private SuperAdminService superAdminService; + /** * 查询京粉订单列表 */ @@ -42,21 +44,36 @@ public class OrderRowsController extends BaseController return getDataTable(list); } - /** + /** * 导出京粉订单列表 */ @Log(title = "京粉订单", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, OrderRows orderRows) + public void export(HttpServletResponse response, OrderRows orderRows) throws IOException { - // 判断是否需要分页 - PageDomain pageDomain = TableSupport.buildPageRequest(); - if (pageDomain.getPageNum() != null && pageDomain.getPageSize() != null) { - startPage(); - } + String fileName = "京粉订单数据"; + List list = orderRowsService.selectOrderRowsList(orderRows); + if (!list.isEmpty()){ + Long unionId = list.get(0).getUnionId(); + SuperAdmin superAdmin = superAdminService.selectSuperAdminByUnionId(unionId); + if (superAdmin != null && superAdmin.getName() != null) { + String name = superAdmin.getName(); + String unionIdStr = String.valueOf(superAdmin.getUnionId()); + fileName = name + "-" + unionIdStr + "-订单"; + } + } + + // 设置响应头,指定文件名 + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setCharacterEncoding("utf-8"); + String encodedFileName = java.net.URLEncoder.encode(fileName + ".xlsx", "UTF-8"); + response.setHeader("Content-Disposition", "attachment; filename=" + encodedFileName); + // 添加download-filename响应头,以支持前端工具类 + response.setHeader("download-filename", encodedFileName); + ExcelUtil util = new ExcelUtil(OrderRows.class); - util.exportExcel(response, list, "京粉订单数据"); + util.exportExcel(response, list, fileName); } @@ -107,4 +124,130 @@ public class OrderRowsController extends BaseController List> options = ValidCodeConverter.getAllValidCodeOptions(); return AjaxResult.success(options); } + /** + * 根据联盟ID或日期范围统计订单数据,按validCode分组 + */ + @GetMapping("/statistics") +public AjaxResult getStatistics(OrderRows orderRows, Date beginTime, Date endTime) { + Map result = new HashMap<>(); + + // 获取superAdminList,筛选出isCount = 0的unionId + List excludeUnionIds = new ArrayList<>(); + List superAdminList = superAdminService.selectSuperAdminList(null); + logger.info("superAdminList.size: {}", superAdminList.size()); + for (SuperAdmin superAdmin : superAdminList) { + if (superAdmin.getIsCount() != null && superAdmin.getIsCount() == 0 && superAdmin.getUnionId() != null) { + try { + excludeUnionIds.add(Long.parseLong(superAdmin.getUnionId())); + } catch (NumberFormatException e) { + // 忽略无法解析的unionId + } + } + } + logger.info("excludeUnionIds: {}", excludeUnionIds.size()); + + // 使用新的查询方法,直接在SQL中完成日期过滤和unionId排除 + List filteredList = orderRowsService.selectOrderRowsListWithFilter(orderRows, beginTime, endTime, excludeUnionIds); + + // 定义分组 + Map groups = new HashMap<>(); + groups.put("cancel", Arrays.asList("3")); + groups.put("invalid", Arrays.asList("2","4","5","6","7","8","9","10","11","14","19","20","21","22","23","29","30","31","32","33","34")); + groups.put("pending", Arrays.asList("15")); + groups.put("paid", Arrays.asList("16")); + groups.put("finished", Arrays.asList("17")); + groups.put("deposit", Arrays.asList("24")); + groups.put("illegal", Arrays.asList("25","26","27","28")); + + // 初始化统计结果 + Map> groupStats = new HashMap<>(); + groupStats.put("cancel", createGroupStat("取消", "cancel")); + groupStats.put("invalid", createGroupStat("无效", "invalid")); + groupStats.put("pending", createGroupStat("待付款", "pending")); + groupStats.put("paid", createGroupStat("已付款", "paid")); + groupStats.put("finished", createGroupStat("已完成", "finished")); + groupStats.put("deposit", createGroupStat("已付定金", "deposit")); + groupStats.put("illegal", createGroupStat("违规", "illegal")); + + // 总统计数据 + int totalOrders = 0; + double totalCommission = 0; + double totalActualFee = 0; + long totalSkuNum = 0; + + // 违规订单统计 + long violationOrders = 0; + double violationCommission = 0.0; + + // 按分组统计 + for (OrderRows row : filteredList) { + totalOrders++; + if (row.getEstimateFee() != null) { + totalCommission += row.getEstimateFee(); + } + if (row.getActualFee() != null) { + totalActualFee += row.getActualFee(); + } + if (row.getSkuNum() != null) { + totalSkuNum += row.getSkuNum(); + } + + // 按validCode分组统计 + if (row.getValidCode() != null) { + String validCode = String.valueOf(row.getValidCode()); + for (Map.Entry group : groups.entrySet()) { + List codes = (List) group.getValue(); + if (codes.contains(validCode)) { + Map stat = groupStats.get(group.getKey()); + stat.put("count", (Integer) stat.get("count") + 1); + stat.put("commission", (Double) stat.get("commission") + (row.getEstimateFee() != null ? row.getEstimateFee() : 0)); + stat.put("actualFee", (Double) stat.get("actualFee") + (row.getActualFee() != null ? row.getActualFee() : 0)); + if (row.getSkuNum() != null) { + stat.put("skuNum", (Long) stat.get("skuNum") + row.getSkuNum()); + } + + // 统计违规订单 + if ("illegal".equals(group.getKey())) { + violationOrders++; + // 违规订单佣金计算方式:实际价格 * 佣金比例 + if (row.getActualCosPrice() != null && row.getCommissionRate() != null) { + violationCommission += row.getActualCosPrice() * row.getCommissionRate() * 0.01; + } else if (row.getEstimateFee() != null) { + // 如果无法计算,使用预估佣金 + violationCommission += row.getEstimateFee(); + } + } + break; + } + } + } + } + + result.put("totalOrders", totalOrders); + result.put("totalCommission", totalCommission); + result.put("totalActualFee", totalActualFee); + result.put("totalSkuNum", totalSkuNum); + result.put("violationOrders", violationOrders); + result.put("violationCommission", violationCommission); + result.put("groupStats", groupStats); + + return AjaxResult.success(result); +} + + + /** + * 创建分组统计对象 + */ + private Map createGroupStat(String label, String value) { + Map stat = new HashMap<>(); + stat.put("label", label); + stat.put("value", value); + stat.put("count", 0); + stat.put("commission", 0.0); + stat.put("actualFee", 0.0); + stat.put("skuNum", 0L); + return stat; + } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/SuperAdminController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/SuperAdminController.java index 4c76f2f..3effa86 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/SuperAdminController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/SuperAdminController.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -20,7 +20,7 @@ import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.jarvis.domain.SuperAdmin; -import com.ruoyi.jarvis.service.ISuperAdminService; +import com.ruoyi.jarvis.service.SuperAdminService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; @@ -34,7 +34,7 @@ import com.ruoyi.common.core.page.TableDataInfo; public class SuperAdminController extends BaseController { @Autowired - private ISuperAdminService superAdminService; + private SuperAdminService superAdminService; /** * 查询超级管理员列表 diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/OrderRows.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/OrderRows.java index 2cc5031..64eaaff 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/OrderRows.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/OrderRows.java @@ -4,6 +4,8 @@ import java.util.Date; import com.ruoyi.common.core.domain.BaseEntity; import lombok.Data; import org.springframework.data.annotation.Transient; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.annotation.Excel.ColumnType; /** * 京粉订单对象 order_rows @@ -16,75 +18,99 @@ public class OrderRows extends BaseEntity private static final long serialVersionUID = 1L; /** ID */ + @Excel(name = "ID") private String id; /** 订单ID */ + @Excel(name = "订单ID", cellType = ColumnType.STRING) private Long orderId; /** 父订单ID */ + @Excel(name = "父订单ID", cellType = ColumnType.STRING) private Long parentId; /** 下单时间 */ + @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date orderTime; /** 完成时间 */ + @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date finishTime; /** 修改时间 */ + @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date modifyTime; /** 订单类型 */ + @Excel(name = "订单类型") private Integer orderEmt; /** 是否PLUS会员 */ + @Excel(name = "是否PLUS会员", readConverterExp = "0=否,1=是") private Integer plus; /** 联盟ID */ + @Excel(name = "联盟ID", cellType = ColumnType.STRING) private Long unionId; /** SKU ID */ + @Excel(name = "SKU ID", cellType = ColumnType.STRING) private Long skuId; /** SKU名称 */ + @Excel(name = "SKU名称") private String skuName; /** SKU数量 */ + @Excel(name = "SKU数量") private Integer skuNum; /** SKU退货数量 */ + @Excel(name = "SKU退货数量") private Integer skuReturnNum; /** SKU冻结数量 */ + @Excel(name = "SKU冻结数量") private Integer skuFrozenNum; /** 价格 */ + @Excel(name = "价格") private Double price; /** 佣金比例 */ + @Excel(name = "佣金比例") private Double commissionRate; /** 子边比例 */ + @Excel(name = "子边比例") private Double subSideRate; /** 补贴比例 */ + @Excel(name = "补贴比例") private Double subsidyRate; /** 最终比例 */ + @Excel(name = "最终比例") private Double finalRate; /** 预估成本价 */ + @Excel(name = "预估成本价") private Double estimateCosPrice; /** 预估佣金 */ + @Excel(name = "预估佣金") private Double estimateFee; /** 实际成本价 */ + @Excel(name = "实际成本价") private Double actualCosPrice; /** 实际佣金 */ + @Excel(name = "实际佣金") private Double actualFee; /** 有效性 */ + @Excel(name = "有效性") private Integer validCode; /** 有效性多选值 */ @@ -92,87 +118,115 @@ public class OrderRows extends BaseEntity private Integer[] validCodes; /** 跟踪类型 */ + @Excel(name = "跟踪类型") private Integer traceType; /** 位置ID */ + @Excel(name = "位置ID", cellType = ColumnType.STRING) private Long positionId; /** 站点ID */ + @Excel(name = "站点ID", cellType = ColumnType.STRING) private Long siteId; /** 联盟别名 */ + @Excel(name = "联盟别名") private String unionAlias; /** PID */ + @Excel(name = "PID") private String pid; /** 一级分类ID */ + @Excel(name = "一级分类ID", cellType = ColumnType.NUMERIC) private Long cid1; /** 二级分类ID */ + @Excel(name = "二级分类ID", cellType = ColumnType.NUMERIC) private Long cid2; /** 三级分类ID */ + @Excel(name = "三级分类ID", cellType = ColumnType.NUMERIC) private Long cid3; /** 子联盟ID */ + @Excel(name = "子联盟ID") private String subUnionId; /** 联盟标签 */ + @Excel(name = "联盟标签") private String unionTag; /** POP ID */ + @Excel(name = "POP ID", cellType = ColumnType.STRING) private Long popId; /** 扩展字段1 */ + @Excel(name = "扩展字段1") private String ext1; /** 支付月份 */ + @Excel(name = "支付月份") private String payMonth; /** 活动ID */ + @Excel(name = "活动ID", cellType = ColumnType.STRING) private Long cpActId; /** 联盟角色 */ + @Excel(name = "联盟角色") private Integer unionRole; /** 礼品券OCS金额 */ + @Excel(name = "礼品券OCS金额") private Double giftCouponOcsAmount; /** 礼品券KEY */ + @Excel(name = "礼品券KEY") private String giftCouponKey; /** 余额扩展 */ + @Excel(name = "余额扩展") private String balanceExt; /** 签名 */ + @Excel(name = "签名") private String sign; /** 促销价格金额 */ + @Excel(name = "促销价格金额") private Double proPriceAmount; /** RID */ + @Excel(name = "RID", cellType = ColumnType.STRING) private Long rid; /** 商品信息ID */ + @Excel(name = "商品信息ID", cellType = ColumnType.STRING) private Long goodsInfoId; /** 快递状态 */ + @Excel(name = "快递状态") private Integer expressStatus; /** 渠道ID */ + @Excel(name = "渠道ID", cellType = ColumnType.STRING) private Long channelId; /** SKU标签 */ + @Excel(name = "SKU标签") private String skuTag; /** 商品ID */ + @Excel(name = "商品ID") private String itemId; /** 调用方商品ID */ + @Excel(name = "调用方商品ID") private String callerItemId; /** 订单标签 */ + @Excel(name = "订单标签") private String orderTag; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/SuperAdmin.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/SuperAdmin.java index 9fa2524..5a71ae9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/SuperAdmin.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/SuperAdmin.java @@ -40,6 +40,10 @@ public class SuperAdmin extends BaseEntity @Excel(name = "是否激活", readConverterExp = "0=否,1=是") private Integer isActive; + /** 是否删除: 0-否, 1-是 */ + @Excel(name = "是否参与订单统计", readConverterExp = "0=否,1=是") + private Integer isCount; + /** 创建时间 */ @Excel(name = "创建时间") private Date createdAt; @@ -137,4 +141,14 @@ public class SuperAdmin extends BaseEntity { this.updatedAt = updatedAt; } + + public Integer getIsCount() + { + return isCount; + } + + public void setIsCount(Integer isCount) + { + this.isCount = isCount; + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/OrderRowsMapper.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/OrderRowsMapper.java index b4db167..2430389 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/OrderRowsMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/OrderRowsMapper.java @@ -1,7 +1,9 @@ package com.ruoyi.jarvis.mapper; import com.ruoyi.jarvis.domain.OrderRows; +import org.apache.ibatis.annotations.Param; +import java.util.Date; import java.util.List; /** @@ -27,6 +29,17 @@ public interface OrderRowsMapper */ public List selectOrderRowsList(OrderRows orderRows); + /** + * 查询京粉订单列表(支持日期范围过滤和排除特定unionId) + * + * @param orderRows 京粉订单 + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @param excludeUnionIds 排除的unionId列表 + * @return 京粉订单集合 + */ + public List selectOrderRowsListWithFilter(@Param("orderRows") OrderRows orderRows, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime, @Param("excludeUnionIds") List excludeUnionIds); + /** * 新增京粉订单 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/SuperAdminMapper.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/SuperAdminMapper.java index 9ecd13b..ab3c59f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/SuperAdminMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/SuperAdminMapper.java @@ -18,6 +18,14 @@ public interface SuperAdminMapper */ public SuperAdmin selectSuperAdminById(Long id); + /** + * 根据联盟ID查询超级管理员 + * + * @param unionId 联盟ID + * @return 超级管理员 + */ + public SuperAdmin selectSuperAdminByUnionId(Long unionId); + /** * 查询超级管理员列表 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IOrderRowsService.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IOrderRowsService.java index 748dbcd..6e2e487 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IOrderRowsService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IOrderRowsService.java @@ -2,6 +2,7 @@ package com.ruoyi.jarvis.service; import com.ruoyi.jarvis.domain.OrderRows; +import java.util.Date; import java.util.List; /** @@ -27,6 +28,17 @@ public interface IOrderRowsService */ public List selectOrderRowsList(OrderRows orderRows); + /** + * 查询京粉订单列表(支持日期范围过滤和排除特定unionId) + * + * @param orderRows 京粉订单 + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @param excludeUnionIds 排除的unionId列表 + * @return 京粉订单集合 + */ + public List selectOrderRowsListWithFilter(OrderRows orderRows, Date beginTime, Date endTime, List excludeUnionIds); + /** * 新增京粉订单 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/ISuperAdminService.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/SuperAdminService.java similarity index 93% rename from ruoyi-system/src/main/java/com/ruoyi/jarvis/service/ISuperAdminService.java rename to ruoyi-system/src/main/java/com/ruoyi/jarvis/service/SuperAdminService.java index 0274560..017be73 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/ISuperAdminService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/SuperAdminService.java @@ -8,7 +8,7 @@ import com.ruoyi.jarvis.domain.SuperAdmin; * * @author ruoyi */ -public interface ISuperAdminService +public interface SuperAdminService { /** * 查询超级管理员 @@ -57,4 +57,6 @@ public interface ISuperAdminService * @return 结果 */ public int deleteSuperAdminById(Long id); + + SuperAdmin selectSuperAdminByUnionId(Long unionId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/OrderRowsServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/OrderRowsServiceImpl.java index 3213d85..20edede 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/OrderRowsServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/OrderRowsServiceImpl.java @@ -1,5 +1,6 @@ package com.ruoyi.jarvis.service.impl; +import java.util.Date; import java.util.List; import com.ruoyi.jarvis.domain.OrderRows; @@ -44,6 +45,21 @@ public class OrderRowsServiceImpl implements IOrderRowsService return orderRowsMapper.selectOrderRowsList(orderRows); } + /** + * 查询京粉订单列表(支持日期范围过滤和排除特定unionId) + * + * @param orderRows 京粉订单 + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @param excludeUnionIds 排除的unionId列表 + * @return 京粉订单集合 + */ + @Override + public List selectOrderRowsListWithFilter(OrderRows orderRows, Date beginTime, Date endTime, List excludeUnionIds) + { + return orderRowsMapper.selectOrderRowsListWithFilter(orderRows, beginTime, endTime, excludeUnionIds); + } + /** * 新增京粉订单 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/SuperAdminServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/SuperAdminServiceImpl.java index 18659dd..db47845 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/SuperAdminServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/SuperAdminServiceImpl.java @@ -5,7 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.jarvis.mapper.SuperAdminMapper; import com.ruoyi.jarvis.domain.SuperAdmin; -import com.ruoyi.jarvis.service.ISuperAdminService; +import com.ruoyi.jarvis.service.SuperAdminService; /** * 超级管理员Service业务层处理 @@ -13,7 +13,7 @@ import com.ruoyi.jarvis.service.ISuperAdminService; * @author ruoyi */ @Service -public class SuperAdminServiceImpl implements ISuperAdminService +public class SuperAdminServiceImpl implements SuperAdminService { @Autowired private SuperAdminMapper superAdminMapper; @@ -89,4 +89,9 @@ public class SuperAdminServiceImpl implements ISuperAdminService { return superAdminMapper.deleteSuperAdminById(id); } + + @Override + public SuperAdmin selectSuperAdminByUnionId(Long unionId) { + return superAdminMapper.selectSuperAdminByUnionId(unionId); + } } diff --git a/ruoyi-system/src/main/resources/mapper/jarvis/OrderRowsMapper.xml b/ruoyi-system/src/main/resources/mapper/jarvis/OrderRowsMapper.xml index b575fb3..d731402 100644 --- a/ruoyi-system/src/main/resources/mapper/jarvis/OrderRowsMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/jarvis/OrderRowsMapper.xml @@ -61,77 +61,141 @@ select id, order_id, parent_id, order_time, finish_time, modify_time, order_emt, plus, union_id, sku_id, sku_name, sku_num, sku_return_num, sku_frozen_num, price, commission_rate, sub_side_rate, subsidy_rate, final_rate, estimate_cos_price, estimate_fee, actual_cos_price, actual_fee, valid_code, trace_type, position_id, site_id, union_alias, pid, cid1, cid2, cid3, sub_union_id, union_tag, pop_id, ext1, pay_month, cp_act_id, union_role, gift_coupon_ocs_amount, gift_coupon_key, balance_ext, sign, pro_price_amount, rid, goods_info_id, express_status, channel_id, sku_tag, item_id, caller_item_id, order_tag from order_rows - - + + + insert into order_rows @@ -187,7 +251,7 @@ item_id, caller_item_id, order_tag, - + #{id}, #{orderId}, @@ -241,7 +305,7 @@ #{itemId}, #{callerItemId}, #{orderTag}, - + diff --git a/ruoyi-system/src/main/resources/mapper/jarvis/SuperAdminMapper.xml b/ruoyi-system/src/main/resources/mapper/jarvis/SuperAdminMapper.xml index 905dd0f..5c35e9c 100644 --- a/ruoyi-system/src/main/resources/mapper/jarvis/SuperAdminMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/jarvis/SuperAdminMapper.xml @@ -1,4 +1,4 @@ - + @@ -10,12 +10,13 @@ + - select id, wxid, name, union_id, app_key, secret_key, is_active, created_at, updated_at from super_admin + select id, wxid, name, union_id, app_key, secret_key, is_active, is_count, created_at, updated_at from super_admin + + insert into super_admin wxid, name, - union_id, + union_id, app_key, secret_key, is_active, @@ -51,7 +57,7 @@ #{wxid}, #{name}, - #{unionId}, + #{unionId}, #{appKey}, #{secretKey}, #{isActive}, @@ -65,10 +71,11 @@ wxid = #{wxid}, name = #{name}, - union_id = #{unionId}, + union_id = #{unionId}, app_key = #{appKey}, secret_key = #{secretKey}, is_active = #{isActive}, + is_count = #{isCount}, updated_at = now(), where id = #{id}