diff --git a/admin-pc/.env.development b/admin-pc/.env.development index 3fe47d3..cd69ba2 100644 --- a/admin-pc/.env.development +++ b/admin-pc/.env.development @@ -1,5 +1,5 @@ NODE_ENV=development -VUE_APP_API_BASE_URL=https://popularize-admin.hhlm1688.com/popularize-admin/ +VUE_APP_API_BASE_URL=http://localhost:8001/popularize-admin/ VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview diff --git a/admin-pc/.env.production b/admin-pc/.env.production index 13172c7..df1d7d5 100644 --- a/admin-pc/.env.production +++ b/admin-pc/.env.production @@ -1,4 +1,4 @@ NODE_ENV=production -VUE_APP_API_BASE_URL=https://popularize-admin.hhlm1688.com/popularize-admin/ +VUE_APP_API_BASE_URL=http://localhost:8001/popularize-admin/ VUE_APP_CAS_BASE_URL=http://localhost:8888/cas VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview \ No newline at end of file diff --git a/admin-pc/src/views/popularizeOrder/PopularizeOrderList.vue b/admin-pc/src/views/popularizeOrder/PopularizeOrderList.vue index e34ed96..6f2bd7b 100644 --- a/admin-pc/src/views/popularizeOrder/PopularizeOrderList.vue +++ b/admin-pc/src/views/popularizeOrder/PopularizeOrderList.vue @@ -233,6 +233,11 @@ align:"center", dataIndex: 'userId_dictText' }, + { + title:'性别', + align:"center", + dataIndex: 'user_sex' + }, { title:'支付金额', align:"center", diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/ApiIndexServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/ApiIndexServiceImpl.java index 61a0a03..5bbd2d3 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/ApiIndexServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/ApiIndexServiceImpl.java @@ -35,6 +35,8 @@ import org.jeecg.modules.popularizeInvoicing.entity.PopularizeInvoicing; import org.jeecg.modules.popularizeInvoicing.service.IPopularizeInvoicingService; import org.jeecg.modules.popularizeOrder.entity.PopularizeOrder; import org.jeecg.modules.popularizeOrder.service.IPopularizeOrderService; +import org.jeecg.modules.popularizeOrderTuiLog.entity.PopularizeOrderTuiLog; +import org.jeecg.modules.popularizeOrderTuiLog.service.IPopularizeOrderTuiLogService; import org.jeecg.modules.popularizeRecruit.entity.PopularizeRecruit; import org.jeecg.modules.popularizeRecruit.service.IPopularizeRecruitService; import org.jeecg.modules.popularizeRecruitLog.entity.PopularizeRecruitLog; @@ -52,6 +54,7 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import javax.transaction.Transactional; import java.math.BigDecimal; +import java.math.RoundingMode; import java.time.LocalDateTime; import java.util.*; @@ -88,6 +91,8 @@ public class ApiIndexServiceImpl implements ApiIndexService { private IPopularizeActivityService popularizeActivityService; @Autowired private IPopularizeRecruitLogService popularizeRecruitLogService; + @Autowired + private IPopularizeOrderTuiLogService popularizeOrderTuiLogService; //支付接口 @@ -356,9 +361,28 @@ public class ApiIndexServiceImpl implements ApiIndexService { //获取旅行列表带分页 @Override public Result getTravelPageList(String title,String state, String timeStr,PageBean pageBean){ + + + // 添加活动时间在当前时间之前的条件 + + List activityList = popularizeTravelService + .lambdaQuery() + .lt(PopularizeTravel::getStartTime, LocalDateTime.now()) + .list(); // 这是一个假设的方法名,您需要根据实际情况调整 + + for (PopularizeTravel activity : activityList) { + activity.setType("1"); // 设置状态为往期活动 + activity.setState(1); //设置活动已经结束 + popularizeTravelService.updateById(activity); + } + + + + Page page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); Page page1 = popularizeTravelService .lambdaQuery() + .eq(PopularizeTravel::getIsOpen,"Y") .orderByDesc(PopularizeTravel::getCreateTime) .page(page); //如果标题不为空 @@ -367,6 +391,7 @@ public class ApiIndexServiceImpl implements ApiIndexService { .lambdaQuery() .like(PopularizeTravel::getTitle,title) .eq(PopularizeTravel::getState,state) + .eq(PopularizeTravel::getIsOpen,"Y") .orderByDesc(PopularizeTravel::getCreateTime) .page(page); } @@ -376,6 +401,7 @@ public class ApiIndexServiceImpl implements ApiIndexService { .lambdaQuery() .like(PopularizeTravel::getStartTime,timeStr) .eq(PopularizeTravel::getState,state) + .eq(PopularizeTravel::getIsOpen,"Y") .orderByDesc(PopularizeTravel::getCreateTime) .page(page); } @@ -392,6 +418,7 @@ public class ApiIndexServiceImpl implements ApiIndexService { .lambdaQuery() .like(PopularizeTravel::getTitle,title) .eq(PopularizeTravel::getState,state) + .eq(PopularizeTravel::getIsOpen,"Y") .orderByDesc(PopularizeTravel::getCreateTime) .page(page); } @@ -593,44 +620,128 @@ public class ApiIndexServiceImpl implements ApiIndexService { return Result.OK(map); } +// +// //取消订单活动 +// @Override +// public Result cancelOrder(String token,String orderId){ +// HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); +// PopularizeOrder popularizeOrder = popularizeOrderService.getById(orderId); +//// byId.setState("3"); +//// popularizeOrderService.updateById(byId); +// +// //7天外退款时,退100%。 +// //7天内至1天以外,退50%。 +// //24小时以内,无法退款。 +// String msg = "取消成功"; +// +// //获取退款当前时间 +// long l = System.currentTimeMillis(); +// //获取活动开始时间 +// +// +// +// if(popularizeOrder.getPayTime().getTime()+1000*60*60*24*7>System.currentTimeMillis()){ +// popularizeOrder.setTuiPrice(popularizeOrder.getPayPrice()); +// +// RefundOrderReq req = new RefundOrderReq(); +// req.setOutTradeNo(popularizeOrder.getOutTradeNo()); +// req.setRefundAmount(popularizeOrder.getTuiPrice()); +// req.setTotalAmount(popularizeOrder.getPayPrice()); +// req.setTransactionId(popularizeOrder.getTransactionId()); +// wxMiniappPayService.refund(req); +// msg = "取消成功,7天外退款时,退100%"; +// }else if(popularizeOrder.getPayTime().getTime()+1000*60*60*24*7>System.currentTimeMillis()-1000*60*60*24) { +// popularizeOrder.setTuiPrice(popularizeOrder.getPayPrice().divide(new BigDecimal(2))); +// RefundOrderReq req = new RefundOrderReq(); +// req.setOutTradeNo(popularizeOrder.getOutTradeNo()); +// req.setRefundAmount(popularizeOrder.getTuiPrice()); +// req.setTotalAmount(popularizeOrder.getPayPrice()); +// req.setTransactionId(popularizeOrder.getTransactionId()); +// wxMiniappPayService.refund(req); +// msg = "取消成功,7天内至1天以外,退50%"; +// }else if(popularizeOrder.getPayTime().getTime()+1000*60*60*24>System.currentTimeMillis()){ +// msg = "24小时以内,无法退款。"; +// } +// return Result.OK("取消成功"); +// } + + - //取消订单活动 @Override - public Result cancelOrder(String token,String orderId){ - HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); - PopularizeOrder popularizeOrder = popularizeOrderService.getById(orderId); -// byId.setState("3"); -// popularizeOrderService.updateById(byId); - - //7天外退款时,退100%。 - //7天内至1天以外,退50%。 - //24小时以内,无法退款。 - String msg = "取消成功"; - if(popularizeOrder.getPayTime().getTime()+1000*60*60*24*7>System.currentTimeMillis()){ - popularizeOrder.setTuiPrice(popularizeOrder.getPayPrice()); - - RefundOrderReq req = new RefundOrderReq(); - req.setOutTradeNo(popularizeOrder.getOutTradeNo()); - req.setRefundAmount(popularizeOrder.getTuiPrice()); - req.setTotalAmount(popularizeOrder.getPayPrice()); - req.setTransactionId(popularizeOrder.getTransactionId()); - wxMiniappPayService.refund(req); - msg = "取消成功,7天外退款时,退100%"; - }else if(popularizeOrder.getPayTime().getTime()+1000*60*60*24*7>System.currentTimeMillis()-1000*60*60*24) { - popularizeOrder.setTuiPrice(popularizeOrder.getPayPrice().divide(new BigDecimal(2))); - RefundOrderReq req = new RefundOrderReq(); - req.setOutTradeNo(popularizeOrder.getOutTradeNo()); - req.setRefundAmount(popularizeOrder.getTuiPrice()); - req.setTotalAmount(popularizeOrder.getPayPrice()); - req.setTransactionId(popularizeOrder.getTransactionId()); - wxMiniappPayService.refund(req); - msg = "取消成功,7天内至1天以外,退50%"; - }else if(popularizeOrder.getPayTime().getTime()+1000*60*60*24>System.currentTimeMillis()){ - msg = "24小时以内,无法退款。"; + public Result cancelOrder(String token, String orderId) { + // 常量定义(提高可读性) + final long ONE_DAY_MS = 1000 * 60 * 60 * 24; + final long SEVEN_DAYS_MS = ONE_DAY_MS * 7; + + HanHaiMember member = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + PopularizeOrder order = popularizeOrderService.getById(orderId); + + // 安全校验(建议添加) + if (order == null || order.getStartTime() == null) { + return Result.error("订单不存在或未支付"); + } + + long currentTime = System.currentTimeMillis(); + long payTime = order.getStartTime().getTime(); + + // 时间差计算 + long timeDiff = currentTime - payTime; + + String msg; + BigDecimal refundAmount = BigDecimal.ZERO; + + // 优化后的时间判断逻辑(从大到小判断) + if (timeDiff > SEVEN_DAYS_MS) { + // 超过7天(退100%) + refundAmount = order.getPayPrice(); + msg = "取消成功,超过7天全额退款"; + } else if (timeDiff > ONE_DAY_MS) { + // 1-7天之间(退50%) + refundAmount = order.getPayPrice().divide(new BigDecimal(2), 2, RoundingMode.HALF_UP); + msg = "取消成功,1-7天内退50%"; + } else { + // 24小时内(不可退款) + msg = "24小时内不可取消订单"; + return Result.error(msg); // 直接返回错误 } - return Result.OK("取消成功"); + + //创建退款记录订单 + PopularizeOrderTuiLog tuiLog = new PopularizeOrderTuiLog(); + tuiLog.setCreateTime(new Date()); + tuiLog.setOrderId(order.getId()); + tuiLog.setOrderPrice(order.getPayPrice()); + tuiLog.setTuiPrice(refundAmount); + tuiLog.setUserId(member.getId()); + tuiLog.setState(0); + popularizeOrderTuiLogService.save(tuiLog); + + + // 执行退款操作 + RefundOrderReq req = new RefundOrderReq(); + req.setOutTradeNo(order.getOutTradeNo()); + req.setRefundAmount(refundAmount); + req.setTotalAmount(order.getPayPrice()); + req.setTransactionId(order.getTransactionId()); + + // 添加退款结果校验(建议) + wxMiniappPayService.refund(req); + + + // 更新订单状态(建议添加) + order.setState("3"); // 假设3表示已取消 + popularizeOrderService.updateById(order); + + return Result.OK(msg); } + + + + + + + + //订单活动签到 @Override public Result signIn(String token,String orderId){ @@ -999,14 +1110,15 @@ public class ApiIndexServiceImpl implements ApiIndexService { ); recruitObj.setNum(recruitObj.getOrderList().size()); //创建一个签到人数 - recruitObj.setDoNum( - popularizeOrderService - .lambdaQuery() - .eq(PopularizeOrder::getTravelOrderId, recruit.getId()) - .eq(PopularizeOrder::getState, 2) - .eq(PopularizeOrder::getOpen, "Y") - .list().size() - ); +// recruitObj.setDoNum( +// popularizeOrderService +// .lambdaQuery() +// .eq(PopularizeOrder::getTravelOrderId, recruit.getId()) +// .eq(PopularizeOrder::getState, 2) +// .eq(PopularizeOrder::getOpen, "Y") +// .list().size() +// ); + recruitObj.setDoNum(popularizeOrderService.sumNumByTravelOrderIdAndStateQD(recruit.getId())); @@ -1080,14 +1192,18 @@ public class ApiIndexServiceImpl implements ApiIndexService { ); recruitObj.setNum(recruitObj.getPopularizeOrderList().size()); //创建一个签到人数 - recruitObj.setDoNum( - popularizeOrderService - .lambdaQuery() - .eq(PopularizeOrder::getActivityOrderId, recruit.getId()) - .eq(PopularizeOrder::getState, 2) - .eq(PopularizeOrder::getOpen, "Y") - .list().size() - ); +// recruitObj.setDoNum( +// popularizeOrderService +// .lambdaQuery() +// .eq(PopularizeOrder::getActivityOrderId, recruit.getId()) +// .eq(PopularizeOrder::getState, 2) +// .eq(PopularizeOrder::getOpen, "Y") +// .list().size() +// ); + + recruitObj.setDoNum(popularizeOrderService.sumNumByActivityOrderIdAndStateQD(recruit.getId())); + + recruitList.add(recruitObj); } @@ -1310,6 +1426,7 @@ public class ApiIndexServiceImpl implements ApiIndexService { popularizeOrder.setOpen("N"); popularizeOrder.setName(hanHaiMember.getNickName()); popularizeOrder.setPhone(hanHaiMember.getPhone()); + popularizeOrder.setUserSex(hanHaiMember.getSex()); popularizeOrderService.save(popularizeOrder); @@ -1414,6 +1531,7 @@ public class ApiIndexServiceImpl implements ApiIndexService { popularizeOrder.setIsPj("N"); popularizeOrder.setOpen("N"); popularizeOrder.setDetails(byId.getOrderDetails()); + popularizeOrder.setUserSex(hanHaiMember.getSex()); popularizeOrderService.save(popularizeOrder); diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/WxMiniappPayServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/WxMiniappPayServiceImpl.java index 32230de..ff8eceb 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/WxMiniappPayServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/WxMiniappPayServiceImpl.java @@ -25,6 +25,8 @@ import org.jeecg.api.wxUtils.Response; import org.jeecg.api.wxUtils.WxPayConfig; import org.jeecg.modules.popularizeOrder.entity.PopularizeOrder; import org.jeecg.modules.popularizeOrder.service.IPopularizeOrderService; +import org.jeecg.modules.popularizeOrderTuiLog.entity.PopularizeOrderTuiLog; +import org.jeecg.modules.popularizeOrderTuiLog.service.IPopularizeOrderTuiLogService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; @@ -33,6 +35,7 @@ import org.springframework.stereotype.Service; import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.math.BigDecimal; +import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -109,7 +112,8 @@ public class WxMiniappPayServiceImpl implements WxMiniappPayService { @Autowired private IPopularizeOrderService popularizeOrderService; - + @Autowired + private IPopularizeOrderTuiLogService popularizeOrderTuiLogService; /** * 退款 @@ -180,6 +184,16 @@ public class WxMiniappPayServiceImpl implements WxMiniappPayService { } if (Status.SUCCESS.equals(refund.getStatus())) { log.info("退款成功!-订单号:{}", req.getOutTradeNo()); + + //修改退款记录订单状态 + PopularizeOrderTuiLog tuiLog = popularizeOrderTuiLogService.lambdaQuery() + .eq(PopularizeOrderTuiLog::getOrderId, payOrder.getId()) + .one(); + + tuiLog.setTuiTime(new Date()); + tuiLog.setState(1); + popularizeOrderTuiLogService.updateById(tuiLog); + return Response.success("退款成功"); } else if (Status.CLOSED.equals(refund.getStatus())) { log.info("退款关闭!-订单号:{}", req.getOutTradeNo()); diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrder/entity/PopularizeOrder.java b/module-common/src/main/java/org/jeecg/modules/popularizeOrder/entity/PopularizeOrder.java index e5578d7..e4574b7 100644 --- a/module-common/src/main/java/org/jeecg/modules/popularizeOrder/entity/PopularizeOrder.java +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrder/entity/PopularizeOrder.java @@ -152,5 +152,9 @@ public class PopularizeOrder implements Serializable { private String outTradeNo; + /**性别*/ + @Excel(name = "性别", width = 15) + @ApiModelProperty(value = "性别") + private java.lang.String userSex; } diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrder/mapper/PopularizeOrderMapper.java b/module-common/src/main/java/org/jeecg/modules/popularizeOrder/mapper/PopularizeOrderMapper.java index 0beca61..f6b610a 100644 --- a/module-common/src/main/java/org/jeecg/modules/popularizeOrder/mapper/PopularizeOrderMapper.java +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrder/mapper/PopularizeOrderMapper.java @@ -20,7 +20,12 @@ public interface PopularizeOrderMapper extends BaseMapper { @Select("SELECT SUM(num) FROM popularize_order WHERE travel_order_id = #{travelOrderId} AND state in(1,2)") Integer sumNumByTravelOrderIdAndState(@Param("travelOrderId") String travelOrderId); + @Select("SELECT SUM(num) FROM popularize_order WHERE activity_order_id = #{activityOrderId} AND state in(2) AND open = 'Y'") + Integer sumNumByActivityOrderIdAndStateQD(@Param("activityOrderId") String activityOrderId); + @Select("SELECT SUM(num) FROM popularize_order WHERE travel_order_id = #{travelOrderId} AND state in(2) AND open = 'Y'") + Integer sumNumByTravelOrderIdAndStateQD(@Param("travelOrderId") String travelOrderId); + } diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrder/service/IPopularizeOrderService.java b/module-common/src/main/java/org/jeecg/modules/popularizeOrder/service/IPopularizeOrderService.java index c7da03b..9d43681 100644 --- a/module-common/src/main/java/org/jeecg/modules/popularizeOrder/service/IPopularizeOrderService.java +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrder/service/IPopularizeOrderService.java @@ -15,5 +15,16 @@ public interface IPopularizeOrderService extends IService { Integer sumNumByActivityOrderIdAndState(String activityOrderId); + + + + Integer sumNumByTravelOrderIdAndState(String travelOrderId); + + + Integer sumNumByActivityOrderIdAndStateQD(String activityOrderId); + + Integer sumNumByTravelOrderIdAndStateQD(String travelOrderId); + + } diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrder/service/impl/PopularizeOrderServiceImpl.java b/module-common/src/main/java/org/jeecg/modules/popularizeOrder/service/impl/PopularizeOrderServiceImpl.java index fbd2613..8af5de4 100644 --- a/module-common/src/main/java/org/jeecg/modules/popularizeOrder/service/impl/PopularizeOrderServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrder/service/impl/PopularizeOrderServiceImpl.java @@ -36,4 +36,17 @@ public class PopularizeOrderServiceImpl extends ServiceImpl { + @Autowired + private IPopularizeOrderTuiLogService popularizeOrderTuiLogService; + + /** + * 分页列表查询 + * + * @param popularizeOrderTuiLog + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "退款记录表-分页列表查询") + @ApiOperation(value="退款记录表-分页列表查询", notes="退款记录表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(PopularizeOrderTuiLog popularizeOrderTuiLog, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(popularizeOrderTuiLog, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = popularizeOrderTuiLogService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param popularizeOrderTuiLog + * @return + */ + @AutoLog(value = "退款记录表-添加") + @ApiOperation(value="退款记录表-添加", notes="退款记录表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody PopularizeOrderTuiLog popularizeOrderTuiLog) { + popularizeOrderTuiLogService.save(popularizeOrderTuiLog); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param popularizeOrderTuiLog + * @return + */ + @AutoLog(value = "退款记录表-编辑") + @ApiOperation(value="退款记录表-编辑", notes="退款记录表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody PopularizeOrderTuiLog popularizeOrderTuiLog) { + popularizeOrderTuiLogService.updateById(popularizeOrderTuiLog); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "退款记录表-通过id删除") + @ApiOperation(value="退款记录表-通过id删除", notes="退款记录表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + popularizeOrderTuiLogService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "退款记录表-批量删除") + @ApiOperation(value="退款记录表-批量删除", notes="退款记录表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.popularizeOrderTuiLogService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "退款记录表-通过id查询") + @ApiOperation(value="退款记录表-通过id查询", notes="退款记录表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + PopularizeOrderTuiLog popularizeOrderTuiLog = popularizeOrderTuiLogService.getById(id); + if(popularizeOrderTuiLog==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(popularizeOrderTuiLog); + } + + /** + * 导出excel + * + * @param request + * @param popularizeOrderTuiLog + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, PopularizeOrderTuiLog popularizeOrderTuiLog) { + return super.exportXls(request, popularizeOrderTuiLog, PopularizeOrderTuiLog.class, "退款记录表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, PopularizeOrderTuiLog.class); + } + +} diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/entity/PopularizeOrderTuiLog.java b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/entity/PopularizeOrderTuiLog.java new file mode 100644 index 0000000..d1fad98 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/entity/PopularizeOrderTuiLog.java @@ -0,0 +1,74 @@ +package org.jeecg.modules.popularizeOrderTuiLog.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 退款记录表 + * @Author: jeecg-boot + * @Date: 2025-03-23 + * @Version: V1.0 + */ +@Data +@TableName("popularize_order_tui_log") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="popularize_order_tui_log对象", description="退款记录表") +public class PopularizeOrderTuiLog implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**订单标识*/ + @Excel(name = "订单标识", width = 15) + @ApiModelProperty(value = "订单标识") + private java.lang.String orderId; + /**订单价格*/ + @Excel(name = "订单价格", width = 15) + @ApiModelProperty(value = "订单价格") + private java.math.BigDecimal orderPrice; + /**退款金额*/ + @Excel(name = "退款金额", width = 15) + @ApiModelProperty(value = "退款金额") + private java.math.BigDecimal tuiPrice; + /**退款时间*/ + @Excel(name = "退款时间", width = 15) + @ApiModelProperty(value = "退款时间") + private java.util.Date tuiTime; + /**退款状态*/ + @Excel(name = "退款状态", width = 15) + @ApiModelProperty(value = "退款状态") + private java.lang.Integer state; + /**用户*/ + @Excel(name = "用户", width = 15) + @ApiModelProperty(value = "用户") + private java.lang.String userId; +} diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/mapper/PopularizeOrderTuiLogMapper.java b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/mapper/PopularizeOrderTuiLogMapper.java new file mode 100644 index 0000000..2943a57 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/mapper/PopularizeOrderTuiLogMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.popularizeOrderTuiLog.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.popularizeOrderTuiLog.entity.PopularizeOrderTuiLog; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 退款记录表 + * @Author: jeecg-boot + * @Date: 2025-03-23 + * @Version: V1.0 + */ +public interface PopularizeOrderTuiLogMapper extends BaseMapper { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/mapper/xml/PopularizeOrderTuiLogMapper.xml b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/mapper/xml/PopularizeOrderTuiLogMapper.xml new file mode 100644 index 0000000..b7e6a17 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/mapper/xml/PopularizeOrderTuiLogMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/service/IPopularizeOrderTuiLogService.java b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/service/IPopularizeOrderTuiLogService.java new file mode 100644 index 0000000..07e2959 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/service/IPopularizeOrderTuiLogService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.popularizeOrderTuiLog.service; + +import org.jeecg.modules.popularizeOrderTuiLog.entity.PopularizeOrderTuiLog; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 退款记录表 + * @Author: jeecg-boot + * @Date: 2025-03-23 + * @Version: V1.0 + */ +public interface IPopularizeOrderTuiLogService extends IService { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/service/impl/PopularizeOrderTuiLogServiceImpl.java b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/service/impl/PopularizeOrderTuiLogServiceImpl.java new file mode 100644 index 0000000..6dd6ac1 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/service/impl/PopularizeOrderTuiLogServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.popularizeOrderTuiLog.service.impl; + +import org.jeecg.modules.popularizeOrderTuiLog.entity.PopularizeOrderTuiLog; +import org.jeecg.modules.popularizeOrderTuiLog.mapper.PopularizeOrderTuiLogMapper; +import org.jeecg.modules.popularizeOrderTuiLog.service.IPopularizeOrderTuiLogService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 退款记录表 + * @Author: jeecg-boot + * @Date: 2025-03-23 + * @Version: V1.0 + */ +@Service +public class PopularizeOrderTuiLogServiceImpl extends ServiceImpl implements IPopularizeOrderTuiLogService { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/PopularizeOrderTuiLogList.vue b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/PopularizeOrderTuiLogList.vue new file mode 100644 index 0000000..db599d1 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/PopularizeOrderTuiLogList.vue @@ -0,0 +1,202 @@ + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/modules/PopularizeOrderTuiLogForm.vue b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/modules/PopularizeOrderTuiLogForm.vue new file mode 100644 index 0000000..4e9620d --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/modules/PopularizeOrderTuiLogForm.vue @@ -0,0 +1,129 @@ + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/modules/PopularizeOrderTuiLogModal.Style#Drawer.vue b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/modules/PopularizeOrderTuiLogModal.Style#Drawer.vue new file mode 100644 index 0000000..6f1ef29 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/modules/PopularizeOrderTuiLogModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/modules/PopularizeOrderTuiLogModal.vue b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/modules/PopularizeOrderTuiLogModal.vue new file mode 100644 index 0000000..1121cbb --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue/modules/PopularizeOrderTuiLogModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/PopularizeOrderTuiLog.api.ts b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/PopularizeOrderTuiLog.api.ts new file mode 100644 index 0000000..869fa3d --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/PopularizeOrderTuiLog.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/popularizeOrderTuiLog/popularizeOrderTuiLog/list', + save='/popularizeOrderTuiLog/popularizeOrderTuiLog/add', + edit='/popularizeOrderTuiLog/popularizeOrderTuiLog/edit', + deleteOne = '/popularizeOrderTuiLog/popularizeOrderTuiLog/delete', + deleteBatch = '/popularizeOrderTuiLog/popularizeOrderTuiLog/deleteBatch', + importExcel = '/popularizeOrderTuiLog/popularizeOrderTuiLog/importExcel', + exportXls = '/popularizeOrderTuiLog/popularizeOrderTuiLog/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/PopularizeOrderTuiLog.data.ts b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/PopularizeOrderTuiLog.data.ts new file mode 100644 index 0000000..d0b533e --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/PopularizeOrderTuiLog.data.ts @@ -0,0 +1,73 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '订单标识', + align:"center", + dataIndex: 'orderId' + }, + { + title: '订单价格', + align:"center", + dataIndex: 'orderPrice' + }, + { + title: '退款金额', + align:"center", + dataIndex: 'tuiPrice' + }, + { + title: '退款时间', + align:"center", + dataIndex: 'tuiTime' + }, + { + title: '退款状态', + align:"center", + dataIndex: 'state' + }, + { + title: '用户', + align:"center", + dataIndex: 'userId' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '订单标识', + field: 'orderId', + component: 'Input', + }, + { + label: '订单价格', + field: 'orderPrice', + component: 'InputNumber', + }, + { + label: '退款金额', + field: 'tuiPrice', + component: 'InputNumber', + }, + { + label: '退款时间', + field: 'tuiTime', + component: 'Input', + }, + { + label: '退款状态', + field: 'state', + component: 'InputNumber', + }, + { + label: '用户', + field: 'userId', + component: 'Input', + }, +]; diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/PopularizeOrderTuiLogList.vue b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/PopularizeOrderTuiLogList.vue new file mode 100644 index 0000000..e57596b --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/PopularizeOrderTuiLogList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/components/PopularizeOrderTuiLogModal.vue b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/components/PopularizeOrderTuiLogModal.vue new file mode 100644 index 0000000..409273f --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/popularizeOrderTuiLog/vue3/components/PopularizeOrderTuiLogModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/module-system/src/main/resources/application-dev.yml b/module-system/src/main/resources/application-dev.yml index c16b1e3..da457c8 100644 --- a/module-system/src/main/resources/application-dev.yml +++ b/module-system/src/main/resources/application-dev.yml @@ -349,30 +349,30 @@ wechat-dm: notifyUrl: -### 微信商户 -#wx: -# miniapp: -# appid: wx797abcfb479c75ec # 微信小程序appid -# secret: c4565acc18698a7000be1b2bb748be81 # 微信小程序密钥 -# merchantId: 1659066870 # 商户号 -# privateKeyPath: E:\\git_java\\api_java\\popularize-admin\\popularize-admin\\popularize-admin\\module-pay\\src\\main\\resources\\apiclient_key.pem -# merchantSerialNumber: 7BE56DC695B2B612BD1C6C710A7FBFA1AC46B10F # 商户API证书序列号 -# apiV3Key: vtribevtribevtribevtribevtribe12 # 商户APIV3密钥 -# payNotifyUrl: http://h5.xzaiyp.top/popularize-admin/order_pay/refundNotify # 支付通知地址(测试环境) -# refundNotifyUrl: http://h5.xzaiyp.top/popularize-admin/order_pay/refundNotify # 退款通知地址(测试环境) - - ## 微信商户 wx: miniapp: appid: wx797abcfb479c75ec # 微信小程序appid secret: c4565acc18698a7000be1b2bb748be81 # 微信小程序密钥 merchantId: 1659066870 # 商户号 - privateKeyPath: /root/api/pem/apiclient_key.pem + privateKeyPath: E:\\git_java\\api_java\\popularize-admin\\popularize-admin\\popularize-admin\\module-pay\\src\\main\\resources\\apiclient_key.pem merchantSerialNumber: 7BE56DC695B2B612BD1C6C710A7FBFA1AC46B10F # 商户API证书序列号 apiV3Key: vtribevtribevtribevtribevtribe12 # 商户APIV3密钥 - payNotifyUrl: https://popularize-admin.hhlm1688.com/popularize-admin/order_pay/refundNotify # 支付通知地址(测试环境) - refundNotifyUrl: https://popularize-admin.hhlm1688.com/popularize-admin/order_pay/refundNotify # 退款通知地址(测试环境) + payNotifyUrl: http://h5.xzaiyp.top/popularize-admin/order_pay/refundNotify # 支付通知地址(测试环境) + refundNotifyUrl: http://h5.xzaiyp.top/popularize-admin/order_pay/refundNotify # 退款通知地址(测试环境) + + +### 微信商户 +#wx: +# miniapp: +# appid: wx797abcfb479c75ec # 微信小程序appid +# secret: c4565acc18698a7000be1b2bb748be81 # 微信小程序密钥 +# merchantId: 1659066870 # 商户号 +# privateKeyPath: /root/api/pem/apiclient_key.pem +# merchantSerialNumber: 7BE56DC695B2B612BD1C6C710A7FBFA1AC46B10F # 商户API证书序列号 +# apiV3Key: vtribevtribevtribevtribevtribe12 # 商户APIV3密钥 +# payNotifyUrl: https://popularize-admin.hhlm1688.com/popularize-admin/order_pay/refundNotify # 支付通知地址(测试环境) +# refundNotifyUrl: https://popularize-admin.hhlm1688.com/popularize-admin/order_pay/refundNotify # 退款通知地址(测试环境) #wxpay: