提交 384eaf08 authored 作者: zhouzhigang's avatar zhouzhigang

--no commit message

上级 28e4c41b
......@@ -90,7 +90,7 @@ public class PrivateMessageServiceImpl extends BaseServiceImpl<PrivateMessage, I
}
@Override
public PrivateMessageVO getById(Integer id) {
PrivateMessage pm = mapper.selectByPrimaryKey(id);
PrivateMessage pm = super.notNull(id);
PrivateMessageVO vo = new PrivateMessageVO();
BeanUtils.copyProperties(pm, vo);
if(pm.getAcceptMember() == 2){//指定会员 查询指定会员的名称
......
......@@ -112,7 +112,7 @@ public class FgMemberServiceImpl extends BaseServiceImpl<Member, Integer> implem
* @return
*/
public MemberInfo getMemberById(Integer id) {
Member m = mapper.selectByPrimaryKey(id);
Member m = super.notNull(id);
MemberInfo info = new MemberInfo();
BeanUtils.copyProperties(m, info);
if (m.getLevel() == LevelEnum.PERSONAL.getCode()) {
......
......@@ -106,7 +106,7 @@ public class OrderServiceImpl extends BaseServiceImpl<Order, Integer> implements
@Override
public OrderVO selectById(Integer oid) {
OrderVO orderVO = new OrderVO();
Order order = orderMapper.selectByPrimaryKey(oid);
Order order = super.notNull(oid);
BeanUtils.copyProperties(order, orderVO);
orderVO.setLevel_zh(LevelEnum.getName(orderVO.getLevel()));
orderVO.setStatusZh(OrderStatusEnum.getName(orderVO.getStatus()));
......@@ -142,7 +142,7 @@ public class OrderServiceImpl extends BaseServiceImpl<Order, Integer> implements
if (orderId == null) {
throw new BaseException("订单id为空");
}
Order o = selectByPrimaryKey(orderId);
Order o = super.notNull(orderId);
if (o == null) {
throw new BaseException("未找到该订单");
}
......@@ -176,7 +176,7 @@ public class OrderServiceImpl extends BaseServiceImpl<Order, Integer> implements
@Override
public boolean saveRemarkHistory(
OrderRemarkHistoryForm orderRemarkHistoryForm) {
Order o = selectByPrimaryKey(orderRemarkHistoryForm.getOrderId());
Order o = super.notNull(orderRemarkHistoryForm.getOrderId());
if (o == null) {
throw new BaseException("未找到订单,请检查后重试");
}
......
......@@ -113,7 +113,7 @@ public class AnnexLibrarySerivceImpl extends BaseServiceImpl<AnnexLibrary,String
entity.setUpdateTime(new Date());
mapper.updateByPrimaryKeySelective(entity);
if(form.getPrice() == null){
AnnexLibrary a = mapper.selectByPrimaryKey(entity.getId());
AnnexLibrary a = super.notNull(entity.getId());
a.setPrice(form.getPrice());
mapper.updateByPrimaryKey(a);
}
......
......@@ -104,7 +104,7 @@ public class ArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,St
entity.setUpdateTime(new Date());
mapper.updateByPrimaryKeySelective(entity);
if(form.getPrice() == null){
ArticleLibrary a = mapper.selectByPrimaryKey(entity.getId());
ArticleLibrary a = super.notNull(entity.getId());
a.setPrice(form.getPrice());
mapper.updateByPrimaryKey(a);
}
......
......@@ -105,7 +105,7 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,String
entity.setUpdateTime(new Date());
mapper.updateByPrimaryKeySelective(entity);
if(form.getPrice() == null){
AudioLibrary a = mapper.selectByPrimaryKey(entity.getId());
AudioLibrary a = super.notNull(entity.getId());
a.setPrice(form.getPrice());
mapper.updateByPrimaryKey(a);
}
......
......@@ -111,7 +111,7 @@ public class ImageLibrarySerivceImpl extends BaseServiceImpl<ImageLibrary,String
entity.setUpdateTime(new Date());
mapper.updateByPrimaryKeySelective(entity);
if(form.getPrice() == null){
ImageLibrary a = mapper.selectByPrimaryKey(entity.getId());
ImageLibrary a = super.notNull(entity.getId());
a.setPrice(form.getPrice());
mapper.updateByPrimaryKey(a);
}
......
......@@ -52,7 +52,7 @@ public class LabelSerivceImpl extends BaseServiceImpl<Label,Integer> implements
@Override
public LabelOneVO selectOne(Integer oid){
LabelOneVO form = new LabelOneVO();
Label label = labelMapper.selectByPrimaryKey(oid);
Label label = super.notNull(oid);
BeanUtils.copyProperties(label, form);
List<LabelDataType> li = labelDataTypeMapper.queryBylabelId(oid);
form.setDataType(BeanUtils.copyList(li,LabelDataTypeForm.class));
......@@ -101,7 +101,7 @@ public class LabelSerivceImpl extends BaseServiceImpl<Label,Integer> implements
labelMapper.insert(entity);
}else{
//更新当前对象的信息
entity.setCreateTime(labelMapper.selectByPrimaryKey(form.getId()).getCreateTime());
entity.setCreateTime(super.notNull(form.getId()).getCreateTime());
entity.setUpdateTime(new Date());
labelMapper.updateByPrimaryKey(entity);
//删除当前对象与数据类型的关系
......
......@@ -59,7 +59,7 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
entity.setUpdateTime(new Date());
mapper.updateByPrimaryKeySelective(entity);
if(form.getPrice() == null){
PdfLibrary a = mapper.selectByPrimaryKey(entity.getId());
PdfLibrary a = super.notNull(entity.getId());
a.setPrice(form.getPrice());
mapper.updateByPrimaryKey(a);
}
......
......@@ -109,7 +109,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
entity.setUpdateTime(new Date());
mapper.updateByPrimaryKeySelective(entity);
if(form.getPrice() == null){
VideoLibrary a = mapper.selectByPrimaryKey(entity.getId());
VideoLibrary a = super.notNull(entity.getId());
a.setPrice(form.getPrice());
mapper.updateByPrimaryKey(a);
}
......
......@@ -81,7 +81,7 @@ public class FgAnnexLibrarySerivceImpl extends
@Override
public boolean updateGoodsSales(List<OrderInfo> list) {
list.forEach(li -> {
AnnexLibrary video = mapper.selectByPrimaryKey(li.getGoodsid());
AnnexLibrary video = super.notNull(li.getGoodsid());
if (video == null) {
throw new BaseException("此商品不存在");
}
......@@ -146,7 +146,7 @@ public class FgAnnexLibrarySerivceImpl extends
@Override
public FgAnnexLibraryVO selectById(String oid,boolean isStatus) {
AnnexLibrary entity = mapper.selectByPrimaryKey(oid);
AnnexLibrary entity = super.notNull(oid);
FgAnnexLibraryVO vo = new FgAnnexLibraryVO();
if(entity == null){
// 资源更新中,敬请期待~
......@@ -310,7 +310,7 @@ public class FgAnnexLibrarySerivceImpl extends
*/
@Override
public boolean updateBrowseNum(String oid){
AnnexLibrary AnnexLibrary = mapper.selectByPrimaryKey(oid);
AnnexLibrary AnnexLibrary = super.notNull(oid);
if(AnnexLibrary == null){
throw new BaseException("此商品不存在");
}
......
......@@ -177,7 +177,7 @@ public class FgArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,
list.forEach(li ->{
FgArticleLibraryOneVO one = articleOneInfoById(li.getId(),true);
BeanUtils.copyProperties(one, li);
ArticleLibrary article = mapper.selectByPrimaryKey(li.getId());
ArticleLibrary article = super.notNull(li.getId());
if(article != null){
li.setIsPdf(article.getPdf() == null ? Integer.parseInt(BooleanStatusEnum.NO.getCode()) : Integer.parseInt(BooleanStatusEnum.YES.getCode()));
li.setIsAudio(article.getAudio() == null ? Integer.parseInt(BooleanStatusEnum.NO.getCode()) : Integer.parseInt(BooleanStatusEnum.YES.getCode()));
......@@ -190,7 +190,7 @@ public class FgArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,
@Override
public FgArticleLibraryOneVO articleOneInfoById(String oid, boolean isStatus) {
ArticleLibrary entity = mapper.selectByPrimaryKey(oid);
ArticleLibrary entity = super.notNull(oid);
FgArticleLibraryOneVO vo = new FgArticleLibraryOneVO();
if(entity == null){
vo.setText(null);
......@@ -520,7 +520,7 @@ public class FgArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,
*/
@Override
public boolean updateBrowseNum(String oid){
ArticleLibrary article = mapper.selectByPrimaryKey(oid);
ArticleLibrary article = super.notNull(oid);
if(article == null){
throw new BaseException("此文章不存在");
}
......@@ -544,7 +544,7 @@ public class FgArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,
@Override
public boolean updateGoodsSales(List<OrderInfo> list){
list.forEach(li -> {
ArticleLibrary article = mapper.selectByPrimaryKey(li.getGoodsid());
ArticleLibrary article = super.notNull(li.getGoodsid());
if(article == null){
throw new BaseException("此商品不存在");
}
......@@ -797,7 +797,7 @@ public class FgArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,
private void isPdf(List<FgArticleLibraryListVO> objectList){
if(ArrayUtils.isNotEmpty(objectList)){
objectList.forEach(obj -> {
ArticleLibrary ar = mapper.selectByPrimaryKey(obj.getId());
ArticleLibrary ar = super.notNull(obj.getId());
if(ar != null && StringUtils.isNotBlank(ar.getPdf())){
obj.setIsPdf(Integer.parseInt(BooleanStatusEnum.YES.getCode()));
}else{
......
......@@ -86,7 +86,7 @@ public class FgAudioLibrarySerivceImpl extends
@Override
public boolean updateGoodsSales(List<OrderInfo> list) {
list.forEach(li -> {
AudioLibrary audio = mapper.selectByPrimaryKey(li.getGoodsid());
AudioLibrary audio = super.notNull(li.getGoodsid());
if (audio == null) {
throw new BaseException("此商品不存在");
}
......@@ -170,7 +170,7 @@ public class FgAudioLibrarySerivceImpl extends
@Override
public FgAudioLibraryVO selectById(String oid,boolean isStatus) {
AudioLibrary entity = mapper.selectByPrimaryKey(oid);
AudioLibrary entity = super.notNull(oid);
FgAudioLibraryVO vo = new FgAudioLibraryVO();
if(entity == null){
// 资源更新中,敬请期待~
......@@ -339,7 +339,7 @@ public class FgAudioLibrarySerivceImpl extends
*/
@Override
public boolean updateBrowseNum(String oid){
AudioLibrary audioLibrary = mapper.selectByPrimaryKey(oid);
AudioLibrary audioLibrary = super.notNull(oid);
if(audioLibrary == null){
throw new BaseException("此图书不存在");
}
......
......@@ -133,7 +133,7 @@ public class FgAuthorLibraryServiceImpl extends BaseServiceImpl<AuthorLibrary, S
@Override
public FgAuthorLibraryOneVO authorOneInfoById(String oid){
AuthorLibrary author = authorLibraryMapper.selectByPrimaryKey(oid);
AuthorLibrary author = super.notNull(oid);
FgAuthorLibraryOneVO vo = BeanUtils.copy(author, FgAuthorLibraryOneVO.class);
// 关注数量
vo.setConcernedNum(fgMemberConllectionManage.queryAuthorCollectNum(oid));
......@@ -160,7 +160,7 @@ public class FgAuthorLibraryServiceImpl extends BaseServiceImpl<AuthorLibrary, S
*/
@Override
public boolean updateBrowseNum(String oid){
AuthorLibrary author = authorLibraryMapper.selectByPrimaryKey(oid);
AuthorLibrary author = super.notNull(oid);
if(author == null){
throw new BaseException("此文章不存在");
}
......
......@@ -86,7 +86,7 @@ public class FgCourseLibrarySerivceImpl extends
@Override
public boolean updateGoodsSales(List<OrderInfo> list) {
list.forEach(li -> {
CourseLibrary Course = mapper.selectByPrimaryKey(li.getGoodsid());
CourseLibrary Course = super.notNull(li.getGoodsid());
if (Course == null) {
throw new BaseException("此商品不存在");
}
......@@ -110,7 +110,7 @@ public class FgCourseLibrarySerivceImpl extends
*/
@Override
public boolean updateBrowseNum(String oid){
CourseLibrary CourseLibrary = mapper.selectByPrimaryKey(oid);
CourseLibrary CourseLibrary = super.notNull(oid);
if(CourseLibrary == null){
throw new BaseException("此图书不存在");
}
......@@ -151,7 +151,7 @@ public class FgCourseLibrarySerivceImpl extends
@Override
public FgCourseLibraryVO selectById(String oid, boolean isStatus){
CourseLibrary entity = mapper.selectByPrimaryKey(oid);
CourseLibrary entity = super.notNull(oid);
FgCourseLibraryVO vo = new FgCourseLibraryVO();
if(entity == null){
// 资源更新中,敬请期待~
......
......@@ -40,7 +40,7 @@ public class FgBookServiceImpl extends BaseServiceImpl<Book, String> implements
@Override
public boolean updateGoodsSales(List<OrderInfo> list){
list.forEach(li -> {
Book book = bookMapper.selectByPrimaryKey(li.getGoodsid());
Book book = super.notNull(li.getGoodsid());
if(book == null){
throw new BaseException("此商品不存在");
}
......
......@@ -143,7 +143,7 @@ public class FgImageLibrarySerivceImpl extends
@Override
public FgImageLibraryVO selectById(String oid,boolean isStatus) {
ImageLibrary entity = mapper.selectByPrimaryKey(oid);
ImageLibrary entity = this.notNull(oid);
FgImageLibraryVO vo = new FgImageLibraryVO();
if(entity == null){
// 资源更新中,敬请期待~
......@@ -330,7 +330,7 @@ public class FgImageLibrarySerivceImpl extends
*/
@Override
public boolean updateBrowseNum(String oid) {
ImageLibrary imageLibrary = mapper.selectByPrimaryKey(oid);
ImageLibrary imageLibrary = this.notNull(oid);
if (imageLibrary == null) {
throw new BaseException("此图书不存在");
}
......
......@@ -65,7 +65,7 @@ public class FgNoteServiceImpl extends BaseServiceImpl<Note, String> implements
@Override
public Integer updateNote(Note note) {
Note record = mapper.selectByPrimaryKey(note.getId());
Note record = this.notNull(note.getId());
if(record == null){
throw new BaseException("未找到笔记");
}
......
......@@ -53,7 +53,7 @@ public class FgProjectLibrarySerivceImpl extends
*/
@Override
public boolean updateBrowseNum(String oid){
ProjectLibrary ProjectLibrary = mapper.selectByPrimaryKey(oid);
ProjectLibrary ProjectLibrary = this.notNull(oid);
if(ProjectLibrary == null){
throw new BaseException("此图书不存在");
}
......
......@@ -117,7 +117,7 @@ public class FgShoppingCartServiceImpl extends BaseServiceImpl<ShoppingCart, Int
public ShoppingCartVo batchGet(List<Integer> ids) {
List<ShoppingCart> shoppingCarts= new ArrayList<ShoppingCart>();
for(Integer id : ids){
ShoppingCart shoppingCart = fgShoppingCartMapper.selectByPrimaryKey(id);
ShoppingCart shoppingCart = super.notNull(id);
if(shoppingCart != null){
shoppingCarts.add(shoppingCart);
}
......@@ -345,7 +345,7 @@ public class FgShoppingCartServiceImpl extends BaseServiceImpl<ShoppingCart, Int
@Override
public List<CreateOrderInfoForm> queryByIds(List<Integer> ids) {
List<CreateOrderInfoForm> createOrderInfoForms = ids.stream().map(id -> {
ShoppingCart shoppingCart = fgShoppingCartMapper.selectByPrimaryKey(id);
ShoppingCart shoppingCart = this.notNull(id);
CreateOrderInfoForm createOrderInfoForm = new CreateOrderInfoForm();
createOrderInfoForm.setGoodsId(shoppingCart.getGoodsId());
createOrderInfoForm.setGoodsType(shoppingCart.getGoodsType());
......@@ -381,7 +381,7 @@ public class FgShoppingCartServiceImpl extends BaseServiceImpl<ShoppingCart, Int
public Integer isContain(List<Integer> ids) {
List<ShoppingCart> shoppingCarts= new ArrayList<ShoppingCart>();
for(Integer id : ids){
ShoppingCart shoppingCart = fgShoppingCartMapper.selectByPrimaryKey(id);
ShoppingCart shoppingCart = this.notNull(id);
if(shoppingCart != null){
shoppingCarts.add(shoppingCart);
}
......
......@@ -188,7 +188,7 @@ public class FgVideoLibrarySerivceImpl extends
}*/
@Override
public FgVideoLibraryVO selectById(String oid,boolean isStatus) {
VideoLibrary entity = mapper.selectByPrimaryKey(oid);
VideoLibrary entity = this.notNull(oid);
FgVideoLibraryVO vo = new FgVideoLibraryVO();
if(entity == null){
// 资源更新中,敬请期待~
......@@ -403,7 +403,7 @@ public class FgVideoLibrarySerivceImpl extends
*/
@Override
public boolean updateBrowseNum(String oid){
VideoLibrary videoLibrary = mapper.selectByPrimaryKey(oid);
VideoLibrary videoLibrary = super.notNull(oid);
if(videoLibrary == null){
throw new BaseException("此图书不存在");
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论