Parcourir la source

Merge branch 'master' of http://192.168.1.218:3000/lidexi/guosen-ldt

# Conflicts:
#	src/main/java/org/springblade/modules/ldt/activity/service/impl/ActivityServiceImpl.java
lianghanqiang il y a 4 ans
Parent
commit
0dfbf5fbe9
25 fichiers modifiés avec 875 ajouts et 57 suppressions
  1. 2 1
      src/main/java/org/springblade/common/constant/SystemConstant.java
  2. 8 0
      src/main/java/org/springblade/modules/ldt/activity/mapper/ActivityMapper.java
  3. 42 0
      src/main/java/org/springblade/modules/ldt/activity/mapper/ActivityMapper.xml
  4. 7 1
      src/main/java/org/springblade/modules/ldt/activity/service/IActivityService.java
  5. 17 2
      src/main/java/org/springblade/modules/ldt/activity/service/impl/ActivityServiceImpl.java
  6. 19 8
      src/main/java/org/springblade/modules/ldt/activityjoinrecord/controller/ActivityJoinRecordController.java
  7. 1 1
      src/main/java/org/springblade/modules/ldt/billrecord/entity/BillRecord.java
  8. 2 2
      src/main/java/org/springblade/modules/ldt/billrecord/mapper/BillRecordMapper.xml
  9. 38 35
      src/main/java/org/springblade/modules/ldt/mall/controller/AppMallController.java
  10. 2 2
      src/main/java/org/springblade/modules/ldt/mall/entity/Mall.java
  11. 162 0
      src/main/java/org/springblade/modules/ldt/shop/controller/AppShopController.java
  12. 14 3
      src/main/java/org/springblade/modules/ldt/shop/entity/Shop.java
  13. 32 0
      src/main/java/org/springblade/modules/ldt/shop/vo/AppShopStaticVO.java
  14. 2 0
      src/main/java/org/springblade/modules/ldt/shop/vo/ShopVO.java
  15. 49 0
      src/main/java/org/springblade/modules/ldt/shop/wrapper/ShopWrapper.java
  16. 127 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/controller/WithdrawRecordController.java
  17. 34 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/dto/WithdrawRecordDTO.java
  18. 118 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/entity/WithdrawRecord.java
  19. 42 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/mapper/WithdrawRecordMapper.java
  20. 37 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/mapper/WithdrawRecordMapper.xml
  21. 41 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/service/IWithdrawRecordService.java
  22. 41 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/service/impl/WithdrawRecordServiceImpl.java
  23. 36 0
      src/main/java/org/springblade/modules/ldt/withdrawrecord/vo/WithdrawRecordVO.java
  24. 1 1
      src/main/resources/application-dev.yml
  25. 1 1
      src/main/resources/application.yml

+ 2 - 1
src/main/java/org/springblade/common/constant/SystemConstant.java

@@ -49,7 +49,8 @@ public interface SystemConstant {
 
 		WATING(0,"待审核"),
 		PASS(1,"审核通过"),
-		FAIL(2,"审核失败");
+		FAIL(2,"审核失败"),
+		STOP(3,"停用");
 		int value;
 		String name;
 		AuditStatus(int value,String name){

+ 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);
 }

+ 17 - 2
src/main/java/org/springblade/modules/ldt/activity/service/impl/ActivityServiceImpl.java

@@ -39,8 +39,23 @@ public class ActivityServiceImpl extends BaseServiceImpl<ActivityMapper, Activit
 	}
 
 	@Override
