lianghanqiang 4 лет назад
Родитель
Сommit
a49059ecfb
18 измененных файлов с 644 добавлено и 26 удалено
  1. 3 2
      src/main/java/org/springblade/common/cache/CacheNames.java
  2. 45 0
      src/main/java/org/springblade/common/cache/PlatformCache.java
  3. 26 0
      src/main/java/org/springblade/common/config/entity/PlatformConfig.java
  4. 11 0
      src/main/java/org/springblade/common/constant/PlatformConst.java
  5. 38 0
      src/main/java/org/springblade/gateway/common_gateway/handle/DiscountHandle.java
  6. 15 10
      src/main/java/org/springblade/gateway/common_gateway/handle/Trade.java
  7. 128 0
      src/main/java/org/springblade/ldt/bills/controller/PlatformBillsController.java
  8. 34 0
      src/main/java/org/springblade/ldt/bills/dto/PlatformBillsDTO.java
  9. 77 0
      src/main/java/org/springblade/ldt/bills/entity/PlatformBills.java
  10. 42 0
      src/main/java/org/springblade/ldt/bills/mapper/PlatformBillsMapper.java
  11. 21 0
      src/main/java/org/springblade/ldt/bills/mapper/PlatformBillsMapper.xml
  12. 41 0
      src/main/java/org/springblade/ldt/bills/service/IPlatformBillsService.java
  13. 41 0
      src/main/java/org/springblade/ldt/bills/service/impl/PlatformBillsServiceImpl.java
  14. 36 0
      src/main/java/org/springblade/ldt/bills/vo/PlatformBillsVO.java
  15. 49 0
      src/main/java/org/springblade/ldt/bills/wrapper/PlatformBillsWrapper.java
  16. 29 11
      src/main/java/org/springblade/ldt/shop/entity/Shop.java
  17. 7 3
      src/main/java/org/springblade/ldt/shop/mapper/ShopMapper.xml
  18. 1 0
      src/main/java/org/springblade/payment/entity/SuccessParams.java

+ 3 - 2
src/main/java/org/springblade/common/cache/CacheNames.java

@@ -59,8 +59,9 @@ public interface CacheNames {
 	String USER_FAIL_KEY = "ldt:user::blade:fail:";
 
 
-	/* 支付模块  */
+	/** 支付模块  */
 	String PAYMENT = "payment";
 
-
+	/** 平台参数  */
+	String PLATFORM = "platform";
 }

+ 45 - 0
src/main/java/org/springblade/common/cache/PlatformCache.java

@@ -0,0 +1,45 @@
+package org.springblade.common.cache;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.springblade.common.config.entity.PlatformConfig;
+import org.springblade.common.constant.PlatformConst;
+import org.springblade.core.cache.utils.CacheUtil;
+import org.springblade.core.tool.utils.SpringUtil;
+import org.springblade.ldt.platform.entity.PlatformSetting;
+import org.springblade.ldt.platform.service.IPlatformSettingService;
+
+import java.util.Objects;
+
+/**
+ * @author: lianghanqiang
+ * @description:
+ * @since: 8/27/21 -- 2:18 PM
+ */
+public class PlatformCache {
+
+	private static IPlatformSettingService platformSettingService;
+
+	private static String PLATFORM_PREFIX = "platform";
+
+	static {
+		platformSettingService = SpringUtil.getBean(IPlatformSettingService.class);
+	}
+
+	/**
+	 * 	获取平台的各种费用参数设置
+	 * */
+	public static PlatformConfig platFormConfig(){
+		PlatformConfig platformConfig = (PlatformConfig) CacheUtil.get(CacheNames.PLATFORM, PLATFORM_PREFIX, PlatformConst.PLATFORM_ARG);
+
+		//没有缓存从数据库获取,然后放缓存
+		if(Objects.isNull(platformConfig)){
+			PlatformSetting platformSetting = platformSettingService.getOne(new QueryWrapper<PlatformSetting>()
+				.lambda()
+				.eq(PlatformSetting::getSettingKey, PlatformConst.PLATFORM_ARG));
+			platformConfig = JSON.parseObject(platformSetting.getSettingValue(), PlatformConfig.class);
+			CacheUtil.put(CacheNames.PLATFORM,PLATFORM_PREFIX,PlatformConst.PLATFORM_ARG,platformConfig);
+		}
+		return platformConfig;
+	}
+}

+ 26 - 0
src/main/java/org/springblade/common/config/entity/PlatformConfig.java

@@ -0,0 +1,26 @@
+package org.springblade.common.config.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author: lianghanqiang
+ * @description:
+ * @since: 8/27/21 -- 2:25 PM
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class PlatformConfig {
+	/**
+	 * 	国信活动服务费 %
+	 * */
+	double serviceFee;
+	/**
+	 * 	国信积分交易手续费 %
+	 * */
+	double pointFee;
+}

+ 11 - 0
src/main/java/org/springblade/common/constant/PlatformConst.java

@@ -0,0 +1,11 @@
+package org.springblade.common.constant;
+
+/**
+ * @author: lianghanqiang
+ * @description: 平台配置字段
+ * @since: 8/27/21 -- 2:29 PM
+ */
+public interface PlatformConst {
+
+	 String PLATFORM_ARG  = "platform_arg";
+}

+ 38 - 0
src/main/java/org/springblade/gateway/common_gateway/handle/DiscountHandle.java

@@ -0,0 +1,38 @@
+package org.springblade.gateway.common_gateway.handle;
+
+import lombok.AllArgsConstructor;
+import org.springblade.common.cache.PlatformCache;
+import org.springblade.common.config.entity.PlatformConfig;
+import org.springblade.gateway.common_gateway.handle.entity.HandleData;
+import org.springblade.gateway.common_gateway.handle.entity.Order;
+import org.springblade.ldt.mall.service.IMallService;
+import org.springblade.ldt.shop.entity.Shop;
+import org.springblade.ldt.shop.service.IShopService;
+import org.springblade.payment.entity.SuccessParams;
+
+import java.math.BigDecimal;
+
+/**
+ * @author: lianghanqiang
+ * @description: 处理各种商家折扣
+ * @since: 8/27/21 -- 2:43 PM
+ */
+@AllArgsConstructor
+public class DiscountHandle implements BaseHandle {
+
+	private IShopService shopService;
+	private IMallService mallService;
+
+	@Override
+	public HandleData handle(BigDecimal remain, Order order, SuccessParams successParams) {
+		PlatformConfig platformConfig = PlatformCache.platFormConfig();
+
+		//商家折扣
+		Shop shop = shopService.getById(order.getShopId());
+
+		//国信服务费
+		double serviceFee = platformConfig.getServiceFee();
+
+		return null;
+	}
+}

+ 15 - 10
src/main/java/org/springblade/gateway/common_gateway/handle/Trade.java

@@ -10,7 +10,9 @@ import org.springblade.gateway.common_gateway.handle.entity.Order;
 import org.springblade.ldt.bills.service.IBalanceBillsService;
 import org.springblade.ldt.bills.service.IBillsService;
 import org.springblade.ldt.bills.service.IPointBillsService;
+import org.springblade.ldt.mall.service.IMallService;
 import org.springblade.ldt.platform.service.IPlatformSettingService;
+import org.springblade.ldt.shop.service.IShopService;
 import org.springblade.ldt.user.service.ILoginUserService;
 import org.springblade.payment.entity.SuccessParams;
 import org.springblade.payment.service.IPaymentService;
