Browse Source

打印日志

igl 5 days ago
parent
commit
375663b0dc

+ 1 - 0
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantRelationServiceImpl.java

@@ -52,6 +52,7 @@ public class MerchantRelationServiceImpl extends ServiceImpl<MerchantRelationMap
     @Override
     public void registerMerchantId(MerchantAuth merchantAuth) {
         Merchant merchant = merchantService.queryByApplicant(merchantAuth.getApplicant());
+        log.info("商家入驻查询商家信息:{}", merchant);
         String requestId = UUID.randomUUID().toString().replaceAll("-", "");
         JSONObject jsonObject = new JSONObject();
         String operationType = "CREATE";

+ 4 - 0
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantServiceImpl.java

@@ -32,6 +32,7 @@ import com.chelvc.framework.location.Address;
 import com.chelvc.framework.location.LocationHandler;
 import lombok.NonNull;
 import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -50,6 +51,7 @@ import java.util.stream.Collectors;
  * @author Woody
  * @date 2023/5/2
  */
+@Slf4j
 @Service
 @RequiredArgsConstructor(onConstructor = @__({@Autowired, @Lazy}))
 public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> implements MerchantService {
@@ -210,6 +212,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
 
     @Override
     public Long addMerchant(@NonNull MerchantModifyParam param) {
+        log.info("新增商家信息:{}", param);
         // 判断商家名称是否存在
         Integer count = this.lambdaQuery()
                 .eq(Merchant::getName, param.getName())
@@ -252,6 +255,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
 
     @Override
     public void updateMerchant(@NonNull Long id, @NonNull MerchantModifyParam param) {
+        log.info("更新商家信息:{}", param);
         Merchant merchant = AssertUtils.nonnull(this.getById(id), "商家不存在");
         MerchantCopier.INSTANCE.copying(param, merchant);
         this.updateById(merchant);