-	public IPage<Activity> getCanJoinActicityByMallId(IPage<ActivityVO> page, Long mallId) {
-		return null;
+	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>
 
 

+ 38 - 35
src/main/java/org/springblade/modules/ldt/mall/controller/AppMallController.java

@@ -33,6 +33,8 @@ import org.springblade.modules.ldt.shop.dto.ShopDTO;
 import org.springblade.modules.ldt.shop.entity.Shop;
 import org.springblade.modules.ldt.shop.service.IShopService;
 import org.springblade.modules.ldt.shop.vo.ShopVO;
+import org.springblade.modules.ldt.shop.wrapper.ShopWrapper;
+import org.springblade.modules.system.service.IParamService;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
@@ -58,7 +60,6 @@ public class AppMallController {
 	private final IMemberService memberService;
 	private final IBillRecordService billRecordService;
 	private final IActivityService activityService;
-	private final IActivityJoinRecordService activityJoinRecordService;
 
 	/**
 	 * 通过手机获取商场信息
@@ -125,16 +126,15 @@ public class AppMallController {
 	 * @param shopDTO
 	 * @return
 	 */
-	@GetMapping("/getPassShopList")
-	@ApiOperation(value = "商场获取已经审核通过的商店列表", notes = "传入商场id")
-	public R<List<Shop>> getPassShopList(@RequestBody ShopDTO shopDTO) {
+	@GetMapping("/getShopList")
+	@ApiOperation(value = "商场获取商店列表", notes = "传入商场")
+	public R<IPage<ShopVO>> getShopList(ShopDTO shopDTO, Query query) {
 		Assert.notNull(shopDTO.getMallId(), "商场id不能为空");
-		List<Shop> shops = shopService.getBaseMapper().selectList(new QueryWrapper<>(new Shop()).lambda().eq(Shop::getAuditStatus, 1)
-			.eq(Shop::getMallId, shopDTO.getMallId()).like(shopDTO.getLabelId() != null, Shop::getLabelIds, shopDTO.getLabelId())
-			.eq(shopDTO.getMallAreaId() != null, Shop::getMallAreaId, shopDTO.getMallAreaId()));
-
-
-		return R.data(shops);
+		IPage<Shop> shops = shopService.getBaseMapper().selectPage(Condition.getPage(query), new QueryWrapper<>(new Shop()).lambda().eq(shopDTO.getAuditStatus() != null, Shop::getAuditStatus, shopDTO.getAuditStatus())
+			.eq(shopDTO.getMallId() != null, Shop::getMallId, shopDTO.getMallId()).like(shopDTO.getLabelId() != null, Shop::getLabelIds, shopDTO.getLabelId())
+			.eq(shopDTO.getMallAreaId() != null, Shop::getMallAreaId, shopDTO.getMallAreaId())
+			.like(shopDTO.getFullName() != null, Shop::getFullName, shopDTO.getFullName()));
+		return R.data(ShopWrapper.build(mallAreaService).pageVO(shops));
 	}
 
 	/**
@@ -167,7 +167,7 @@ public class AppMallController {
 			Date todayDate = sdf.parse(today.toString());
 			todayMemberIn = members.stream().filter(member -> member.getCreateTime().after(todayDate)).collect(Collectors.toList()).size();
 			List<Shop> shops = shopService.getBaseMapper().selectList(new QueryWrapper<>(new Shop()).lambda().eq(Shop::getMallId, mallId));
-			 shopCount = shops.size();
+			shopCount = shops.size();
 
 			//今日营收
 			List<BillRecord> billRecords = billRecordService.getBaseMapper().selectList(new QueryWrapper<>(new BillRecord()).lambda()
@@ -183,7 +183,6 @@ public class AppMallController {
 		}
 
 
-
 		return R.data(appMallStaticVO.setMemberCount(memberCount)
 			.setShopCount(shopCount)
 			.setTodayMemberIn(todayMemberIn)
@@ -202,9 +201,9 @@ public class AppMallController {
 	public R createMemberCenter(@RequestBody Mall mall) {
 		Mall oldEntity = mallService.getById(mall.getId());
 		Assert.notNull(oldEntity, "商场不存在");
-		Assert.notNull(mall.getPoint(),"积分数不能为空");
-		Assert.notNull(mall.getPointValue(),"积分对应的积分价值不能为空");
-		Assert.notNull(mall.getConsumeOnePoint(),"每消费一元赠送的积分数不能为空");
+		Assert.notNull(mall.getPoint(), "积分数不能为空");
+		Assert.notNull(mall.getPointValue(), "积分对应的积分价值不能为空");
+		Assert.notNull(mall.getConsumeOnePoint(), "每消费一元赠送的积分数不能为空");
 		oldEntity.setPoint(mall.getPoint());
 		oldEntity.setPointValue(mall.getPointValue());
 		oldEntity.setConsumeOnePoint(mall.getConsumeOnePoint());
@@ -232,9 +231,9 @@ public class AppMallController {
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入member")
 	public R<IPage<Member>> getMembersByMallId(Member member, Query query) {
-		Assert.notNull(member.getMallId(),"商场id不能为空");
+		Assert.notNull(member.getMallId(), "商场id不能为空");
 		IPage<Member> pages = memberService.page(Condition.getPage(query), new QueryWrapper<>(new Member()).lambda()
-			.eq(Member::getMallId,member.getMallId()).eq(Member::getType,SystemConstant.MALLORSHOP.MALL.getValue())
+			.eq(Member::getMallId, member.getMallId()).eq(Member::getType, SystemConstant.MALLORSHOP.MALL.getValue())
 			.orderByDesc(Member::getPointValue));
 		return R.data(pages);
 	}
@@ -246,33 +245,37 @@ public class AppMallController {
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "通过商场id获取活动信息", notes = "传入member")
 	public R<IPage<Activity>> getMembersByMallId(ActivityDTO activityDTO, Query query) {
-		Assert.notNull(activityDTO.getSelectType() == null,"查询类型字段不能为空");
-		Assert.notNull(activityDTO.getMallId(),"商场id不能为空");
+		Assert.notNull(activityDTO.getSelectType() == null, "查询类型字段不能为空");
+		Assert.notNull(activityDTO.getMallId(), "商场id不能为空");
 		IPage<Activity> pages = null;
-		if(activityDTO.getSelectType() == 1){//查询该商场发起的活动
+		if (activityDTO.getSelectType() == 1) {//查询该商场发起的活动
 			pages = activityService.page(Condition.getPage(query), new QueryWrapper<>(new Activity()).lambda()
-				.eq(Activity::getSponsorType,SystemConstant.MALLORSHOP.MALL.getValue()).eq(Activity::getSponsorId,activityDTO.getMallId())
+				.eq(Activity::getSponsorType, SystemConstant.MALLORSHOP.MALL.getValue()).eq(Activity::getSponsorId, activityDTO.getMallId())
 				.orderByDesc(Activity::getCreateTime));
-		}else if(activityDTO.getSelectType() == 2){//可以参加的活动
+		} else if (activityDTO.getSelectType() == 2) {//可以参加的活动
 			//获取该商场下所有商户发布的活动
-			pages = this.activityService.getCanJoinActicityByMallId(Condition.getPage(query),activityDTO.getMallId());
+			pages = this.activityService.getCanJoinActicityByMallId(Condition.getPage(query), activityDTO.getMallId());
 
-		}else if(activityDTO.getSelectType() == 3){//已参加的活动
+		} 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));
+	}
+
+}

+ 14 - 3
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;
 	/**
 	* 具体地址
 	*/
@@ -182,7 +182,7 @@ public class Shop extends BaseEntity {
 	/**
 	* 审核状态: 0待审核 1-审核通过 2-审核不通过
 	*/
-		@ApiModelProperty(value = "审核状态: 0待审核 1-审核通过 2-审核不通过")
+		@ApiModelProperty(value = "审核状态: 0待审核 1-审核通过 2-审核不通过 3 停用")
 		private Integer auditStatus;
 	/**
 	* 审核意见
@@ -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;
+}

+ 2 - 0
src/main/java/org/springblade/modules/ldt/shop/vo/ShopVO.java

@@ -33,4 +33,6 @@ import io.swagger.annotations.ApiModel;
 public class ShopVO extends Shop {
 	private static final long serialVersionUID = 1L;
 
+	private String mallAreaName;
+
 }

+ 49 - 0
src/main/java/org/springblade/modules/ldt/shop/wrapper/ShopWrapper.java

@@ -0,0 +1,49 @@
+package org.springblade.modules.ldt.shop.wrapper;
+
+/**
+ * Created By lidexi in 2021/8/2
+ **/
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.ldt.mallarea.entity.MallArea;
+import org.springblade.modules.ldt.mallarea.service.IMallAreaService;
+import org.springblade.modules.ldt.mallshoplabel.service.IMallShopLabelService;
+import org.springblade.modules.ldt.shop.entity.Shop;
+import org.springblade.modules.ldt.shop.vo.ShopVO;
+
+import java.util.Objects;
+
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class ShopWrapper extends BaseEntityWrapper<Shop, ShopVO> {
+
+	private IMallAreaService mallAreaService;
+
+	private ShopWrapper(IMallAreaService mallAreaService){
+		this.mallAreaService = mallAreaService;
+	}
+
+	public static ShopWrapper build(IMallAreaService mallAreaService) {
+		return new ShopWrapper(mallAreaService);
+	}
+
+	@Override
+	public ShopVO entityVO(Shop shop) {
+		ShopVO shopVO = Objects.requireNonNull(BeanUtil.copy(shop, ShopVO.class));
+		MallArea mallArea = mallAreaService.getById(shop.getMallAreaId());
+		if(mallArea != null){
+			shopVO.setMallAreaName(mallArea.getName());
+		}
+
+		return shopVO;
+	}
+
+
+
+}
+

+ 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;
+
+}

+ 1 - 1
src/main/resources/application-dev.yml

@@ -42,7 +42,7 @@ blade:
   #分布式锁配置
   secure:
     skip-url:
-      /**
+#      /**
   lock:
     ##是否启用分布式锁
     enabled: false

+ 1 - 1
src/main/resources/application.yml

@@ -193,7 +193,7 @@ blade:
     #接口放行
     skip-url:
       - /blade-test/**
-      - /cyzh-ldt/app/**
+#      - /cyzh-ldt/app/**
     #授权认证配置
     auth:
       - method: ALL