LIDEXI 4 лет назад
Родитель
Сommit
81c28e78f7
20 измененных файлов с 802 добавлено и 31 удалено
  1. 8 0
      src/main/java/org/springblade/modules/ldt/activity/mapper/ActivityMapper.java
  2. 42 0
      src/main/java/org/springblade/modules/ldt/activity/mapper/ActivityMapper.xml
  3. 7 1
      src/main/java/org/springblade/modules/ldt/activity/service/IActivityService.java
  4. 20 0
      src/main/java/org/springblade/modules/ldt/activity/service/impl/ActivityServiceImpl.java
  5. 19 8
      src/main/java/org/springblade/modules/ldt/activityjoinrecord/controller/ActivityJoinRecordController.java
  6. 1 1
      src/main/java/org/springblade/modules/ldt/billrecord/entity/BillRecord.java
  7. 2 2
      src/main/java/org/springblade/modules/ldt/billrecord/mapper/BillRecordMapper.xml
  8. 18 15
      src/main/java/org/springblade/modules/ldt/mall/controller/AppMallController.java
  9. 2 2
      src/main/java/org/springblade/modules/ldt/mall/entity/Mall.java
  10. 162 0
      src/main/java/org/springblade/modules/ldt/shop/controller/AppShopController.java
  11. 13 2
      src/main/java/org/springblade/modules/ldt/shop/entity/Shop.java
  12. 32 0
      src/main/java/org/springblade/modules/ldt/shop/vo/AppShopStaticVO.java
  13. 127 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/controller/WithdrawRecordController.java
  14. 34 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/dto/WithdrawRecordDTO.java
  15. 118 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/entity/WithdrawRecord.java
  16. 42 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/mapper/WithdrawRecordMapper.java
  17. 37 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/mapper/WithdrawRecordMapper.xml
  18. 41 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/service/IWithdrawRecordService.java
  19. 41 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/service/impl/WithdrawRecordServiceImpl.java
  20. 36 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/vo/WithdrawRecordVO.java

+ 8 - 0
src/main/java/org/springblade/modules/ldt/activity/mapper/ActivityMapper.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.ldt.activity.mapper;
 
+import org.apache.ibatis.annotations.Param;
 import org.springblade.modules.ldt.activity.entity.Activity;
 import org.springblade.modules.ldt.activity.vo.ActivityVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -39,4 +40,11 @@ public interface ActivityMapper extends BaseMapper<Activity> {
 	 */
 	List<ActivityVO> selectActivityPage(IPage page, ActivityVO activity);
 
+	List<Activity> getCanJoinActicityByMallId(IPage<Activity> page,@Param("mallId") Long mallId);
+
+	List<Activity> getHadJoinActivityByMallId(IPage<Activity> page,@Param("mallId") Long mallId);
+
+	List<Activity> getCanJoinActicityByShopId(IPage<Activity> page,@Param("sponsorId") Long sponsorId);
+
+	List<Activity> getHadJoinActivityByShopId(IPage<Activity> page,@Param("sponsorId") Long sponsorId);
 }

+ 42 - 0
src/main/java/org/springblade/modules/ldt/activity/mapper/ActivityMapper.xml

@@ -32,5 +32,47 @@
     <select id="selectActivityPage" resultMap="activityResultMap">
         select * from ldt_activity where is_deleted = 0
     </select>
+    <select id="getCanJoinActicityByMallId" resultMap="activityResultMap">
+        select * from ldt_activity where is_deleted = 0 and audit_status = 1
+            and id in (
+                select id   from ldt_activity where is_deleted = 0 and sponsor_type = 2
+                    and sponsor_id in (
+		                select id from ldt_shop where is_deleted = 0 and mall_id = ${mallId}
+                    )
+                    and id not in (
+                        select activity_id from ldt_activity_join_record where is_deleted = 0 and join_type = 1 and join_id = ${mallId}
+                    )
+                )
+    </select>
+
+    <select id="getHadJoinActivityByMallId" resultMap="activityResultMap">
+        select * from ldt_activity where is_deleted = 0
+            and id in (
+                select activity_id   from ldt_activity_join_record where is_deleted = 0 and join_type = 1 and join_id = ${mallId}
+
+             )
+    </select>
+
+    <select id="getCanJoinActicityByShopId" resultMap="activityResultMap">
+        select * from ldt_activity where is_deleted = 0 and audit_status = 1
+            and id in (
+                select id   from ldt_activity where is_deleted = 0 and sponsor_type = 1
+                    and sponsor_id in (
+		                select mall_id from ldt_shop where is_deleted = 0 and id = ${sponsorId}
+                    )
+                    and id not in (
+                        select activity_id from ldt_activity_join_record where is_deleted = 0 and join_type = 2 and join_id = ${sponsorId}
+                    )
+                )
+    </select>
+
+    <select id="getHadJoinActivityByShopId" resultMap="activityResultMap">
+        select * from ldt_activity where is_deleted = 0
+            and id in (
+                select activity_id   from ldt_activity_join_record where is_deleted = 0 and join_type = 2 and join_id = ${sponsorId}
+
+             )
+    </select>
+
 
 </mapper>

