zoujiajian 2 anni fa
parent
commit
45a318a263

+ 3 - 0
netflix-service/src/main/java/com/cyksj/service/mange/goods/CmsYhShopCommonServiceImpl.java

@@ -115,6 +115,9 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 			if (yhShopApplyRecord.getVerifyStatus() == YhShopApplyRecord.Status.modify) {
 				yhShop.setName(yhShopApplyRecord.getName());
 			}
+			if (yhShop.getVerifyStatus() == YhShop.Status.success) {
+				yhShop.setName(yhShopApplyRecord.getName());
+			}
 			yhShop.setReason(null);
 			if (yhShop.getVerifyStatus() == YhShop.Status.verify) {
 				yhShop.setVerifyStatus(YhShop.Status.success);

+ 3 - 2
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/shop/YhShopUserController.java

@@ -102,7 +102,7 @@ public class YhShopUserController {
 		//是否存在正在修改的提交记录
 		YhShopApplyRecord yhShopApplyRecord = yhShopApplyRecordMapper.selectOne(Wrappers.lambdaQuery(YhShopApplyRecord.class)
 				.eq(YhShopApplyRecord::getUserId, userId)
-				.eq(YhShopApplyRecord::getVerifyStatus, YhShopApplyRecord.Status.modify).last("limit 1"));
+				.eq(YhShopApplyRecord::getVerifyStatus, YhShopApplyRecord.Status.verify).last("limit 1"));
 
 		if (yhShopApplyRecord != null) {
 			throw BusinessRuntimeException.getInstance("您提交的修改申请正在审核中..");
@@ -110,12 +110,13 @@ public class YhShopUserController {
 		//三个月可修改一次
 		Integer count = yhShopApplyRecordMapper.selectCount(Wrappers.lambdaQuery(YhShopApplyRecord.class)
 				.eq(YhShopApplyRecord::getUserId, userId)
+				.isNull(YhShopApplyRecord::getCustomId)
 				.ge(YhShopApplyRecord::getCreatedTime, DateUtil.offsetMonth(DateTime.now(), -3)));
 		if (count > 0) {
 			throw BusinessRuntimeException.getInstance("近三个月只可修改一次");
 		}
 		yhShopApplyRecord = new YhShopApplyRecord();
-		yhShopApplyRecord.setVerifyStatus(YhShopApplyRecord.Status.modify);
+		yhShopApplyRecord.setVerifyStatus(YhShopApplyRecord.Status.verify);
 		yhShopApplyRecord.setName(name);
 		yhShopApplyRecord.setUserId(userId);
 		yhShopApplyRecordMapper.insert(yhShopApplyRecord);