调整店铺与会员关系问题
This commit is contained in:
parent
089bf02144
commit
9f63d5a164
@ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
@ -51,7 +52,7 @@ import java.util.Optional;
|
||||
public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements StoreService {
|
||||
|
||||
//店铺
|
||||
@Autowired
|
||||
@Resource
|
||||
private StoreMapper storeMapper;
|
||||
//会员
|
||||
@Autowired
|
||||
@ -178,6 +179,7 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
|
||||
//修改会员 表示已有店铺
|
||||
Member member = memberService.getById(store.getMemberId());
|
||||
member.setHaveStore(true);
|
||||
member.setStoreId(id);
|
||||
memberService.updateById(member);
|
||||
|
||||
} else {
|
||||
@ -197,6 +199,7 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
|
||||
goodsService.underStoreGoods(id);
|
||||
return this.updateById(store);
|
||||
}
|
||||
|
||||
throw new ServiceException(ResultCode.STORE_NOT_EXIST);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user