+ 7 - 1
src/main/java/org/springblade/modules/ldt/activity/service/IActivityService.java

@@ -38,5 +38,11 @@ public interface IActivityService extends BaseService<Activity> {
 	 */
 	IPage<ActivityVO> selectActivityPage(IPage<ActivityVO> page, ActivityVO activity);
 
-	IPage<Activity> getCanJoinActicityByMallId(IPage<ActivityVO> page,Long mallId);
+	IPage<Activity> getCanJoinActicityByMallId(IPage<Activity> page,Long mallId);
+
+	IPage<Activity> getHadJoinActivityByMallId(IPage<Activity> page, Long mallId);
+
+	IPage<Activity> getCanJoinActicityByShopId(IPage<Activity> page, Long sponsorId);
+
+	IPage<Activity> getHadJoinActivityByShopId(IPage<Activity> page, Long sponsorId);
 }

+ 20 - 0
src/main/java/org/springblade/modules/ldt/activity/service/impl/ActivityServiceImpl.java

@@ -38,4 +38,24 @@ public class ActivityServiceImpl extends BaseServiceImpl<ActivityMapper, Activit
 		return page.setRecords(baseMapper.selectActivityPage(page, activity));
 	}
 
+	@Override
+	public IPage<Activity> getCanJoinActicityByMallId(IPage<Activity> page, Long mallId) {
+		return page.setRecords(baseMapper.getCanJoinActicityByMallId(page,mallId));
+	}
+
+	@Override
+	public IPage<Activity> getHadJoinActivityByMallId(IPage<Activity> page, Long mallId) {
+		return page.setRecords(baseMapper.getHadJoinActivityByMallId(page,mallId));
+	}
+
+	@Override
+	public IPage<Activity> getCanJoinActicityByShopId(IPage<Activity> page, Long sponsorId) {
+		return page.setRecords(baseMapper.getCanJoinActicityByShopId(page,sponsorId));
+	}
+
+	@Override
+	public IPage<Activity> getHadJoinActivityByShopId(IPage<Activity> page, Long sponsorId) {
+		return page.setRecords(baseMapper.getHadJoinActivityByShopId(page,sponsorId));
+	}
+
 }

+ 19 - 8
src/main/java/org/springblade/modules/ldt/activityjoinrecord/controller/ActivityJoinRecordController.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.ldt.activityjoinrecord.controller;
 
