zoujiajian 1 年之前
父節點
當前提交
19e8522ddf

+ 7 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/UserMirrorShop.java

@@ -79,6 +79,13 @@ public class UserMirrorShop extends BaseEntity {
 	@TableField(exist = false)
 	private Boolean joinFeeStatus = true;
 
+	/**
+	 * 最新修改时间
+	 */
+	@DbIgnore
+	@TableField(exist = false)
+	private Date modifyTime;
+
 	@Getter
 	public enum Status {
 		verify("审核中"),

+ 0 - 1
netflix-dao/src/main/java/com/cyksj/model/entity/UserMirrorShopApplyRecord.java

@@ -46,7 +46,6 @@ public class UserMirrorShopApplyRecord extends BaseEntity{
 	@Getter
 	public enum Status {
 		verify("审核中"),
-		modify("申请修改"),
 		success("审核通过"),
 		fail("审核失败");
 		String desc;

+ 11 - 2
netflix-web/src/main/java/com/cyksj/web/controller/manage/mirrorshop/manage/CmsUserMirrorShopController.java

@@ -11,7 +11,6 @@ import com.cyksj.mapper.mirrorshop.UserMirrorShopApplyRecordMapper;
 import com.cyksj.mapper.mirrorshop.UserMirrorShopMapper;
 import com.cyksj.model.entity.UserMirrorShop;
 import com.cyksj.model.entity.UserMirrorShopApplyRecord;
-import com.cyksj.model.entity.YhShopApplyRecord;
 import com.cyksj.model.request.UserMirrorShopApplyMoneyReq;
 import com.cyksj.model.views.UserMirrorShopApplyInfoView;
 import com.cyksj.service.mirrorshop.CmsUserMirrorShopService;
@@ -57,6 +56,15 @@ public class CmsUserMirrorShopController {
 		UserMirrorShopApplyInfoView userMirrorShopApplyInfoView = beanSearcher.searchFirst(UserMirrorShopApplyInfoView.class, MapUtils.flatBuilder(request.getParameterMap())
 				.field(UserMirrorShopApplyInfoView::getUserId, yhShopUserId).orderBy(UserMirrorShopApplyInfoView::getId).desc().build());
 		detailView.setApplyInfoView(userMirrorShopApplyInfoView);
+
+		UserMirrorShopApplyRecord userMirrorShopApplyRecord = userMirrorShopApplyRecordMapper.selectOne(Wrappers.lambdaQuery(UserMirrorShopApplyRecord.class)
+				.eq(UserMirrorShopApplyRecord::getUserId, yhShopUserId)
+				.ne(UserMirrorShopApplyRecord::getVerifyStatus, UserMirrorShopApplyRecord.Status.fail)
+				.orderByDesc(UserMirrorShopApplyRecord::getId)
+				.last("limit 1"));
+		if (userMirrorShopApplyRecord != null) {
+			detailView.setModifyTime(userMirrorShopApplyRecord.getCreatedTime());
+		}
 		return GatewayResponse.SUCCESS.newBuilder().toResult(detailView);
 	}
 
@@ -97,7 +105,7 @@ public class CmsUserMirrorShopController {
 		//是否存在正在修改的提交记录
 		UserMirrorShopApplyRecord userMirrorShopApplyRecord = userMirrorShopApplyRecordMapper.selectOne(Wrappers.lambdaQuery(UserMirrorShopApplyRecord.class)
 				.eq(UserMirrorShopApplyRecord::getUserId, userId)
-				.eq(UserMirrorShopApplyRecord::getVerifyStatus, YhShopApplyRecord.Status.verify).last("limit 1"));
+				.eq(UserMirrorShopApplyRecord::getVerifyStatus, UserMirrorShopApplyRecord.Status.verify).last("limit 1"));
 
 		if (userMirrorShopApplyRecord != null) {
 			throw BusinessRuntimeException.getInstance("您提交的修改申请正在审核中..");
@@ -106,6 +114,7 @@ public class CmsUserMirrorShopController {
 		Integer count = userMirrorShopApplyRecordMapper.selectCount(Wrappers.lambdaQuery(UserMirrorShopApplyRecord.class)
 				.eq(UserMirrorShopApplyRecord::getUserId, userId)
 				.isNull(UserMirrorShopApplyRecord::getCustomId)
+				.eq(UserMirrorShopApplyRecord::getVerifyStatus, UserMirrorShopApplyRecord.Status.success)
 				.ge(UserMirrorShopApplyRecord::getCreatedTime, DateUtil.offsetMonth(DateTime.now(), -3)));
 		if (count > 0) {
 			throw BusinessRuntimeException.getInstance("近三个月只可修改一次");