去掉自动生成的Base64
This commit is contained in:
@ -1,6 +1,5 @@
|
|||||||
package cn.iocoder.yudao.module.system.service.dishesraw;
|
package cn.iocoder.yudao.module.system.service.dishesraw;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjUtil;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.dishesraw.vo.DishesRawPageReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.dishesraw.vo.DishesRawPageReqVO;
|
||||||
@ -13,7 +12,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Base64;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
@ -85,13 +83,13 @@ public class DishesRawServiceImpl implements DishesRawService {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public Long createDishesRawList(List<DishesRawSaveReqVO> createReqVO) {
|
public Long createDishesRawList(List<DishesRawSaveReqVO> createReqVO) {
|
||||||
for (DishesRawSaveReqVO reqVO : createReqVO) {
|
for (DishesRawSaveReqVO reqVO : createReqVO) {
|
||||||
String enCode=null;
|
// String enCode=null;
|
||||||
if(ObjUtil.isNotEmpty(reqVO.getRawImgUrl())){
|
// if(ObjUtil.isNotEmpty(reqVO.getRawImgUrl())){
|
||||||
enCode= Base64.getEncoder().encodeToString(reqVO.getRawImgUrl().getBytes());
|
// enCode= Base64.getEncoder().encodeToString(reqVO.getRawImgUrl().getBytes());
|
||||||
}
|
// }
|
||||||
// 插入
|
// 插入
|
||||||
DishesRawDO dishesRaw = BeanUtils.toBean(reqVO, DishesRawDO.class);
|
DishesRawDO dishesRaw = BeanUtils.toBean(reqVO, DishesRawDO.class);
|
||||||
dishesRaw.setRawImgUrl(enCode);
|
// dishesRaw.setRawImgUrl(enCode);
|
||||||
dishesRawMapper.insert(dishesRaw);
|
dishesRawMapper.insert(dishesRaw);
|
||||||
}
|
}
|
||||||
return 1L;
|
return 1L;
|
||||||
|
Reference in New Issue
Block a user