+import cn.hutool.core.lang.Assert;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -27,6 +28,8 @@ 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.springblade.modules.ldt.activity.entity.Activity;
+import org.springblade.modules.ldt.activity.service.IActivityService;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -48,6 +51,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 public class ActivityJoinRecordController extends BladeController {
 
 	private final IActivityJoinRecordService activityJoinRecordService;
+	private final IActivityService activityService;
 
 	/**
 	 * 详情
@@ -61,7 +65,7 @@ public class ActivityJoinRecordController extends BladeController {
 	}
 
 	/**
-	 * 分页 
+	 * 分页
 	 */
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
@@ -72,7 +76,7 @@ public class ActivityJoinRecordController extends BladeController {
 	}
 
 	/**
-	 * 自定义分页 
+	 * 自定义分页
 	 */
 	@GetMapping("/page")
 	@ApiOperationSupport(order = 3)
@@ -83,17 +87,18 @@ public class ActivityJoinRecordController extends BladeController {
 	}
 
 	/**
-	 * 新增 
+	 * 新增
 	 */
 	@PostMapping("/save")
 	@ApiOperationSupport(order = 4)
 	@ApiOperation(value = "新增", notes = "传入activityJoinRecord")
 	public R save(@Valid @RequestBody ActivityJoinRecord activityJoinRecord) {
+		activityJoinRecord.getActivityId();
 		return R.status(activityJoinRecordService.save(activityJoinRecord));
 	}
 
 	/**
-	 * 修改 
+	 * 修改
 	 */
 	@PostMapping("/update")
 	@ApiOperationSupport(order = 5)
@@ -103,18 +108,24 @@ public class ActivityJoinRecordController extends BladeController {
 	}
 
 	/**
-	 * 新增或修改 
+	 * 新增或修改
 	 */
 	@PostMapping("/submit")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入activityJoinRecord")
 	public R submit(@Valid @RequestBody ActivityJoinRecord activityJoinRecord) {
+		Assert.notNull(activityJoinRecord.getJoinType(),"joinType不能为空");
+		Assert.notNull(activityJoinRecord.getJoinId(),"参与者不能为空");
+		Assert.notNull(activityJoinRecord.getActivityId(),"活动不能为空");
+		Activity activity = activityService.getById(activityJoinRecord.getActivityId());
+		Assert.notNull(activity,"活动不存在");
+
 		return R.status(activityJoinRecordService.saveOrUpdate(activityJoinRecord));
 	}
 
-	
+
 	/**
-	 * 删除 
+	 * 删除
 	 */
 	@PostMapping("/remove")
 	@ApiOperationSupport(order = 7)
@@ -123,5 +134,5 @@ public class ActivityJoinRecordController extends BladeController {
 		return R.status(activityJoinRecordService.deleteLogic(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 1 - 1
src/main/java/org/springblade/modules/ldt/billrecord/entity/BillRecord.java

@@ -106,7 +106,7 @@ public class BillRecord extends BaseEntity {
 	* 易支付返回的支付状态
 	*/
 		@ApiModelProperty(value = "易支付返回的支付状态")
-		private String yeePayStatus;
+		private String thirdPayStatus;
 	/**
 	* 实际付款价格
 	*/

+ 2 - 2
src/main/java/org/springblade/modules/ldt/billrecord/mapper/BillRecordMapper.xml

@@ -23,14 +23,14 @@
         <result column="order_id" property="orderId"/>
         <result column="channel_order_id" property="channelOrderId"/>
         <result column="pay_amount" property="payAmount"/>
-        <result column="yee_pay_status" property="yeePayStatus"/>
+        <result column="third_pay_status" property="thirdPayStatus"/>
         <result column="real_pay_amount" property="realPayAmount"/>
         <result column="parent_merchant_no" property="parentMerchantNo"/>
         <result column="merchant_no" property="merchantNo"/>
         <result column="pay_success_date" property="paySuccessDate"/>
         <result column="payer_info" property="payerInfo"/>
         <result column="pay_status" property="payStatus"/>
-       
+
     </resultMap>
 
 

+ 18 - 15
src/main/java/org/springblade/modules/ldt/mall/controller/AppMallController.java

@@ -58,7 +58,6 @@ public class AppMallController {
 	private final IMemberService memberService;
 	private final IBillRecordService billRecordService;
 	private final IActivityService activityService;
-	private final IActivityJoinRecordService activityJoinRecordService;
 
 	/**
 	 * 通过手机获取商场信息
@@ -125,11 +124,11 @@ public class AppMallController {
 	 * @param shopDTO
 	 * @return
 	 */
-	@GetMapping("/getPassShopList")
-	@ApiOperation(value = "商场获取已经审核通过的商店列表", notes = "传入商场id")
+	@GetMapping("/getShopList")
+	@ApiOperation(value = "商场获取商店列表", notes = "传入商场")
 	public R<List<Shop>> getPassShopList(@RequestBody ShopDTO shopDTO) {
 		Assert.notNull(shopDTO.getMallId(), "商场id不能为空");
-		List<Shop> shops = shopService.getBaseMapper().selectList(new QueryWrapper<>(new Shop()).lambda().eq(Shop::getAuditStatus, 1)
+		List<Shop> shops = shopService.getBaseMapper().selectList(new QueryWrapper<>(new Shop()).lambda().eq(Shop::getAuditStatus, shopDTO.getAuditStatus())
 			.eq(Shop::getMallId, shopDTO.getMallId()).like(shopDTO.getLabelId() != null, Shop::getLabelIds, shopDTO.getLabelId())
 			.eq(shopDTO.getMallAreaId() != null, Shop::getMallAreaId, shopDTO.getMallAreaId()));
 
@@ -259,20 +258,24 @@ public class AppMallController {
 
 		}else if(activityDTO.getSelectType() == 3){//已参加的活动
 			//从活动参加记录表中获取
-			List<ActivityJoinRecord> activityJoinRecords = activityJoinRecordService.getBaseMapper().selectList(new QueryWrapper<>(new ActivityJoinRecord()).lambda()
-				.eq(ActivityJoinRecord::getJoinId, activityDTO.getSponsorId()).eq(ActivityJoinRecord::getJoinType, SystemConstant.MALLORSHOP.MALL.getValue()));
-			pages = new Page<>();
-			pages.setCurrent(query.getCurrent());
-			pages.setSize(query.getSize());
-			pages.setTotal(activityJoinRecords.size());
-			List<Long> activityIds = activityJoinRecords.stream().map(ActivityJoinRecord::getActivityId).collect(Collectors.toList());
-			activityIds = activityIds.subList((query.getCurrent()-1) * 10, query.getCurrent() * query.getSize());
-			List<Activity> activities = this.activityService.getBaseMapper().selectList(new QueryWrapper<>(new Activity())
-				.lambda().in(Activity::getId,activityIds));
-			pages.setRecords(activities);
+			pages = this.activityService.getHadJoinActivityByMallId(Condition.getPage(query),activityDTO.getMallId());
 		}
 
 		return R.data(pages);
 	}
 
+	/**
+	 * 活动审核
+	 */
+	@PostMapping("/auditActivity")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "活动审核", notes = "传入activity")
+	public R getMembersByMallId(@RequestBody Activity activity) {
+		Activity oldEntity = activityService.getById(activity.getId());
+		Assert.notNull(oldEntity,"活动不存在");
+		oldEntity.setAuditAdvice(activity.getAuditAdvice());
+		oldEntity.setAuditStatus(activity.getAuditStatus());
+		return R.data(activityService.updateById(oldEntity));
+	}
+
 }

+ 2 - 2
src/main/java/org/springblade/modules/ldt/mall/entity/Mall.java

@@ -82,12 +82,12 @@ public class Mall extends BaseEntity {
 	* 经度
 	*/
 		@ApiModelProperty(value = "经度")
-		private BigDecimal longitude;
+		private String longitude;
 	/**
 	* 纬度
 	*/
 		@ApiModelProperty(value = "纬度")
-		private BigDecimal latitude;
+		private String latitude;
 	/**
 	* 负责人手机号码
 	*/

+ 162 - 0
src/main/java/org/springblade/modules/ldt/shop/controller/AppShopController.java

@@ -0,0 +1,162 @@
+package org.springblade.modules.ldt.shop.controller;
+
+import cn.hutool.core.lang.Assert;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springblade.common.constant.SystemConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.modules.ldt.activity.dto.ActivityDTO;
+import org.springblade.modules.ldt.activity.entity.Activity;
+import org.springblade.modules.ldt.activity.service.IActivityService;
+import org.springblade.modules.ldt.billrecord.entity.BillRecord;
+import org.springblade.modules.ldt.billrecord.service.IBillRecordService;
+import org.springblade.modules.ldt.mall.entity.Mall;
+import org.springblade.modules.ldt.mall.vo.AppMallStaticVO;
+import org.springblade.modules.ldt.member.entity.Member;
+import org.springblade.modules.ldt.member.service.IMemberService;
+import org.springblade.modules.ldt.shop.entity.Shop;
+import org.springblade.modules.ldt.shop.service.IShopService;
+import org.springblade.modules.ldt.shop.vo.AppShopStaticVO;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Created By lidexi in 2021/7/30
+ **/
+@RestController
+@AllArgsConstructor
+@RequestMapping("cyzh-ldt/app/shop")
+@Api(value = "商店app接口", tags = "商店app接口")
+public class AppShopController {
+
+	private final IShopService shopService;
+	private final IActivityService activityService;
+	private final IMemberService memberService;
+	private final IBillRecordService billRecordService;
+
+	/**
+	 * 商店创建会员中心
+	 *
+	 * @param shop
+	 * @return
+	 */
+	@PostMapping("/createMemberCenter")
+	@ApiOperation(value = "商店创建会员中心", notes = "传入商店")
+	public R createMemberCenter(@RequestBody Shop shop) {
+		Shop oldEntity = shopService.getById(shop.getId());
+		Assert.notNull(oldEntity, "商店不存在");
+		Assert.isTrue( SystemConstant.AuditStatus.PASS.getValue() == oldEntity.getAuditStatus(),
+			"商店还没通过审核,不能创建会员中心,请先联系商场审核");
+		Assert.notNull(shop.getPoint(),"积分数不能为空");
+		Assert.notNull(shop.getPointValue(),"积分对应的积分价值不能为空");
+		Assert.notNull(shop.getConsumeOnePoint(),"每消费一元赠送的积分数不能为空");
+		oldEntity.setPoint(shop.getPoint());
+		oldEntity.setPointValue(shop.getPointValue());
+		oldEntity.setConsumeOnePoint(shop.getConsumeOnePoint());
+		oldEntity.setIsOpenMember(SystemConstant.WHETHER.YES.getValue());
+		return R.status(shopService.updateById(oldEntity));
+	}
+
+	/**
+	 * 通过商店id获取活动信息
+	 */
+	@GetMapping("/getActivity")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "通过商店id获取活动信息", notes = "传入activityDTO")
+	public R<IPage<Activity>> getMembersByMallId(ActivityDTO activityDTO, Query query) {
+		Assert.notNull(activityDTO.getSelectType() == null,"查询类型字段不能为空");
+		Assert.notNull(activityDTO.getSponsorId(),"商店id不能为空");
+		IPage<Activity> pages = null;
+		if(activityDTO.getSelectType() == 1){//查询该商店发起的活动
+			pages = activityService.page(Condition.getPage(query), new QueryWrapper<>(new Activity()).lambda()
+				.eq(Activity::getSponsorType,SystemConstant.MALLORSHOP.SHOP.getValue()).eq(Activity::getSponsorId,activityDTO.getSponsorId())
+				.orderByDesc(Activity::getCreateTime));
+		}else if(activityDTO.getSelectType() == 2){//可以参加的活动
+			//获取该商店所属商场发布的活动
+			pages = this.activityService.getCanJoinActicityByShopId(Condition.getPage(query),activityDTO.getSponsorId());
+
+		}else if(activityDTO.getSelectType() == 3){//已参加的活动
+			//从活动参加记录表中获取
+			pages = this.activityService.getHadJoinActivityByShopId(Condition.getPage(query),activityDTO.getSponsorId());
+		}
+
+		return R.data(pages);
+	}
+
+	/**
+	 * 通过商店id获取会员列表
+	 */
+	@GetMapping("/getMembersByShopId")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "通过商店id获取会员列表", notes = "传入member")
+	public R<IPage<Member>> getMembersByShopId(Member member, Query query) {
+		Assert.notNull(member.getShopId(),"商店id不能为空");
+		IPage<Member> pages = memberService.page(Condition.getPage(query), new QueryWrapper<>(new Member()).lambda()
+			.eq(Member::getShopId,member.getShopId()).eq(Member::getType,SystemConstant.MALLORSHOP.SHOP.getValue())
+			.orderByDesc(Member::getPointValue));
+		return R.data(pages);
+	}
+
+	/**
+	 * 商店首页获取统计数据
+	 *
+	 * @param shopId
+	 * @return
+	 */
+	@GetMapping("/statistic")
+	@ApiOperation(value = "商店首页获取统计数据", notes = "传入商店id")
+	public R<AppShopStaticVO> statistic(@RequestParam Long shopId) {
+		AppShopStaticVO appShopStaticVO = new AppShopStaticVO();
+		//统计会员总数
+		List<Member> members = memberService.getBaseMapper().selectList(new QueryWrapper<>(new Member()).lambda()
+			.eq(Member::getShopId, shopId).eq(Member::getType,SystemConstant.MALLORSHOP.SHOP.getValue()));
+		//商场会员总数
+		Integer memberCount = members.size();
+		//今日会员新增
+		Integer todayMemberIn = 0;
+
+		//今日营收
+		BigDecimal todayIncome = BigDecimal.ZERO;
+		//今日交易笔数
+		Integer todayOrderCount = 0;
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+		Date today = new Date();
+		//今日新增会员数
+		try {
+			Date todayDate = sdf.parse(today.toString());
+			todayMemberIn = members.stream().filter(member -> member.getCreateTime().after(todayDate)).collect(Collectors.toList()).size();
+
+
+			//今日营收
+			List<BillRecord> billRecords = billRecordService.getBaseMapper().selectList(new QueryWrapper<>(new BillRecord()).lambda()
+				.eq(BillRecord::getShopId, shopId).eq(BillRecord::getPayStatus, SystemConstant.BillRecordPayStatus.PAYED)
+				.gt(BillRecord::getCreateTime, todayDate));
+
+			todayIncome = billRecords.stream().map(BillRecord::getPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
+
+			todayOrderCount = billRecords.size();
+
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+
+
+		return R.data(appShopStaticVO.setMemberCount(memberCount)
+			.setTodayMemberIn(todayMemberIn)
+			.setTodayIncome(todayIncome)
+			.setTodayOrderCount(todayOrderCount));
+	}
+
+}

+ 13 - 2
src/main/java/org/springblade/modules/ldt/shop/entity/Shop.java

@@ -132,12 +132,12 @@ public class Shop extends BaseEntity {
 	* 经度
 	*/
 		@ApiModelProperty(value = "经度")
-		private BigDecimal longitude;
+		private String longitude;
 	/**
 	* 纬度
 	*/
 		@ApiModelProperty(value = "纬度")
-		private BigDecimal latitude;
+		private String latitude;
 	/**
 	* 具体地址
 	*/
@@ -223,5 +223,16 @@ public class Shop extends BaseEntity {
 	@ApiModelProperty(value = "积分总价值")
 	private Integer totalPointValue;
 
+	/**
+	 * 是否已开启会员中心
+	 */
+	@ApiModelProperty(value = "是否已开启会员中心")
+	private Integer isOpenMember;
+
+	/**
+	 * 可提现总金额
+	 */
+	@ApiModelProperty(value = "可提现总金额")
+	private String withdrawTotalPrice;
 
 }

+ 32 - 0
src/main/java/org/springblade/modules/ldt/shop/vo/AppShopStaticVO.java

@@ -0,0 +1,32 @@
+package org.springblade.modules.ldt.shop.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/**
+ * Created By lidexi in 2021/7/30
+ **/
+@Data
+@ApiModel("app商店端首页统计视图类")
+@Accessors(chain = true)
+public class AppShopStaticVO {
+
+	@ApiModelProperty("会员总数")
+	private Integer memberCount;
+
+	@ApiModelProperty("门店总数")
+	private Integer shopCount;
+
+	@ApiModelProperty("今日营收")
+	private BigDecimal todayIncome;
+
+	@ApiModelProperty("今日交易笔数")
+	private Integer todayOrderCount;
+
+	@ApiModelProperty("今日会员新增")
+	private Integer todayMemberIn;
+}

+ 127 - 0
src/main/java/org/springblade/modules/ldt/withdrawrecord/controller/WithdrawRecordController.java

@@ -0,0 +1,127 @@
+/*
+ *      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.modules.ldt.withdrawrecord.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 org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.ldt.withdrawrecord.entity.WithdrawRecord;
+import org.springblade.modules.ldt.withdrawrecord.vo.WithdrawRecordVO;
+import org.springblade.modules.ldt.withdrawrecord.service.IWithdrawRecordService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2021-07-30
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("cyzh-ldt/withdrawrecord")
+@Api(value = "", tags = "接口")
+public class WithdrawRecordController extends BladeController {
+
+	private final IWithdrawRecordService withdrawRecordService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入withdrawRecord")
+	public R<WithdrawRecord> detail(WithdrawRecord withdrawRecord) {
+		WithdrawRecord detail = withdrawRecordService.getOne(Condition.getQueryWrapper(withdrawRecord));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入withdrawRecord")
+	public R<IPage<WithdrawRecord>> list(WithdrawRecord withdrawRecord, Query query) {
+		IPage<WithdrawRecord> pages = withdrawRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(withdrawRecord));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入withdrawRecord")
+	public R<IPage<WithdrawRecordVO>> page(WithdrawRecordVO withdrawRecord, Query query) {
+		IPage<WithdrawRecordVO> pages = withdrawRecordService.selectWithdrawRecordPage(Condition.getPage(query), withdrawRecord);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入withdrawRecord")
+	public R save(@Valid @RequestBody WithdrawRecord withdrawRecord) {
+		return R.status(withdrawRecordService.save(withdrawRecord));
+	}
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入withdrawRecord")
+	public R update(@Valid @RequestBody WithdrawRecord withdrawRecord) {
+		return R.status(withdrawRecordService.updateById(withdrawRecord));
+	}
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入withdrawRecord")
+	public R submit(@Valid @RequestBody WithdrawRecord withdrawRecord) {
+		return R.status(withdrawRecordService.saveOrUpdate(withdrawRecord));
+	}
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(withdrawRecordService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 34 - 0
src/main/java/org/springblade/modules/ldt/withdrawrecord/dto/WithdrawRecordDTO.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.modules.ldt.withdrawrecord.dto;
+
+import org.springblade.modules.ldt.withdrawrecord.entity.WithdrawRecord;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-07-30
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class WithdrawRecordDTO extends WithdrawRecord {
+	private static final long serialVersionUID = 1L;
+
+}

+ 118 - 0
src/main/java/org/springblade/modules/ldt/withdrawrecord/entity/WithdrawRecord.java

@@ -0,0 +1,118 @@
+/*
+ *      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.modules.ldt.withdrawrecord.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-07-30
+ */
+@Data
+@TableName("ldt_withdraw_record")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "WithdrawRecord对象", description = "WithdrawRecord对象")
+public class WithdrawRecord extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 提现用户类型: 1-商家
+	*/
+		@ApiModelProperty(value = "提现用户类型: 1-商家")
+		private Integer ownerType;
+	/**
+	* 提现用户id: 若owner_type = 1则为商家id
+	*/
+		@ApiModelProperty(value = "提现用户id: 若owner_type = 1则为商家id")
+		private Long ownerId;
+	/**
+	* 提现金额
+	*/
+		@ApiModelProperty(value = "提现金额")
+		private BigDecimal price;
+	/**
+	* 需扣积分价值
+	*/
+		@ApiModelProperty(value = "需扣积分价值")
+		private BigDecimal pointValue;
+	/**
+	* 实际提现金额
+	*/
+		@ApiModelProperty(value = "实际提现金额")
+		private BigDecimal actualPrice;
+	/**
+	* 提现手续费
+	*/
+		@ApiModelProperty(value = "提现手续费")
+		private BigDecimal fee;
+	/**
+	* 提现状态: 1-待确定 2-已到账 3-失败
+	*/
+		@ApiModelProperty(value = "提现状态: 1-待确定 2-已到账 3-失败")
+		private Integer withdrawStatus;
+	/**
+	* 提现订单号
+	*/
+		@ApiModelProperty(value = "提现订单号")
+		private String orderId;
+	/**
+	* 提现渠道:yeePay(易宝支付)
+	*/
+		@ApiModelProperty(value = "提现渠道:yeePay(易宝支付)")
+		private String channel;
+	/**
+	* 银行类型
+	*/
+		@ApiModelProperty(value = "银行类型")
+		private String bankCode;
+	/**
+	* 接收人真实姓名
+	*/
+		@ApiModelProperty(value = "接收人真实姓名")
+		private String receiverAccountName;
+	/**
+	* 接收人的银行账号
+	*/
+		@ApiModelProperty(value = "接收人的银行账号")
+		private String receiverAccountNo;
+	/**
+	* 到账类型,默认实时到账
+	*/
+		@ApiModelProperty(value = "到账类型,默认实时到账")
+		private String receiveType;
+	/**
+	* 提现到账的金额
+	*/
+		@ApiModelProperty(value = "提现到账的金额")
+		private BigDecimal receiveAmount;
+	/**
+	* 失败原因
+	*/
+		@ApiModelProperty(value = "失败原因")
+		private String failReason;
+
+
+}

+ 42 - 0
src/main/java/org/springblade/modules/ldt/withdrawrecord/mapper/WithdrawRecordMapper.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.modules.ldt.withdrawrecord.mapper;
+
+import org.springblade.modules.ldt.withdrawrecord.entity.WithdrawRecord;
+import org.springblade.modules.ldt.withdrawrecord.vo.WithdrawRecordVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-07-30
+ */
+public interface WithdrawRecordMapper extends BaseMapper<WithdrawRecord> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param withdrawRecord
+	 * @return
+	 */
+	List<WithdrawRecordVO> selectWithdrawRecordPage(IPage page, WithdrawRecordVO withdrawRecord);
+
+}

+ 37 - 0
src/main/java/org/springblade/modules/ldt/withdrawrecord/mapper/WithdrawRecordMapper.xml

@@ -0,0 +1,37 @@
+<?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.modules.ldt.withdrawrecord.mapper.WithdrawRecordMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="withdrawRecordResultMap" type="org.springblade.modules.ldt.withdrawrecord.entity.WithdrawRecord">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="owner_type" property="ownerType"/>
+        <result column="owner_id" property="ownerId"/>
+        <result column="price" property="price"/>
+        <result column="point_value" property="pointValue"/>
+        <result column="actual_price" property="actualPrice"/>
+        <result column="fee" property="fee"/>
+        <result column="withdraw_status" property="withdrawStatus"/>
+        <result column="order_id" property="orderId"/>
+        <result column="channel" property="channel"/>
+        <result column="bank_code" property="bankCode"/>
+        <result column="receiver_account_name" property="receiverAccountName"/>
+        <result column="receiver_account_no" property="receiverAccountNo"/>
+        <result column="receive_type" property="receiveType"/>
+        <result column="receive_amount" property="receiveAmount"/>
+        <result column="fail_reason" property="failReason"/>
+    </resultMap>
+
+
+    <select id="selectWithdrawRecordPage" resultMap="withdrawRecordResultMap">
+        select * from ldt_withdraw_record where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
src/main/java/org/springblade/modules/ldt/withdrawrecord/service/IWithdrawRecordService.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.modules.ldt.withdrawrecord.service;
+
+import org.springblade.modules.ldt.withdrawrecord.entity.WithdrawRecord;
+import org.springblade.modules.ldt.withdrawrecord.vo.WithdrawRecordVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2021-07-30
+ */
+public interface IWithdrawRecordService extends BaseService<WithdrawRecord> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param withdrawRecord
+	 * @return
+	 */
+	IPage<WithdrawRecordVO> selectWithdrawRecordPage(IPage<WithdrawRecordVO> page, WithdrawRecordVO withdrawRecord);
+
+}

+ 41 - 0
src/main/java/org/springblade/modules/ldt/withdrawrecord/service/impl/WithdrawRecordServiceImpl.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.modules.ldt.withdrawrecord.service.impl;
+
+import org.springblade.modules.ldt.withdrawrecord.entity.WithdrawRecord;
+import org.springblade.modules.ldt.withdrawrecord.vo.WithdrawRecordVO;
+import org.springblade.modules.ldt.withdrawrecord.mapper.WithdrawRecordMapper;
+import org.springblade.modules.ldt.withdrawrecord.service.IWithdrawRecordService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2021-07-30
+ */
+@Service
+public class WithdrawRecordServiceImpl extends BaseServiceImpl<WithdrawRecordMapper, WithdrawRecord> implements IWithdrawRecordService {
+
+	@Override
+	public IPage<WithdrawRecordVO> selectWithdrawRecordPage(IPage<WithdrawRecordVO> page, WithdrawRecordVO withdrawRecord) {
+		return page.setRecords(baseMapper.selectWithdrawRecordPage(page, withdrawRecord));
+	}
+
+}

+ 36 - 0
src/main/java/org/springblade/modules/ldt/withdrawrecord/vo/WithdrawRecordVO.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.modules.ldt.withdrawrecord.vo;
+
+import org.springblade.modules.ldt.withdrawrecord.entity.WithdrawRecord;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-07-30
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "WithdrawRecordVO对象", description = "WithdrawRecordVO对象")
+public class WithdrawRecordVO extends WithdrawRecord {
+	private static final long serialVersionUID = 1L;
+
+}