Procházet zdrojové kódy

mj镜像池;提现审核截图非必选

zoujiajian před 2 roky
rodič
revize
5bd7ecd5fd

+ 3 - 0
netflix-dao/src/main/java/com/cyksj/model/manage/views/AccountView.java

@@ -155,4 +155,7 @@ public class AccountView {
 
     @DbField("a.type")
     private Integer accountType;
+
+    @DbIgnore
+    private Boolean isMjMirror;
 }

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/model/views/GoodsDonSkuRateView.java

@@ -36,5 +36,5 @@ public class GoodsDonSkuRateView {
 	private String specVal;
 
 	@DbField("sr.rate")
-	private Integer rate = 0;
+	private Integer rate;
 }

+ 1 - 0
netflix-service/src/main/java/com/cyksj/service/distribute/impl/DistributeServiceImpl.java

@@ -383,6 +383,7 @@ public class DistributeServiceImpl implements DistributeService {
 
 	@Override
 	public void setDistributeCommonSkuRate(List<DistributeGeneralSkuRate> skuRates) {
+		generalSkuRateMapper.delete(null);
 		skuRates.forEach(e -> {
 			Integer rate = e.getRate();
 			if (rate == null || rate < 0 || rate > 100) {

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

@@ -190,9 +190,9 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 			log.info("店铺提现审核失败,归还店铺申请提现金额:{}至用户{}结束", distributeMoneyApply.getMoney().divide(BigDecimal.valueOf(100)), userId);
 		}
 		if (YhShopDistributeMoneyApply.Status.success.name().equals(distributeApplyMoneyReq.getVerifyStatus())) {
-			if (StrUtil.isBlank(distributeApplyMoneyReq.getImg())) {
-				throw BusinessRuntimeException.getInstance("审核成功时,打款图片不存在");
-			}
+//			if (StrUtil.isBlank(distributeApplyMoneyReq.getImg())) {
+//				throw BusinessRuntimeException.getInstance("审核成功时,打款图片不存在");
+//			}
 			distributeMoneyApply.setImg(distributeApplyMoneyReq.getImg());
 		}
 		yhShopDistributeMoneyApplyMapper.updateById(distributeMoneyApply);

+ 14 - 1
netflix-web/src/main/java/com/cyksj/web/controller/manage/account/CmsAccountController.java

@@ -115,11 +115,13 @@ public class CmsAccountController {
 
 	private final ChatGptAccountService chatGptAccountService;
 
+	private final MidjourneyAccountMapper midjourneyAccountMapper;
+
 	private static final GlobalThreadPoolTaskExecutor TASK_EXECUTOR = GlobalThreadPoolTaskExecutor.getInstance();
 
 	@GetMapping("/get")
 	@SaCheckPermission("account:view")
-	public Result<SearchResult<AccountView>> get(Long userId, String showId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Integer noChangeMonths) {
+	public Result<SearchResult<AccountView>> get(Long userId, String showId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, Boolean expiredAll, Boolean existsExpired, Boolean existsExpiredToday, Integer noChangeMonths, Boolean isMjMirror) {
 		MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
 		if (StrUtil.isNotEmpty(expiryStartTime) || StrUtil.isNotEmpty(expiryEndTime)) {
 			mapBuilder.field(AccountView::getExpiryTime, expiryStartTime, expiryEndTime)
@@ -165,6 +167,12 @@ public class CmsAccountController {
 				extra_sql += String.format(" (select min(expiry_time) from (select gt.id from groups_trips where account_id = a.id) gt inner join groups_relation gr on gr.groups_id = gt.id) > '%s'", endOfDay);
 			}
 		}
+		if (isMjMirror != null) {
+			if (StrUtil.isNotEmpty(extra_sql)) {
+				extra_sql += " and";
+			}
+			extra_sql += String.format(" %s (select 1 from midjourney_account ma where ma.account_id = a.id limit 1)", isMjMirror ? "EXISTS" : "NOT EXISTS");
+		}
 		if (StrUtil.isNotEmpty(extra_sql)) {
 			mapBuilder.put("extra_sql", extra_sql);
 		}
@@ -200,6 +208,11 @@ public class CmsAccountController {
 								.last("limit 1")))
 						.ifPresent(email -> accountView.setEmailPassword(email.getPassword()));
 			}
+			if (accountView.getGoodsId() == 26) {
+				Integer count = midjourneyAccountMapper.selectCount(Wrappers.lambdaQuery(MidjourneyAccount.class)
+						.eq(MidjourneyAccount::getAccountId, accountView.getId()));
+				accountView.setIsMjMirror(count > 0 ? true : false);
+			}
 		});
 		return GatewayResponse.SUCCESS.newBuilder().toResult(search);
 	}

+ 8 - 6
netflix-web/src/main/java/com/cyksj/web/controller/manage/distribute/DistributeController.java

@@ -493,9 +493,9 @@ public class DistributeController {
 			log.info("归还积分:{}至用户{}结束", distributeMoneyApply.getPoints(), userId);
 		}
 		if (DistributeMoneyApply.Status.success.name().equals(distributeApplyMoneyReq.getVerifyStatus())) {
-			if (StrUtil.isBlank(distributeApplyMoneyReq.getImg())) {
-				throw BusinessRuntimeException.getInstance("审核成功时,打款图片不存在");
-			}
+//			if (StrUtil.isBlank(distributeApplyMoneyReq.getImg())) {
+//				throw BusinessRuntimeException.getInstance("审核成功时,打款图片不存在");
+//			}
 			distributeMoneyApply.setImg(distributeApplyMoneyReq.getImg());
 		}
 		distributeMoneyApplyMapper.updateById(distributeMoneyApply);
@@ -516,9 +516,9 @@ public class DistributeController {
 		if (entity == null || entity.getVerifyStatus() != DistributeMoneyApply.Status.success) {
 			throw BusinessRuntimeException.getInstance("审核记录错误");
 		}
-		if (StrUtil.isBlank(distributeApplyMoneyReq.getImg())) {
-			throw BusinessRuntimeException.getInstance("打款截图为空");
-		}
+//		if (StrUtil.isBlank(distributeApplyMoneyReq.getImg())) {
+//			throw BusinessRuntimeException.getInstance("打款截图为空");
+//		}
 		DistributeMoneyApply apply = new DistributeMoneyApply();
 		apply.setImg(distributeApplyMoneyReq.getImg());
 		apply.setId(distributeApplyMoneyReq.getId());
@@ -807,6 +807,8 @@ public class DistributeController {
 
 		//sku规格比例设置
 		if (CollUtil.isNotEmpty(skuRates)) {
+			//先清空
+			businessDistributeDefaultSkuRateConfigMapper.delete(null);
 			skuRates.forEach(config -> {
 				if (config.getRate() == null) {
 					config.setRate(0);