|
|
@@ -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);
|