qrc
This commit is contained in:
parent
4e156aa718
commit
64173c1afa
@ -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() {
|
||||||
|
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user