商品统计
This commit is contained in:
@@ -1,21 +1,24 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||
import cn.hutool.extra.qrcode.QrConfig;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.czg.account.dto.msg.ShopMsgEditDTO;
|
||||
import com.czg.account.entity.ShopMsgState;
|
||||
import com.czg.account.entity.ShopPushOpenId;
|
||||
import com.czg.account.param.ShopPushConfigParam;
|
||||
import com.czg.account.service.ShopMsgStateService;
|
||||
import com.czg.service.account.mapper.ShopMsgStateMapper;
|
||||
import com.czg.service.account.mapper.ShopPushOpenIdMapper;
|
||||
import com.czg.service.account.util.AliOssUtil;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.account.entity.ShopMsgState;
|
||||
import com.czg.account.service.ShopMsgStateService;
|
||||
import com.czg.service.account.mapper.ShopMsgStateMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
@@ -45,6 +48,8 @@ public class ShopMsgStateServiceImpl extends ServiceImpl<ShopMsgStateMapper, Sho
|
||||
private ResourceLoader resourceLoader;
|
||||
@Resource
|
||||
private AliOssUtil aliOssUtil;
|
||||
@Resource
|
||||
private ShopPushOpenIdMapper shopPushOpenIdMapper;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -99,4 +104,11 @@ public class ShopMsgStateServiceImpl extends ServiceImpl<ShopMsgStateMapper, Sho
|
||||
|
||||
return aliOssUtil.uploadSuffix(outputStream.toByteArray(), "png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifyConfig(ShopPushConfigParam param) {
|
||||
ShopPushOpenId entity = shopPushOpenIdMapper.selectOneById(param.getId());
|
||||
entity.setTypeInfo(CollUtil.isEmpty(param.getTypeInfo()) ? null : JSON.toJSONString(param.getTypeInfo()));
|
||||
shopPushOpenIdMapper.update(entity, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user