部署方式由war转为jar包;使用gitee图床作为图片服务

master
Bosen 2021-12-06 22:26:10 +08:00
parent 31f2b1e91a
commit b73713beee
1 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import com.example.jieyue.common.entity.SysUser;
import com.example.jieyue.common.mapper.SysCommentMapper;
import com.example.jieyue.common.mapper.SysGoodsMapper;
import com.example.jieyue.common.mapper.SysUserMapper;
import com.example.jieyue.common.utils.GiteeImgBedUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -56,7 +57,9 @@ public class UserProductService {
* <p>id</p>
*/
public SysGoods getGoods(int id){
return goodsMapper.findById(id);
SysGoods goods = goodsMapper.findById(id);
goods.setImg(GiteeImgBedUtils.PRE + goods.getImg());
return goods;
}
/**