zoujiajian 2 anni fa
parent
commit
2146794656

+ 2 - 0
netflix-service/src/main/java/com/cyksj/service/mange/CmsYhShopCommonService.java

@@ -26,4 +26,6 @@ public interface CmsYhShopCommonService {
 	void setBusinessRate(List<UserDistributeBusinessRate> rates);
 
 	void verifyYhShopApplyMoney(DistributeApplyMoneyReq distributeApplyMoneyReq);
+
+	void updateVerifyImg(DistributeApplyMoneyReq distributeApplyMoneyReq);
 }

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

@@ -175,8 +175,9 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 			}
 			dbShop.setBusinessId(businessId);
 			dbShop.setBusinessBindTime(DateTime.now());
-			yhShopMapper.updateById(dbShop);
 		}
+		dbShop.setRemark(yhShop.getRemark());
+		yhShopMapper.updateById(dbShop);
 	}
 
 	@Override
@@ -270,6 +271,27 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 		yhShopDistributeMoneyApplyMapper.updateById(distributeMoneyApply);
 	}
 
+	@Override
+	public void updateVerifyImg(DistributeApplyMoneyReq distributeApplyMoneyReq) {
+		Long id = distributeApplyMoneyReq.getId();
+		String img = distributeApplyMoneyReq.getImg();
+		if (id == null) {
+			throw BusinessRuntimeException.getInstance("请选择对应的申请提现记录");
+		}
+		YhShopDistributeMoneyApply yhShopDistributeMoneyApply = yhShopDistributeMoneyApplyMapper.selectById(id);
+		if (yhShopDistributeMoneyApply == null) {
+			throw BusinessRuntimeException.getInstance("请选择对应的申请提现记录");
+		}
+		if (StrUtil.isEmpty(img)) {
+			throw BusinessRuntimeException.getInstance("请传入对应的审核图片");
+		}
+		if (yhShopDistributeMoneyApply.getVerifyStatus() != YhShopDistributeMoneyApply.Status.success) {
+			throw BusinessRuntimeException.getInstance("该申请提现记录未审核成功");
+		}
+		yhShopDistributeMoneyApply.setImg(img);
+		yhShopDistributeMoneyApplyMapper.updateById(yhShopDistributeMoneyApply);
+	}
+
 	public void checkDistributorAndBusinessRate(Integer distributeGoodsRate, Long goodsId, String goodsName) {
 		YhShopUserBusinessDefaultRateConfig defaultGoodsRateConfig = defaultRateConfigMapper.selectOne(Wrappers.lambdaQuery(YhShopUserBusinessDefaultRateConfig.class)
 				.eq(YhShopUserBusinessDefaultRateConfig::getGoodsId, goodsId)

+ 13 - 1
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/shop/CmsYhShopGoodsController.java

@@ -16,7 +16,10 @@ import com.cyksj.mapper.UserMapper;
 import com.cyksj.mapper.manage.cms.CmsUserMapper;
 import com.cyksj.mapper.shop.YhShopMapper;
 import com.cyksj.model.entity.*;
-import com.cyksj.model.request.*;
+import com.cyksj.model.request.DistributeApplyMoneyReq;
+import com.cyksj.model.request.GoodsDonShopRateReq;
+import com.cyksj.model.request.YhShopUserPlatDistributeRateReq;
+import com.cyksj.model.request.YhShopVerifyReq;
 import com.cyksj.model.views.*;
 import com.cyksj.service.mange.CmsYhShopCommonService;
 import com.cyksj.service.mange.CmsYhShopGoodsRateService;
@@ -498,6 +501,15 @@ public class CmsYhShopGoodsController {
         return GatewayResponse.SUCCESS.newBuilder().toResult("审核操作成功");
     }
 
+    /**
+     * 修改审核图片
+     */
+    @PutMapping("/verify/applyMoney/img")
+    public Result<String> updateVerifyImg(@RequestBody DistributeApplyMoneyReq distributeApplyMoneyReq) {
+        cmsYhShopCommonService.updateVerifyImg(distributeApplyMoneyReq);
+        return GatewayResponse.SUCCESS.newBuilder().toResult();
+    }
+
 
     /**
      * 开店审核列表