@@ -32,19 +34,22 @@ import java.util.List;
 @AllArgsConstructor
 public class Trade {
 
-	private  IBillsService billsService;
-	private  IPointBillsService pointBillsService;
-	private  IBalanceBillsService balanceBillsService;
-	private  WebSocketServer webSocketServer;
-	private  IPaymentService paymentService;
-	private  IPlatformSettingService platformSettingService;
-	private  ILoginUserService loginUserService;
+	private IBillsService billsService;
+	private IPointBillsService pointBillsService;
+	private IBalanceBillsService balanceBillsService;
+	private WebSocketServer webSocketServer;
+	private IPaymentService paymentService;
+	private IShopService shopService;
+	private IMallService mallService;
+	private IPlatformSettingService platformSettingService;
+	private ILoginUserService loginUserService;
 
 	/**
 	 * 	交易处理链,每个handle处理负责一个业务节点
-	 * 	1、用户渠道积分用以抵消交易金额
-	 * 	2、用户账户余额抵消交易金额
-	 * 	3、剩余金额用户微信支付
+	 * 	1、处理各种商家折扣,计算实际交易金额
+	 * 	2、用户渠道积分用以抵消交易金额
+	 * 	3、用户账户余额抵消交易金额
+	 * 	4、剩余金额用户微信支付
 	 * */
 	private  List<BaseHandle> chain ;
 

+ 128 - 0
src/main/java/org/springblade/ldt/bills/controller/PlatformBillsController.java

@@ -0,0 +1,128 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.ldt.bills.entity.PlatformBills;
+import org.springblade.ldt.bills.vo.PlatformBillsVO;
+import org.springblade.ldt.bills.wrapper.PlatformBillsWrapper;
+import org.springblade.ldt.bills.service.IPlatformBillsService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("ldt_bills/platformbills")
+@Api(value = "", tags = "接口")
+public class PlatformBillsController extends BladeController {
+
+	private final IPlatformBillsService platformBillsService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入platformBills")
+	public R<PlatformBillsVO> detail(PlatformBills platformBills) {
+		PlatformBills detail = platformBillsService.getOne(Condition.getQueryWrapper(platformBills));
+		return R.data(PlatformBillsWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入platformBills")
+	public R<IPage<PlatformBillsVO>> list(PlatformBills platformBills, Query query) {
+		IPage<PlatformBills> pages = platformBillsService.page(Condition.getPage(query), Condition.getQueryWrapper(platformBills));
+		return R.data(PlatformBillsWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入platformBills")
+	public R<IPage<PlatformBillsVO>> page(PlatformBillsVO platformBills, Query query) {
+		IPage<PlatformBillsVO> pages = platformBillsService.selectPlatformBillsPage(Condition.getPage(query), platformBills);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入platformBills")
+	public R save(@Valid @RequestBody PlatformBills platformBills) {
+		return R.status(platformBillsService.save(platformBills));
+	}
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入platformBills")
+	public R update(@Valid @RequestBody PlatformBills platformBills) {
+		return R.status(platformBillsService.updateById(platformBills));
+	}
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入platformBills")
+	public R submit(@Valid @RequestBody PlatformBills platformBills) {
+		return R.status(platformBillsService.saveOrUpdate(platformBills));
+	}
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(platformBillsService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 34 - 0
src/main/java/org/springblade/ldt/bills/dto/PlatformBillsDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.dto;
+
+import org.springblade.ldt.bills.entity.PlatformBills;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PlatformBillsDTO extends PlatformBills {
+	private static final long serialVersionUID = 1L;
+
+}

+ 77 - 0
src/main/java/org/springblade/ldt/bills/entity/PlatformBills.java

@@ -0,0 +1,77 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+@Data
+@TableName("ldt_platform_bills")
+@ApiModel(value = "PlatformBills对象", description = "PlatformBills对象")
+public class PlatformBills implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 平台收益明细id
+	*/
+		@ApiModelProperty(value = "平台收益明细id")
+		private Long id;
+	/**
+	* 支付方
+	*/
+		@ApiModelProperty(value = "支付方")
+		private Long payer;
+	/**
+	* 收款方
+	*/
+		@ApiModelProperty(value = "收款方")
+		private Long receiver;
+	/**
+	* 交易类型
+	*/
+		@ApiModelProperty(value = "交易类型")
+		private String type;
+	/**
+	* 手续费
+	*/
+		@ApiModelProperty(value = "手续费")
+		private Double fee;
+	/**
+	* 交易时间
+	*/
+		@ApiModelProperty(value = "交易时间")
+		private LocalDateTime createTime;
+	/**
+	* 交易金额
+	*/
+		@ApiModelProperty(value = "交易金额")
+		private Double price;
+
+
+}

+ 42 - 0
src/main/java/org/springblade/ldt/bills/mapper/PlatformBillsMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.mapper;
+
+import org.springblade.ldt.bills.entity.PlatformBills;
+import org.springblade.ldt.bills.vo.PlatformBillsVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+public interface PlatformBillsMapper extends BaseMapper<PlatformBills> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param platformBills
+	 * @return
+	 */
+	List<PlatformBillsVO> selectPlatformBillsPage(IPage page, PlatformBillsVO platformBills);
+
+}

+ 21 - 0
src/main/java/org/springblade/ldt/bills/mapper/PlatformBillsMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.ldt.bills.mapper.PlatformBillsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="platformBillsResultMap" type="org.springblade.ldt.bills.entity.PlatformBills">
+        <result column="id" property="id"/>
+        <result column="payer" property="payer"/>
+        <result column="receiver" property="receiver"/>
+        <result column="type" property="type"/>
+        <result column="fee" property="fee"/>
+        <result column="create_time" property="createTime"/>
+        <result column="price" property="price"/>
+    </resultMap>
+
+
+    <select id="selectPlatformBillsPage" resultMap="platformBillsResultMap">
+        select * from ldt_platform_bills where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
src/main/java/org/springblade/ldt/bills/service/IPlatformBillsService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.service;
+
+import org.springblade.ldt.bills.entity.PlatformBills;
+import org.springblade.ldt.bills.vo.PlatformBillsVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+public interface IPlatformBillsService extends IService<PlatformBills> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param platformBills
+	 * @return
+	 */
+	IPage<PlatformBillsVO> selectPlatformBillsPage(IPage<PlatformBillsVO> page, PlatformBillsVO platformBills);
+
+}

+ 41 - 0
src/main/java/org/springblade/ldt/bills/service/impl/PlatformBillsServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.service.impl;
+
+import org.springblade.ldt.bills.entity.PlatformBills;
+import org.springblade.ldt.bills.vo.PlatformBillsVO;
+import org.springblade.ldt.bills.mapper.PlatformBillsMapper;
+import org.springblade.ldt.bills.service.IPlatformBillsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+@Service
+public class PlatformBillsServiceImpl extends ServiceImpl<PlatformBillsMapper, PlatformBills> implements IPlatformBillsService {
+
+	@Override
+	public IPage<PlatformBillsVO> selectPlatformBillsPage(IPage<PlatformBillsVO> page, PlatformBillsVO platformBills) {
+		return page.setRecords(baseMapper.selectPlatformBillsPage(page, platformBills));
+	}
+
+}

+ 36 - 0
src/main/java/org/springblade/ldt/bills/vo/PlatformBillsVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.vo;
+
+import org.springblade.ldt.bills.entity.PlatformBills;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "PlatformBillsVO对象", description = "PlatformBillsVO对象")
+public class PlatformBillsVO extends PlatformBills {
+	private static final long serialVersionUID = 1L;
+
+}

+ 49 - 0
src/main/java/org/springblade/ldt/bills/wrapper/PlatformBillsWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.ldt.bills.entity.PlatformBills;
+import org.springblade.ldt.bills.vo.PlatformBillsVO;
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+public class PlatformBillsWrapper extends BaseEntityWrapper<PlatformBills, PlatformBillsVO>  {
+
+	public static PlatformBillsWrapper build() {
+		return new PlatformBillsWrapper();
+ 	}
+
+	@Override
+	public PlatformBillsVO entityVO(PlatformBills platformBills) {
+		PlatformBillsVO platformBillsVO = Objects.requireNonNull(BeanUtil.copy(platformBills, PlatformBillsVO.class));
+
+		//User createUser = UserCache.getUser(platformBills.getCreateUser());
+		//User updateUser = UserCache.getUser(platformBills.getUpdateUser());
+		//platformBillsVO.setCreateUserName(createUser.getName());
+		//platformBillsVO.setUpdateUserName(updateUser.getName());
+
+		return platformBillsVO;
+	}
+
+}

+ 29 - 11
src/main/java/org/springblade/ldt/shop/entity/Shop.java

@@ -18,7 +18,6 @@ package org.springblade.ldt.shop.entity;
 
 import java.math.BigDecimal;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -44,6 +43,11 @@ public class Shop implements Serializable {
 		@ApiModelProperty(value = "商户id")
 		private Long id;
 	/**
+	* 商户名称
+	*/
+		@ApiModelProperty(value = "商户名称")
+		private String name;
+	/**
 	* 代理人
 	*/
 		@ApiModelProperty(value = "代理人")
@@ -69,9 +73,9 @@ public class Shop implements Serializable {
 		@ApiModelProperty(value = "区域编码")
 		private String locationCode;
 	/**
-	* 区
+	* 所在地
 	*/
-		@ApiModelProperty(value = "区")
+		@ApiModelProperty(value = "所在地区")
 		private String location;
 	/**
 	* 商户封面
@@ -79,11 +83,6 @@ public class Shop implements Serializable {
 		@ApiModelProperty(value = "商户封面")
 		private String cover;
 	/**
-	* 商户名称
-	*/
-		@ApiModelProperty(value = "商户名称")
-		private String name;
-	/**
 	* 商户logo
 	*/
 		@ApiModelProperty(value = "商户logo")
@@ -92,8 +91,7 @@ public class Shop implements Serializable {
 	* 父标签ids,逗号分割
 	*/
 		@ApiModelProperty(value = "父标签ids,逗号分割")
-		@TableField("label_parentIds")
-	private String labelParentids;
+		private String labelParentIds;
 	/**
 	* 商户标签json字符串
 	*/
@@ -173,12 +171,32 @@ public class Shop implements Serializable {
 	* 审核意见
 	*/
 		@ApiModelProperty(value = "审核意见")
-		private String auditComment;
+		private String auditAdvice;
 	/**
 	* 账单应收
 	*/
 		@ApiModelProperty(value = "账单应收")
 		private BigDecimal charge;
+	/**
+	* 经度
+	*/
+		@ApiModelProperty(value = "经度")
+		private String longitude;
+	/**
+	* 纬度
+	*/
+		@ApiModelProperty(value = "纬度")
+		private String latitude;
+	/**
+	* 详细地址
+	*/
+		@ApiModelProperty(value = "详细地址")
+		private String address;
+	/**
+	* 参加活动的id
+	*/
+		@ApiModelProperty(value = "参加活动的id")
+		private Long activityId;
 
 
 }

+ 7 - 3
src/main/java/org/springblade/ldt/shop/mapper/ShopMapper.xml

@@ -5,6 +5,7 @@
     <!-- 通用查询映射结果 -->
     <resultMap id="shopResultMap" type="org.springblade.ldt.shop.entity.Shop">
         <id column="id" property="id"/>
+        <result column="name" property="name"/>
         <result column="agenter" property="agenter"/>
         <result column="mall_id" property="mallId"/>
         <result column="person_name" property="personName"/>
@@ -12,9 +13,8 @@
         <result column="location_code" property="locationCode"/>
         <result column="location" property="location"/>
         <result column="cover" property="cover"/>
-        <result column="name" property="name"/>
         <result column="logo" property="logo"/>
-        <result column="label_parentIds" property="labelParentids"/>
+        <result column="label_parent_ids" property="labelParentIds"/>
         <result column="label_json" property="labelJson"/>
         <result column="label_key" property="labelKey"/>
         <result column="sales" property="sales"/>
@@ -30,8 +30,12 @@
         <result column="member_count" property="memberCount"/>
         <result column="slogan" property="slogan"/>
         <result column="audit_status" property="auditStatus"/>
-        <result column="audit_comment" property="auditComment"/>
+        <result column="audit_advice" property="auditAdvice"/>
         <result column="charge" property="charge"/>
+        <result column="longitude" property="longitude"/>
+        <result column="latitude" property="latitude"/>
+        <result column="address" property="address"/>
+        <result column="activity_id" property="activityId"/>
     </resultMap>
 
 

+ 1 - 0
src/main/java/org/springblade/payment/entity/SuccessParams.java

@@ -48,4 +48,5 @@ public class SuccessParams {
 	 * 交易总额
 	 * */
 	private double totalPrice;
+
 }