This commit is contained in:
sjm 2023-12-27 14:59:27 +08:00
parent 4e156aa718
commit 64173c1afa
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ import lombok.Data;
*/ */
@Data @Data
public class CollectIconList implements Serializable { public class CollectIconList implements Serializable {
CollectIconList(){ public CollectIconList(){
this.status = 0; this.status = 0;
} }
public Long getId() { public Long getId() {

View File

@ -28,11 +28,11 @@ public class QRCServiceImpl implements QRCService{
UrlList urlList = urlListDao.selectByPrimaryKey(Long.valueOf(url_id)); UrlList urlList = urlListDao.selectByPrimaryKey(Long.valueOf(url_id));
String url = urlList.getUrl(); String url = urlList.getUrl();
String list = collectIconListDao.selectByUrlid(url_id); String list = collectIconListDao.selectByUrlid(url_id);
CollectIconList collectIconList = new CollectIconList();
if (list == null) { if (list == null) {
CollectIconList collect = null;
String base64 = QRCodeUtil.ImageToBase64(QRCodeUtil.encode(url, logoPath, destPath, true)); String base64 = QRCodeUtil.ImageToBase64(QRCodeUtil.encode(url, logoPath, destPath, true));
collect.setQr_url(base64); collectIconList.setQr_url(base64);
collectIconListDao.insertSelective(collect); collectIconListDao.insertSelective(collectIconList);
return JSON.toJSONString(base64); return JSON.toJSONString(base64);
}else { }else {
return JSON.toJSONString(collectIconListDao.selectByUrlid(url_id)); return JSON.toJSONString(collectIconListDao.selectByUrlid(url_id));